Bug 1277129 Part 1b - Rename nsHTMLReflowState.h/cpp to ReflowInput.h/cpp and fix #includes. draft
authorTing-Yu Lin <tlin@mozilla.com>
Thu, 21 Jul 2016 12:58:24 +0800
changeset 390442 18d4f3e773d68802d61feff978d9e1d6207e13d1
parent 390441 35def22ecab06df6e919fb19603cb4f5fa63974a
child 390443 3f3bb29ad96b2f6669631e3ca8caf107dd270133
push id23670
push usertlin@mozilla.com
push dateThu, 21 Jul 2016 05:05:21 +0000
bugs1277129
milestone50.0a1
Bug 1277129 Part 1b - Rename nsHTMLReflowState.h/cpp to ReflowInput.h/cpp and fix #includes. The #includes are fixed by the following script: function rename() { find .\ -type f\ ! -path "./obj*"\ ! -path "./.git"\ ! -path "./.hg"\ \( -name "*.cpp" -or\ -name "*.h" \)\ -exec sed -i -e "s/$1/$2/g" "{}" \; } rename "nsHTMLReflowState\.h" "mozilla\/ReflowInput\.h" MozReview-Commit-ID: KUDcI5eYwym
dom/xul/nsXULPopupListener.cpp
embedding/browser/nsDocShellTreeOwner.cpp
layout/base/nsDocumentViewer.cpp
layout/generic/ReflowInput.cpp
layout/generic/ReflowInput.h
layout/generic/moz.build
layout/generic/nsAbsoluteContainingBlock.cpp
layout/generic/nsBlockReflowContext.h
layout/generic/nsBlockReflowState.h
layout/generic/nsFloatManager.cpp
layout/generic/nsFontInflationData.cpp
layout/generic/nsFrame.h
layout/generic/nsHTMLReflowMetrics.cpp
layout/generic/nsHTMLReflowState.cpp
layout/generic/nsHTMLReflowState.h
layout/printing/nsPrintEngine.cpp
layout/style/nsComputedDOMStyle.cpp
layout/xul/grid/nsGrid.cpp
layout/xul/grid/nsGridLayout2.cpp
layout/xul/grid/nsGridRowGroupLayout.cpp
--- a/dom/xul/nsXULPopupListener.cpp
+++ b/dom/xul/nsXULPopupListener.cpp
@@ -22,17 +22,17 @@
 #include "nsIScriptContext.h"
 #include "nsIDOMWindow.h"
 #include "nsIDOMXULDocument.h"
 #include "nsIDocument.h"
 #include "nsServiceManagerUtils.h"
 #include "nsIPrincipal.h"
 #include "nsIScriptSecurityManager.h"
 #include "nsLayoutUtils.h"
-#include "nsHTMLReflowState.h"
+#include "mozilla/ReflowInput.h"
 #include "nsIObjectLoadingContent.h"
 #include "mozilla/EventStateManager.h"
 #include "mozilla/EventStates.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/dom/Event.h" // for nsIDOMEvent::InternalDOMEvent()
 #include "mozilla/dom/EventTarget.h"
 #include "mozilla/dom/FragmentOrElement.h"
 
--- a/embedding/browser/nsDocShellTreeOwner.cpp
+++ b/embedding/browser/nsDocShellTreeOwner.cpp
@@ -6,17 +6,17 @@
 
 // Local Includes
 #include "nsDocShellTreeOwner.h"
 #include "nsWebBrowser.h"
 
 // Helper Classes
 #include "nsStyleCoord.h"
 #include "nsSize.h"
-#include "nsHTMLReflowState.h"
+#include "mozilla/ReflowInput.h"
 #include "nsIServiceManager.h"
 #include "nsComponentManagerUtils.h"
 #include "nsXPIDLString.h"
 #include "nsIAtom.h"
 #include "nsReadableUtils.h"
 #include "nsUnicharUtils.h"
 #include "nsISimpleEnumerator.h"
 #include "mozilla/LookAndFeel.h"
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -55,17 +55,17 @@
 #include "mozilla/CSSStyleSheet.h"
 #include "mozilla/css/Loader.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsDocShell.h"
 #include "nsIBaseWindow.h"
 #include "nsILayoutHistoryState.h"
 #include "nsCharsetSource.h"
