Changeset 118961 in webkit
- Timestamp:
- May 30, 2012 1:30:51 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r118957 r118961 1 2012-05-30 Shezan Baig <shezbaig.wk@gmail.com> 2 3 Rename offsetTopLeft in RenderBoxModelObject to something better 4 https://bugs.webkit.org/show_bug.cgi?id=85915 5 6 Reviewed by Darin Adler. 7 8 Renamed offsetTopLeft in RenderBoxModelObject to 9 adjustedPositionRelativeToOffsetParent, because it returns the given 10 startPoint after adjusting it to be relative to the top-left corner of 11 the offsetParent. The definition of offsetParent itself is non-trivial 12 and is documented within the body of RenderObject::offsetParent, 13 therefore I decided to reuse this term, as-is, in the name of this 14 function. 15 16 No new tests; no functional or visible changes. 17 18 * rendering/RenderBox.cpp: 19 (WebCore::RenderBox::offsetLeft): 20 (WebCore::RenderBox::offsetTop): 21 * rendering/RenderBoxModelObject.cpp: 22 (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent): 23 (WebCore::RenderBoxModelObject::offsetLeft): 24 (WebCore::RenderBoxModelObject::offsetTop): 25 * rendering/RenderBoxModelObject.h: 26 (RenderBoxModelObject): 27 * rendering/RenderInline.cpp: 28 (WebCore::RenderInline::offsetLeft): 29 (WebCore::RenderInline::offsetTop): 30 1 31 2012-05-29 Adrienne Walker <enne@google.com> 2 32 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r118957 r118961 3836 3836 LayoutUnit RenderBox::offsetLeft() const 3837 3837 { 3838 return offsetTopLeft(topLeftLocation()).x();3838 return adjustedPositionRelativeToOffsetParent(topLeftLocation()).x(); 3839 3839 } 3840 3840 3841 3841 LayoutUnit RenderBox::offsetTop() const 3842 3842 { 3843 return offsetTopLeft(topLeftLocation()).y();3843 return adjustedPositionRelativeToOffsetParent(topLeftLocation()).y(); 3844 3844 } 3845 3845 -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r118562 r118961 516 516 } 517 517 518 LayoutPoint RenderBoxModelObject:: offsetTopLeft(const LayoutPoint& startPoint) const518 LayoutPoint RenderBoxModelObject::adjustedPositionRelativeToOffsetParent(const LayoutPoint& startPoint) const 519 519 { 520 520 // If the element is the HTML body element or does not have an associated box … … 554 554 { 555 555 // Note that RenderInline and RenderBox override this to pass a different 556 // startPoint to offsetTopLeft.557 return offsetTopLeft(LayoutPoint()).x();556 // startPoint to adjustedPositionRelativeToOffsetParent. 557 return adjustedPositionRelativeToOffsetParent(LayoutPoint()).x(); 558 558 } 559 559 … … 561 561 { 562 562 // Note that RenderInline and RenderBox override this to pass a different 563 // startPoint to offsetTopLeft.564 return offsetTopLeft(LayoutPoint()).y();563 // startPoint to adjustedPositionRelativeToOffsetParent. 564 return adjustedPositionRelativeToOffsetParent(LayoutPoint()).y(); 565 565 } 566 566 -
trunk/Source/WebCore/rendering/RenderBoxModelObject.h
r118551 r118961 226 226 }; 227 227 228 LayoutPoint offsetTopLeft(const LayoutPoint&) const;228 LayoutPoint adjustedPositionRelativeToOffsetParent(const LayoutPoint&) const; 229 229 230 230 void calculateBackgroundImageGeometry(const FillLayer*, const LayoutRect& paintRect, BackgroundImageGeometry&); -
trunk/Source/WebCore/rendering/RenderInline.cpp
r118617 r118961 654 654 if (InlineBox* firstBox = firstLineBoxIncludingCulling()) 655 655 topLeft = flooredLayoutPoint(firstBox->topLeft()); 656 return offsetTopLeft(topLeft).x();656 return adjustedPositionRelativeToOffsetParent(topLeft).x(); 657 657 } 658 658 … … 662 662 if (InlineBox* firstBox = firstLineBoxIncludingCulling()) 663 663 topLeft = flooredLayoutPoint(firstBox->topLeft()); 664 return offsetTopLeft(topLeft).y();664 return adjustedPositionRelativeToOffsetParent(topLeft).y(); 665 665 } 666 666
Note: See TracChangeset
for help on using the changeset viewer.