Bug 1312379 part 4 - Rename GetBaseline() to BaselineBOffset(). r=me a=cbook
☠☠ backed out by cc0413f9fad3 ☠ ☠
authorMats Palmgren <mats@mozilla.com>
Thu, 22 Dec 2016 16:08:43 +0100
changeset 353179 c1e8046838571461c7bcca048ff88a96a6be0138
parent 353178 e341f4fa167cae19c0a81660f6ffae628061c519
child 353180 af6633c41d46a6183d9173cd6aa13532ed6a733b
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme, cbook
bugs1312379
milestone52.0a2
Bug 1312379 part 4 - Rename GetBaseline() to BaselineBOffset(). r=me a=cbook
layout/generic/nsBlockFrame.cpp
layout/generic/nsGridContainerFrame.cpp
layout/generic/nsIFrame.h
layout/generic/nsIFrameInlines.h
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -487,17 +487,17 @@ nsBlockFrame::InvalidateFrameWithRect(co
   }
   nsContainerFrame::InvalidateFrameWithRect(aRect, aDisplayItemKey);
 }
 
 nscoord
 nsBlockFrame::GetLogicalBaseline(WritingMode aWM) const
 {
   auto lastBaseline =
-    GetBaseline(aWM, BaselineSharingGroup::eLast, AlignmentContext::eInline);
+    BaselineBOffset(aWM, BaselineSharingGroup::eLast, AlignmentContext::eInline);
   return BSize(aWM) - lastBaseline;
 }
 
 bool
 nsBlockFrame::GetNaturalBaselineBOffset(mozilla::WritingMode aWM,
                                         BaselineSharingGroup aBaselineGroup,
                                         nscoord*             aBaseline) const
 {
--- a/layout/generic/nsGridContainerFrame.cpp
+++ b/layout/generic/nsGridContainerFrame.cpp
@@ -6718,17 +6718,17 @@ nsGridContainerFrame::SynthesizeBaseline
   nscoord size;
   if (aAxis == eLogicalAxisBlock) {
     start = child->GetLogicalNormalPosition(aCBWM, aCBPhysicalSize).B(aCBWM);
     size = child->BSize(aCBWM);
     if (grid && aGridOrderItem.mIsInEdgeTrack) {
       isOrthogonal ? grid->GetIBaseline(aGroup, &baseline) :
                      grid->GetBBaseline(aGroup, &baseline);
     } else if (!isOrthogonal && aGridOrderItem.mIsInEdgeTrack) {
-      baseline = child->GetBaseline(childWM, aGroup, AlignmentContext::eGrid);
+      baseline = child->BaselineBOffset(childWM, aGroup, AlignmentContext::eGrid);
     } else {
       baseline = ::SynthesizeBaselineFromBorderBox(aGroup, childWM, size);
     }
   } else {
     start = child->GetLogicalNormalPosition(aCBWM, aCBPhysicalSize).I(aCBWM);
     size = child->ISize(aCBWM);
     if (grid && aGridOrderItem.mIsInEdgeTrack) {
       isOrthogonal ? grid->GetBBaseline(aGroup, &baseline) :
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -1250,19 +1250,19 @@ public:
    * for the given alignment context. The returned baseline is the distance from
    * the block-axis border-box start(end) edge for aBaselineGroup eFirst(eLast).
    * @note The returned value is only valid when reflow is not needed.
    * @note You should only call this on frames with a WM that's parallel to aWM.
    * @param aWM the writing-mode of the alignment context
    * @param aBaselineOffset out-param, only valid if the method returns true
    * (implemented in nsIFrameInlines.h)
    */
-  inline nscoord GetBaseline(mozilla::WritingMode aWM,
-                             BaselineSharingGroup aBaselineGroup,
-                             AlignmentContext     aAlignmentContext) const;
+  inline nscoord BaselineBOffset(mozilla::WritingMode aWM,
+                                 BaselineSharingGroup aBaselineGroup,
+                                 AlignmentContext     aAlignmentContext) const;
 
   /**
    * XXX: this method is taking over the role that GetLogicalBaseline has.
    * Return true if the frame has a CSS2 'vertical-align' baseline.
    * If it has, then the returned baseline is the distance from the block-
    * axis border-box start edge.
    * @note This method should only be used in AlignmentContext::eInline contexts.
    * @note The returned value is only valid when reflow is not needed.
--- a/layout/generic/nsIFrameInlines.h
+++ b/layout/generic/nsIFrameInlines.h
@@ -139,19 +139,19 @@ nsIFrame::SynthesizeBaselineBOffsetFromB
   }
   MOZ_ASSERT(aGroup == BaselineSharingGroup::eLast);
   // Round up for central baseline offset, to be consistent with eFirst.
   auto borderBoxCenter = (borderBoxSize / 2) + (borderBoxSize % 2);
   return MOZ_LIKELY(aWM.IsAlphabeticalBaseline()) ? 0 : borderBoxCenter;
 }
 
 nscoord
-nsIFrame::GetBaseline(mozilla::WritingMode aWM,
-                      BaselineSharingGroup aBaselineGroup,
-                      AlignmentContext     aAlignmentContext) const
+nsIFrame::BaselineBOffset(mozilla::WritingMode aWM,
+                          BaselineSharingGroup aBaselineGroup,
+                          AlignmentContext     aAlignmentContext) const
 {
   MOZ_ASSERT(!aWM.IsOrthogonalTo(GetWritingMode()));
   nscoord baseline;
   if (GetNaturalBaselineBOffset(aWM, aBaselineGroup, &baseline)) {
     return baseline;
   }
   if (aAlignmentContext == AlignmentContext::eInline) {
     return SynthesizeBaselineBOffsetFromMarginBox(aWM, aBaselineGroup);