Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: Source/core/rendering/RenderInline.cpp

Issue 767283005: Take continuation into consideration when calculating absoluteClippedOverflowRect. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address review comments and rebaseline Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/spatial-navigation/snav-div-in-anchor-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderInline.cpp
diff --git a/Source/core/rendering/RenderInline.cpp b/Source/core/rendering/RenderInline.cpp
index 40e065671d2d0adeae9efc9c1f936be6532c9675..01bde6431c7acf4d77b64c0ccfa1e255212e220f 100644
--- a/Source/core/rendering/RenderInline.cpp
+++ b/Source/core/rendering/RenderInline.cpp
@@ -1024,7 +1024,25 @@ LayoutRect RenderInline::linesVisualOverflowBoundingBox() const
LayoutRect RenderInline::absoluteClippedOverflowRect() const
{
- return clippedOverflowRect(view());
+ if (!continuation())
+ return clippedOverflowRect(view());
+
+ FloatRect floatResult;
+ LinesBoundingBoxGeneratorContext context(floatResult);
+
+ RenderInline* endContinuation = inlineElementContinuation();
+ while (endContinuation->inlineElementContinuation())
+ 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());
+ context(rect);
+ if (curr == endContinuation)
+ return enclosingIntRect(floatResult);
+ }
+ }
+ return LayoutRect();
}
LayoutRect RenderInline::clippedOverflowRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationState) const
« no previous file with comments | « LayoutTests/fast/spatial-navigation/snav-div-in-anchor-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698