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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBlock.cpp

Issue 2794663002: Fix inline outline in a corner case (Closed)
Patch Set: - Created 3 years, 9 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 | « third_party/WebKit/LayoutTests/fast/inline/inline-focus-ring-under-absolute-enclosing-relative-div-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutBlock.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
index fe8b13e07a1f7f0457d5c36469f1505eb5c51ac6..2e17b0e4a24eacad4fddb42857eb05eb1edc2e0b 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
@@ -476,10 +476,7 @@ DISABLE_CFI_PERF
void LayoutBlock::computeOverflow(LayoutUnit oldClientAfterEdge, bool) {
m_overflow.reset();
- // Add overflow from children.
addOverflowFromChildren();
-
- // Add in the overflow from positioned objects.
addOverflowFromPositionedObjects();
if (hasOverflowClip()) {
@@ -517,8 +514,19 @@ void LayoutBlock::computeOverflow(LayoutUnit oldClientAfterEdge, bool) {
void LayoutBlock::addOverflowFromBlockChildren() {
for (LayoutBox* child = firstChildBox(); child;
child = child->nextSiblingBox()) {
- if (!child->isFloatingOrOutOfFlowPositioned() && !child->isColumnSpanAll())
- addOverflowFromChild(child);
+ if (child->isFloatingOrOutOfFlowPositioned() || child->isColumnSpanAll())
+ continue;
+
+ // If the child contains inline with outline and continuation, its
+ // visual overflow computed during its layout might be inaccurate because
+ // the layout of continuations might not be up-to-date at that time.
+ // Re-add overflow from inline children to ensure its overflow covers
+ // the outline which may enclose continuations.
+ if (child->isLayoutBlockFlow() &&
+ toLayoutBlockFlow(child)->containsInlineWithOutlineAndContinuation())
+ toLayoutBlockFlow(child)->addOverflowFromInlineChildren();
+
+ addOverflowFromChild(child);
}
}
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/inline/inline-focus-ring-under-absolute-enclosing-relative-div-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698