<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[196222] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/196222">196222</a></dd>
<dt>Author</dt> <dd>zalan@apple.com</dd>
<dt>Date</dt> <dd>2016-02-06 15:07:54 -0800 (Sat, 06 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Outline should contribute to visual overflow.
https://bugs.webkit.org/show_bug.cgi?id=153299

This patch eliminates the special outline handling (RenderView::setMaximalOutlineSize).
Now that outline is part of visual overflow, we don't have to inflate the layers to accomodate
outline borders.
This patch fixes several focusring related repaint issues. However when both the outline: auto
and the descendant renderer are composited, we still don't paint properly in certain cases. -not a regression.
(Also when parent renderer has overflow: hidden repaint does not take outline into account. -regression.)
It changes column behavior (see TestExpectations) since outline behaves now like any other visual overflow properties.

Reviewed by David Hyatt.

Source/WebCore:

Test: fast/repaint/focus-ring-repaint.html
      fast/repaint/focus-ring-repaint-with-negative-offset.html

* css/html.css: resetting to old behavior.
(:focus):
(input:focus, textarea:focus, isindex:focus, keygen:focus, select:focus):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::addToLine):
(WebCore::InlineFlowBox::addOutlineVisualOverflow):
(WebCore::InlineFlowBox::computeOverflow):
(WebCore::InlineFlowBox::paint): Deleted.
* rendering/InlineFlowBox.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeOverflow):
(WebCore::RenderBlock::outlineStyleForRepaint):
(WebCore::RenderBlock::paint): Deleted.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlock): Deleted.
(WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren): Deleted.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::addVisualEffectOverflow):
(WebCore::RenderBox::applyVisualEffectOverflow):
(WebCore::RenderBox::clippedOverflowRectForRepaint): Deleted.
* rendering/RenderBoxModelObject.h:
* rendering/RenderDetailsMarker.cpp:
(WebCore::RenderDetailsMarker::paint): Deleted.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::insertChildInternal):
(WebCore::RenderElement::styleDidChange):
(WebCore::RenderElement::repaintAfterLayoutIfNeeded):
(WebCore::RenderElement::issueRepaintForOutlineAuto):
(WebCore::RenderElement::updateOutlineAutoAncestor):
(WebCore::RenderElement::computeMaxOutlineSize): Deleted.
(WebCore::RenderElement::styleWillChange): Deleted.
* rendering/RenderElement.h:
(WebCore::RenderElement::hasContinuation):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::paintOutlineForLine): Deleted.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::anyLineIntersectsRect):
(WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
(WebCore::RenderLineBoxList::paint):
(WebCore::isOutlinePhase): Deleted.
* rendering/RenderLineBoxList.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::computePreferredLogicalWidths):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint): Deleted.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::propagateRepaintToParentWithOutlineAutoIfNeeded): The renderer with outline: auto is responsible for
painting focusring around the descendants. If we issued repaint only on the descendant when it changes,
the focusring would not refresh properly. We have to find the ancestor with outline: auto, inflate the repaint rect and
issue the repaint on the ancestor if we crossed repaint container.

(WebCore::RenderObject::repaintUsingContainer):
(WebCore::RenderObject::adjustRectForOutlineAndShadow):
(WebCore::RenderObject::setHasOutlineAutoAncestor):
(WebCore::RenderObject::adjustRectWithMaximumOutline): Deleted.

* rendering/RenderObject.h: We mark the descendants of outline: auto so that
when a child renderer changes we can propagate the repaint to the ancestor with outline.

(WebCore::RenderObject::hasOutlineAutoAncestor):
(WebCore::RenderObject::RenderObjectRareData::RenderObjectRareData):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::overflowRectForFlowThreadPortion):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::shouldPaint): Deleted.
(WebCore::RenderReplaced::clippedOverflowRectForRepaint): Deleted.
* rendering/RenderTable.cpp:
(WebCore::RenderTable::paint): Deleted.
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::clippedOverflowRectForRepaint): Deleted.
(WebCore::RenderTableCell::paintCollapsedBorders): Deleted.
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
(WebCore::RenderTableRow::clippedOverflowRectForRepaint): Deleted.
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layoutRows):
(WebCore::RenderTableSection::computeOverflowFromCells): Deleted.
(WebCore::RenderTableSection::paintObject): Deleted.
* rendering/RenderTheme.h:
(WebCore::RenderTheme::platformFocusRingWidth):
* rendering/RenderView.cpp:
(WebCore::RenderView::setMaximalOutlineSize): Deleted.
* rendering/RenderView.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeAffectsVisualOverflow):
(WebCore::RenderStyle::outlineWidth):
* rendering/style/RenderStyle.h:

LayoutTests:

