Chromium Code Reviews| Index: Source/core/layout/LayoutBlockFlowLine.cpp |
| diff --git a/Source/core/layout/LayoutBlockFlowLine.cpp b/Source/core/layout/LayoutBlockFlowLine.cpp |
| index 77c6656f3981fdf33291fa5d194d91a5ee82645a..9ccc684648b2101b27be4dabf5679df89e0ec2e4 100644 |
| --- a/Source/core/layout/LayoutBlockFlowLine.cpp |
| +++ b/Source/core/layout/LayoutBlockFlowLine.cpp |
| @@ -1492,6 +1492,11 @@ void LayoutBlockFlow::computeInlinePreferredLogicalWidths(LayoutUnit& minLogical |
| maxLogicalWidth = std::max(maxLogicalWidth, inlineMax); |
| } |
| +static bool isInlineWithOutlineAndContinuation(const LayoutObject& o) |
| +{ |
| + return o.isLayoutInline() && o.styleRef().hasOutline() && !o.isElementContinuation() && toLayoutInline(o).continuation(); |
| +} |
| + |
| void LayoutBlockFlow::layoutInlineChildren(bool relayoutChildren, LayoutUnit& paintInvalidationLogicalTop, LayoutUnit& paintInvalidationLogicalBottom, LayoutUnit afterEdge) |
| { |
| LayoutFlowThread* flowThread = flowThreadContainingBlock(); |
| @@ -1566,6 +1571,9 @@ void LayoutBlockFlow::layoutInlineChildren(bool relayoutChildren, LayoutUnit& pa |
| dirtyLineBoxesForObject(o, layoutState.isFullLayout()); |
| o->clearNeedsLayout(); |
| } |
| + |
| + if (isInlineWithOutlineAndContinuation(*o)) |
| + setContainsInlineWithOutlineAndContinuation(true); |
| } |
| for (size_t i = 0; i < replacedChildren.size(); i++) |
| @@ -1854,6 +1862,24 @@ void LayoutBlockFlow::addOverflowFromInlineChildren() |
| LayoutRect visualOverflow = curr->visualOverflowRect(curr->lineTop(), curr->lineBottom()); |
| addContentsVisualOverflow(visualOverflow); |
| } |
| + |
| + if (!containsInlineWithOutlineAndContinuation()) |
| + return; |
| + |
| + // Add outline rects of continuations of descendant inlines into visual overflow of this block. |
| + LayoutRect outlineBoundsOfAllContinuations; |
| + for (InlineWalker walker(this); !walker.atEnd(); walker.advance()) { |
| + const LayoutObject& o = *walker.current(); |
| + if (!isInlineWithOutlineAndContinuation(o)) |
| + continue; |
| + |
| + Vector<LayoutRect> outlineRects; |
| + toLayoutInline(o).addOutlineRectsForContinuations(outlineRects, LayoutPoint()); |
| + LayoutRect outlineBounds = unionRect(outlineRects); |
| + outlineBounds.inflate(o.styleRef().outlineOutsetExtent()); |
|
chrishtr
2015/08/27 23:14:52
Why do you need to include the outset extent of th
Xianzhu
2015/08/27 23:40:15
The contents visual overflow of a block should cov
chrishtr
2015/08/28 00:10:05
Sure, but why is o.styleRef().outlineOutsetExtent(
Xianzhu
2015/08/28 00:24:09
It's the visual outset of the outline outside of t
|
| + outlineBoundsOfAllContinuations.unite(outlineBounds); |
| + } |
| + addContentsVisualOverflow(outlineBoundsOfAllContinuations); |
| } |
| void LayoutBlockFlow::deleteEllipsisLineBoxes() |