Bug 1288992 Part 2 - Rename ReflowMetrics variables to ReflowOutput. r=dholbert
authorTing-Yu Lin <tlin@mozilla.com>
Tue, 26 Jul 2016 16:33:52 +0800
changeset 348864 7e7af6bd33b898ee1d6f701f45d15f4ab557f29c
parent 348863 53d6028d2809f3041223a39c39492b6b365ea3bf
child 348865 f06109a9a08d10f8f3058096ff9adf37af329362
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1288992
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1288992 Part 2 - Rename ReflowMetrics variables to ReflowOutput. r=dholbert This patch is generated by the following scripts: function rename() { find layout\ -type f\ \( -name "*.cpp" -or\ -name "*.h" \)\ -exec sed -i -r "s/$1/$2/g" "{}" \; } rename "([[:alpha:]]*)([rR])eflowMetrics" "\1\2eflowOutput" rename "gLameReflowOutput" "gLameReflowMetrics" MozReview-Commit-ID: CBDAau50Ail
layout/generic/ReflowInput.cpp
layout/generic/nsIFrame.h
layout/mathml/nsMathMLContainerFrame.cpp
layout/mathml/nsMathMLContainerFrame.h
--- a/layout/generic/ReflowInput.cpp
+++ b/layout/generic/ReflowInput.cpp
@@ -1076,17 +1076,17 @@ struct nsHypotheticalPosition {
 static bool
 GetIntrinsicSizeFor(nsIFrame* aFrame, nsSize& aIntrinsicSize, nsIAtom* aFrameType)
 {
   // See if it is an image frame
   bool success = false;
 
   // Currently the only type of replaced frame that we can get the intrinsic
   // size for is an image frame
-  // XXX We should add back the GetReflowMetrics() function and one of the
+  // XXX We should add back the GetReflowOutput() function and one of the
   // things should be the intrinsic size...
   if (aFrameType == nsGkAtoms::imageFrame) {
     nsImageFrame* imageFrame = (nsImageFrame*)aFrame;
 
     if (NS_SUCCEEDED(imageFrame->GetIntrinsicImageSize(aIntrinsicSize))) {
       success = (aIntrinsicSize != nsSize(0, 0));
     }
   }
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -2015,17 +2015,17 @@ public:
    * Otherwise, if the frame has the NS_FRAME_HAS_DIRTY_CHILDREN bit
    * set, then it is responsible for reflowing at least those
    * children that have NS_FRAME_HAS_DIRTY_CHILDREN or NS_FRAME_IS_DIRTY
    * set.
    *
    * If a difference in available size from the previous reflow causes
    * the frame's size to change, it should reflow descendants as needed.
    *
-   * @param aReflowMetrics <i>out</i> parameter where you should return the
+   * @param aReflowOutput <i>out</i> parameter where you should return the
    *          desired size and ascent/descent info. You should include any
    *          space you want for border/padding in the desired size you return.
    *
    *          It's okay to return a desired size that exceeds the avail
    *          size if that's the smallest you can be, i.e. it's your
    *          minimum size.
    *
    *          For an incremental reflow you are responsible for invalidating
@@ -2043,17 +2043,17 @@ public:
    *          still must return an accurate desired size. If you're a container
    *          you must <b>always</b> reflow at least one frame regardless of the
    *          available space
    *
    * @param aStatus a return value indicating whether the frame is complete
    *          and whether the next-in-flow is dirty and needs to be reflowed
    */
   virtual void Reflow(nsPresContext*           aPresContext,
-                      ReflowOutput&     aReflowMetrics,
+                      ReflowOutput&     aReflowOutput,
                       const ReflowInput& aReflowInput,
                       nsReflowStatus&          aStatus) = 0;
 
   /**
    * Post-reflow hook. After a frame is reflowed this method will be called
    * informing the frame that this reflow process is complete, and telling the
    * frame the status returned by the Reflow member function.
    *
--- a/layout/mathml/nsMathMLContainerFrame.cpp
+++ b/layout/mathml/nsMathMLContainerFrame.cpp
@@ -119,47 +119,47 @@ static bool
 IsForeignChild(const nsIFrame* aFrame)
 {
   // This counts nsMathMLmathBlockFrame as a foreign child, because it
   // uses block reflow
   return !(aFrame->IsFrameOfType(nsIFrame::eMathML)) ||
     aFrame->GetType() == nsGkAtoms::blockFrame;
 }
 
-NS_DECLARE_FRAME_PROPERTY_DELETABLE(HTMLReflowMetricsProperty,
+NS_DECLARE_FRAME_PROPERTY_DELETABLE(HTMLReflowOutputProperty,
                                     ReflowOutput)
 
 /* static */ void
 nsMathMLContainerFrame::SaveReflowAndBoundingMetricsFor(nsIFrame*                  aFrame,
-                                                        const ReflowOutput& aReflowMetrics,
+                                                        const ReflowOutput& aReflowOutput,
                                                         const nsBoundingMetrics&   aBoundingMetrics)
 {
-  ReflowOutput *metrics = new ReflowOutput(aReflowMetrics);
+  ReflowOutput *metrics = new ReflowOutput(aReflowOutput);
   metrics->mBoundingMetrics = aBoundingMetrics;
-  aFrame->Properties().Set(HTMLReflowMetricsProperty(), metrics);
+  aFrame->Properties().Set(HTMLReflowOutputProperty(), metrics);
 }
 
 // helper method to facilitate getting the reflow and bounding metrics
 /* static */ void
 nsMathMLContainerFrame::GetReflowAndBoundingMetricsFor(nsIFrame*            aFrame,
-                                                       ReflowOutput& aReflowMetrics,
+                                                       ReflowOutput& aReflowOutput,
                                                        nsBoundingMetrics&   aBoundingMetrics,
                                                        eMathMLFrameType*    aMathMLFrameType)
 {
   NS_PRECONDITION(aFrame, "null arg");
 
   ReflowOutput* metrics =
-    aFrame->Properties().Get(HTMLReflowMetricsProperty());
+    aFrame->Properties().Get(HTMLReflowOutputProperty());
 
   // IMPORTANT: This function is only meant to be called in Place() methods
   // where it is assumed that SaveReflowAndBoundingMetricsFor has recorded the
   // information.
   NS_ASSERTION(metrics, "Didn't SaveReflowAndBoundingMetricsFor frame!");
   if (metrics) {
-    aReflowMetrics = *metrics;
+    aReflowOutput = *metrics;
     aBoundingMetrics = metrics->mBoundingMetrics;
   }
 
   if (aMathMLFrameType) {
     if (!IsForeignChild(aFrame)) {
       nsIMathMLFrame* mathMLFrame = do_QueryFrame(aFrame);
       if (mathMLFrame) {
         *aMathMLFrameType = mathMLFrame->GetMathMLFrameType();
@@ -172,17 +172,17 @@ nsMathMLContainerFrame::GetReflowAndBoun
 }
 
 void
 nsMathMLContainerFrame::ClearSavedChildMetrics()
 {
   nsIFrame* childFrame = mFrames.FirstChild();
   FramePropertyTable* props = PresContext()->PropertyTable();
   while (childFrame) {
-    props->Delete(childFrame, HTMLReflowMetricsProperty());
+    props->Delete(childFrame, HTMLReflowOutputProperty());
     childFrame = childFrame->GetNextSibling();
   }
 }
 
 // helper to get the preferred size that a container frame should use to fire
 // the stretch on its stretchy child frames.
 void
 nsMathMLContainerFrame::GetPreferredStretchSize(DrawTarget*          aDrawTarget,
--- a/layout/mathml/nsMathMLContainerFrame.h
+++ b/layout/mathml/nsMathMLContainerFrame.h
@@ -295,29 +295,29 @@ protected:
   // helper method to complete the post-reflow hook and ensure that embellished
   // operators don't terminate their Reflow without receiving a Stretch command.
   virtual nsresult
   FinalizeReflow(DrawTarget* aDrawTarget, ReflowOutput& aDesiredSize);
 
   // Record metrics of a child frame for recovery through the following method
   static void
   SaveReflowAndBoundingMetricsFor(nsIFrame*                  aFrame,
-                                  const ReflowOutput& aReflowMetrics,
+                                  const ReflowOutput& aReflowOutput,
                                   const nsBoundingMetrics&   aBoundingMetrics);
 
   // helper method to facilitate getting the reflow and bounding metrics of a
   // child frame.  The argument aMathMLFrameType, when non null, will return
   // the 'type' of the frame, which is used to determine the inter-frame
   // spacing.
   // IMPORTANT: This function is only meant to be called in Place() methods as
   // the information is available only when set up with the above method
   // during Reflow/Stretch() and GetPrefISize().
   static void
   GetReflowAndBoundingMetricsFor(nsIFrame*            aFrame,
-                                 ReflowOutput& aReflowMetrics,
+                                 ReflowOutput& aReflowOutput,
                                  nsBoundingMetrics&   aBoundingMetrics,
                                  eMathMLFrameType*    aMathMLFrameType = nullptr);
 
   // helper method to clear metrics saved with
   // SaveReflowAndBoundingMetricsFor() from all child frames.
   void ClearSavedChildMetrics();
 
   // helper to let the update of presentation data pass through