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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 1055
1056 return visualOverflowRect(); 1056 return visualOverflowRect();
1057 } 1057 }
1058 1058
1059 LayoutRect LayoutInline::visualOverflowRect() const 1059 LayoutRect LayoutInline::visualOverflowRect() const
1060 { 1060 {
1061 LayoutRect overflowRect = linesVisualOverflowBoundingBox(); 1061 LayoutRect overflowRect = linesVisualOverflowBoundingBox();
1062 LayoutUnit outlineOutset(style()->outlineOutsetExtent()); 1062 LayoutUnit outlineOutset(style()->outlineOutsetExtent());
1063 if (outlineOutset) { 1063 if (outlineOutset) {
1064 Vector<LayoutRect> rects; 1064 Vector<LayoutRect> rects;
1065 // We have already included outline extents of line boxes in linesVisual OverflowBoundingBox(), 1065 if (document().inNoQuirksMode()) {
1066 // so the following just add outline rects for children and continuation s. 1066 // We have already included outline extents of line boxes in linesVi sualOverflowBoundingBox(),
1067 addOutlineRectsForChildrenAndContinuations(rects, LayoutPoint(), outline RectsShouldIncludeBlockVisualOverflow()); 1067 // so the following just add outline rects for children and continua tions.
1068 addOutlineRectsForChildrenAndContinuations(rects, LayoutPoint(), out lineRectsShouldIncludeBlockVisualOverflow());
1069 } else {
1070 // In non-standard mode, because the difference in LayoutBlock::minL ineHeightForReplacedObject(),
1071 // linesVisualOverflowBoundingBox() may not cover outline rects of l ines containing replaced objects.
1072 addOutlineRects(rects, LayoutPoint(), outlineRectsShouldIncludeBlock VisualOverflow());
1073 }
1068 if (!rects.isEmpty()) { 1074 if (!rects.isEmpty()) {
1069 LayoutRect outlineRect = unionRectEvenIfEmpty(rects); 1075 LayoutRect outlineRect = unionRectEvenIfEmpty(rects);
1070 outlineRect.inflate(outlineOutset); 1076 outlineRect.inflate(outlineOutset);
1071 overflowRect.unite(outlineRect); 1077 overflowRect.unite(outlineRect);
1072 } 1078 }
1073 } 1079 }
1074 return overflowRect; 1080 return overflowRect;
1075 } 1081 }
1076 1082
1077 bool LayoutInline::mapToVisualRectInAncestorSpace(const LayoutBoxModelObject* an cestor, LayoutRect& rect, VisualRectFlags visualRectFlags) const 1083 bool LayoutInline::mapToVisualRectInAncestorSpace(const LayoutBoxModelObject* an cestor, LayoutRect& rect, VisualRectFlags visualRectFlags) const
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
1355 1361
1356 void LayoutInline::invalidateDisplayItemClients(PaintInvalidationReason invalida tionReason) const 1362 void LayoutInline::invalidateDisplayItemClients(PaintInvalidationReason invalida tionReason) const
1357 { 1363 {
1358 LayoutBoxModelObject::invalidateDisplayItemClients(invalidationReason); 1364 LayoutBoxModelObject::invalidateDisplayItemClients(invalidationReason);
1359 1365
1360 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) 1366 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox())
1361 invalidateDisplayItemClient(*box, invalidationReason); 1367 invalidateDisplayItemClient(*box, invalidationReason);
1362 } 1368 }
1363 1369
1364 } // namespace blink 1370 } // namespace blink
OLDNEW
« 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