Index: Source/core/rendering/RenderInline.cpp |
diff --git a/Source/core/rendering/RenderInline.cpp b/Source/core/rendering/RenderInline.cpp |
index 120a6f50569de2a8edefeec4c7be73f66e4a40a4..53c072903849f099e8e35e6c8e9153c4bf64e26e 100644 |
--- a/Source/core/rendering/RenderInline.cpp |
+++ b/Source/core/rendering/RenderInline.cpp |
@@ -1017,6 +1017,29 @@ LayoutRect RenderInline::linesVisualOverflowBoundingBox() const |
return rect; |
} |
+LayoutRect RenderInline::absoluteClippedOverflowRect() const |
+{ |
+ if (!continuation()) |
+ return clippedOverflowRectForPaintInvalidation(view()); |
pdr.
2014/12/02 21:56:21
It looks like clippedOverflowRectForPaintInvalidat
c.shu
2014/12/02 22:16:31
The continuation code in clippedOverflowRectForPai
pdr.
2014/12/03 22:11:17
Can you help me understand why we wouldn't want to
c.shu
2014/12/03 22:27:27
It's not that we wouldn't want to include outlines
|
+ |
+ FloatRect floatResult; |
+ LinesBoundingBoxGeneratorContext context(floatResult); |
+ |
+ RenderInline* endContinuation = inlineElementContinuation(); |
+ while (endContinuation->inlineElementContinuation()) { |
leviw_travelin_and_unemployed
2014/12/09 20:39:56
Nit: no braces needed.
c.shu
2014/12/10 02:40:51
Acknowledged.
|
+ endContinuation = endContinuation->inlineElementContinuation(); |
+ } |
+ for (RenderBlock* currBlock = containingBlock(); currBlock && currBlock->isAnonymousBlock(); currBlock = toRenderBlock(currBlock->nextSibling())) { |
+ for (RenderObject* curr = currBlock->firstChild(); curr; curr = curr->nextSibling()) { |
+ LayoutRect rect = curr->clippedOverflowRectForPaintInvalidation(view()); |
leviw_travelin_and_unemployed
2014/12/09 20:39:56
This is N^2 since we'll walk up to the view for ev
c.shu
2014/12/10 02:40:51
thanks for pointing out this performance issue. I
|
+ context(FloatRect(enclosingIntRect(rect))); |
+ if (curr == endContinuation) |
+ return enclosingIntRect(floatResult); |
+ } |
+ } |
+ return LayoutRect(); |
+} |
+ |
LayoutRect RenderInline::clippedOverflowRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationState) const |
{ |
if ((!firstLineBoxIncludingCulling() && !continuation()) || style()->visibility() != VISIBLE) |