-#include "nsHTMLReflowState.h"
+#include "mozilla/ReflowInput.h"
 #include "nsIImageLoadingContent.h"
 #include "nsCopySupport.h"
 #include "nsIDOMHTMLFrameSetElement.h"
 #include "nsIDOMHTMLImageElement.h"
 #ifdef MOZ_XUL
 #include "nsIXULDocument.h"
 #include "nsXULPopupManager.h"
 #endif
rename from layout/generic/nsHTMLReflowState.cpp
rename to layout/generic/ReflowInput.cpp
--- a/layout/generic/nsHTMLReflowState.cpp
+++ b/layout/generic/ReflowInput.cpp
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* struct containing the input to nsIFrame::Reflow */
 
-#include "nsHTMLReflowState.h"
+#include "mozilla/ReflowInput.h"
 
 #include "LayoutLogging.h"
 #include "nsStyleConsts.h"
 #include "nsCSSAnonBoxes.h"
 #include "nsFrame.h"
 #include "nsIContent.h"
 #include "nsGkAtoms.h"
 #include "nsPresContext.h"
rename from layout/generic/nsHTMLReflowState.h
rename to layout/generic/ReflowInput.h
--- a/layout/generic/moz.build
+++ b/layout/generic/moz.build
@@ -68,17 +68,16 @@ EXPORTS += [
     'nsFrame.h',
     'nsFrameIdList.h',
     'nsFrameList.h',
     'nsFrameSelection.h',
     'nsFrameState.h',
     'nsFrameStateBits.h',
     'nsHTMLParts.h',
     'nsHTMLReflowMetrics.h',
-    'nsHTMLReflowState.h',
     'nsIAnonymousContentCreator.h',
     'nsIFrame.h',
     'nsIFrameInlines.h',
     'nsIFrameUtil.h',
     'nsILineIterator.h',
     'nsIObjectFrame.h',
     'nsIPageSequenceFrame.h',
     'nsIScrollableFrame.h',
@@ -97,16 +96,17 @@ EXPORTS += [
     'RubyUtils.h',
     'ScrollbarActivity.h',
     'ScrollSnap.h',
     'Visibility.h',
     'VisibilityIPC.h',
 ]
 
 EXPORTS.mozilla += [
+    'ReflowInput.h',
     'WritingModes.h',
 ]
 
 EXPORTS.mozilla.dom += [
     'Selection.h',
 ]
 
 EXPORTS.mozilla.layout += [
@@ -136,17 +136,16 @@ UNIFIED_SOURCES += [
     'nsFrameList.cpp',
     'nsFrameSetFrame.cpp',
     'nsFrameState.cpp',
     'nsFrameUtil.cpp',
     'nsGfxScrollFrame.cpp',
     'nsGridContainerFrame.cpp',
     'nsHTMLCanvasFrame.cpp',
     'nsHTMLReflowMetrics.cpp',
-    'nsHTMLReflowState.cpp',
     'nsImageFrame.cpp',
     'nsImageMap.cpp',
     'nsInlineFrame.cpp',
     'nsIntervalSet.cpp',
     'nsLeafFrame.cpp',
     'nsLineBox.cpp',
     'nsPageContentFrame.cpp',
     'nsPageFrame.cpp',
@@ -161,16 +160,17 @@ UNIFIED_SOURCES += [
     'nsSimplePageSequenceFrame.cpp',
     'nsSplittableFrame.cpp',
     'nsSubDocumentFrame.cpp',
     'nsTextFrame.cpp',
     'nsTextFrameUtils.cpp',
     'nsTextRunTransformations.cpp',
     'nsVideoFrame.cpp',
     'nsViewportFrame.cpp',
+    'ReflowInput.cpp',
     'RubyUtils.cpp',
     'ScrollbarActivity.cpp',
     'ScrollSnap.cpp',
     'ScrollVelocityQueue.cpp',
     'StickyScrollContainer.cpp',
     'TextOverflow.cpp',
 ]
 
--- a/layout/generic/nsAbsoluteContainingBlock.cpp
+++ b/layout/generic/nsAbsoluteContainingBlock.cpp
@@ -8,17 +8,17 @@
  * object that is a containing block for them
  */
 
 #include "nsAbsoluteContainingBlock.h"
 
 #include "nsContainerFrame.h"
 #include "nsGkAtoms.h"
 #include "nsIPresShell.h"
-#include "nsHTMLReflowState.h"
+#include "mozilla/ReflowInput.h"
 #include "nsPresContext.h"
 #include "nsCSSFrameConstructor.h"
 #include "nsGridContainerFrame.h"
 
 #include "mozilla/Snprintf.h"
 
 #ifdef DEBUG
 #include "nsBlockFrame.h"
--- a/layout/generic/nsBlockReflowContext.h
+++ b/layout/generic/nsBlockReflowContext.h
@@ -15,16 +15,18 @@
 class nsBlockReflowState;
 class nsLineBox;
 class nsPresContext;
 
 /**
  * An encapsulation of the state and algorithm for reflowing block frames.
  */
 class nsBlockReflowContext {
+  using nsHTMLReflowState = mozilla::nsHTMLReflowState;
+
 public:
   nsBlockReflowContext(nsPresContext* aPresContext,
                        const nsHTMLReflowState& aParentRS);
   ~nsBlockReflowContext() { }
 
   void ReflowBlock(const mozilla::LogicalRect& aSpace,
                    bool                        aApplyBStartMargin,
                    nsCollapsingMargin&         aPrevMargin,
--- a/layout/generic/nsBlockReflowState.h
+++ b/layout/generic/nsBlockReflowState.h
@@ -5,17 +5,17 @@
 
 /* state used in reflow of block frames */
 
 #ifndef nsBlockReflowState_h__
 #define nsBlockReflowState_h__
 
 #include "nsFloatManager.h"
 #include "nsLineBox.h"
-#include "nsHTMLReflowState.h"
+#include "mozilla/ReflowInput.h"
 
 class nsBlockFrame;
 class nsFrameList;
 class nsOverflowContinuationTracker;
 
 // Block reflow state flags.
 //
 // BRS_UNCONSTRAINEDBSIZE is set in the nsBlockReflowState constructor when the
--- a/layout/generic/nsFloatManager.cpp
+++ b/layout/generic/nsFloatManager.cpp
@@ -3,17 +3,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* class that manages rules for positioning floats */
 
 #include "nsFloatManager.h"
 #include "nsIPresShell.h"
 #include "nsMemory.h"
-#include "nsHTMLReflowState.h"
+#include "mozilla/ReflowInput.h"
 #include "nsBlockDebugFlags.h"
 #include "nsError.h"
 #include <algorithm>
 
 using namespace mozilla;
 
 int32_t nsFloatManager::sCachedFloatManagerCount = 0;
 void* nsFloatManager::sCachedFloatManagers[NS_FLOAT_MANAGER_CACHE_SIZE];
--- a/layout/generic/nsFontInflationData.cpp
+++ b/layout/generic/nsFontInflationData.cpp
@@ -5,17 +5,17 @@
 
 /* Per-block-formatting-context manager of font size inflation for pan and zoom UI. */
 
 #include "nsFontInflationData.h"
 #include "FramePropertyTable.h"
 #include "nsTextControlFrame.h"
 #include "nsListControlFrame.h"
 #include "nsComboboxControlFrame.h"
-#include "nsHTMLReflowState.h"
+#include "mozilla/ReflowInput.h"
 #include "nsTextFrameUtils.h"
 
 using namespace mozilla;
 using namespace mozilla::layout;
 
 NS_DECLARE_FRAME_PROPERTY_DELETABLE(FontInflationDataProperty,
                                     nsFontInflationData)
 
--- a/layout/generic/nsFrame.h
+++ b/layout/generic/nsFrame.h
@@ -10,17 +10,17 @@
 
 #include "mozilla/Attributes.h"
 #include "mozilla/EventForwards.h"
 #include "mozilla/Likely.h"
 #include "nsBox.h"
 #include "mozilla/Logging.h"
 
 #include "nsIPresShell.h"
-#include "nsHTMLReflowState.h"
+#include "mozilla/ReflowInput.h"
 #include "nsHTMLParts.h"
 #include "nsISelectionDisplay.h"
 
 /**
  * nsFrame logging constants. We redefine the nspr
  * PRLogModuleInfo.level field to be a bitfield.  Each bit controls a
  * specific type of logging. Each logging operation has associated
  * inline methods defined below.
--- a/layout/generic/nsHTMLReflowMetrics.cpp
+++ b/layout/generic/nsHTMLReflowMetrics.cpp
@@ -1,17 +1,17 @@
 /* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* struct containing the output from nsIFrame::Reflow */
 
 #include "nsHTMLReflowMetrics.h"
-#include "nsHTMLReflowState.h"
+#include "mozilla/ReflowInput.h"
 
 void
 nsOverflowAreas::UnionWith(const nsOverflowAreas& aOther)
 {
   // FIXME: We should probably change scrollable overflow to use
   // UnionRectIncludeEmpty (but leave visual overflow using UnionRect).
   NS_FOR_FRAME_OVERFLOW_TYPES(otype) {
     mRects[otype].UnionRect(mRects[otype], aOther.mRects[otype]);
--- a/layout/printing/nsPrintEngine.cpp
+++ b/layout/printing/nsPrintEngine.cpp
@@ -103,17 +103,17 @@ static const char kPrintingPromptService
 #include "nsIContentViewerFile.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIDocShellTreeOwner.h"
 #include "nsIWebBrowserChrome.h"
 #include "nsIBaseWindow.h"
 #include "nsILayoutHistoryState.h"
 #include "nsFrameManager.h"
-#include "nsHTMLReflowState.h"
+#include "mozilla/ReflowInput.h"
 #include "nsIDOMHTMLAnchorElement.h"
 #include "nsIDOMHTMLAreaElement.h"
 #include "nsIDOMHTMLLinkElement.h"
 #include "nsIDOMHTMLImageElement.h"
 #include "nsIContentViewerContainer.h"
 #include "nsIContentViewer.h"
 #include "nsIDocumentViewerPrint.h"
 
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -22,17 +22,17 @@
 #include "nsIContent.h"
 
 #include "nsDOMCSSRect.h"
 #include "nsDOMCSSRGBColor.h"
 #include "nsDOMCSSValueList.h"
 #include "nsFlexContainerFrame.h"
 #include "nsGridContainerFrame.h"
 #include "nsGkAtoms.h"
-#include "nsHTMLReflowState.h"
+#include "mozilla/ReflowInput.h"
 #include "nsStyleUtil.h"
 #include "nsStyleStructInlines.h"
 #include "nsROCSSPrimitiveValue.h"
 
 #include "nsPresContext.h"
 #include "nsIDocument.h"
 
 #include "nsCSSPseudoElements.h"
--- a/layout/xul/grid/nsGrid.cpp
+++ b/layout/xul/grid/nsGrid.cpp
@@ -13,17 +13,17 @@
 #include "nsGrid.h"
 #include "nsGridRowGroupLayout.h"
 #include "nsBox.h"
 #include "nsIScrollableFrame.h"
 #include "nsSprocketLayout.h"
 #include "nsGridLayout2.h"
 #include "nsGridRow.h"
 #include "nsGridCell.h"
-#include "nsHTMLReflowState.h"
+#include "mozilla/ReflowInput.h"
 
 /*
 The grid control expands the idea of boxes from 1 dimension to 2 dimensions. 
 It works by allowing the XUL to define a collection of rows and columns and then 
 stacking them on top of each other. Here is and example.
 
 Example 1:
 
--- a/layout/xul/grid/nsGridLayout2.cpp
+++ b/layout/xul/grid/nsGridLayout2.cpp
@@ -11,17 +11,17 @@
 //
 
 #include "nsGridLayout2.h"
 #include "nsGridRowGroupLayout.h"
 #include "nsGridRow.h"
 #include "nsBox.h"
 #include "nsIScrollableFrame.h"
 #include "nsSprocketLayout.h"
-#include "nsHTMLReflowState.h"
+#include "mozilla/ReflowInput.h"
 
 nsresult
 NS_NewGridLayout2( nsIPresShell* aPresShell, nsBoxLayout** aNewLayout)
 {
   *aNewLayout = new nsGridLayout2(aPresShell);
   NS_IF_ADDREF(*aNewLayout);
 
   return NS_OK;
--- a/layout/xul/grid/nsGridRowGroupLayout.cpp
+++ b/layout/xul/grid/nsGridRowGroupLayout.cpp
@@ -17,17 +17,17 @@
 
 #include "nsGridRowGroupLayout.h"
 #include "nsCOMPtr.h"
 #include "nsIScrollableFrame.h"
 #include "nsBox.h"
 #include "nsBoxLayoutState.h"
 #include "nsGridLayout2.h"
 #include "nsGridRow.h"
-#include "nsHTMLReflowState.h"
+#include "mozilla/ReflowInput.h"
 
 already_AddRefed<nsBoxLayout> NS_NewGridRowGroupLayout()
 {
   RefPtr<nsBoxLayout> layout = new nsGridRowGroupLayout();
   return layout.forget();
 } 
 
 nsGridRowGroupLayout::nsGridRowGroupLayout():nsGridRowLayout(), mRowCount(0)