Chromium Code Reviews| Index: Source/core/rendering/RenderInline.cpp |
| diff --git a/Source/core/rendering/RenderInline.cpp b/Source/core/rendering/RenderInline.cpp |
| index c58194d2ad32ddc5d13a81f8f7bb621b227e9832..cf914767ca8da3f9409bf69533a0319f45f59e01 100644 |
| --- a/Source/core/rendering/RenderInline.cpp |
| +++ b/Source/core/rendering/RenderInline.cpp |
| @@ -1020,6 +1020,33 @@ LayoutRect RenderInline::linesVisualOverflowBoundingBox() const |
| return rect; |
| } |
| +LayoutRect RenderInline::absoluteClippedOverflowRect() const |
| +{ |
| + if (!continuation()) |
| + return clippedOverflowRectForPaintInvalidation(view()); |
| + |
| + FloatRect floatResult; |
| + LinesBoundingBoxGeneratorContext context(floatResult); |
| + |
| + RenderInline* endContinuation = inlineElementContinuation(); |
| + while (endContinuation->inlineElementContinuation()) |
| + endContinuation = endContinuation->inlineElementContinuation(); |
| + |
| + // Note the following algorithm is N^2 (if the continuation is N renderers and the averagae |
| + // depth of those renderers is M, we'll visit N*M nodes). We can possibly do some optimizations, |
| + // such as mapping all these rects into a common ancestor's address space then mapping the |
| + // result into the view. |
| + 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()); |
| + context(FloatRect(enclosingIntRect(rect))); |
|
leviw_travelin_and_unemployed
2015/01/20 20:19:24
If you're eventually taking the enclosingIntRect o
c.shu
2015/01/20 23:10:22
Done.
|
| + if (curr == endContinuation) |
| + return enclosingIntRect(floatResult); |
| + } |
| + } |
| + return LayoutRect(); |
| +} |
| + |
| LayoutRect RenderInline::clippedOverflowRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationState) const |
| { |
| if ((!firstLineBoxIncludingCulling() && !continuation()) || style()->visibility() != VISIBLE) |