Bug 1277129 Part 5b - Rename nsHTMLReflowMetrics.h/cpp to ReflowOutput.h/cpp and fix #includes. draft
authorTing-Yu Lin <tlin@mozilla.com>
Thu, 21 Jul 2016 12:58:28 +0800
changeset 390453 8fe068518bf4f95867e18826101320ce8f1d5f2c
parent 390452 112a5ac659ba84ea51dc5541c11a44ece4accf7c
child 390454 cda9271d3637029eb56ccd337e9ddeee08037c68
push id23670
push usertlin@mozilla.com
push dateThu, 21 Jul 2016 05:05:21 +0000
bugs1277129
milestone50.0a1
Bug 1277129 Part 5b - Rename nsHTMLReflowMetrics.h/cpp to ReflowOutput.h/cpp and fix #includes. The modification to nsAbsoluteContainingBlock.h and nsBlockFrame.cpp are needed to fix the build error due to the file order changed in the unified build. 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 "nsHTMLReflowMetrics\.h" "mozilla\/ReflowOutput\.h" MozReview-Commit-ID: 1N8HcekhIXb
layout/base/nsLayoutUtils.h
layout/generic/ReflowOutput.cpp
layout/generic/ReflowOutput.h
layout/generic/moz.build
layout/generic/nsAbsoluteContainingBlock.h
layout/generic/nsBlockFrame.cpp
layout/generic/nsBlockReflowContext.h
layout/generic/nsHTMLReflowMetrics.cpp
layout/generic/nsHTMLReflowMetrics.h
layout/generic/nsIFrame.h
--- a/layout/base/nsLayoutUtils.h
+++ b/layout/base/nsLayoutUtils.h
@@ -22,17 +22,17 @@
 #include "nsStyleCoord.h"
 #include "nsStyleConsts.h"
 #include "nsGkAtoms.h"
 #include "nsRuleNode.h"
 #include "imgIContainer.h"
 #include "mozilla/gfx/2D.h"
 #include "Units.h"
 #include "mozilla/ToString.h"
-#include "nsHTMLReflowMetrics.h"
+#include "mozilla/ReflowOutput.h"
 #include "ImageContainer.h"
 #include "gfx2DGlue.h"
 
 #include <limits>
 #include <algorithm>
 
 class nsPresContext;
 class nsIContent;
