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

Unified Diff: Source/core/layout/line/InlineFlowBox.cpp

Issue 1182053009: Correct box shadow overflow computation for InlineFlowBox (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: do the same to addBorderOutsetVisualOverflow Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/line/InlineFlowBox.cpp
diff --git a/Source/core/layout/line/InlineFlowBox.cpp b/Source/core/layout/line/InlineFlowBox.cpp
index 22885f2f095fe728d8b028bf7dc92e35bf8ca815..39c5a898f912a6be140187daddd40856af5a987a 100644
--- a/Source/core/layout/line/InlineFlowBox.cpp
+++ b/Source/core/layout/line/InlineFlowBox.cpp
@@ -744,11 +744,13 @@ void InlineFlowBox::flipLinesInBlockDirection(LayoutUnit lineTop, LayoutUnit lin
inline void InlineFlowBox::addBoxShadowVisualOverflow(LayoutRect& logicalVisualOverflow)
{
- // box-shadow on root line boxes is applying to the block and not to the lines.
- if (!parent())
+ const ComputedStyle& style = layoutObject().styleRef(isFirstLineStyle());
+
+ // box-shadow on the block element applies to the block and not to the lines,
+ // unless it is modified by :first-line pseudo element.
+ if (!parent() && (!isFirstLineStyle() || &style == layoutObject().style()))
return;
- const ComputedStyle& style = layoutObject().styleRef(isFirstLineStyle());
WritingMode writingMode = style.writingMode();
ShadowList* boxShadow = style.boxShadow();
if (!boxShadow)
@@ -766,11 +768,13 @@ inline void InlineFlowBox::addBoxShadowVisualOverflow(LayoutRect& logicalVisualO
inline void InlineFlowBox::addBorderOutsetVisualOverflow(LayoutRect& logicalVisualOverflow)
{
- // border-image-outset on root line boxes is applying to the block and not to the lines.
- if (!parent())
+ const ComputedStyle& style = layoutObject().styleRef(isFirstLineStyle());
+
+ // border-image-outset on the block element applies to the block and not to the lines,
+ // unless it is modified by :first-line pseudo element.
+ if (!parent() && (!isFirstLineStyle() || &style == layoutObject().style()))
return;
- const ComputedStyle& style = layoutObject().styleRef(isFirstLineStyle());
if (!style.hasBorderImageOutsets())
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698