| Index: Source/core/rendering/RenderBox.cpp
|
| diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
|
| index 4b2f02d7664c8d86ef8f37b545f5686bf08c7de8..422a2f69df755cdab90d153c2245ccb667aaaa3c 100644
|
| --- a/Source/core/rendering/RenderBox.cpp
|
| +++ b/Source/core/rendering/RenderBox.cpp
|
| @@ -314,6 +314,10 @@ void RenderBox::layout()
|
| ASSERT(!child->needsLayout());
|
| child = child->nextSibling();
|
| }
|
| +
|
| + m_overflow.clear();
|
| + addVisualEffectOverflow();
|
| +
|
| statePusher.pop();
|
| invalidateBackgroundObscurationStatus();
|
| clearNeedsLayout();
|
| @@ -1656,11 +1660,6 @@ bool RenderBox::pushContentsClip(PaintInfo& paintInfo, const LayoutPoint& accumu
|
| if (contentsVisualOverflow.isEmpty())
|
| return false;
|
|
|
| - // FIXME: Get rid of this slop from here and elsewhere.
|
| - // Instead, properly include the outline in visual overflow.
|
| - if (RenderView* view = this->view())
|
| - contentsVisualOverflow.inflate(view->maximalOutlineSize());
|
| -
|
| LayoutRect conservativeClipRect = clipRect;
|
| if (hasBorderRadius)
|
| conservativeClipRect.intersect(clipRoundedRect.radiusCenterRect());
|
| @@ -2010,15 +2009,6 @@ LayoutRect RenderBox::clippedOverflowRectForRepaint(const RenderLayerModelObject
|
| r.move(v->layoutDelta());
|
| }
|
|
|
| - if (style()) {
|
| - // We have to use maximalOutlineSize() because a child might have an outline
|
| - // that projects outside of our overflowRect.
|
| - if (v) {
|
| - ASSERT(style()->outlineSize() <= v->maximalOutlineSize());
|
| - r.inflate(v->maximalOutlineSize());
|
| - }
|
| - }
|
| -
|
| computeRectForRepaint(repaintContainer, r);
|
| return r;
|
| }
|
| @@ -4160,7 +4150,7 @@ void RenderBox::markForPaginationRelayoutIfNeeded(SubtreeLayoutScope& layoutScop
|
|
|
| void RenderBox::addVisualEffectOverflow()
|
| {
|
| - if (!style()->boxShadow() && !style()->hasBorderImageOutsets())
|
| + if (!style()->boxShadow() && !style()->hasBorderImageOutsets() && !style()->hasOutline())
|
| return;
|
|
|
| bool isFlipped = style()->isFlippedBlocksWritingMode();
|
| @@ -4199,7 +4189,16 @@ void RenderBox::addVisualEffectOverflow()
|
| overflowMaxY = max(overflowMaxY, borderBox.maxY() + ((!isFlipped || !isHorizontal) ? borderOutsets.bottom() : borderOutsets.top()));
|
| }
|
|
|
| - // Add in the final overflow with shadows and outsets combined.
|
| + if (style()->hasOutline()) {
|
| + LayoutUnit outlineSize = style()->outlineSize();
|
| +
|
| + overflowMinX = min(overflowMinX, borderBox.x() - outlineSize);
|
| + overflowMaxX = max(overflowMaxX, borderBox.maxX() + outlineSize);
|
| + overflowMinY = min(overflowMinY, borderBox.y() - outlineSize);
|
| + overflowMaxY = max(overflowMaxY, borderBox.maxY() + outlineSize);
|
| + }
|
| +
|
| + // Add in the final overflow with shadows, outsets and outline combined.
|
| LayoutRect visualEffectOverflow(overflowMinX, overflowMinY, overflowMaxX - overflowMinX, overflowMaxY - overflowMinY);
|
| addVisualOverflow(visualEffectOverflow);
|
| }
|
|
|