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
--- 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.