Bug 1432341 - Simplify by using GetContentRectRelativeToSelf. r?mattwoodrow draft
authorL. David Baron <dbaron@dbaron.org>
Sat, 27 Jan 2018 09:28:04 -0800
changeset 748038 e84667d60d2643805e12b20c0a2724b178ec57af
parent 747859 6190b1e65676010bc61ca612b14198992aa27f5a
child 748039 58a4c0c23a0e7fe5f996a9f8c5cc437d7fa1ccf1
push id97054
push userdbaron@mozilla.com
push dateSat, 27 Jan 2018 17:29:55 +0000
reviewersmattwoodrow
bugs1432341
milestone60.0a1
Bug 1432341 - Simplify by using GetContentRectRelativeToSelf. r?mattwoodrow This is just cleanup in advance of the patch to fix this bug. MozReview-Commit-ID: 1pzauGix51m
layout/generic/nsColumnSetFrame.cpp
--- a/layout/generic/nsColumnSetFrame.cpp
+++ b/layout/generic/nsColumnSetFrame.cpp
@@ -162,19 +162,17 @@ nsColumnSetFrame::ForEachColumn(const st
   nscoord ruleWidth = colStyle->GetComputedColumnRuleWidth();
   if (!ruleWidth)
     return;
 
   WritingMode wm = GetWritingMode();
   bool isVertical = wm.IsVertical();
   bool isRTL = !wm.IsBidiLTR();
 
-  // Get our content rect as an absolute coordinate, not relative to
-  // our parent (which is what the X and Y normally is)
-  nsRect contentRect = GetContentRect() - GetRect().TopLeft() + aPt;
+  nsRect contentRect = GetContentRectRelativeToSelf() + aPt;
   nsSize ruleSize = isVertical ? nsSize(contentRect.width, ruleWidth)
                                : nsSize(ruleWidth, contentRect.height);
 
   while (nextSibling) {
     // The frame tree goes RTL in RTL.
     // The |prevFrame| and |nextFrame| frames here are the visually preceding
     // (left/above) and following (right/below) frames, not in logical writing-
     // mode direction.