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

Unified Diff: Source/core/layout/LayoutBox.cpp

Issue 1278543002: Include the whole outline into visual overflow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | « Source/core/layout/LayoutBlockFlowLine.cpp ('k') | Source/core/layout/LayoutInline.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutBox.cpp
diff --git a/Source/core/layout/LayoutBox.cpp b/Source/core/layout/LayoutBox.cpp
index 4db3b1211060bcd2331339ed0ae4bfcf8dbd22dc..eb135636cd9f5892b18d4884ee096469bc8949d0 100644
--- a/Source/core/layout/LayoutBox.cpp
+++ b/Source/core/layout/LayoutBox.cpp
@@ -4116,23 +4116,15 @@ LayoutRectOutsets LayoutBox::computeVisualEffectOverflowOutsets() const
}
if (style()->hasOutline()) {
+ Vector<LayoutRect> outlineRects;
+ // The result rects are in coordinates of this object's border box.
+ addOutlineRects(outlineRects, LayoutPoint());
+ LayoutRect rect = unionRect(outlineRects);
int outlineOutset = style()->outlineOutsetExtent();
- if (style()->outlineStyleIsAuto()) {
- // The result focus ring rects are in coordinates of this object's border box.
- Vector<LayoutRect> focusRingRects;
- addOutlineRects(focusRingRects, LayoutPoint());
- LayoutRect rect = unionRect(focusRingRects);
-
- top = std::max(top, -rect.y() + outlineOutset);
- right = std::max(right, rect.maxX() - size().width() + outlineOutset);
- bottom = std::max(bottom, rect.maxY() - size().height() + outlineOutset);
- left = std::max(left, -rect.x() + outlineOutset);
- } else {
- top = std::max<LayoutUnit>(top, outlineOutset);
- right = std::max<LayoutUnit>(right, outlineOutset);
- bottom = std::max<LayoutUnit>(bottom, outlineOutset);
- left = std::max<LayoutUnit>(left, outlineOutset);
- }
+ top = std::max(top, -rect.y() + outlineOutset);
+ right = std::max(right, rect.maxX() - size().width() + outlineOutset);
+ bottom = std::max(bottom, rect.maxY() - size().height() + outlineOutset);
+ left = std::max(left, -rect.x() + outlineOutset);
}
return LayoutRectOutsets(top, right, bottom, left);
« no previous file with comments | « Source/core/layout/LayoutBlockFlowLine.cpp ('k') | Source/core/layout/LayoutInline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698