* fast/repaint/focus-ring-repaint-expected.txt: Added.
* fast/repaint/focus-ring-repaint.html: Added.
* fast/repaint/focus-ring-repaint-expected-with-negative-offset.txt: Added.
* fast/repaint/focus-ring-repaint-with-negative-offset.html: Added.
* TestExpectations:
* platform/mac/TestExpectations:
* platform/mac/compositing/geometry/ancestor-overflow-change-expected.txt:
* platform/mac/compositing/geometry/composited-in-columns-expected.txt:
* platform/mac/compositing/layer-creation/overlap-animation-container-expected.txt:
* platform/mac/compositing/layer-creation/stacking-context-overlap-nested-expected.txt:
* platform/mac/compositing/visibility/visibility-image-layers-dynamic-expected.txt:
* platform/mac/fast/clip/outline-overflowClip-expected.txt:
* platform/mac/fast/inline/continuation-outlines-with-layers-expected.txt:
* platform/mac/fast/repaint/4776765-expected.txt: Added.
* platform/mac/fast/repaint/focus-ring-expected.txt: Added.
* platform/mac/fast/repaint/layer-outline-expected.txt:
* platform/mac/fast/repaint/layer-outline-horizontal-expected.txt:
* platform/mac/svg/custom/focus-ring-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsTestExpectations">trunk/LayoutTests/TestExpectations</a></li>
<li><a href="#trunkLayoutTestscompositinglayercreationstackingcontextoverlapnestedexpectedtxt">trunk/LayoutTests/compositing/layer-creation/stacking-context-overlap-nested-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastrepaint4776765expectedtxt">trunk/LayoutTests/fast/repaint/4776765-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastrepaintfocusringexpectedtxt">trunk/LayoutTests/fast/repaint/focus-ring-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacTestExpectations">trunk/LayoutTests/platform/mac/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformmaccompositinggeometryancestoroverflowchangeexpectedtxt">trunk/LayoutTests/platform/mac/compositing/geometry/ancestor-overflow-change-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmaccompositinggeometrycompositedincolumnsexpectedtxt">trunk/LayoutTests/platform/mac/compositing/geometry/composited-in-columns-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmaccompositinglayercreationoverlapanimationcontainerexpectedtxt">trunk/LayoutTests/platform/mac/compositing/layer-creation/overlap-animation-container-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmaccompositingvisibilityvisibilityimagelayersdynamicexpectedtxt">trunk/LayoutTests/platform/mac/compositing/visibility/visibility-image-layers-dynamic-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastclipoutlineoverflowClipexpectedtxt">trunk/LayoutTests/platform/mac/fast/clip/outline-overflowClip-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastinlinecontinuationoutlineswithlayersexpectedtxt">trunk/LayoutTests/platform/mac/fast/inline/continuation-outlines-with-layers-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastrepaintlayeroutlineexpectedtxt">trunk/LayoutTests/platform/mac/fast/repaint/layer-outline-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastrepaintlayeroutlinehorizontalexpectedtxt">trunk/LayoutTests/platform/mac/fast/repaint/layer-outline-horizontal-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecsshtmlcss">trunk/Source/WebCore/css/html.css</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineFlowBoxcpp">trunk/Source/WebCore/rendering/InlineFlowBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineFlowBoxh">trunk/Source/WebCore/rendering/InlineFlowBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockcpp">trunk/Source/WebCore/rendering/RenderBlock.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockFlowcpp">trunk/Source/WebCore/rendering/RenderBlockFlow.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBlockLineLayoutcpp">trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxcpp">trunk/Source/WebCore/rendering/RenderBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxModelObjecth">trunk/Source/WebCore/rendering/RenderBoxModelObject.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderDetailsMarkercpp">trunk/Source/WebCore/rendering/RenderDetailsMarker.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderElementcpp">trunk/Source/WebCore/rendering/RenderElement.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderElementh">trunk/Source/WebCore/rendering/RenderElement.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderInlinecpp">trunk/Source/WebCore/rendering/RenderInline.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayercpp">trunk/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLineBoxListcpp">trunk/Source/WebCore/rendering/RenderLineBoxList.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLineBoxListh">trunk/Source/WebCore/rendering/RenderLineBoxList.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderListBoxcpp">trunk/Source/WebCore/rendering/RenderListBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderListMarkercpp">trunk/Source/WebCore/rendering/RenderListMarker.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjectcpp">trunk/Source/WebCore/rendering/RenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjecth">trunk/Source/WebCore/rendering/RenderObject.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderOverflowh">trunk/Source/WebCore/rendering/RenderOverflow.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderRegioncpp">trunk/Source/WebCore/rendering/RenderRegion.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderReplacedcpp">trunk/Source/WebCore/rendering/RenderReplaced.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTablecpp">trunk/Source/WebCore/rendering/RenderTable.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTableCellcpp">trunk/Source/WebCore/rendering/RenderTableCell.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTableRowcpp">trunk/Source/WebCore/rendering/RenderTableRow.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTableSectioncpp">trunk/Source/WebCore/rendering/RenderTableSection.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeh">trunk/Source/WebCore/rendering/RenderTheme.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderViewcpp">trunk/Source/WebCore/rendering/RenderView.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderViewh">trunk/Source/WebCore/rendering/RenderView.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStylecpp">trunk/Source/WebCore/rendering/style/RenderStyle.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleh">trunk/Source/WebCore/rendering/style/RenderStyle.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastrepaintfocusringrepaintexpectedtxt">trunk/LayoutTests/fast/repaint/focus-ring-repaint-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastrepaintfocusringrepainthtml">trunk/LayoutTests/fast/repaint/focus-ring-repaint.html</a></li>
<li><a href="#trunkLayoutTestsfastrepaintfocusringwithnegativeoffsetrepaintexpectedtxt">trunk/LayoutTests/fast/repaint/focus-ring-with-negative-offset-repaint-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastrepaintfocusringwithnegativeoffsetrepainthtml">trunk/LayoutTests/fast/repaint/focus-ring-with-negative-offset-repaint.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/LayoutTests/ChangeLog        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -1,3 +1,37 @@
</span><ins>+2016-02-06  Zalan Bujtas  &lt;zalan@apple.com&gt;
+
+        Outline should contribute to visual overflow.
+        https://bugs.webkit.org/show_bug.cgi?id=153299
+
+        This patch eliminates the special outline handling (RenderView::setMaximalOutlineSize).
+        Now that outline is part of visual overflow, we don't have to inflate the layers to accomodate
+        outline borders.
+        This patch fixes several focusring related repaint issues. However when both the outline: auto
+        and the descendant renderer are composited, we still don't paint properly in certain cases. -not a regression.
+        (Also when parent renderer has overflow: hidden repaint does not take outline into account. -regression.)
+        It changes column behavior (see TestExpectations) since outline behaves now like any other visual overflow properties.
+
+        Reviewed by David Hyatt.
+
+        * fast/repaint/focus-ring-repaint-expected.txt: Added.
+        * fast/repaint/focus-ring-repaint.html: Added.
+        * fast/repaint/focus-ring-repaint-expected-with-negative-offset.txt: Added.
+        * fast/repaint/focus-ring-repaint-with-negative-offset.html: Added.
+        * TestExpectations:
+        * platform/mac/TestExpectations:
+        * platform/mac/compositing/geometry/ancestor-overflow-change-expected.txt:
+        * platform/mac/compositing/geometry/composited-in-columns-expected.txt:
+        * platform/mac/compositing/layer-creation/overlap-animation-container-expected.txt:
+        * platform/mac/compositing/layer-creation/stacking-context-overlap-nested-expected.txt:
+        * platform/mac/compositing/visibility/visibility-image-layers-dynamic-expected.txt:
+        * platform/mac/fast/clip/outline-overflowClip-expected.txt:
+        * platform/mac/fast/inline/continuation-outlines-with-layers-expected.txt:
+        * platform/mac/fast/repaint/4776765-expected.txt: Added.
+        * platform/mac/fast/repaint/focus-ring-expected.txt: Added.
+        * platform/mac/fast/repaint/layer-outline-expected.txt:
+        * platform/mac/fast/repaint/layer-outline-horizontal-expected.txt:
+        * platform/mac/svg/custom/focus-ring-expected.txt:
+
</ins><span class="cx"> 2016-02-06  Michael Catanzaro  &lt;mcatanzaro@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Various tests are flaky
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/LayoutTests/TestExpectations        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -851,3 +851,7 @@
</span><span class="cx"> loader/stateobjects/pushstate-size.html [ Slow ]
</span><span class="cx"> loader/stateobjects/replacestate-size-iframe.html [ Slow ]
</span><span class="cx"> loader/stateobjects/replacestate-size.html [ Slow ]
</span><ins>+
+# outline: auto -focusring.
+imported/blink/fast/multicol/outlines-at-column-boundaries.html [ ImageOnlyFailure ]
+fast/multicol/multicol-with-child-renderLayer-for-input.html [ ImageOnlyFailure ]
</ins></span></pre></div>
<a id="trunkLayoutTestscompositinglayercreationstackingcontextoverlapnestedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/compositing/layer-creation/stacking-context-overlap-nested-expected.txt (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/compositing/layer-creation/stacking-context-overlap-nested-expected.txt        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/LayoutTests/compositing/layer-creation/stacking-context-overlap-nested-expected.txt        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -19,8 +19,9 @@
</span><span class="cx">           )
</span><span class="cx">         )
</span><span class="cx">         (GraphicsLayer
</span><del>-          (position 65.00 65.00)
-          (bounds 76.00 76.00)
</del><ins>+          (position 75.00 75.00)
+          (bounds 56.00 56.00)
+          (contentsOpaque 1)
</ins><span class="cx">         )
</span><span class="cx">       )
</span><span class="cx">     )
</span></span></pre></div>
<a id="trunkLayoutTestsfastrepaint4776765expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/repaint/4776765-expected.txt (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/repaint/4776765-expected.txt        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/LayoutTests/fast/repaint/4776765-expected.txt        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -2,20 +2,13 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> (repaint rects
</span><del>-  (rect 5 41 790 6)
-  (rect -3 -3 3 606)
-  (rect 800 -3 3 606)
-  (rect -3 -3 806 3)
-  (rect -3 600 806 3)
-  (rect -3 -3 3 606)
-  (rect 800 -3 3 606)
-  (rect -3 -3 806 3)
-  (rect -3 600 806 3)
-  (rect 5 41 790 6)
-  (rect 5 41 790 24)
-  (rect 5 47 790 18)
-  (rect 5 44 790 3)
</del><ins>+  (rect 1 37 798 32)
+  (rect 8 44 784 18)
+  (rect 1 51 798 18)
+  (rect 1 44 798 7)
+  (rect 1 19 15 32)
</ins><span class="cx">   (rect 8 26 1 18)
</span><ins>+  (rect 1 37 15 32)
</ins><span class="cx">   (rect 8 44 1 18)
</span><span class="cx"> )
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastrepaintfocusringexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/repaint/focus-ring-expected.txt (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/repaint/focus-ring-expected.txt        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/LayoutTests/fast/repaint/focus-ring-expected.txt        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -4,5 +4,5 @@
</span><span class="cx">   RenderBlock {HTML} at (0,0) size 800x600
</span><span class="cx">     RenderBody {BODY} at (8,20) size 784x560
</span><span class="cx">       RenderBlock {DIV} at (20,0) size 100x100 [bgcolor=#FFFFE0]
</span><del>-layer at (28,148) size 100x100 backgroundClip at (28,148) size 50x50 clip at (18,138) size 60x60 outlineClip at (18,138) size 60x60
</del><ins>+layer at (28,148) size 100x100 backgroundClip at (18,138) size 60x60 clip at (18,138) size 60x60 outlineClip at (18,138) size 60x60
</ins><span class="cx">   RenderBlock (positioned) {DIV} at (28,148) size 100x100 [bgcolor=#FFFFE0]
</span></span></pre></div>
<a id="trunkLayoutTestsfastrepaintfocusringrepaintexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/repaint/focus-ring-repaint-expected.txt (0 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/repaint/focus-ring-repaint-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/repaint/focus-ring-repaint-expected.txt        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+
+
+
+
+
+
+
+(repaint rects
+  (rect 5 457 103 67)
+  (rect 5 457 103 67)
+  (rect 5 457 106 70)
+  (rect 5 542 106 70)
+  (rect 15 32 36 70)
+  (rect 18 35 30 64)
+  (rect 5 89 56 10)
+  (rect 5 35 56 64)
+  (rect 5 117 36 60)
+  (rect 8 120 30 54)
+  (rect 5 117 36 86)
+  (rect 8 120 30 80)
+  (rect 5 174 56 30)
+  (rect 5 120 56 84)
+  (rect 5 205 56 37)
+  (rect 5 375 56 37)
+  (rect 5 457 103 67)
+  (rect 8 460 100 64)
+  (rect 8 545 100 64)
+  (rect 5 542 103 67)
+  (rect 45 212 36 40)
+  (rect 48 215 30 34)
+  (rect 155 212 36 40)
+  (rect 158 215 30 34)
+  (rect 7 377 36 36)
+  (rect 10 380 30 30)
+  (rect 147 377 36 36)
+  (rect 150 380 30 30)
+  (rect 105 382 36 40)
+  (rect 108 385 30 34)
+  (rect 205 382 36 40)
+  (rect 208 385 30 34)
+)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastrepaintfocusringrepainthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/repaint/focus-ring-repaint.html (0 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/repaint/focus-ring-repaint.html                                (rev 0)
+++ trunk/LayoutTests/fast/repaint/focus-ring-repaint.html        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This tests that we repaint focus ring properly.&lt;/title&gt;
+&lt;script src=&quot;resources/text-based-repaint.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function repaintTest() {
+  document.getElementById(&quot;shrinkThis&quot;).style.height = &quot;20px&quot;; 
+  document.getElementById(&quot;enlargeThis&quot;).style.height = &quot;80px&quot;; 
+  document.getElementById(&quot;moveThisRelative&quot;).style.left = &quot;150px&quot;; 
+  document.getElementById(&quot;moveThisAbsolute&quot;).style.left = &quot;150px&quot;; 
+  document.getElementById(&quot;moveThisRelativeAndNotIntersected&quot;).style.left = &quot;200px&quot;; 
+  document.getElementById(&quot;removeOutline&quot;).style.outline = &quot;none&quot;;
+  document.getElementById(&quot;addOutline&quot;).style.outline = &quot;auto&quot;;
+}
+onload = runRepaintTest;
+&lt;/script&gt;
+
+&lt;style&gt;
+div {
+        margin-top: 35px;
+}
+
+.outline-container {
+    width: 50px;
+    height: 50px;
+          outline: auto;
+}
+
+img {
+    width: 30px;
+    height: 30px;
+}
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div class=outline-container&gt;&lt;img style=&quot;margin-top: 30px; margin-left: 10px;&quot; src=&quot;broken.jpg&quot; id=shrinkThis&gt;&lt;/div&gt;
+&lt;div class=outline-container&gt;&lt;img style=&quot;height: 50px;&quot; src=&quot;broken.jpg&quot; id=enlargeThis&gt;&lt;/div&gt;
+&lt;div class=outline-container&gt;&lt;img style=&quot;position: relative; top: 10px; left: 40px;&quot; src=&quot;broken.jpg&quot; id=moveThisRelative&gt;&lt;/div&gt;
+&lt;div class=outline-container&gt;&lt;img style=&quot;position: absolute; top: 380px; left: 10px;&quot; src=&quot;broken.jpg&quot; id=moveThisAbsolute&gt;&lt;/div&gt;
+&lt;div class=outline-container&gt;&lt;img style=&quot;position: relative; top: 10px; left: 100px;&quot; src=&quot;broken.jpg&quot; id=moveThisRelativeAndNotIntersected&gt;&lt;/div&gt;
+&lt;div class=outline-container id=removeOutline&gt;&lt;img style=&quot;margin-top: 30px; margin-left: 70px;&quot; src=&quot;broken.jpg&quot;&gt;&lt;/div&gt;
+&lt;div class=outline-container id=addOutline style=&quot;outline: none&quot;&gt;&lt;img style=&quot;margin-top: 30px; margin-left: 70px;&quot; src=&quot;broken.jpg&quot;&gt;&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsfastrepaintfocusringwithnegativeoffsetrepaintexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/repaint/focus-ring-with-negative-offset-repaint-expected.txt (0 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/repaint/focus-ring-with-negative-offset-repaint-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/repaint/focus-ring-with-negative-offset-repaint-expected.txt        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+(repaint rects
+  (rect 5 7 26 26)
+  (rect 6 38 24 24)
+  (rect 7 69 22 22)
+  (rect 8 100 20 20)
+  (rect 8 130 20 20)
+  (rect 8 160 20 20)
+  (rect 8 190 20 20)
+  (rect 8 220 20 20)
+  (rect 8 250 20 20)
+  (rect 8 280 20 20)
+)
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastrepaintfocusringwithnegativeoffsetrepainthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/repaint/focus-ring-with-negative-offset-repaint.html (0 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/repaint/focus-ring-with-negative-offset-repaint.html                                (rev 0)
+++ trunk/LayoutTests/fast/repaint/focus-ring-with-negative-offset-repaint.html        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;This tests that we repaint focus ring properly when outline-offset is negative.&lt;/title&gt;
+&lt;script src=&quot;resources/text-based-repaint.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function repaintTest() {
+    for (var i = 0; i &lt; 10; ++i) {
+        var element = document.createElement(&quot;div&quot;);
+        element.style.outlineOffset = -i + &quot;px&quot;;
+        element.style.top = (30 * i) + &quot;px&quot;;
+        document.body.insertBefore(element);
+    }
+}
+onload = runRepaintTest;
+&lt;/script&gt;
+&lt;style&gt;
+div {
+  margin-top: 10px;
+  position: absolute;
+  top: 10px;
+  height: 20px;
+  width: 20px;
+  outline: auto;
+}
+&lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/TestExpectations (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/TestExpectations        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/LayoutTests/platform/mac/TestExpectations        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -1322,3 +1322,7 @@
</span><span class="cx"> 
</span><span class="cx"> # This test is already run with run-jsc-stress-tests
</span><span class="cx"> webkit.org/b/153879 js/basic-set.html [ Skip ]
</span><ins>+
+# outline: auto -focusring.
+accessibility/mac/selection-element-tabbing-to-link.html [ Pass Failure ]
+accessibility/mac/selection-notification-focus-change.html [ Pass Failure ]
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmaccompositinggeometryancestoroverflowchangeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/compositing/geometry/ancestor-overflow-change-expected.txt (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/compositing/geometry/ancestor-overflow-change-expected.txt        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/LayoutTests/platform/mac/compositing/geometry/ancestor-overflow-change-expected.txt        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -7,8 +7,9 @@
</span><span class="cx">       (contentsOpaque 1)
</span><span class="cx">       (children 1
</span><span class="cx">         (GraphicsLayer
</span><del>-          (position 6.00 6.00)
-          (bounds 104.00 104.00)
</del><ins>+          (position 8.00 8.00)
+          (bounds 100.00 100.00)
+          (contentsOpaque 1)
</ins><span class="cx">           (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 1.00 1.00])
</span><span class="cx">         )
</span><span class="cx">       )
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmaccompositinggeometrycompositedincolumnsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/compositing/geometry/composited-in-columns-expected.txt (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/compositing/geometry/composited-in-columns-expected.txt        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/LayoutTests/platform/mac/compositing/geometry/composited-in-columns-expected.txt        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -12,7 +12,9 @@
</span><span class="cx">           (drawsContent 1)
</span><span class="cx">           (children 1
</span><span class="cx">             (GraphicsLayer
</span><del>-              (bounds 60.00 60.00)
</del><ins>+              (position 5.00 5.00)
+              (bounds 50.00 50.00)
+              (contentsOpaque 1)
</ins><span class="cx">             )
</span><span class="cx">           )
</span><span class="cx">         )
</span><span class="lines">@@ -22,7 +24,9 @@
</span><span class="cx">           (drawsContent 1)
</span><span class="cx">           (children 1
</span><span class="cx">             (GraphicsLayer
</span><del>-              (bounds 60.00 60.00)
</del><ins>+              (position 5.00 5.00)
+              (bounds 50.00 50.00)
+              (contentsOpaque 1)
</ins><span class="cx">             )
</span><span class="cx">           )
</span><span class="cx">         )
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmaccompositinglayercreationoverlapanimationcontainerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/compositing/layer-creation/overlap-animation-container-expected.txt (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/compositing/layer-creation/overlap-animation-container-expected.txt        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/LayoutTests/platform/mac/compositing/layer-creation/overlap-animation-container-expected.txt        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -8,25 +8,28 @@
</span><span class="cx">       (contentsOpaque 1)
</span><span class="cx">       (children 3
</span><span class="cx">         (GraphicsLayer
</span><del>-          (position 17.00 119.00)
-          (bounds 102.00 102.00)
</del><ins>+          (position 18.00 120.00)
+          (bounds 100.00 100.00)
+          (contentsOpaque 1)
</ins><span class="cx">           (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 -110.00 0.00 1.00])
</span><span class="cx">         )
</span><span class="cx">         (GraphicsLayer
</span><del>-          (position 46.00 229.00)
-          (bounds 146.00 454.00)
</del><ins>+          (position 46.00 230.00)
+          (bounds 146.00 452.00)
</ins><span class="cx">           (drawsContent 1)
</span><span class="cx">           (children 1
</span><span class="cx">             (GraphicsLayer
</span><del>-              (position 22.00 11.00)
-              (bounds 102.00 102.00)
</del><ins>+              (position 23.00 11.00)
+              (bounds 100.00 100.00)
+              (contentsOpaque 1)
</ins><span class="cx">               (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 -1.00 1.00])
</span><span class="cx">             )
</span><span class="cx">           )
</span><span class="cx">         )
</span><span class="cx">         (GraphicsLayer
</span><del>-          (position 17.00 691.00)
-          (bounds 102.00 102.00)
</del><ins>+          (position 18.00 692.00)
+          (bounds 100.00 100.00)
+          (contentsOpaque 1)
</ins><span class="cx">         )
</span><span class="cx">       )
</span><span class="cx">     )
</span><span class="lines">@@ -43,42 +46,46 @@
</span><span class="cx">       (contentsOpaque 1)
</span><span class="cx">       (children 3
</span><span class="cx">         (GraphicsLayer
</span><del>-          (position 17.00 119.00)
-          (bounds 102.00 102.00)
</del><ins>+          (position 18.00 120.00)
+          (bounds 100.00 100.00)
+          (contentsOpaque 1)
</ins><span class="cx">           (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 -110.00 0.00 1.00])
</span><span class="cx">         )
</span><span class="cx">         (GraphicsLayer
</span><del>-          (position 57.00 229.00)
-          (bounds 124.00 454.00)
</del><ins>+          (position 58.00 230.00)
+          (bounds 122.00 452.00)
+          (contentsOpaque 1)
</ins><span class="cx">           (drawsContent 1)
</span><span class="cx">           (children 4
</span><span class="cx">             (GraphicsLayer
</span><span class="cx">               (position 11.00 11.00)
</span><del>-              (bounds 102.00 102.00)
</del><ins>+              (bounds 100.00 100.00)
+              (contentsOpaque 1)
</ins><span class="cx">               (transform [1.00 0.00 0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 -1.00 1.00])
</span><span class="cx">             )
</span><span class="cx">             (GraphicsLayer
</span><del>-              (position 11.00 121.00)
</del><ins>+              (position 10.00 120.00)
</ins><span class="cx">               (bounds 102.00 102.00)
</span><span class="cx">               (drawsContent 1)
</span><span class="cx">               (transform [0.71 0.71 0.00 0.00] [-0.71 0.71 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00])
</span><span class="cx">             )
</span><span class="cx">             (GraphicsLayer
</span><del>-              (position 11.00 231.00)
</del><ins>+              (position 10.00 230.00)
</ins><span class="cx">               (bounds 102.00 102.00)
</span><span class="cx">               (drawsContent 1)
</span><span class="cx">               (transform [0.71 0.71 0.00 0.00] [-0.71 0.71 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00])
</span><span class="cx">             )
</span><span class="cx">             (GraphicsLayer
</span><del>-              (position 11.00 341.00)
</del><ins>+              (position 10.00 340.00)
</ins><span class="cx">               (bounds 102.00 102.00)
</span><span class="cx">               (drawsContent 1)
</span><span class="cx">             )
</span><span class="cx">           )
</span><span class="cx">         )
</span><span class="cx">         (GraphicsLayer
</span><del>-          (position 17.00 691.00)
-          (bounds 102.00 102.00)
</del><ins>+          (position 18.00 692.00)
+          (bounds 100.00 100.00)
+          (contentsOpaque 1)
</ins><span class="cx">         )
</span><span class="cx">       )
</span><span class="cx">     )
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmaccompositingvisibilityvisibilityimagelayersdynamicexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/compositing/visibility/visibility-image-layers-dynamic-expected.txt (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/compositing/visibility/visibility-image-layers-dynamic-expected.txt        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/LayoutTests/platform/mac/compositing/visibility/visibility-image-layers-dynamic-expected.txt        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -12,13 +12,13 @@
</span><span class="cx">       (contentsOpaque 1)
</span><span class="cx">       (children 3
</span><span class="cx">         (GraphicsLayer
</span><del>-          (position 14.00 6.00)
</del><ins>+          (position 18.00 10.00)
</ins><span class="cx">           (anchor 0.50 0.50)
</span><del>-          (bounds 757.00 152.00)
</del><ins>+          (bounds 749.00 144.00)
</ins><span class="cx">           (children 1
</span><span class="cx">             (GraphicsLayer
</span><span class="cx">               (position 20.00 20.00)
</span><del>-              (bounds 108.00 108.00)
</del><ins>+              (bounds 100.00 100.00)
</ins><span class="cx">               (contentsVisible 0)
</span><span class="cx">             )
</span><span class="cx">           )
</span><span class="lines">@@ -30,8 +30,8 @@
</span><span class="cx">           (contentsVisible 0)
</span><span class="cx">           (children 1
</span><span class="cx">             (GraphicsLayer
</span><del>-              (position 20.00 20.00)
-              (bounds 108.00 108.00)
</del><ins>+              (position 24.00 24.00)
+              (bounds 100.00 100.00)
</ins><span class="cx">               (contentsVisible 0)
</span><span class="cx">             )
</span><span class="cx">           )
</span><span class="lines">@@ -43,8 +43,8 @@
</span><span class="cx">           (contentsVisible 0)
</span><span class="cx">           (children 1
</span><span class="cx">             (GraphicsLayer
</span><del>-              (position 20.00 20.00)
-              (bounds 108.00 108.00)
</del><ins>+              (position 24.00 24.00)
+              (bounds 100.00 100.00)
</ins><span class="cx">             )
</span><span class="cx">           )
</span><span class="cx">         )
</span><span class="lines">@@ -63,13 +63,13 @@
</span><span class="cx">       (contentsOpaque 1)
</span><span class="cx">       (children 3
</span><span class="cx">         (GraphicsLayer
</span><del>-          (position 14.00 6.00)
</del><ins>+          (position 18.00 10.00)
</ins><span class="cx">           (anchor 0.50 0.50)
</span><del>-          (bounds 757.00 152.00)
</del><ins>+          (bounds 749.00 144.00)
</ins><span class="cx">           (children 1
</span><span class="cx">             (GraphicsLayer
</span><span class="cx">               (position 20.00 20.00)
</span><del>-              (bounds 108.00 108.00)
</del><ins>+              (bounds 100.00 100.00)
</ins><span class="cx">             )
</span><span class="cx">           )
</span><span class="cx">         )
</span><span class="lines">@@ -80,8 +80,8 @@
</span><span class="cx">           (contentsVisible 0)
</span><span class="cx">           (children 1
</span><span class="cx">             (GraphicsLayer
</span><del>-              (position 20.00 20.00)
-              (bounds 108.00 108.00)
</del><ins>+              (position 24.00 24.00)
+              (bounds 100.00 100.00)
</ins><span class="cx">               (contentsVisible 0)
</span><span class="cx">             )
</span><span class="cx">           )
</span><span class="lines">@@ -93,8 +93,8 @@
</span><span class="cx">           (contentsVisible 0)
</span><span class="cx">           (children 1
</span><span class="cx">             (GraphicsLayer
</span><del>-              (position 20.00 20.00)
-              (bounds 108.00 108.00)
</del><ins>+              (position 24.00 24.00)
+              (bounds 100.00 100.00)
</ins><span class="cx">             )
</span><span class="cx">           )
</span><span class="cx">         )
</span><span class="lines">@@ -113,13 +113,13 @@
</span><span class="cx">       (contentsOpaque 1)
</span><span class="cx">       (children 3
</span><span class="cx">         (GraphicsLayer
</span><del>-          (position 14.00 6.00)
</del><ins>+          (position 18.00 10.00)
</ins><span class="cx">           (anchor 0.50 0.50)
</span><del>-          (bounds 757.00 152.00)
</del><ins>+          (bounds 749.00 144.00)
</ins><span class="cx">           (children 1
</span><span class="cx">             (GraphicsLayer
</span><span class="cx">               (position 20.00 20.00)
</span><del>-              (bounds 108.00 108.00)
</del><ins>+              (bounds 100.00 100.00)
</ins><span class="cx">             )
</span><span class="cx">           )
</span><span class="cx">         )
</span><span class="lines">@@ -130,8 +130,8 @@
</span><span class="cx">           (drawsContent 1)
</span><span class="cx">           (children 1
</span><span class="cx">             (GraphicsLayer
</span><del>-              (position 20.00 20.00)
-              (bounds 108.00 108.00)
</del><ins>+              (position 24.00 24.00)
+              (bounds 100.00 100.00)
</ins><span class="cx">             )
</span><span class="cx">           )
</span><span class="cx">         )
</span><span class="lines">@@ -142,8 +142,8 @@
</span><span class="cx">           (contentsVisible 0)
</span><span class="cx">           (children 1
</span><span class="cx">             (GraphicsLayer
</span><del>-              (position 20.00 20.00)
-              (bounds 108.00 108.00)
</del><ins>+              (position 24.00 24.00)
+              (bounds 100.00 100.00)
</ins><span class="cx">             )
</span><span class="cx">           )
</span><span class="cx">         )
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastclipoutlineoverflowClipexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/fast/clip/outline-overflowClip-expected.txt (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/clip/outline-overflowClip-expected.txt        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/LayoutTests/platform/mac/fast/clip/outline-overflowClip-expected.txt        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -14,7 +14,7 @@
</span><span class="cx">     RenderText {#text} at (2,2) size 102x18
</span><span class="cx">       text run at (2,2) width 102: &quot;text in outer div&quot;
</span><span class="cx">     RenderText {#text} at (0,0) size 0x0
</span><del>-layer at (60,64) size 108x24 backgroundClip at (83,64) size 85x24 clip at (83,67) size 82x18 outlineClip at (83,44) size 229x204 scrollWidth 103
</del><ins>+layer at (60,64) size 108x24 backgroundClip at (83,61) size 88x30 clip at (83,67) size 82x18 outlineClip at (83,44) size 229x204 scrollWidth 103
</ins><span class="cx">   RenderBlock (positioned) {DIV} at (52,20) size 108x24 [bgcolor=#EEEEEE] [border: (3px solid #FF0000)]
</span><span class="cx">     RenderText {#text} at (3,3) size 102x18
</span><span class="cx">       text run at (3,3) width 102: &quot;text in inner div&quot;
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastinlinecontinuationoutlineswithlayersexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/fast/inline/continuation-outlines-with-layers-expected.txt (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/inline/continuation-outlines-with-layers-expected.txt        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/LayoutTests/platform/mac/fast/inline/continuation-outlines-with-layers-expected.txt        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -31,8 +31,6 @@
</span><span class="cx">   RenderInline (relative positioned) {SPAN} at (0,0) size 84x18
</span><span class="cx">     RenderText {#text} at (0,0) size 84x18
</span><span class="cx">       text run at (0,0) width 84: &quot;Content after&quot;
</span><del>-layer at (8,164) size 0x0
-  RenderInline (relative positioned) {SPAN} at (0,0) size 0x0
</del><span class="cx"> layer at (8,164) size 784x22
</span><span class="cx">   RenderBlock (anonymous) at (0,0) size 784x22
</span><span class="cx">     RenderBlock {H3} at (0,0) size 784x22
</span><span class="lines">@@ -51,14 +49,8 @@
</span><span class="cx">     RenderBlock {H3} at (0,0) size 784x22
</span><span class="cx">       RenderText {#text} at (0,0) size 176x22
</span><span class="cx">         text run at (0,0) width 176: &quot;But No Content After&quot;
</span><del>-layer at (8,316) size 0x0
-  RenderInline (relative positioned) {SPAN} at (0,0) size 0x0
-layer at (8,316) size 0x0
-  RenderInline (relative positioned) {SPAN} at (0,0) size 0x0
</del><span class="cx"> layer at (8,316) size 784x22
</span><span class="cx">   RenderBlock (anonymous) at (0,0) size 784x22
</span><span class="cx">     RenderBlock {H3} at (0,0) size 784x22
</span><span class="cx">       RenderText {#text} at (0,0) size 214x22
</span><span class="cx">         text run at (0,0) width 214: &quot;No content before or after.&quot;
</span><del>-layer at (8,357) size 0x0
-  RenderInline (relative positioned) {SPAN} at (0,0) size 0x0
</del></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastrepaintlayeroutlineexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/fast/repaint/layer-outline-expected.txt (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/repaint/layer-outline-expected.txt        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/LayoutTests/platform/mac/fast/repaint/layer-outline-expected.txt        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -21,11 +21,15 @@
</span><span class="cx">   RenderBlock (relative positioned) {DIV} at (0,44) size 784x130
</span><span class="cx"> layer at (18,62) size 100x100
</span><span class="cx">   RenderBlock (positioned) {DIV} at (10,10) size 100x100 [bgcolor=#EEEEEE] [border: (1px solid #000000)]
</span><del>-layer at (148,62) size 100x100 backgroundClip at (148,62) size 90x90 clip at (138,52) size 100x100 outlineClip at (138,52) size 100x100
</del><ins>+layer at (148,62) size 100x100 backgroundClip at (138,52) size 100x100 clip at (138,52) size 100x100 outlineClip at (138,52) size 100x100
</ins><span class="cx">   RenderBlock (positioned) {DIV} at (140,10) size 100x100 [bgcolor=#EEEEEE] [border: (1px solid #000000)]
</span><ins>+layer at (278,62) size 100x100 backgroundClip at (268,52) size 5x5 clip at (268,52) size 5x5 outlineClip at (268,52) size 5x5
+  RenderBlock (positioned) {DIV} at (270,10) size 100x100 [bgcolor=#EEEEEE] [border: (1px solid #000000)]
</ins><span class="cx"> layer at (408,62) size 100x100
</span><span class="cx">   RenderBlock (positioned) {DIV} at (400,10) size 100x100 [bgcolor=#EEEEEE] [border: (1px solid #000000)]
</span><del>-layer at (538,62) size 100x100 backgroundClip at (548,72) size 90x90 clip at (548,72) size 100x100 outlineClip at (548,72) size 100x100
</del><ins>+layer at (538,62) size 100x100 backgroundClip at (548,72) size 100x100 clip at (548,72) size 100x100 outlineClip at (548,72) size 100x100
</ins><span class="cx">   RenderBlock (positioned) {DIV} at (530,10) size 100x100 [bgcolor=#EEEEEE] [border: (1px solid #000000)]
</span><ins>+layer at (668,62) size 100x100 backgroundClip at (773,167) size 5x5 clip at (773,167) size 5x5 outlineClip at (773,167) size 5x5
+  RenderBlock (positioned) {DIV} at (660,10) size 100x100 [bgcolor=#EEEEEE] [border: (1px solid #000000)]
</ins><span class="cx"> layer at (18,322) size 100x100
</span><span class="cx">   RenderBlock (relative positioned) {DIV} at (0,294) size 100x100 [bgcolor=#EEEEEE] [border: (1px solid #000000)]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastrepaintlayeroutlinehorizontalexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/fast/repaint/layer-outline-horizontal-expected.txt (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/repaint/layer-outline-horizontal-expected.txt        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/LayoutTests/platform/mac/fast/repaint/layer-outline-horizontal-expected.txt        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -21,11 +21,15 @@
</span><span class="cx">   RenderBlock (relative positioned) {DIV} at (0,44) size 784x130
</span><span class="cx"> layer at (18,62) size 100x100
</span><span class="cx">   RenderBlock (positioned) {DIV} at (10,10) size 100x100 [bgcolor=#EEEEEE] [border: (1px solid #000000)]
</span><del>-layer at (148,62) size 100x100 backgroundClip at (148,62) size 90x90 clip at (138,52) size 100x100 outlineClip at (138,52) size 100x100
</del><ins>+layer at (148,62) size 100x100 backgroundClip at (138,52) size 100x100 clip at (138,52) size 100x100 outlineClip at (138,52) size 100x100
</ins><span class="cx">   RenderBlock (positioned) {DIV} at (140,10) size 100x100 [bgcolor=#EEEEEE] [border: (1px solid #000000)]
</span><ins>+layer at (278,62) size 100x100 backgroundClip at (268,52) size 5x5 clip at (268,52) size 5x5 outlineClip at (268,52) size 5x5
+  RenderBlock (positioned) {DIV} at (270,10) size 100x100 [bgcolor=#EEEEEE] [border: (1px solid #000000)]
</ins><span class="cx"> layer at (408,62) size 100x100
</span><span class="cx">   RenderBlock (positioned) {DIV} at (400,10) size 100x100 [bgcolor=#EEEEEE] [border: (1px solid #000000)]
</span><del>-layer at (538,62) size 100x100 backgroundClip at (548,72) size 90x90 clip at (548,72) size 100x100 outlineClip at (548,72) size 100x100
</del><ins>+layer at (538,62) size 100x100 backgroundClip at (548,72) size 100x100 clip at (548,72) size 100x100 outlineClip at (548,72) size 100x100
</ins><span class="cx">   RenderBlock (positioned) {DIV} at (530,10) size 100x100 [bgcolor=#EEEEEE] [border: (1px solid #000000)]
</span><ins>+layer at (668,62) size 100x100 backgroundClip at (773,167) size 5x5 clip at (773,167) size 5x5 outlineClip at (773,167) size 5x5
+  RenderBlock (positioned) {DIV} at (660,10) size 100x100 [bgcolor=#EEEEEE] [border: (1px solid #000000)]
</ins><span class="cx"> layer at (18,322) size 100x100
</span><span class="cx">   RenderBlock (relative positioned) {DIV} at (0,294) size 100x100 [bgcolor=#EEEEEE] [border: (1px solid #000000)]
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/ChangeLog        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -1,3 +1,113 @@
</span><ins>+2016-02-06  Zalan Bujtas  &lt;zalan@apple.com&gt;
+
+        Outline should contribute to visual overflow.
+        https://bugs.webkit.org/show_bug.cgi?id=153299
+
+        This patch eliminates the special outline handling (RenderView::setMaximalOutlineSize).
+        Now that outline is part of visual overflow, we don't have to inflate the layers to accomodate
+        outline borders.
+        This patch fixes several focusring related repaint issues. However when both the outline: auto
+        and the descendant renderer are composited, we still don't paint properly in certain cases. -not a regression.
+        (Also when parent renderer has overflow: hidden repaint does not take outline into account. -regression.)
+        It changes column behavior (see TestExpectations) since outline behaves now like any other visual overflow properties.
+
+        Reviewed by David Hyatt.
+
+        Test: fast/repaint/focus-ring-repaint.html
+              fast/repaint/focus-ring-repaint-with-negative-offset.html
+
+        * css/html.css: resetting to old behavior.
+        (:focus):
+        (input:focus, textarea:focus, isindex:focus, keygen:focus, select:focus):
+        * rendering/InlineFlowBox.cpp:
+        (WebCore::InlineFlowBox::addToLine):
+        (WebCore::InlineFlowBox::addOutlineVisualOverflow):
+        (WebCore::InlineFlowBox::computeOverflow):
+        (WebCore::InlineFlowBox::paint): Deleted.
+        * rendering/InlineFlowBox.h:
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::computeOverflow):
+        (WebCore::RenderBlock::outlineStyleForRepaint):
+        (WebCore::RenderBlock::paint): Deleted.
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::layoutBlock): Deleted.
+        (WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren): Deleted.
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::addVisualEffectOverflow):
+        (WebCore::RenderBox::applyVisualEffectOverflow):
+        (WebCore::RenderBox::clippedOverflowRectForRepaint): Deleted.
+        * rendering/RenderBoxModelObject.h:
+        * rendering/RenderDetailsMarker.cpp:
+        (WebCore::RenderDetailsMarker::paint): Deleted.
+        * rendering/RenderElement.cpp:
+        (WebCore::RenderElement::insertChildInternal):
+        (WebCore::RenderElement::styleDidChange):
+        (WebCore::RenderElement::repaintAfterLayoutIfNeeded):
+        (WebCore::RenderElement::issueRepaintForOutlineAuto):
+        (WebCore::RenderElement::updateOutlineAutoAncestor):
+        (WebCore::RenderElement::computeMaxOutlineSize): Deleted.
+        (WebCore::RenderElement::styleWillChange): Deleted.
+        * rendering/RenderElement.h:
+        (WebCore::RenderElement::hasContinuation):
+        * rendering/RenderInline.cpp:
+        (WebCore::RenderInline::paintOutlineForLine): Deleted.
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::calculateClipRects):
+        * rendering/RenderLineBoxList.cpp:
+        (WebCore::RenderLineBoxList::anyLineIntersectsRect):
+        (WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
+        (WebCore::RenderLineBoxList::paint):
+        (WebCore::isOutlinePhase): Deleted.
+        * rendering/RenderLineBoxList.h:
+        * rendering/RenderListBox.cpp:
+        (WebCore::RenderListBox::computePreferredLogicalWidths):
+        * rendering/RenderListMarker.cpp:
+        (WebCore::RenderListMarker::paint): Deleted.
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::propagateRepaintToParentWithOutlineAutoIfNeeded): The renderer with outline: auto is responsible for
+        painting focusring around the descendants. If we issued repaint only on the descendant when it changes,
+        the focusring would not refresh properly. We have to find the ancestor with outline: auto, inflate the repaint rect and
+        issue the repaint on the ancestor if we crossed repaint container.

+        (WebCore::RenderObject::repaintUsingContainer):
+        (WebCore::RenderObject::adjustRectForOutlineAndShadow):
+        (WebCore::RenderObject::setHasOutlineAutoAncestor):
+        (WebCore::RenderObject::adjustRectWithMaximumOutline): Deleted.
+        
+        * rendering/RenderObject.h: We mark the descendants of outline: auto so that
+        when a child renderer changes we can propagate the repaint to the ancestor with outline.
+
+        (WebCore::RenderObject::hasOutlineAutoAncestor):
+        (WebCore::RenderObject::RenderObjectRareData::RenderObjectRareData):
+        * rendering/RenderRegion.cpp:
+        (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
+        * rendering/RenderReplaced.cpp:
+        (WebCore::RenderReplaced::shouldPaint): Deleted.
+        (WebCore::RenderReplaced::clippedOverflowRectForRepaint): Deleted.
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::paint): Deleted.
+        * rendering/RenderTableCell.cpp:
+        (WebCore::RenderTableCell::clippedOverflowRectForRepaint): Deleted.
+        (WebCore::RenderTableCell::paintCollapsedBorders): Deleted.
+        * rendering/RenderTableRow.cpp:
+        (WebCore::RenderTableRow::layout):
+        (WebCore::RenderTableRow::clippedOverflowRectForRepaint): Deleted.
+        * rendering/RenderTableSection.cpp:
+        (WebCore::RenderTableSection::layoutRows):
+        (WebCore::RenderTableSection::computeOverflowFromCells): Deleted.
+        (WebCore::RenderTableSection::paintObject): Deleted.
+        * rendering/RenderTheme.h:
+        (WebCore::RenderTheme::platformFocusRingWidth):
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::setMaximalOutlineSize): Deleted.
+        * rendering/RenderView.h:
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::changeAffectsVisualOverflow):
+        (WebCore::RenderStyle::outlineWidth):
+        * rendering/style/RenderStyle.h:
+
</ins><span class="cx"> 2016-02-06  Andreas Kling  &lt;akling@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS] Throw away linked code when navigating to a new page.
</span></span></pre></div>
<a id="trunkSourceWebCorecsshtmlcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/html.css (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/html.css        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/css/html.css        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -1129,7 +1129,7 @@
</span><span class="cx"> /* states */
</span><span class="cx"> 
</span><span class="cx"> :focus {
</span><del>-    outline: auto;
</del><ins>+    outline: auto 5px -webkit-focus-ring-color;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /* Read-only text fields do not show a focus ring but do still receive focus */
</span><span class="lines">@@ -1137,6 +1137,10 @@
</span><span class="cx">     outline: none;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+input:focus, textarea:focus, isindex:focus, keygen:focus, select:focus {
+    outline-offset: -2px;
+}
+
</ins><span class="cx"> input:matches([type=&quot;button&quot;], [type=&quot;checkbox&quot;], [type=&quot;file&quot;], [type=&quot;hidden&quot;], [type=&quot;image&quot;], [type=&quot;radio&quot;], [type=&quot;reset&quot;], [type=&quot;search&quot;], [type=&quot;submit&quot;]):focus,
</span><span class="cx"> input[type=&quot;file&quot;]:focus::-webkit-file-upload-button {
</span><span class="cx">     outline-offset: 0;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineFlowBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineFlowBox.cpp (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineFlowBox.cpp        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.cpp        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -179,6 +179,8 @@
</span><span class="cx">             || (is&lt;RenderListMarker&gt;(child-&gt;renderer()) &amp;&amp; !downcast&lt;RenderListMarker&gt;(child-&gt;renderer()).isInside())
</span><span class="cx">             || childStyle.hasBorderImageOutsets()))
</span><span class="cx">             child-&gt;clearKnownToHaveNoOverflow();
</span><ins>+        else if (childStyle.hasOutlineInVisualOverflow())
+            child-&gt;clearKnownToHaveNoOverflow();
</ins><span class="cx">         
</span><span class="cx">         if (knownToHaveNoOverflow() &amp;&amp; is&lt;InlineFlowBox&gt;(*child) &amp;&amp; !downcast&lt;InlineFlowBox&gt;(*child).knownToHaveNoOverflow())
</span><span class="cx">             clearKnownToHaveNoOverflow();
</span><span class="lines">@@ -946,6 +948,20 @@
</span><span class="cx">     textBox.setLogicalOverflowRect(logicalVisualOverflow);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline void InlineFlowBox::addOutlineVisualOverflow(LayoutRect&amp; logicalVisualOverflow)
+{
+    const auto&amp; lineStyle = this-&gt;lineStyle();
+    if (!lineStyle.hasOutlineInVisualOverflow())
+        return;
+    LayoutUnit outlineSize = lineStyle.outlineSize();
+    LayoutUnit logicalTopVisualOverflow = std::min(LayoutUnit(logicalTop() - outlineSize), logicalVisualOverflow.y());
+    LayoutUnit logicalBottomVisualOverflow = std::max(LayoutUnit(logicalBottom() + outlineSize), logicalVisualOverflow.maxY());
+    LayoutUnit logicalLeftVisualOverflow = std::min(LayoutUnit(logicalLeft() - outlineSize), logicalVisualOverflow.x());
+    LayoutUnit logicalRightVisualOverflow = std::max(LayoutUnit(logicalRight() + outlineSize), logicalVisualOverflow.maxX());
+    logicalVisualOverflow = LayoutRect(logicalLeftVisualOverflow, logicalTopVisualOverflow,
+        logicalRightVisualOverflow - logicalLeftVisualOverflow, logicalBottomVisualOverflow - logicalTopVisualOverflow);
+}
+
</ins><span class="cx"> inline void InlineFlowBox::addReplacedChildOverflow(const InlineBox* inlineBox, LayoutRect&amp; logicalLayoutOverflow, LayoutRect&amp; logicalVisualOverflow)
</span><span class="cx"> {
</span><span class="cx">     const RenderBox&amp; box = downcast&lt;RenderBox&gt;(inlineBox-&gt;renderer());
</span><span class="lines">@@ -983,6 +999,7 @@
</span><span class="cx">     LayoutRect logicalVisualOverflow(logicalLayoutOverflow);
</span><span class="cx">   
</span><span class="cx">     addBoxShadowVisualOverflow(logicalVisualOverflow);
</span><ins>+    addOutlineVisualOverflow(logicalVisualOverflow);
</ins><span class="cx">     addBorderOutsetVisualOverflow(logicalVisualOverflow);
</span><span class="cx"> 
</span><span class="cx">     for (InlineBox* child = firstChild(); child; child = child-&gt;nextOnLine()) {
</span><span class="lines">@@ -1146,7 +1163,6 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     LayoutRect overflowRect(visualOverflowRect(lineTop, lineBottom));
</span><del>-    renderer().adjustRectWithMaximumOutline(paintInfo.phase, overflowRect);
</del><span class="cx">     flipForWritingMode(overflowRect);
</span><span class="cx">     overflowRect.moveBy(paintOffset);
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineFlowBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineFlowBox.h (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineFlowBox.h        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.h        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -309,6 +309,7 @@
</span><span class="cx">     void addBoxShadowVisualOverflow(LayoutRect&amp; logicalVisualOverflow);
</span><span class="cx">     void addBorderOutsetVisualOverflow(LayoutRect&amp; logicalVisualOverflow);
</span><span class="cx">     void addTextBoxVisualOverflow(InlineTextBox&amp;, GlyphOverflowAndFallbackFontsMap&amp;, LayoutRect&amp; logicalVisualOverflow);
</span><ins>+    void addOutlineVisualOverflow(LayoutRect&amp; logicalVisualOverflow);
</ins><span class="cx">     void addReplacedChildOverflow(const InlineBox*, LayoutRect&amp; logicalLayoutOverflow, LayoutRect&amp; logicalVisualOverflow);
</span><span class="cx">     void constrainToLineTopAndBottomIfNeeded(LayoutRect&amp;) const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlock.cpp        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -1003,7 +1003,6 @@
</span><span class="cx"> void RenderBlock::computeOverflow(LayoutUnit oldClientAfterEdge, bool)
</span><span class="cx"> {
</span><span class="cx">     clearOverflow();
</span><del>-
</del><span class="cx">     // Add overflow from children.
</span><span class="cx">     addOverflowFromChildren();
</span><span class="cx"> 
</span><span class="lines">@@ -1025,7 +1024,7 @@
</span><span class="cx">             m_overflow-&gt;setLayoutClientAfterEdge(oldClientAfterEdge);
</span><span class="cx">     }
</span><span class="cx">         
</span><del>-    // Add visual overflow from box-shadow and border-image-outset.
</del><ins>+    // Add visual overflow from box-shadow, border-image-outset and outline.
</ins><span class="cx">     addVisualEffectOverflow();
</span><span class="cx"> 
</span><span class="cx">     // Add visual overflow from theme.
</span><span class="lines">@@ -1409,7 +1408,6 @@
</span><span class="cx">     if (!isDocumentElementRenderer()) {
</span><span class="cx">         LayoutRect overflowBox = overflowRectForPaintRejection(namedFlowFragment);
</span><span class="cx">         flipForWritingMode(overflowBox);
</span><del>-        adjustRectWithMaximumOutline(phase, overflowBox);
</del><span class="cx">         overflowBox.moveBy(adjustedPaintOffset);
</span><span class="cx">         if (!overflowBox.intersects(paintInfo.rect)
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -3390,7 +3388,7 @@
</span><span class="cx"> 
</span><span class="cx"> const RenderStyle&amp; RenderBlock::outlineStyleForRepaint() const
</span><span class="cx"> {
</span><del>-    return isAnonymousBlockContinuation() ? continuation()-&gt;style() : style();
</del><ins>+    return isAnonymousBlockContinuation() ? continuation()-&gt;style() : RenderElement::outlineStyleForRepaint();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderBlock::childBecameNonInline(RenderElement&amp;)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockFlowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -561,8 +561,6 @@
</span><span class="cx">         else
</span><span class="cx">             repaintRect = LayoutRect(repaintLogicalTop, repaintLogicalLeft, repaintLogicalBottom - repaintLogicalTop, repaintLogicalRight - repaintLogicalLeft);
</span><span class="cx"> 
</span><del>-        repaintRect.inflate(view().maximalOutlineSize());
-        
</del><span class="cx">         if (hasOverflowClip()) {
</span><span class="cx">             // Adjust repaint rect for scroll offset
</span><span class="cx">             repaintRect.move(-scrolledContentOffset());
</span><span class="lines">@@ -3462,9 +3460,6 @@
</span><span class="cx"> void RenderBlockFlow::addFocusRingRectsForInlineChildren(Vector&lt;IntRect&gt;&amp; rects, const LayoutPoint&amp; additionalOffset, const RenderLayerModelObject*)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(childrenInline());
</span><del>-
-    ensureLineBoxes();
-
</del><span class="cx">     for (RootInlineBox* curr = firstRootBox(); curr; curr = curr-&gt;nextRootBox()) {
</span><span class="cx">         LayoutUnit top = std::max&lt;LayoutUnit&gt;(curr-&gt;lineTop(), curr-&gt;top());
</span><span class="cx">         LayoutUnit bottom = std::min&lt;LayoutUnit&gt;(curr-&gt;lineBottom(), curr-&gt;top() + curr-&gt;height());
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBlockLineLayoutcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -1986,9 +1986,10 @@
</span><span class="cx">         if (region)
</span><span class="cx">             region-&gt;addLayoutOverflowForBox(this, curr-&gt;paddedLayoutOverflowRect(endPadding));
</span><span class="cx">         if (!hasOverflowClip()) {
</span><del>-            addVisualOverflow(curr-&gt;visualOverflowRect(curr-&gt;lineTop(), curr-&gt;lineBottom()));
</del><ins>+            LayoutRect childVisualOverflowRect = curr-&gt;visualOverflowRect(curr-&gt;lineTop(), curr-&gt;lineBottom());
+            addVisualOverflow(childVisualOverflowRect);
</ins><span class="cx">             if (region)
</span><del>-                region-&gt;addVisualOverflowForBox(this, curr-&gt;visualOverflowRect(curr-&gt;lineTop(), curr-&gt;lineBottom()));
</del><ins>+                region-&gt;addVisualOverflowForBox(this, childVisualOverflowRect);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -2177,17 +2177,10 @@
</span><span class="cx"> {
</span><span class="cx">     if (style().visibility() != VISIBLE &amp;&amp; !enclosingLayer()-&gt;hasVisibleContent())
</span><span class="cx">         return LayoutRect();
</span><del>-
</del><span class="cx">     LayoutRect r = visualOverflowRect();
</span><del>-
</del><span class="cx">     // FIXME: layoutDelta needs to be applied in parts before/after transforms and
</span><span class="cx">     // repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308
</span><span class="cx">     r.move(view().layoutDelta());
</span><del>-    
-    // We have to use maximalOutlineSize() because a child might have an outline
-    // that projects outside of our overflowRect.
-    ASSERT(style().outlineSize() &lt;= view().maximalOutlineSize());
-    r.inflate(view().maximalOutlineSize());
</del><span class="cx">     return computeRectForRepaint(r, repaintContainer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4500,11 +4493,10 @@
</span><span class="cx"> 
</span><span class="cx"> void RenderBox::addVisualEffectOverflow()
</span><span class="cx"> {
</span><del>-    if (!style().boxShadow() &amp;&amp; !style().hasBorderImageOutsets())
</del><ins>+    if (!style().boxShadow() &amp;&amp; !style().hasBorderImageOutsets() &amp;&amp; !outlineStyleForRepaint().hasOutlineInVisualOverflow())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    LayoutRect borderBox = borderBoxRect();
-    addVisualOverflow(applyVisualEffectOverflow(borderBox));
</del><ins>+    addVisualOverflow(applyVisualEffectOverflow(borderBoxRect()));
</ins><span class="cx"> 
</span><span class="cx">     RenderFlowThread* flowThread = flowThreadContainingBlock();
</span><span class="cx">     if (flowThread)
</span><span class="lines">@@ -4548,6 +4540,13 @@
</span><span class="cx">         overflowMaxY = std::max(overflowMaxY, borderBox.maxY() + ((!isFlipped || !isHorizontal) ? borderOutsets.bottom() : borderOutsets.top()));
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    if (outlineStyleForRepaint().hasOutlineInVisualOverflow()) {
+        LayoutUnit outlineSize = outlineStyleForRepaint().outlineSize();
+        overflowMinX = std::min(overflowMinX, borderBox.x() - outlineSize);
+        overflowMaxX = std::max(overflowMaxX, borderBox.maxX() + outlineSize);
+        overflowMinY = std::min(overflowMinY, borderBox.y() - outlineSize);
+        overflowMaxY = std::max(overflowMaxY, borderBox.maxY() + outlineSize);
+    }
</ins><span class="cx">     // Add in the final overflow with shadows and outsets combined.
</span><span class="cx">     return LayoutRect(overflowMinX, overflowMinY, overflowMaxX - overflowMinX, overflowMaxY - overflowMinY);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxModelObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.h (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBoxModelObject.h        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.h        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -235,6 +235,8 @@
</span><span class="cx"> 
</span><span class="cx">     void suspendAnimations(double time = 0);
</span><span class="cx"> 
</span><ins>+    RenderBoxModelObject* continuation() const;
+
</ins><span class="cx"> protected:
</span><span class="cx">     RenderBoxModelObject(Element&amp;, Ref&lt;RenderStyle&gt;&amp;&amp;, BaseTypeFlags);
</span><span class="cx">     RenderBoxModelObject(Document&amp;, Ref&lt;RenderStyle&gt;&amp;&amp;, BaseTypeFlags);
</span><span class="lines">@@ -253,7 +255,6 @@
</span><span class="cx"> 
</span><span class="cx">     InterpolationQuality chooseInterpolationQuality(GraphicsContext&amp;, Image&amp;, const void*, const LayoutSize&amp;);
</span><span class="cx"> 
</span><del>-    RenderBoxModelObject* continuation() const;
</del><span class="cx">     void setContinuation(RenderBoxModelObject*);
</span><span class="cx"> 
</span><span class="cx">     LayoutRect localCaretRectForEmptyElement(LayoutUnit width, LayoutUnit textIndentOffset);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderDetailsMarkercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderDetailsMarker.cpp (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderDetailsMarker.cpp        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderDetailsMarker.cpp        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -124,7 +124,6 @@
</span><span class="cx">     LayoutPoint boxOrigin(paintOffset + location());
</span><span class="cx">     LayoutRect overflowRect(visualOverflowRect());
</span><span class="cx">     overflowRect.moveBy(boxOrigin);
</span><del>-    adjustRectWithMaximumOutline(paintInfo.phase, overflowRect);
</del><span class="cx"> 
</span><span class="cx">     if (!paintInfo.rect.intersects(snappedIntRect(overflowRect)))
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderElement.cpp (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderElement.cpp        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderElement.cpp        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -371,22 +371,6 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void RenderElement::computeMaxOutlineSize(const RenderStyle&amp; style) const
-{
-    // We need to ensure that view-&gt;maximalOutlineSize() is valid for any repaints that happen
-    // during styleDidChange (it's used by clippedOverflowRectForRepaint()).
-    if (!style.outlineWidth())
-        return;
-    float maxOutlineSize = style.outlineSize();
-    if (style.outlineStyleIsAuto())
-        maxOutlineSize = std::max(theme().platformFocusRingWidth() + style.outlineOffset(), maxOutlineSize);
-
-    if (maxOutlineSize &lt; view().maximalOutlineSize())
-        return;
-
-    view().setMaximalOutlineSize(maxOutlineSize);
-}
-
</del><span class="cx"> void RenderElement::initializeStyle()
</span><span class="cx"> {
</span><span class="cx">     styleWillChange(StyleDifferenceNewStyle, style());
</span><span class="lines">@@ -615,6 +599,8 @@
</span><span class="cx">         cache-&gt;childrenChanged(this, newChild);
</span><span class="cx">     if (is&lt;RenderBlockFlow&gt;(*this))
</span><span class="cx">         downcast&lt;RenderBlockFlow&gt;(*this).invalidateLineLayoutPath();
</span><ins>+    if (hasOutlineAutoAncestor() || outlineStyleForRepaint().outlineStyleIsAuto())
+        newChild-&gt;setHasOutlineAutoAncestor();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderElement::removeChildInternal(RenderObject&amp; oldChild, NotifyChildrenType notifyChildren)
</span><span class="lines">@@ -926,11 +912,6 @@
</span><span class="cx"> 
</span><span class="cx">     if (isDocumentElementRenderer() || isBody())
</span><span class="cx">         view().frameView().updateExtendBackgroundIfNecessary();
</span><del>-
-    if (!oldStyle || (oldStyle-&gt;outlineSize() != newStyle.outlineSize()
-        || (oldStyle-&gt;outlineStyleIsAuto() &amp;&amp; !newStyle.outlineStyleIsAuto())
-        || (!oldStyle-&gt;outlineStyleIsAuto() &amp;&amp; newStyle.outlineStyleIsAuto())))
-        computeMaxOutlineSize(newStyle);
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderElement::handleDynamicFloatPositionChange()
</span><span class="lines">@@ -1037,6 +1018,12 @@
</span><span class="cx">     if (oldStyle &amp;&amp; !areCursorsEqual(oldStyle, &amp;style()))
</span><span class="cx">         frame().eventHandler().scheduleCursorUpdate();
</span><span class="cx"> #endif
</span><ins>+    bool hadOutlineAuto = oldStyle &amp;&amp; oldStyle-&gt;outlineStyleIsAuto();
+    bool hasOutlineAuto = outlineStyleForRepaint().outlineStyleIsAuto();
+    if (hasOutlineAuto != hadOutlineAuto) {
+        updateOutlineAutoAncestor(hasOutlineAuto);
+        issueRepaintForOutlineAuto(hasOutlineAuto ? outlineStyleForRepaint().outlineSize() : oldStyle-&gt;outlineSize());
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderElement::insertedIntoTree()
</span><span class="lines">@@ -1315,8 +1302,7 @@
</span><span class="cx">         // This ASSERT fails due to animations. See https://bugs.webkit.org/show_bug.cgi?id=37048
</span><span class="cx">         // ASSERT(!newOutlineBoxRectPtr || *newOutlineBoxRectPtr == outlineBoundsForRepaint(repaintContainer));
</span><span class="cx">         newOutlineBox = newOutlineBoxRectPtr ? *newOutlineBoxRectPtr : outlineBoundsForRepaint(repaintContainer);
</span><del>-        if (newOutlineBox.location() != oldOutlineBox.location() || (mustRepaintBackgroundOrBorder(*this) &amp;&amp; (newBounds != oldBounds || newOutlineBox != oldOutlineBox)))
-            fullRepaint = true;
</del><ins>+        fullRepaint = (newOutlineBox.location() != oldOutlineBox.location() || (mustRepaintBackgroundOrBorder(*this) &amp;&amp; (newBounds != oldBounds || newOutlineBox != oldOutlineBox)));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!repaintContainer)
</span><span class="lines">@@ -2103,7 +2089,7 @@
</span><span class="cx">     addFocusRingRects(focusRingRects, paintOffset, paintInfo.paintContainer);
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     bool needsRepaint;
</span><del>-    paintInfo.context().drawFocusRing(focusRingRects, theme().platformFocusRingWidth(), style.outlineOffset(), document().page()-&gt;focusController().timeSinceFocusWasSet(), needsRepaint);
</del><ins>+    paintInfo.context().drawFocusRing(focusRingRects, style.outlineWidth(), style.outlineOffset(), document().page()-&gt;focusController().timeSinceFocusWasSet(), needsRepaint);
</ins><span class="cx">     if (needsRepaint)
</span><span class="cx">         document().page()-&gt;focusController().setFocusedElementNeedsRepaint();
</span><span class="cx"> #else
</span><span class="lines">@@ -2179,4 +2165,33 @@
</span><span class="cx">         graphicsContext.endTransparencyLayer();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void RenderElement::issueRepaintForOutlineAuto(float outlineSize)
+{
+    LayoutRect repaintRect;
+    Vector&lt;IntRect&gt; focusRingRects;
+    addFocusRingRects(focusRingRects, LayoutPoint(), containerForRepaint());
+    for (auto rect : focusRingRects) {
+        rect.inflate(outlineSize);
+        repaintRect.unite(rect);
+    }
+    repaintRectangle(repaintRect);
</ins><span class="cx"> }
</span><ins>+
+void RenderElement::updateOutlineAutoAncestor(bool hasOutlineAuto) const
+{
+    for (auto* child = firstChild(); child; child = child-&gt;nextSibling()) {
+        if (hasOutlineAuto == child-&gt;hasOutlineAutoAncestor())
+            continue;
+        child-&gt;setHasOutlineAutoAncestor(hasOutlineAuto);
+        bool childHasOutlineAuto = child-&gt;outlineStyleForRepaint().outlineStyleIsAuto();
+        if (childHasOutlineAuto)
+            continue;
+        if (!is&lt;RenderElement&gt;(child))
+            continue;
+        downcast&lt;RenderElement&gt;(*child).updateOutlineAutoAncestor(hasOutlineAuto);
+    }
+    if (hasContinuation())
+        downcast&lt;RenderBoxModelObject&gt;(*this).continuation()-&gt;updateOutlineAutoAncestor(hasOutlineAuto);
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderElement.h (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderElement.h        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderElement.h        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -216,6 +216,7 @@
</span><span class="cx">     void drawLineForBoxSide(GraphicsContext&amp;, const FloatRect&amp;, BoxSide, Color, EBorderStyle, float adjacentWidth1, float adjacentWidth2, bool antialias = false) const;
</span><span class="cx"> 
</span><span class="cx">     bool childRequiresTable(const RenderObject&amp; child) const;
</span><ins>+    bool hasContinuation() const { return m_hasContinuation; }
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     enum BaseTypeFlag {
</span><span class="lines">@@ -255,7 +256,6 @@
</span><span class="cx">     bool renderInlineAlwaysCreatesLineBoxes() const { return m_renderInlineAlwaysCreatesLineBoxes; }
</span><span class="cx"> 
</span><span class="cx">     void setHasContinuation(bool b) { m_hasContinuation = b; }
</span><del>-    bool hasContinuation() const { return m_hasContinuation; }
</del><span class="cx"> 
</span><span class="cx">     static bool hasControlStatesForRenderer(const RenderObject*);
</span><span class="cx">     static ControlStates* controlStatesForRenderer(const RenderObject*);
</span><span class="lines">@@ -276,6 +276,7 @@
</span><span class="cx"> 
</span><span class="cx">     void paintFocusRing(PaintInfo&amp;, const LayoutPoint&amp;, const RenderStyle&amp;);
</span><span class="cx">     void paintOutline(PaintInfo&amp;, const LayoutRect&amp;);
</span><ins>+    void updateOutlineAutoAncestor(bool hasOutlineAuto) const;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     RenderElement(ContainerNode&amp;, Ref&lt;RenderStyle&gt;&amp;&amp;, BaseTypeFlags);
</span><span class="lines">@@ -314,9 +315,8 @@
</span><span class="cx">     void clearLayoutRootIfNeeded() const;
</span><span class="cx">     
</span><span class="cx">     bool shouldWillChangeCreateStackingContext() const;
</span><ins>+    void issueRepaintForOutlineAuto(float outlineSize);
</ins><span class="cx"> 
</span><del>-    void computeMaxOutlineSize(const RenderStyle&amp;) const;
-
</del><span class="cx">     unsigned m_baseTypeFlags : 6;
</span><span class="cx">     unsigned m_ancestorLineBoxDirty : 1;
</span><span class="cx">     unsigned m_hasInitializedStyle : 1;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderInlinecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderInline.cpp        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -1644,10 +1644,8 @@
</span><span class="cx">     float outlineWidth = styleToUse.outlineWidth();
</span><span class="cx">     float outlineOffset = style().outlineOffset();
</span><span class="cx">     EBorderStyle outlineStyle = styleToUse.outlineStyle();
</span><del>-
</del><span class="cx">     bool antialias = shouldAntialiasLines(graphicsContext);
</span><span class="cx"> 
</span><del>-
</del><span class="cx">     LayoutRect box(LayoutPoint(paintOffset.x() + thisline.x() - outlineOffset, paintOffset.y() + thisline.y() - outlineOffset),
</span><span class="cx">         LayoutSize(thisline.width() + 2 * outlineOffset, thisline.height() + 2 * outlineOffset));
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.cpp        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -5612,12 +5612,6 @@
</span><span class="cx"> 
</span><span class="cx">         foregroundRect = backgroundRect;
</span><span class="cx">         outlineRect = backgroundRect;
</span><del>-
-        // If the region does not clip its overflow, inflate the outline rect.
-        if (namedFlowFragment) {
-            if (!(namedFlowFragment-&gt;parent()-&gt;hasOverflowClip() &amp;&amp; (&amp;namedFlowFragment-&gt;fragmentContainerLayer() != clipRectsContext.rootLayer || clipRectsContext.respectOverflowClip == RespectOverflowClip)))
-                outlineRect.inflate(renderer().view().maximalOutlineSize());
-        }
</del><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Update the clip rects that will be passed to child layers.
</span><span class="lines">@@ -5656,7 +5650,6 @@
</span><span class="cx">             bounds.move(offsetFromRootLocal);
</span><span class="cx">             if (this != clipRectsContext.rootLayer || clipRectsContext.respectOverflowClip == RespectOverflowClip)
</span><span class="cx">                 backgroundRect.intersect(bounds);
</span><del>-            
</del><span class="cx">             // Boxes inside flow threads don't have their logical left computed to avoid
</span><span class="cx">             // floats. Instead, that information is kept in their RenderBoxRegionInfo structure.
</span><span class="cx">             // As such, the layer bounds must be enlarged to encompass their background rect
</span><span class="lines">@@ -5769,12 +5762,8 @@
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     // If we aren't an inline flow, and our layer bounds do intersect the damage rect, then we can return true.
</span><del>-    if (!renderer().isRenderInline()) {
-        LayoutRect b = layerBounds;
-        b.inflate(renderer().view().maximalOutlineSize());
-        if (b.intersects(damageRect))
-            return true;
-    }
</del><ins>+    if (!renderer().isRenderInline() &amp;&amp; layerBounds.intersects(damageRect))
+        return true;
</ins><span class="cx"> 
</span><span class="cx">     RenderNamedFlowFragment* namedFlowFragment = currentRenderNamedFlowFragment();
</span><span class="cx">     // When using regions, some boxes might have their frame rect relative to the flow thread, which could
</span><span class="lines">@@ -5782,10 +5771,9 @@
</span><span class="cx">     // e.g. an absolutely positioned box with bottom:0px and right:0px would have it's frameRect.x relative
</span><span class="cx">     // to the flow thread, not the last region (in which it will end up because of bottom:0px)
</span><span class="cx">     if (namedFlowFragment &amp;&amp; renderer().flowThreadContainingBlock()) {
</span><del>-        LayoutRect b = layerBounds;
-        b.moveBy(namedFlowFragment-&gt;visualOverflowRectForBox(downcast&lt;RenderBoxModelObject&gt;(renderer())).location());
-        b.inflate(renderer().view().maximalOutlineSize());
-        if (b.intersects(damageRect))
</del><ins>+        LayoutRect adjustedBounds = layerBounds;
+        adjustedBounds.moveBy(namedFlowFragment-&gt;visualOverflowRectForBox(downcast&lt;RenderBoxModelObject&gt;(renderer())).location());
+        if (adjustedBounds.intersects(damageRect))
</ins><span class="cx">             return true;
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="lines">@@ -5836,8 +5824,6 @@
</span><span class="cx">                 result.unite(overflowRect);
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-
-    result.inflate(renderer().view().maximalOutlineSize());
</del><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5925,7 +5911,6 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     LayoutRect boundingBoxRect = localBoundingBox(flags);
</span><del>-
</del><span class="cx">     if (renderer().view().frameView().hasFlippedBlockRenderers()) {
</span><span class="cx">         if (is&lt;RenderBox&gt;(renderer()))
</span><span class="cx">             downcast&lt;RenderBox&gt;(renderer()).flipForWritingMode(boundingBoxRect);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLineBoxListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLineBoxList.cpp (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLineBoxList.cpp        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderLineBoxList.cpp        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -180,7 +180,7 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool RenderLineBoxList::anyLineIntersectsRect(RenderBoxModelObject* renderer, const LayoutRect&amp; rect, const LayoutPoint&amp; offset, bool usePrintRect, LayoutUnit outlineSize) const
</del><ins>+bool RenderLineBoxList::anyLineIntersectsRect(RenderBoxModelObject* renderer, const LayoutRect&amp; rect, const LayoutPoint&amp; offset, bool usePrintRect) const
</ins><span class="cx"> {
</span><span class="cx">     // We can check the first box and last box and avoid painting/hit testing if we don't
</span><span class="cx">     // intersect.  This is a quick short-circuit that we can take to avoid walking any lines.
</span><span class="lines">@@ -194,24 +194,14 @@
</span><span class="cx">     LayoutUnit lastLineBottom = lastLineBox()-&gt;logicalBottomVisualOverflow(lastRootBox.lineBottom());
</span><span class="cx">     if (usePrintRect &amp;&amp; !lastLineBox()-&gt;parent())
</span><span class="cx">         lastLineBottom = std::max(lastLineBottom, lastRootBox.lineBottom());
</span><del>-    LayoutUnit logicalTop = firstLineTop - outlineSize;
-    LayoutUnit logicalBottom = outlineSize + lastLineBottom;
-    
-    return rangeIntersectsRect(renderer, logicalTop, logicalBottom, rect, offset);
</del><ins>+    return rangeIntersectsRect(renderer, firstLineTop, lastLineBottom, rect, offset);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool isOutlinePhase(PaintPhase phase)
-{
-    return phase == PaintPhaseOutline || phase == PaintPhaseSelfOutline || phase == PaintPhaseChildOutlines;
-}
-
</del><span class="cx"> bool RenderLineBoxList::lineIntersectsDirtyRect(RenderBoxModelObject* renderer, InlineFlowBox* box, const PaintInfo&amp; paintInfo, const LayoutPoint&amp; offset) const
</span><span class="cx"> {
</span><span class="cx">     const RootInlineBox&amp; rootBox = box-&gt;root();
</span><del>-    const LayoutUnit outlineSize = isOutlinePhase(paintInfo.phase) ? renderer-&gt;view().maximalOutlineSize() : 0;
-    LayoutUnit logicalTop = std::min(box-&gt;logicalTopVisualOverflow(rootBox.lineTop()), rootBox.selectionTop()) - outlineSize;
-    LayoutUnit logicalBottom = box-&gt;logicalBottomVisualOverflow(rootBox.lineBottom()) + outlineSize;
-    
</del><ins>+    LayoutUnit logicalTop = std::min(box-&gt;logicalTopVisualOverflow(rootBox.lineTop()), rootBox.selectionTop());
+    LayoutUnit logicalBottom = box-&gt;logicalBottomVisualOverflow(rootBox.lineBottom());
</ins><span class="cx">     return rangeIntersectsRect(renderer, logicalTop, logicalBottom, paintInfo.rect, offset);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -227,8 +217,7 @@
</span><span class="cx">     // NSViews.  Do not add any more code for this.
</span><span class="cx">     RenderView&amp; v = renderer-&gt;view();
</span><span class="cx">     bool usePrintRect = !v.printRect().isEmpty();
</span><del>-    LayoutUnit outlineSize = isOutlinePhase(paintInfo.phase) ? v.maximalOutlineSize() : 0;
-    if (!anyLineIntersectsRect(renderer, paintInfo.rect, paintOffset, usePrintRect, outlineSize))
</del><ins>+    if (!anyLineIntersectsRect(renderer, paintInfo.rect, paintOffset, usePrintRect))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     PaintInfo info(paintInfo);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLineBoxListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLineBoxList.h (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLineBoxList.h        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderLineBoxList.h        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx">     bool hitTest(RenderBoxModelObject*, const HitTestRequest&amp;, HitTestResult&amp;, const HitTestLocation&amp; locationInContainer, const LayoutPoint&amp; accumulatedOffset, HitTestAction) const;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    bool anyLineIntersectsRect(RenderBoxModelObject*, const LayoutRect&amp;, const LayoutPoint&amp;, bool usePrintRect = false, LayoutUnit outlineSize = 0) const;
</del><ins>+    bool anyLineIntersectsRect(RenderBoxModelObject*, const LayoutRect&amp;, const LayoutPoint&amp;, bool usePrintRect = false) const;
</ins><span class="cx">     bool lineIntersectsDirtyRect(RenderBoxModelObject*, InlineFlowBox*, const PaintInfo&amp;, const LayoutPoint&amp;) const;
</span><span class="cx">     bool rangeIntersectsRect(RenderBoxModelObject*, LayoutUnit logicalTop, LayoutUnit logicalBottom, const LayoutRect&amp;, const LayoutPoint&amp;) const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderListBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderListBox.cpp (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderListBox.cpp        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderListBox.cpp        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -59,6 +59,7 @@
</span><span class="cx"> #include &quot;Settings.h&quot;
</span><span class="cx"> #include &quot;SpatialNavigation.h&quot;
</span><span class="cx"> #include &quot;StyleResolver.h&quot;
</span><ins>+#include &quot;StyleTreeResolver.h&quot;
</ins><span class="cx"> #include &quot;WheelEventTestTrigger.h&quot;
</span><span class="cx"> #include &lt;math.h&gt;
</span><span class="cx"> #include &lt;wtf/StackStats.h&gt;
</span><span class="lines">@@ -198,7 +199,8 @@
</span><span class="cx"> 
</span><span class="cx"> void RenderListBox::computePreferredLogicalWidths()
</span><span class="cx"> {
</span><del>-    ASSERT(!m_optionsChanged);
</del><ins>+    // Nested style recal do not fire post recal callbacks. see webkit.org/b/153767
+    ASSERT(!m_optionsChanged || Style::postResolutionCallbacksAreSuspended());
</ins><span class="cx"> 
</span><span class="cx">     m_minPreferredLogicalWidth = 0;
</span><span class="cx">     m_maxPreferredLogicalWidth = 0;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderListMarkercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderListMarker.cpp (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderListMarker.cpp        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderListMarker.cpp        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -1184,8 +1184,6 @@
</span><span class="cx">     LayoutPoint boxOrigin(paintOffset + location());
</span><span class="cx">     LayoutRect overflowRect(visualOverflowRect());
</span><span class="cx">     overflowRect.moveBy(boxOrigin);
</span><del>-    adjustRectWithMaximumOutline(paintInfo.phase, overflowRect);
-
</del><span class="cx">     if (!paintInfo.rect.intersects(overflowRect))
</span><span class="cx">         return;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.cpp        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -888,6 +888,38 @@
</span><span class="cx">     return repaintContainer;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void RenderObject::propagateRepaintToParentWithOutlineAutoIfNeeded(const RenderLayerModelObject&amp; repaintContainer, const LayoutRect&amp; repaintRect) const
+{
+    if (!hasOutlineAutoAncestor())
+        return;
+
+    // FIXME: We should really propagate only when the the child renderer sticks out.
+    bool repaintRectNeedsConverting = false;
+    // Issue repaint on the renderer with outline: auto.
+    for (const auto* renderer = this; renderer; renderer = renderer-&gt;parent()) {
+        bool rendererHasOutlineAutoAncestor = renderer-&gt;hasOutlineAutoAncestor();
+        ASSERT(rendererHasOutlineAutoAncestor
+            || renderer-&gt;outlineStyleForRepaint().outlineStyleIsAuto()
+            || (is&lt;RenderElement&gt;(*renderer) &amp;&amp; downcast&lt;RenderElement&gt;(*renderer).hasContinuation()));
+        if (renderer == &amp;repaintContainer &amp;&amp; rendererHasOutlineAutoAncestor)
+            repaintRectNeedsConverting = true;
+        if (rendererHasOutlineAutoAncestor)
+            continue;
+        // Issue repaint on the correct repaint container.
+        LayoutRect adjustedRepaintRect = repaintRect;
+        adjustedRepaintRect.inflate(renderer-&gt;outlineStyleForRepaint().outlineSize());
+        if (!repaintRectNeedsConverting)
+            repaintContainer.repaintRectangle(adjustedRepaintRect);
+        else if (is&lt;RenderLayerModelObject&gt;(renderer)) {
+            const auto&amp; rendererWithOutline = downcast&lt;RenderLayerModelObject&gt;(*renderer);
+            adjustedRepaintRect = LayoutRect(repaintContainer.localToContainerQuad(FloatRect(adjustedRepaintRect), &amp;rendererWithOutline).boundingBox());
+            rendererWithOutline.repaintRectangle(adjustedRepaintRect);
+        }
+        return;
+    }
+    ASSERT_NOT_REACHED();
+}
+
</ins><span class="cx"> void RenderObject::repaintUsingContainer(const RenderLayerModelObject* repaintContainer, const LayoutRect&amp; r, bool shouldClipToLayer) const
</span><span class="cx"> {
</span><span class="cx">     if (r.isEmpty())
</span><span class="lines">@@ -901,6 +933,8 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    propagateRepaintToParentWithOutlineAutoIfNeeded(*repaintContainer, r);
+
</ins><span class="cx">     if (repaintContainer-&gt;hasFilter() &amp;&amp; repaintContainer-&gt;layer() &amp;&amp; repaintContainer-&gt;layer()-&gt;requiresFullLayerImageForFilters()) {
</span><span class="cx">         repaintContainer-&gt;layer()-&gt;setFilterBackendNeedsRepaintingInRect(r);
</span><span class="cx">         return;
</span><span class="lines">@@ -918,7 +952,6 @@
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    
</del><span class="cx"> 
</span><span class="cx">     if (view().usesCompositing()) {
</span><span class="cx">         ASSERT(repaintContainer-&gt;isComposited());
</span><span class="lines">@@ -1919,13 +1952,6 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void RenderObject::adjustRectWithMaximumOutline(PaintPhase phase, LayoutRect&amp; rect) const
-{
-    if (phase != PaintPhaseOutline &amp;&amp; phase != PaintPhaseSelfOutline &amp;&amp; phase != PaintPhaseChildOutlines)
-        return;
-    rect.inflate(view().maximalOutlineSize());
-}
-
</del><span class="cx"> int RenderObject::caretMinOffset() const
</span><span class="cx"> {
</span><span class="cx">     return 0;
</span><span class="lines">@@ -1957,9 +1983,7 @@
</span><span class="cx"> 
</span><span class="cx"> void RenderObject::adjustRectForOutlineAndShadow(LayoutRect&amp; rect) const
</span><span class="cx"> {
</span><del>-    float outlineSize = outlineStyleForRepaint().outlineSize();
-    if (outlineStyleForRepaint().outlineStyleIsAuto())
-        outlineSize = std::max(theme().platformFocusRingWidth() + outlineStyleForRepaint().outlineOffset(), outlineSize);
</del><ins>+    LayoutUnit outlineSize = outlineStyleForRepaint().outlineSize();
</ins><span class="cx">     if (const ShadowData* boxShadow = style().boxShadow()) {
</span><span class="cx">         boxShadow-&gt;adjustRectForShadow(rect, outlineSize);
</span><span class="cx">         return;
</span><span class="lines">@@ -2210,6 +2234,12 @@
</span><span class="cx">         ensureRareData().setIsRenderFlowThread(isFlowThread);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void RenderObject::setHasOutlineAutoAncestor(bool hasOutlineAutoAncestor)
+{
+    if (hasOutlineAutoAncestor || hasRareData())
+        ensureRareData().setHasOutlineAutoAncestor(hasOutlineAutoAncestor);
+}
+
</ins><span class="cx"> void RenderObject::setIsRegisteredForVisibleInViewportCallback(bool registered)
</span><span class="cx"> {
</span><span class="cx">     if (registered || hasRareData())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.h (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.h        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderObject.h        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -501,6 +501,7 @@
</span><span class="cx">     bool isDragging() const { return m_bitfields.hasRareData() &amp;&amp; rareData().isDragging(); }
</span><span class="cx">     bool hasReflection() const { return m_bitfields.hasRareData() &amp;&amp; rareData().hasReflection(); }
</span><span class="cx">     bool isRenderFlowThread() const { return m_bitfields.hasRareData() &amp;&amp; rareData().isRenderFlowThread(); }
</span><ins>+    bool hasOutlineAutoAncestor() const { return m_bitfields.hasRareData() &amp;&amp; rareData().hasOutlineAutoAncestor(); }
</ins><span class="cx">     bool isRegisteredForVisibleInViewportCallback() { return m_bitfields.hasRareData() &amp;&amp; rareData().isRegisteredForVisibleInViewportCallback(); }
</span><span class="cx"> 
</span><span class="cx">     enum VisibleInViewportState {
</span><span class="lines">@@ -618,6 +619,7 @@
</span><span class="cx">     void setIsDragging(bool);
</span><span class="cx">     void setHasReflection(bool = true);
</span><span class="cx">     void setIsRenderFlowThread(bool = true);
</span><ins>+    void setHasOutlineAutoAncestor(bool = true);
</ins><span class="cx">     void setIsRegisteredForVisibleInViewportCallback(bool);
</span><span class="cx">     void setVisibleInViewportState(VisibleInViewportState);
</span><span class="cx"> 
</span><span class="lines">@@ -751,9 +753,6 @@
</span><span class="cx"> 
</span><span class="cx">     bool isFloatingOrOutOfFlowPositioned() const { return (isFloating() || isOutOfFlowPositioned()); }
</span><span class="cx"> 
</span><del>-    // Applied as a &quot;slop&quot; to dirty rect checks during the outline painting phase's dirty-rect checks.
-    void adjustRectWithMaximumOutline(PaintPhase, LayoutRect&amp;) const;
-
</del><span class="cx">     enum SelectionState {
</span><span class="cx">         SelectionNone, // The object is not selected.
</span><span class="cx">         SelectionStart, // The object either contains the start of a selection run or is the start of a run
</span><span class="lines">@@ -886,6 +885,8 @@
</span><span class="cx">     void removeFromRenderFlowThreadIncludingDescendants(bool);
</span><span class="cx">     Node* generatingPseudoHostElement() const;
</span><span class="cx"> 
</span><ins>+    void propagateRepaintToParentWithOutlineAutoIfNeeded(const RenderLayerModelObject&amp; repaintContainer, const LayoutRect&amp; repaintRect) const;
+
</ins><span class="cx">     virtual bool isWBR() const { ASSERT_NOT_REACHED(); return false; }
</span><span class="cx"> 
</span><span class="cx">     void setEverHadLayout(bool b) { m_bitfields.setEverHadLayout(b); }
</span><span class="lines">@@ -1026,6 +1027,7 @@
</span><span class="cx">             : m_isDragging(false)
</span><span class="cx">             , m_hasReflection(false)
</span><span class="cx">             , m_isRenderFlowThread(false)
</span><ins>+            , m_hasOutlineAutoAncestor(false)
</ins><span class="cx">             , m_isRegisteredForVisibleInViewportCallback(false)
</span><span class="cx">             , m_visibleInViewportState(VisibilityUnknown)
</span><span class="cx">         {
</span><span class="lines">@@ -1033,6 +1035,7 @@
</span><span class="cx">         ADD_BOOLEAN_BITFIELD(isDragging, IsDragging);
</span><span class="cx">         ADD_BOOLEAN_BITFIELD(hasReflection, HasReflection);
</span><span class="cx">         ADD_BOOLEAN_BITFIELD(isRenderFlowThread, IsRenderFlowThread);
</span><ins>+        ADD_BOOLEAN_BITFIELD(hasOutlineAutoAncestor, HasOutlineAutoAncestor);
</ins><span class="cx"> 
</span><span class="cx">         // From RenderElement
</span><span class="cx">         ADD_BOOLEAN_BITFIELD(isRegisteredForVisibleInViewportCallback, IsRegisteredForVisibleInViewportCallback);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderOverflowh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderOverflow.h (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderOverflow.h        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderOverflow.h        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> // Layout overflow examples include other boxes that spill out of our box,  For example, in the inline case a tall image
</span><span class="cx"> // could spill out of a line box. 
</span><span class="cx">     
</span><del>-// Examples of visual overflow are shadows, text stroke (and eventually outline and border-image).
</del><ins>+// Examples of visual overflow are shadows, text stroke, outline (and eventually border-image).
</ins><span class="cx"> 
</span><span class="cx"> // This object is allocated only when some of these fields have non-default values in the owning box.
</span><span class="cx"> class RenderOverflow : public WTF::RefCounted&lt;RenderOverflow&gt; {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderRegioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderRegion.cpp (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderRegion.cpp        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderRegion.cpp        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -152,31 +152,26 @@
</span><span class="cx"> LayoutRect RenderRegion::overflowRectForFlowThreadPortion(const LayoutRect&amp; flowThreadPortionRect, bool isFirstPortion, bool isLastPortion, OverflowType overflowType)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(isValid());
</span><del>-
</del><span class="cx">     if (shouldClipFlowThreadContent())
</span><span class="cx">         return flowThreadPortionRect;
</span><span class="cx"> 
</span><span class="cx">     LayoutRect flowThreadOverflow = overflowType == VisualOverflow ? visualOverflowRectForBox(*m_flowThread) : layoutOverflowRectForBox(m_flowThread);
</span><del>-
-    // We are interested about the outline size only when computing the visual overflow.
-    LayoutUnit outlineSize = overflowType == VisualOverflow ? LayoutUnit(view().maximalOutlineSize()) : LayoutUnit();
</del><span class="cx">     LayoutRect clipRect;
</span><span class="cx">     if (m_flowThread-&gt;isHorizontalWritingMode()) {
</span><del>-        LayoutUnit minY = isFirstPortion ? (flowThreadOverflow.y() - outlineSize) : flowThreadPortionRect.y();
-        LayoutUnit maxY = isLastPortion ? std::max(flowThreadPortionRect.maxY(), flowThreadOverflow.maxY()) + outlineSize : flowThreadPortionRect.maxY();
</del><ins>+        LayoutUnit minY = isFirstPortion ? flowThreadOverflow.y() : flowThreadPortionRect.y();
+        LayoutUnit maxY = isLastPortion ? std::max(flowThreadPortionRect.maxY(), flowThreadOverflow.maxY()) : flowThreadPortionRect.maxY();
</ins><span class="cx">         bool clipX = style().overflowX() != OVISIBLE;
</span><del>-        LayoutUnit minX = clipX ? flowThreadPortionRect.x() : std::min(flowThreadPortionRect.x(), flowThreadOverflow.x() - outlineSize);
-        LayoutUnit maxX = clipX ? flowThreadPortionRect.maxX() : std::max(flowThreadPortionRect.maxX(), (flowThreadOverflow.maxX() + outlineSize));
</del><ins>+        LayoutUnit minX = clipX ? flowThreadPortionRect.x() : std::min(flowThreadPortionRect.x(), flowThreadOverflow.x());
+        LayoutUnit maxX = clipX ? flowThreadPortionRect.maxX() : std::max(flowThreadPortionRect.maxX(), flowThreadOverflow.maxX());
</ins><span class="cx">         clipRect = LayoutRect(minX, minY, maxX - minX, maxY - minY);
</span><span class="cx">     } else {
</span><del>-        LayoutUnit minX = isFirstPortion ? (flowThreadOverflow.x() - outlineSize) : flowThreadPortionRect.x();
-        LayoutUnit maxX = isLastPortion ? std::max(flowThreadPortionRect.maxX(), flowThreadOverflow.maxX()) + outlineSize : flowThreadPortionRect.maxX();
</del><ins>+        LayoutUnit minX = isFirstPortion ? flowThreadOverflow.x() : flowThreadPortionRect.x();
+        LayoutUnit maxX = isLastPortion ? std::max(flowThreadPortionRect.maxX(), flowThreadOverflow.maxX()) : flowThreadPortionRect.maxX();
</ins><span class="cx">         bool clipY = style().overflowY() != OVISIBLE;
</span><del>-        LayoutUnit minY = clipY ? flowThreadPortionRect.y() : std::min(flowThreadPortionRect.y(), (flowThreadOverflow.y() - outlineSize));
-        LayoutUnit maxY = clipY ? flowThreadPortionRect.maxY() : std::max(flowThreadPortionRect.y(), (flowThreadOverflow.maxY() + outlineSize));
</del><ins>+        LayoutUnit minY = clipY ? flowThreadPortionRect.y() : std::min(flowThreadPortionRect.y(), flowThreadOverflow.y());
+        LayoutUnit maxY = clipY ? flowThreadPortionRect.maxY() : std::max(flowThreadPortionRect.y(), flowThreadOverflow.maxY());
</ins><span class="cx">         clipRect = LayoutRect(minX, minY, maxX - minX, maxY - minY);
</span><span class="cx">     }
</span><del>-
</del><span class="cx">     return clipRect;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderReplacedcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderReplaced.cpp (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderReplaced.cpp        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderReplaced.cpp        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -233,7 +233,6 @@
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     LayoutRect localRepaintRect = paintInfo.rect;
</span><del>-    adjustRectWithMaximumOutline(paintInfo.phase, localRepaintRect);
</del><span class="cx">     if (adjustedPaintOffset.x() + visualOverflowRect().x() &gt;= localRepaintRect.maxX() || adjustedPaintOffset.x() + visualOverflowRect().maxX() &lt;= localRepaintRect.x())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -614,7 +613,6 @@
</span><span class="cx">     // FIXME: layoutDelta needs to be applied in parts before/after transforms and
</span><span class="cx">     // repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308
</span><span class="cx">     r.move(view().layoutDelta());
</span><del>-    r.inflate(style().outlineSize());
</del><span class="cx">     return computeRectForRepaint(r, repaintContainer);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTable.cpp (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTable.cpp        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderTable.cpp        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -660,7 +660,6 @@
</span><span class="cx"> 
</span><span class="cx">     if (!isDocumentElementRenderer()) {
</span><span class="cx">         LayoutRect overflowBox = visualOverflowRect();
</span><del>-        adjustRectWithMaximumOutline(paintInfo.phase, overflowBox);
</del><span class="cx">         flipForWritingMode(overflowBox);
</span><span class="cx">         overflowBox.moveBy(adjustedPaintOffset);
</span><span class="cx">         if (!overflowBox.intersects(paintInfo.rect))
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTableCellcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTableCell.cpp (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTableCell.cpp        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderTableCell.cpp        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -383,7 +383,6 @@
</span><span class="cx">     // FIXME: layoutDelta needs to be applied in parts before/after transforms and
</span><span class="cx">     // repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308
</span><span class="cx">     r.move(view().layoutDelta());
</span><del>-
</del><span class="cx">     return computeRectForRepaint(r, repaintContainer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1182,8 +1181,6 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     LayoutRect localRepaintRect = paintInfo.rect;
</span><del>-    adjustRectWithMaximumOutline(paintInfo.phase, localRepaintRect);
-
</del><span class="cx">     LayoutRect paintRect = LayoutRect(paintOffset + location(), frameRect().size());
</span><span class="cx">     if (paintRect.y() - table()-&gt;outerBorderTop() &gt;= localRepaintRect.maxY())
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTableRowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTableRow.cpp (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTableRow.cpp        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderTableRow.cpp        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -178,6 +178,8 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    clearOverflow();
+    addVisualEffectOverflow();
</ins><span class="cx">     // We only ever need to repaint if our cells didn't, which menas that they didn't need
</span><span class="cx">     // layout, so we know that our bounds didn't change. This code is just making up for
</span><span class="cx">     // the fact that we did not repaint in setStyle() because we had a layout hint.
</span><span class="lines">@@ -196,7 +198,6 @@
</span><span class="cx"> LayoutRect RenderTableRow::clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const
</span><span class="cx"> {
</span><span class="cx">     ASSERT(parent());
</span><del>-    
</del><span class="cx">     // Rows and cells are in the same coordinate space. We need to both compute our overflow rect (which
</span><span class="cx">     // will accommodate a row outline and any visual effects on the row itself), but we also need to add in
</span><span class="cx">     // the repaint rects of cells.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTableSectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTableSection.cpp (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTableSection.cpp        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderTableSection.cpp        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -537,6 +537,8 @@
</span><span class="cx">             rowRenderer-&gt;setLogicalWidth(logicalWidth());
</span><span class="cx">             rowRenderer-&gt;setLogicalHeight(m_rowPos[r + 1] - m_rowPos[r] - vspacing);
</span><span class="cx">             rowRenderer-&gt;updateLayerTransform();
</span><ins>+            rowRenderer-&gt;clearOverflow();
+            rowRenderer-&gt;addVisualEffectOverflow();
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         LayoutUnit rowHeightIncreaseForPagination = 0;
</span><span class="lines">@@ -707,7 +709,6 @@
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-
</del><span class="cx">     ASSERT(hasOverflowingCell == this-&gt;hasOverflowingCell());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1230,7 +1231,6 @@
</span><span class="cx"> void RenderTableSection::paintObject(PaintInfo&amp; paintInfo, const LayoutPoint&amp; paintOffset)
</span><span class="cx"> {
</span><span class="cx">     LayoutRect localRepaintRect = paintInfo.rect;
</span><del>-    adjustRectWithMaximumOutline(paintInfo.phase, localRepaintRect);
</del><span class="cx">     localRepaintRect.moveBy(-paintOffset);
</span><span class="cx"> 
</span><span class="cx">     LayoutRect tableAlignedRect = logicalRectForWritingModeAndDirection(localRepaintRect);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTheme.h (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTheme.h        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderTheme.h        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -23,12 +23,15 @@
</span><span class="cx"> #ifndef RenderTheme_h
</span><span class="cx"> #define RenderTheme_h
</span><span class="cx"> 
</span><ins>+#include &quot;BorderData.h&quot;
</ins><span class="cx"> #include &quot;ControlStates.h&quot;
</span><ins>+#include &quot;FillLayer.h&quot;
</ins><span class="cx"> #if USE(NEW_THEME)
</span><span class="cx"> #include &quot;Theme.h&quot;
</span><span class="cx"> #else
</span><span class="cx"> #include &quot;ThemeTypes.h&quot;
</span><span class="cx"> #endif
</span><ins>+#include &quot;PaintInfo.h&quot;
</ins><span class="cx"> #include &quot;PopupMenuStyle.h&quot;
</span><span class="cx"> #include &quot;RenderObject.h&quot;
</span><span class="cx"> #include &quot;ScrollTypes.h&quot;
</span><span class="lines">@@ -163,7 +166,8 @@
</span><span class="cx">     static Color focusRingColor();
</span><span class="cx">     virtual Color platformFocusRingColor() const { return Color(0, 0, 0); }
</span><span class="cx">     static void setCustomFocusRingColor(const Color&amp;);
</span><del>-    virtual int platformFocusRingWidth() const { return 3; }
</del><ins>+    static float platformFocusRingWidth() { return 3; }
+    static float platformFocusRingOffset(float outlineWidth) { return std::max&lt;float&gt;(outlineWidth - platformFocusRingWidth(), 0); }
</ins><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="cx">     static Color tapHighlightColor();
</span><span class="cx">     virtual Color platformTapHighlightColor() const { return RenderTheme::defaultTapHighlightColor; }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderView.cpp (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderView.cpp        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderView.cpp        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -825,20 +825,6 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-// Compositing layer dimensions take outline size into account, so we have to recompute layer
-// bounds when it changes.
-// FIXME: This is ugly; it would be nice to have a better way to do this.
-void RenderView::setMaximalOutlineSize(float outlineSize)
-{
-    if (outlineSize == m_maximalOutlineSize)
-        return;
-    
-    m_maximalOutlineSize = outlineSize;
-    // maximalOutlineSize affects compositing layer dimensions.
-    // FIXME: this really just needs to be a geometry update.
-    compositor().setCompositingLayersNeedRebuild();
-}
-
</del><span class="cx"> void RenderView::setSelection(RenderObject* start, int startPos, RenderObject* end, int endPos, SelectionRepaintMode blockRepaintMode)
</span><span class="cx"> {
</span><span class="cx">     // Make sure both our start and end objects are defined.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderView.h (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderView.h        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/RenderView.h        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -98,9 +98,6 @@
</span><span class="cx">     virtual void absoluteRects(Vector&lt;IntRect&gt;&amp;, const LayoutPoint&amp; accumulatedOffset) const override;
</span><span class="cx">     virtual void absoluteQuads(Vector&lt;FloatQuad&gt;&amp;, bool* wasFixed) const override;
</span><span class="cx"> 
</span><del>-    void setMaximalOutlineSize(float);
-    float maximalOutlineSize() const { return m_maximalOutlineSize; }
-
</del><span class="cx">     LayoutRect viewRect() const;
</span><span class="cx"> 
</span><span class="cx">     // layoutDelta is used transiently during layout to store how far an object has moved from its
</span><span class="lines">@@ -350,9 +347,6 @@
</span><span class="cx">     LegacyPrinting m_legacyPrinting;
</span><span class="cx">     // End deprecated members.
</span><span class="cx"> 
</span><del>-    // Used to inflate compositing layers and repaint rects.
-    float m_maximalOutlineSize { 0 };
-
</del><span class="cx">     bool shouldUsePrintingLayout() const;
</span><span class="cx"> 
</span><span class="cx">     void lazyRepaintTimerFired();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx"> #include &quot;Pagination.h&quot;
</span><span class="cx"> #include &quot;QuotesData.h&quot;
</span><span class="cx"> #include &quot;RenderObject.h&quot;
</span><ins>+#include &quot;RenderTheme.h&quot;
</ins><span class="cx"> #include &quot;ScaleTransformOperation.h&quot;
</span><span class="cx"> #include &quot;ShadowData.h&quot;
</span><span class="cx"> #include &quot;StyleImage.h&quot;
</span><span class="lines">@@ -57,10 +58,6 @@
</span><span class="cx"> #include &quot;TextAutosizer.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if ENABLE(TOUCH_EVENTS)
-#include &quot;RenderTheme.h&quot;
-#endif
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> struct SameSizeAsBorderValue {
</span><span class="lines">@@ -480,6 +477,8 @@
</span><span class="cx">         return visualOverflowForDecorations(*this, nullptr) != visualOverflowForDecorations(other, nullptr);
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    if (hasOutlineInVisualOverflow() != other.hasOutlineInVisualOverflow())
+        return true;
</ins><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2026,4 +2025,22 @@
</span><span class="cx">     rareInheritedData.access()-&gt;m_customProperties.access()-&gt;setContainsVariables(false);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+float RenderStyle::outlineWidth() const
+{
+    if (m_background-&gt;outline().style() == BNONE)
+        return 0;
+    if (outlineStyleIsAuto())
+        return std::max(m_background-&gt;outline().width(), RenderTheme::platformFocusRingWidth());
+    return m_background-&gt;outline().width();
+}
+
+float RenderStyle::outlineOffset() const
+{
+    if (m_background-&gt;outline().style() == BNONE)
+        return 0;
+    if (outlineStyleIsAuto())
+        return (m_background-&gt;outline().offset() + RenderTheme::platformFocusRingOffset(outlineWidth()));
+    return m_background-&gt;outline().offset();
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (196221 => 196222)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.h        2016-02-06 18:14:51 UTC (rev 196221)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h        2016-02-06 23:07:54 UTC (rev 196222)
</span><span class="lines">@@ -667,15 +667,11 @@
</span><span class="cx">     float borderEndWidth() const;
</span><span class="cx"> 
</span><span class="cx">     float outlineSize() const { return std::max&lt;float&gt;(0, outlineWidth() + outlineOffset()); }
</span><del>-    float outlineWidth() const
-    {
-        if (m_background-&gt;outline().style() == BNONE)
-            return 0;
-        return m_background-&gt;outline().width();
-    }
-    bool hasOutline() const { return outlineWidth() &gt; 0 &amp;&amp; outlineStyle() &gt; BHIDDEN; }
</del><ins>+    float outlineWidth() const;
+    bool hasOutline() const { return outlineStyle() &gt; BHIDDEN &amp;&amp; outlineWidth() &gt; 0; }
</ins><span class="cx">     EBorderStyle outlineStyle() const { return m_background-&gt;outline().style(); }
</span><span class="cx">     OutlineIsAuto outlineStyleIsAuto() const { return static_cast&lt;OutlineIsAuto&gt;(m_background-&gt;outline().isAuto()); }
</span><ins>+    bool hasOutlineInVisualOverflow() const { return hasOutline() &amp;&amp; outlineSize() &gt; 0; }
</ins><span class="cx">     
</span><span class="cx">     EOverflow overflowX() const { return noninherited_flags.overflowX(); }
</span><span class="cx">     EOverflow overflowY() const { return noninherited_flags.overflowY(); }
</span><span class="lines">@@ -882,13 +878,7 @@
</span><span class="cx">     
</span><span class="cx">     HangingPunctuation hangingPunctuation() const { return static_cast&lt;HangingPunctuation&gt;(rareInheritedData-&gt;m_hangingPunctuation); }
</span><span class="cx"> 
</span><del>-    float outlineOffset() const
-    {
-        if (m_background-&gt;outline().style() == BNONE)
-            return 0;
-        return m_background-&gt;outline().offset();
-    }
-
</del><ins>+    float outlineOffset() const;
</ins><span class="cx">     const ShadowData* textShadow() const { return rareInheritedData-&gt;textShadow.get(); }
</span><span class="cx">     void getTextShadowExtent(LayoutUnit&amp; top, LayoutUnit&amp; right, LayoutUnit&amp; bottom, LayoutUnit&amp; left) const { getShadowExtent(textShadow(), top, right, bottom, left); }
</span><span class="cx">     void getTextShadowHorizontalExtent(LayoutUnit&amp; left, LayoutUnit&amp; right) const { getShadowHorizontalExtent(textShadow(), left, right); }
</span></span></pre>
</div>
</div>

</body>
</html>