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

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

Issue 2134413002: Fix LayoutInline::visualOverflowRect() with outline in non-standard mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NeedsRebaseline Created 4 years, 5 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/paint/invalidation/outline-containing-image-in-non-standard-mode-expected.txt ('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/LayoutInline.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutInline.cpp b/third_party/WebKit/Source/core/layout/LayoutInline.cpp
index fefc3724aafd8d8f7eade6f11417d334acc9a356..5d11e8fe84de5c6c558eeeb83929be0ef87d376d 100644
--- a/third_party/WebKit/Source/core/layout/LayoutInline.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutInline.cpp
@@ -1062,9 +1062,15 @@ LayoutRect LayoutInline::visualOverflowRect() const
LayoutUnit outlineOutset(style()->outlineOutsetExtent());
if (outlineOutset) {
Vector<LayoutRect> rects;
- // We have already included outline extents of line boxes in linesVisualOverflowBoundingBox(),
- // so the following just add outline rects for children and continuations.
- addOutlineRectsForChildrenAndContinuations(rects, LayoutPoint(), outlineRectsShouldIncludeBlockVisualOverflow());
+ if (document().inNoQuirksMode()) {
+ // We have already included outline extents of line boxes in linesVisualOverflowBoundingBox(),
+ // so the following just add outline rects for children and continuations.
+ addOutlineRectsForChildrenAndContinuations(rects, LayoutPoint(), outlineRectsShouldIncludeBlockVisualOverflow());
+ } else {
+ // In non-standard mode, because the difference in LayoutBlock::minLineHeightForReplacedObject(),
+ // linesVisualOverflowBoundingBox() may not cover outline rects of lines containing replaced objects.
+ addOutlineRects(rects, LayoutPoint(), outlineRectsShouldIncludeBlockVisualOverflow());
+ }
if (!rects.isEmpty()) {
LayoutRect outlineRect = unionRectEvenIfEmpty(rects);
outlineRect.inflate(outlineOutset);
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/invalidation/outline-containing-image-in-non-standard-mode-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698