Changeset 117497 in webkit
- Timestamp:
- May 17, 2012 2:31:10 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r117494 r117497 1 2012-05-17 Julien Chaffraix <jchaffraix@webkit.org> 2 3 Kill RenderLayer::relativePositionOffset(LayoutUnit& relX, LayoutUnit& relY) and cleanup RenderInline::clippedOverflowRectForRepaint 4 https://bugs.webkit.org/show_bug.cgi?id=86551 5 6 Reviewed by Abhishek Arya. 7 8 No test since there is no expected change in behavior. 9 10 * rendering/RenderInline.cpp: 11 (WebCore::RenderInline::clippedOverflowRectForRepaint): 12 Changed the function to use LayoutRect arithmetics instead of calculating 13 top / left manually. While at it, improved the naming, removed some local 14 variables and removed an unneeded style() NULL-check. 15 16 * rendering/RenderLayer.h: Removed the function. 17 1 18 2012-05-17 Rob Buis <rwlbuis@webkit.org> 2 19 -
trunk/Source/WebCore/rendering/RenderInline.cpp
r116718 r117497 933 933 return LayoutRect(); 934 934 935 // Find our leftmost position. 936 LayoutRect boundingBox(linesVisualOverflowBoundingBox()); 937 LayoutUnit left = boundingBox.x(); 938 LayoutUnit top = boundingBox.y(); 939 940 // Now invalidate a rectangle. 941 LayoutUnit ow = style() ? style()->outlineSize() : 0; 942 935 LayoutRect repaintRect(linesVisualOverflowBoundingBox()); 943 936 bool hitRepaintContainer = false; 944 937 … … 953 946 } 954 947 if (inlineFlow->style()->position() == RelativePosition && inlineFlow->hasLayer()) 955 toRenderInline(inlineFlow)->layer()->relativePositionOffset(left, top); 956 } 957 958 LayoutRect r(-ow + left, -ow + top, boundingBox.width() + ow * 2, boundingBox.height() + ow * 2); 948 repaintRect.move(toRenderInline(inlineFlow)->layer()->relativePositionOffset()); 949 } 950 951 LayoutUnit outlineSize = style()->outlineSize(); 952 repaintRect.inflate(outlineSize); 959 953 960 954 if (hitRepaintContainer || !cb) 961 return r ;955 return repaintRect; 962 956 963 957 if (cb->hasColumns()) 964 cb->adjustRectForColumns(r );958 cb->adjustRectForColumns(repaintRect); 965 959 966 960 if (cb->hasOverflowClip()) { … … 968 962 // layer's size instead. Even if the layer's size is wrong, the layer itself will repaint 969 963 // anyway if its size does change. 970 LayoutRect repaintRect(r);971 964 repaintRect.move(-cb->scrolledContentOffset()); // For overflow:auto/scroll/hidden. 972 965 973 966 LayoutRect boxRect(LayoutPoint(), cb->cachedSizeForOverflowClip()); 974 r = intersection(repaintRect,boxRect);975 } 976 977 cb->computeRectForRepaint(repaintContainer, r );978 979 if (o w) {967 repaintRect.intersect(boxRect); 968 } 969 970 cb->computeRectForRepaint(repaintContainer, repaintRect); 971 972 if (outlineSize) { 980 973 for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) { 981 if (!curr->isText()) { 982 LayoutRect childRect = curr->rectWithOutlineForRepaint(repaintContainer, ow); 983 r.unite(childRect); 984 } 985 } 986 987 if (continuation() && !continuation()->isInline() && continuation()->parent()) { 988 LayoutRect contRect = continuation()->rectWithOutlineForRepaint(repaintContainer, ow); 989 r.unite(contRect); 990 } 991 } 992 993 return r; 974 if (!curr->isText()) 975 repaintRect.unite(curr->rectWithOutlineForRepaint(repaintContainer, outlineSize)); 976 } 977 978 if (continuation() && !continuation()->isInline() && continuation()->parent()) 979 repaintRect.unite(continuation()->rectWithOutlineForRepaint(repaintContainer, outlineSize)); 980 } 981 982 return repaintRect; 994 983 } 995 984 -
trunk/Source/WebCore/rendering/RenderLayer.h
r117162 r117497 370 370 void updateTransform(); 371 371 372 void relativePositionOffset(LayoutUnit& relX, LayoutUnit& relY) const { relX += m_relativeOffset.width(); relY += m_relativeOffset.height(); }373 372 const LayoutSize& relativePositionOffset() const { return m_relativeOffset; } 374 373
Note: See TracChangeset
for help on using the changeset viewer.