rename from layout/generic/nsHTMLReflowMetrics.cpp
rename to layout/generic/ReflowOutput.cpp
--- a/layout/generic/nsHTMLReflowMetrics.cpp
+++ b/layout/generic/ReflowOutput.cpp
@@ -1,16 +1,16 @@
 /* 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 "mozilla/ReflowOutput.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) {
rename from layout/generic/nsHTMLReflowMetrics.h
rename to layout/generic/ReflowOutput.h
--- a/layout/generic/moz.build
+++ b/layout/generic/moz.build
@@ -67,17 +67,16 @@ EXPORTS += [
     'nsDirection.h',
     'nsFrame.h',
     'nsFrameIdList.h',
     'nsFrameList.h',
     'nsFrameSelection.h',
     'nsFrameState.h',
     'nsFrameStateBits.h',
     'nsHTMLParts.h',
-    'nsHTMLReflowMetrics.h',
     'nsIAnonymousContentCreator.h',
     'nsIFrame.h',
     'nsIFrameInlines.h',
     'nsIFrameUtil.h',
     'nsILineIterator.h',
     'nsIObjectFrame.h',
     'nsIPageSequenceFrame.h',
     'nsIScrollableFrame.h',
@@ -98,16 +97,17 @@ EXPORTS += [
     'ScrollSnap.h',
     'Visibility.h',
     'VisibilityIPC.h',
 ]
 
 EXPORTS.mozilla += [
     'BlockReflowInput.h',
     'ReflowInput.h',
+    'ReflowOutput.h',
     'WritingModes.h',
 ]
 
 EXPORTS.mozilla.dom += [
     'Selection.h',
 ]
 
 EXPORTS.mozilla.layout += [
@@ -136,17 +136,16 @@ UNIFIED_SOURCES += [
     'nsFrame.cpp',
     'nsFrameList.cpp',
     'nsFrameSetFrame.cpp',
     'nsFrameState.cpp',
     'nsFrameUtil.cpp',
     'nsGfxScrollFrame.cpp',
     'nsGridContainerFrame.cpp',
     'nsHTMLCanvasFrame.cpp',
-    'nsHTMLReflowMetrics.cpp',
     'nsImageFrame.cpp',
     'nsImageMap.cpp',
     'nsInlineFrame.cpp',
     'nsIntervalSet.cpp',
     'nsLeafFrame.cpp',
     'nsLineBox.cpp',
     'nsPageContentFrame.cpp',
     'nsPageFrame.cpp',
@@ -162,16 +161,17 @@ UNIFIED_SOURCES += [
     'nsSplittableFrame.cpp',
     'nsSubDocumentFrame.cpp',
     'nsTextFrame.cpp',
     'nsTextFrameUtils.cpp',
     'nsTextRunTransformations.cpp',
     'nsVideoFrame.cpp',
     'nsViewportFrame.cpp',
     'ReflowInput.cpp',
+    'ReflowOutput.cpp',
     'RubyUtils.cpp',
     'ScrollbarActivity.cpp',
     'ScrollSnap.cpp',
     'ScrollVelocityQueue.cpp',
     'StickyScrollContainer.cpp',
     'TextOverflow.cpp',
 ]
 
--- a/layout/generic/nsAbsoluteContainingBlock.h
+++ b/layout/generic/nsAbsoluteContainingBlock.h
@@ -28,16 +28,18 @@ class nsPresContext;
  * There is no principal child list, just a named child list which contains
  * the absolutely positioned frames (kAbsoluteList or kFixedList).
  *
  * All functions include as the first argument the frame that is delegating
  * the request.
  */
 class nsAbsoluteContainingBlock
 {
+  using ReflowInput = mozilla::ReflowInput;
+
 public:
   typedef nsIFrame::ChildListID ChildListID;
 
   explicit nsAbsoluteContainingBlock(ChildListID aChildListID)
 #ifdef DEBUG
     : mChildListID(aChildListID)
 #endif
   {
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -60,16 +60,17 @@
 #include "nsBidiPresUtils.h"
 
 static const int MIN_LINES_NEEDING_CURSOR = 20;
 
 static const char16_t kDiscCharacter = 0x2022;
 
 using namespace mozilla;
 using namespace mozilla::css;
+using namespace mozilla::dom;
 using namespace mozilla::layout;
 typedef nsAbsoluteContainingBlock::AbsPosReflowFlags AbsPosReflowFlags;
 
 static void MarkAllDescendantLinesDirty(nsBlockFrame* aBlock)
 {
   nsLineList::iterator line = aBlock->begin_lines();
   nsLineList::iterator endLine = aBlock->end_lines();
   while (line != endLine) {
--- a/layout/generic/nsBlockReflowContext.h
+++ b/layout/generic/nsBlockReflowContext.h
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* class that a parent frame uses to reflow a block frame */
 
 #ifndef nsBlockReflowContext_h___
 #define nsBlockReflowContext_h___
 
 #include "nsIFrame.h"
-#include "nsHTMLReflowMetrics.h"
+#include "mozilla/ReflowOutput.h"
 
 class nsLineBox;
 class nsPresContext;
 namespace mozilla {
 class BlockReflowInput;
 } // namespace mozilla
 
 /**
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -26,17 +26,17 @@
 #include "CaretAssociationHint.h"
 #include "FramePropertyTable.h"
 #include "mozilla/layout/FrameChildList.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/WritingModes.h"
 #include "nsDirection.h"
 #include "nsFrameList.h"
 #include "nsFrameState.h"
-#include "nsHTMLReflowMetrics.h"
+#include "mozilla/ReflowOutput.h"
 #include "nsITheme.h"
 #include "nsLayoutUtils.h"
 #include "nsQueryFrame.h"
 #include "nsStringGlue.h"
 #include "nsStyleContext.h"
 #include "nsStyleStruct.h"
 #include "Visibility.h"