| Index: Source/core/rendering/RenderBox.cpp
|
| diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
|
| index 311d9dfc207ec4ce24cc4f5ec6605d55a085f153..d479367a848fa2eb3a24dd3f038a3a44c2c4e30b 100644
|
| --- a/Source/core/rendering/RenderBox.cpp
|
| +++ b/Source/core/rendering/RenderBox.cpp
|
| @@ -315,7 +315,10 @@ void RenderBox::layout()
|
| child = child->nextSibling();
|
| }
|
| statePusher.pop();
|
| +
|
| + addVisualEffectOverflow();
|
| invalidateBackgroundObscurationStatus();
|
| +
|
| clearNeedsLayout();
|
| }
|
|
|
| @@ -1650,11 +1653,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());
|
| @@ -2004,15 +2002,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;
|
| }
|
| @@ -4151,7 +4140,7 @@ bool RenderBox::avoidsFloats() const
|
|
|
| void RenderBox::addVisualEffectOverflow()
|
| {
|
| - if (!style()->boxShadow() && !style()->hasBorderImageOutsets())
|
| + if (!style()->boxShadow() && !style()->hasBorderImageOutsets() && !style()->hasOutline())
|
| return;
|
|
|
| bool isFlipped = style()->isFlippedBlocksWritingMode();
|
| @@ -4190,7 +4179,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()) {
|
| + unsigned short 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);
|
| }
|
|
|