<!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>[179092] branches/safari-600.1.4.15-branch</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/179092">179092</a></dd>
<dt>Author</dt> <dd>ddkilzer@apple.com</dd>
<dt>Date</dt> <dd>2015-01-25 16:14:06 -0800 (Sun, 25 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merged <a href="http://trac.webkit.org/projects/webkit/changeset/177035">r177035</a>.  rdar://problem/19419933</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari6001415branchLayoutTestsChangeLog">branches/safari-600.1.4.15-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari6001415branchLayoutTestsfastspatialnavigationsnavcontainerwhitespaceexpectedtxt">branches/safari-600.1.4.15-branch/LayoutTests/fast/spatial-navigation/snav-container-white-space-expected.txt</a></li>
<li><a href="#branchessafari6001415branchLayoutTestsfastspatialnavigationsnavcontainerwhitespacehtml">branches/safari-600.1.4.15-branch/LayoutTests/fast/spatial-navigation/snav-container-white-space.html</a></li>
<li><a href="#branchessafari6001415branchLayoutTestsfastspatialnavigationsnavimagemapoverlappedareasexpectedtxt">branches/safari-600.1.4.15-branch/LayoutTests/fast/spatial-navigation/snav-imagemap-overlapped-areas-expected.txt</a></li>
<li><a href="#branchessafari6001415branchLayoutTestsfastspatialnavigationsnavimagemapoverlappedareashtml">branches/safari-600.1.4.15-branch/LayoutTests/fast/spatial-navigation/snav-imagemap-overlapped-areas.html</a></li>
<li><a href="#branchessafari6001415branchSourceWebCoreChangeLog">branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari6001415branchSourceWebCoreWebCoreexpin">branches/safari-600.1.4.15-branch/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#branchessafari6001415branchSourceWebCoreaccessibilityAccessibilitySlidercpp">branches/safari-600.1.4.15-branch/Source/WebCore/accessibility/AccessibilitySlider.cpp</a></li>
<li><a href="#branchessafari6001415branchSourceWebCoredomContainerNodecpp">branches/safari-600.1.4.15-branch/Source/WebCore/dom/ContainerNode.cpp</a></li>
<li><a href="#branchessafari6001415branchSourceWebCoredomContainerNodeh">branches/safari-600.1.4.15-branch/Source/WebCore/dom/ContainerNode.h</a></li>
<li><a href="#branchessafari6001415branchSourceWebCoredomElementcpp">branches/safari-600.1.4.15-branch/Source/WebCore/dom/Element.cpp</a></li>
<li><a href="#branchessafari6001415branchSourceWebCoredomNodecpp">branches/safari-600.1.4.15-branch/Source/WebCore/dom/Node.cpp</a></li>
<li><a href="#branchessafari6001415branchSourceWebCoredomNodeh">branches/safari-600.1.4.15-branch/Source/WebCore/dom/Node.h</a></li>
<li><a href="#branchessafari6001415branchSourceWebCorehtmlColorInputTypecpp">branches/safari-600.1.4.15-branch/Source/WebCore/html/ColorInputType.cpp</a></li>
<li><a href="#branchessafari6001415branchSourceWebCorehtmlHTMLInputElementcpp">branches/safari-600.1.4.15-branch/Source/WebCore/html/HTMLInputElement.cpp</a></li>
<li><a href="#branchessafari6001415branchSourceWebCorehtmlValidationMessagecpp">branches/safari-600.1.4.15-branch/Source/WebCore/html/ValidationMessage.cpp</a></li>
<li><a href="#branchessafari6001415branchSourceWebCorehtmlshadowTextControlInnerElementscpp">branches/safari-600.1.4.15-branch/Source/WebCore/html/shadow/TextControlInnerElements.cpp</a></li>
<li><a href="#branchessafari6001415branchSourceWebCoreloaderFrameLoadercpp">branches/safari-600.1.4.15-branch/Source/WebCore/loader/FrameLoader.cpp</a></li>
<li><a href="#branchessafari6001415branchSourceWebCorepageFrameViewcpp">branches/safari-600.1.4.15-branch/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#branchessafari6001415branchSourceWebCorepageFrameViewh">branches/safari-600.1.4.15-branch/Source/WebCore/page/FrameView.h</a></li>
<li><a href="#branchessafari6001415branchSourceWebCorepageSpatialNavigationcpp">branches/safari-600.1.4.15-branch/Source/WebCore/page/SpatialNavigation.cpp</a></li>
<li><a href="#branchessafari6001415branchSourceWebCorerenderingRenderElementcpp">branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderElement.cpp</a></li>
<li><a href="#branchessafari6001415branchSourceWebCorerenderingRenderElementh">branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderElement.h</a></li>
<li><a href="#branchessafari6001415branchSourceWebCorerenderingRenderTextcpp">branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderText.cpp</a></li>
<li><a href="#branchessafari6001415branchSourceWebCorerenderingRenderTexth">branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderText.h</a></li>
<li><a href="#branchessafari6001415branchSourceWebKitmacChangeLog">branches/safari-600.1.4.15-branch/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#branchessafari6001415branchSourceWebKit2ChangeLog">branches/safari-600.1.4.15-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari6001415branchSourceWebKit2SharedWebHitTestResultcpp">branches/safari-600.1.4.15-branch/Source/WebKit2/Shared/WebHitTestResult.cpp</a></li>
<li><a href="#branchessafari6001415branchSourceWebKit2WebProcessWebPageCoordinatedGraphicsWebPageCoordinatedGraphicscpp">branches/safari-600.1.4.15-branch/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari6001415branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/LayoutTests/ChangeLog (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/LayoutTests/ChangeLog        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/LayoutTests/ChangeLog        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -1,5 +1,15 @@
</span><span class="cx"> 2015-01-24  David Kilzer  &lt;ddkilzer@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r177035.
+
+        * fast/spatial-navigation/snav-container-white-space-expected.txt:
+        * fast/spatial-navigation/snav-container-white-space.html:
+        * fast/spatial-navigation/snav-imagemap-overlapped-areas-expected.txt:
+        * fast/spatial-navigation/snav-imagemap-overlapped-areas.html:
+        - Update results.
+
+2015-01-24  David Kilzer  &lt;ddkilzer@apple.com&gt;
+
</ins><span class="cx">         Merge r176321.
</span><span class="cx"> 
</span><span class="cx">     2014-11-19  Chris Fleizach  &lt;cfleizach@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari6001415branchLayoutTestsfastspatialnavigationsnavcontainerwhitespaceexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/LayoutTests/fast/spatial-navigation/snav-container-white-space-expected.txt (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/LayoutTests/fast/spatial-navigation/snav-container-white-space-expected.txt        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/LayoutTests/fast/spatial-navigation/snav-container-white-space-expected.txt        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> This is an element
</span><span class="cx">  
</span><ins>+
</ins><span class="cx"> This is an element
</span><span class="cx"> This is an element
</span><span class="cx">   
</span></span></pre></div>
<a id="branchessafari6001415branchLayoutTestsfastspatialnavigationsnavcontainerwhitespacehtml"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/LayoutTests/fast/spatial-navigation/snav-container-white-space.html (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/LayoutTests/fast/spatial-navigation/snav-container-white-space.html        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/LayoutTests/fast/spatial-navigation/snav-container-white-space.html        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">         &lt;img src=&quot;resources/green.png&quot; height=&quot;42&quot; width=&quot;76&quot;  border=&quot;0&quot;/&gt;
</span><span class="cx">       &lt;/a&gt;
</span><span class="cx">     &lt;/div&gt;
</span><del>-
</del><ins>+    &lt;br/&gt;
</ins><span class="cx">     &lt;div&gt;
</span><span class="cx">       &lt;a href=&quot;#&quot; id=&quot;2&quot;&gt;This is an element&lt;/a&gt;&lt;br&gt;
</span><span class="cx">     &lt;/div&gt;
</span></span></pre></div>
<a id="branchessafari6001415branchLayoutTestsfastspatialnavigationsnavimagemapoverlappedareasexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/LayoutTests/fast/spatial-navigation/snav-imagemap-overlapped-areas-expected.txt (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/LayoutTests/fast/spatial-navigation/snav-imagemap-overlapped-areas-expected.txt        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/LayoutTests/fast/spatial-navigation/snav-imagemap-overlapped-areas-expected.txt        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>- 
</del><ins>+  
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> PASS gFocusedDocument.activeElement.getAttribute(&quot;id&quot;) is &quot;4&quot;
</span></span></pre></div>
<a id="branchessafari6001415branchLayoutTestsfastspatialnavigationsnavimagemapoverlappedareashtml"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/LayoutTests/fast/spatial-navigation/snav-imagemap-overlapped-areas.html (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/LayoutTests/fast/spatial-navigation/snav-imagemap-overlapped-areas.html        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/LayoutTests/fast/spatial-navigation/snav-imagemap-overlapped-areas.html        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -57,6 +57,7 @@
</span><span class="cx">   &lt;/map&gt;
</span><span class="cx"> 
</span><span class="cx">     &lt;a id=&quot;start&quot; href=&quot;a&quot;&gt;&lt;img src=&quot;resources/green.png&quot; width=50px height=50px&gt;&lt;/a&gt;
</span><ins>+    &lt;br&gt;
</ins><span class="cx">     &lt;div&gt;
</span><span class="cx">       &lt;img src=&quot;resources/green.png&quot; width=200px height=200px usemap=&quot;#map&quot;&gt;
</span><span class="cx">     &lt;/div&gt;
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -1,5 +1,77 @@
</span><span class="cx"> 2015-01-24  David Kilzer  &lt;ddkilzer@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r177035.
+
+    2014-12-09  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        Delete Node::boundingBox()
+        https://bugs.webkit.org/show_bug.cgi?id=139333
+
+        Conceptually, boundingBox() should be on RenderInline. In addition,
+        Node::boundingBox() is completely broken for inline elements: it
+        makes a rect from the top left of the first inline child to the
+        bottom right of the last inline child, disregarding the intermediate
+        inline children. This breaks with vertical text and with line
+        breaks.
+
+        What makes this problem worse is that some functions actually rely
+        on this bad behavior. These functions are functions that use the
+        Node's so-called &quot;bounding box&quot; to scroll to an anchor tag.
+
+        This patch goes through all the call sites of Node::boundingBox(),
+        and segregates them into calls that expect the true bounding box
+        and calls that need this false bounding box. This patch then moves
+        this false bounding box into RenderElement, using the name
+        anchorRect(). Callers what want the correct bounding box have been
+        updated to use RenderElement::absoluteBoundingBoxRect().
+
+        Reviewed by Zalan Bujtas.
+
+        No new tests because there should be no behavior change.
+
+        * accessibility/AccessibilitySlider.cpp:
+        (WebCore::AccessibilitySliderThumb::elementRect): Use
+        RenderObject::absoluteBoundingBoxRect()
+        * dom/ContainerNode.cpp:
+        (WebCore::ContainerNode::getUpperLeftCorner): Deleted.
+        (WebCore::ContainerNode::getLowerRightCorner): Deleted.
+        (WebCore::ContainerNode::boundingBox): Deleted.
+        * dom/ContainerNode.h:
+        * dom/Element.cpp:
+        (WebCore::Element::scrollIntoView): Use RenderElement::anchorRect().
+        (WebCore::Element::scrollIntoViewIfNeeded): Ditto.
+        (WebCore::Element::updateFocusAppearance): Ditto.
+        * dom/Node.cpp:
+        (WebCore::Node::boundingBox): Deleted.
+        * dom/Node.h:
+        (WebCore::Node::pixelSnappedBoundingBox): Deleted.
+        * html/ColorInputType.cpp:
+        (WebCore::ColorInputType::elementRectRelativeToRootView): Use
+        RenderObject::absoluteBoundingBoxRect()
+        * html/HTMLInputElement.cpp:
+        (WebCore::HTMLInputElement::setupDateTimeChooserParameters): Ditto.
+        * html/ValidationMessage.cpp:
+        (WebCore::ValidationMessage::buildBubbleTree): Ditto.
+        * page/FrameView.cpp:
+        (WebCore::FrameView::scrollElementToRect): Use
+        RenderElement::anchorRect().
+        (WebCore::FrameView::scrollToAnchor): Ditto.
+        * page/SpatialNavigation.cpp:
+        (WebCore::nodeRectInAbsoluteCoordinates): Use
+        RenderObject::absoluteBoundingBoxRect()
+        * rendering/RenderElement.cpp:
+        (WebCore::RenderElement::getUpperLeftCorner): Moved from ContainerNode.
+        (WebCore::RenderElement::getLowerRightCorner): Moved from
+        ContainerNode.
+        (WebCore::RenderElement::anchorRect): Moved from ContainerNode.
+        * rendering/RenderObject.h:
+        * rendering/RenderText.cpp:
+        (WebCore::RenderText::topOfFirstText): Helper for
+        RenderElement::anchorRect()
+        * rendering/RenderText.h:
+
+2015-01-24  David Kilzer  &lt;ddkilzer@apple.com&gt;
+
</ins><span class="cx">         Merge r176725.
</span><span class="cx"> 
</span><span class="cx">     2014-12-03  Jer Noble  &lt;jer.noble@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/WebCore.exp.in (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/WebCore.exp.in        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/WebCore.exp.in        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -847,6 +847,7 @@
</span><span class="cx"> __ZN7WebCore19enclosingLayoutRectERKNS_9FloatRectE
</span><span class="cx"> __ZN7WebCore19floatValueForLengthERKNS_6LengthEf
</span><span class="cx"> __ZN7WebCore19getFileCreationTimeERKN3WTF6StringERl
</span><ins>+__ZN7WebCore19rendererBoundingBoxERKNS_4NodeE
</ins><span class="cx"> __ZN7WebCore19toInt32EnforceRangeEPN3JSC9ExecStateENS0_7JSValueE
</span><span class="cx"> __ZN7WebCore20ApplicationCacheHost17maybeLoadResourceEPNS_14ResourceLoaderERKNS_15ResourceRequestERKNS_3URLE
</span><span class="cx"> __ZN7WebCore20ApplicationCacheHost25maybeLoadFallbackForErrorEPNS_14ResourceLoaderERKNS_13ResourceErrorE
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCoreaccessibilityAccessibilitySlidercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/accessibility/AccessibilitySlider.cpp (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/accessibility/AccessibilitySlider.cpp        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/accessibility/AccessibilitySlider.cpp        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -159,7 +159,7 @@
</span><span class="cx">     RenderObject* sliderRenderer = m_parent-&gt;renderer();
</span><span class="cx">     if (!sliderRenderer || !sliderRenderer-&gt;isSlider())
</span><span class="cx">         return LayoutRect();
</span><del>-    return toHTMLInputElement(sliderRenderer-&gt;node())-&gt;sliderThumbElement()-&gt;boundingBox();
</del><ins>+    return rendererBoundingBox(*toHTMLInputElement(sliderRenderer-&gt;node())-&gt;sliderThumbElement());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool AccessibilitySliderThumb::computeAccessibilityIsIgnored() const
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCoredomContainerNodecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/dom/ContainerNode.cpp (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/dom/ContainerNode.cpp        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/dom/ContainerNode.cpp        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -803,134 +803,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool ContainerNode::getUpperLeftCorner(FloatPoint&amp; point) const
-{
-    if (!renderer())
-        return false;
-    // What is this code really trying to do?
-    RenderObject* o = renderer();
-    RenderObject* p = o;
-
-    if (!o-&gt;isInline() || o-&gt;isReplaced()) {
-        point = o-&gt;localToAbsolute(FloatPoint(), UseTransforms);
-        return true;
-    }
-
-    // find the next text/image child, to get a position
-    while (o) {
-        p = o;
-        if (RenderObject* child = o-&gt;firstChildSlow())
-            o = child;
-        else if (o-&gt;nextSibling())
-            o = o-&gt;nextSibling();
-        else {
-            RenderObject* next = 0;
-            while (!next &amp;&amp; o-&gt;parent()) {
-                o = o-&gt;parent();
-                next = o-&gt;nextSibling();
-            }
-            o = next;
-
-            if (!o)
-                break;
-        }
-        ASSERT(o);
-
-        if (!o-&gt;isInline() || o-&gt;isReplaced()) {
-            point = o-&gt;localToAbsolute(FloatPoint(), UseTransforms);
-            return true;
-        }
-
-        if (p-&gt;node() &amp;&amp; p-&gt;node() == this &amp;&amp; o-&gt;isText() &amp;&amp; !toRenderText(o)-&gt;firstTextBox()) {
-            // do nothing - skip unrendered whitespace that is a child or next sibling of the anchor
-        } else if (o-&gt;isText() || o-&gt;isReplaced()) {
-            point = FloatPoint();
-            if (o-&gt;isText() &amp;&amp; toRenderText(o)-&gt;firstTextBox()) {
-                point.move(toRenderText(o)-&gt;linesBoundingBox().x(), toRenderText(o)-&gt;firstTextBox()-&gt;root().lineTop());
-            } else if (o-&gt;isBox()) {
-                RenderBox* box = toRenderBox(o);
-                point.moveBy(box-&gt;location());
-            }
-            point = o-&gt;container()-&gt;localToAbsolute(point, UseTransforms);
-            return true;
-        }
-    }
-    
-    // If the target doesn't have any children or siblings that could be used to calculate the scroll position, we must be
-    // at the end of the document. Scroll to the bottom. FIXME: who said anything about scrolling?
-    if (!o &amp;&amp; document().view()) {
-        point = FloatPoint(0, document().view()-&gt;contentsHeight());
-        return true;
-    }
-    return false;
-}
-
-bool ContainerNode::getLowerRightCorner(FloatPoint&amp; point) const
-{
-    if (!renderer())
-        return false;
-
-    RenderObject* o = renderer();
-    if (!o-&gt;isInline() || o-&gt;isReplaced()) {
-        RenderBox* box = toRenderBox(o);
-        point = o-&gt;localToAbsolute(LayoutPoint(box-&gt;size()), UseTransforms);
-        return true;
-    }
-
-    // find the last text/image child, to get a position
-    while (o) {
-        if (RenderObject* child = o-&gt;lastChildSlow())
-            o = child;
-        else if (o-&gt;previousSibling())
-            o = o-&gt;previousSibling();
-        else {
-            RenderObject* prev = 0;
-            while (!prev) {
-                o = o-&gt;parent();
-                if (!o)
-                    return false;
-                prev = o-&gt;previousSibling();
-            }
-            o = prev;
-        }
-        ASSERT(o);
-        if (o-&gt;isText() || o-&gt;isReplaced()) {
-            point = FloatPoint();
-            if (o-&gt;isText()) {
-                RenderText* text = toRenderText(o);
-                IntRect linesBox = text-&gt;linesBoundingBox();
-                if (!linesBox.maxX() &amp;&amp; !linesBox.maxY())
-                    continue;
-                point.moveBy(linesBox.maxXMaxYCorner());
-            } else {
-                RenderBox* box = toRenderBox(o);
-                point.moveBy(box-&gt;frameRect().maxXMaxYCorner());
-            }
-            point = o-&gt;container()-&gt;localToAbsolute(point, UseTransforms);
-            return true;
-        }
-    }
-    return true;
-}
-
-LayoutRect ContainerNode::boundingBox() const
-{
-    FloatPoint upperLeft, lowerRight;
-    bool foundUpperLeft = getUpperLeftCorner(upperLeft);
-    bool foundLowerRight = getLowerRightCorner(lowerRight);
-    
-    // If we've found one corner, but not the other,
-    // then we should just return a point at the corner that we did find.
-    if (foundUpperLeft != foundLowerRight) {
-        if (foundUpperLeft)
-            lowerRight = upperLeft;
-        else
-            upperLeft = lowerRight;
-    } 
-
-    return enclosingLayoutRect(FloatRect(upperLeft, lowerRight.expandedTo(upperLeft) - upperLeft));
-}
-
</del><span class="cx"> unsigned ContainerNode::childNodeCount() const
</span><span class="cx"> {
</span><span class="cx">     unsigned count = 0;
</span><span class="lines">@@ -1066,4 +938,11 @@
</span><span class="cx">     return ensureRareData().ensureNodeLists().addCacheWithAtomicName&lt;RadioNodeList&gt;(*this, name);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+LayoutRect rendererAnchorRect(const ContainerNode&amp; node)
+{
+    if (RenderElement* renderer = node.renderer())
+        return renderer-&gt;anchorRect();
+    return LayoutRect();
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCoredomContainerNodeh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/dom/ContainerNode.h (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/dom/ContainerNode.h        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/dom/ContainerNode.h        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -107,8 +107,6 @@
</span><span class="cx"> 
</span><span class="cx">     void cloneChildNodes(ContainerNode* clone);
</span><span class="cx"> 
</span><del>-    virtual LayoutRect boundingBox() const override;
-
</del><span class="cx">     enum ChildChangeType { ElementInserted, ElementRemoved, TextInserted, TextRemoved, TextChanged, AllChildrenRemoved, NonContentsChildChanged };
</span><span class="cx">     enum ChildChangeSource { ChildChangeSourceParser, ChildChangeSourceAPI };
</span><span class="cx">     struct ChildChange {
</span><span class="lines">@@ -154,9 +152,6 @@
</span><span class="cx">     void removeBetween(Node* previousChild, Node* nextChild, Node&amp; oldChild);
</span><span class="cx">     void insertBeforeCommon(Node&amp; nextChild, Node&amp; oldChild);
</span><span class="cx"> 
</span><del>-    bool getUpperLeftCorner(FloatPoint&amp;) const;
-    bool getLowerRightCorner(FloatPoint&amp;) const;
-
</del><span class="cx">     void notifyChildInserted(Node&amp; child, ChildChangeSource);
</span><span class="cx">     void notifyChildRemoved(Node&amp; child, Node* previousSibling, Node* nextSibling, ChildChangeSource);
</span><span class="cx"> 
</span><span class="lines">@@ -311,6 +306,8 @@
</span><span class="cx">     ChildNodesLazySnapshot* m_nextSnapshot;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+LayoutRect rendererAnchorRect(const ContainerNode&amp;);
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ContainerNode_h
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCoredomElementcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/dom/Element.cpp (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/dom/Element.cpp        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/dom/Element.cpp        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -570,7 +570,7 @@
</span><span class="cx">     if (!renderer())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    LayoutRect bounds = boundingBox();
</del><ins>+    LayoutRect bounds = renderer()-&gt;anchorRect();
</ins><span class="cx">     // Align to the top / bottom and to the closest edge.
</span><span class="cx">     if (alignToTop)
</span><span class="cx">         renderer()-&gt;scrollRectToVisible(bounds, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignTopAlways);
</span><span class="lines">@@ -585,7 +585,7 @@
</span><span class="cx">     if (!renderer())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    LayoutRect bounds = boundingBox();
</del><ins>+    LayoutRect bounds = renderer()-&gt;anchorRect();
</ins><span class="cx">     if (centerIfNeeded)
</span><span class="cx">         renderer()-&gt;scrollRectToVisible(bounds, ScrollAlignment::alignCenterIfNeeded, ScrollAlignment::alignCenterIfNeeded);
</span><span class="cx">     else
</span><span class="lines">@@ -1995,7 +1995,7 @@
</span><span class="cx">             frame-&gt;selection().revealSelection();
</span><span class="cx">         }
</span><span class="cx">     } else if (renderer() &amp;&amp; !renderer()-&gt;isWidget())
</span><del>-        renderer()-&gt;scrollRectToVisible(boundingBox());
</del><ins>+        renderer()-&gt;scrollRectToVisible(renderer()-&gt;anchorRect());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Element::blur()
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCoredomNodecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/dom/Node.cpp (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/dom/Node.cpp        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/dom/Node.cpp        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -616,13 +616,6 @@
</span><span class="cx">     RenderObject* renderer = this-&gt;renderer();
</span><span class="cx">     return renderer &amp;&amp; renderer-&gt;isBoxModelObject() ? toRenderBoxModelObject(renderer) : 0;
</span><span class="cx"> }
</span><del>-
-LayoutRect Node::boundingBox() const
-{
-    if (renderer())
-        return renderer()-&gt;absoluteBoundingBoxRect();
-    return LayoutRect();
-}
</del><span class="cx">     
</span><span class="cx"> LayoutRect Node::renderRect(bool* isReplaced)
</span><span class="cx"> {    
</span><span class="lines">@@ -2238,6 +2231,13 @@
</span><span class="cx">     return inDocument() &amp;&amp; document().hasLivingRenderTree();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IntRect rendererBoundingBox(const Node&amp; node)
+{
+    if (RenderObject* renderer = node.renderer())
+        return renderer-&gt;absoluteBoundingBoxRect();
+    return IntRect();
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCoredomNodeh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/dom/Node.h (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/dom/Node.h        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/dom/Node.h        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -377,8 +377,6 @@
</span><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    virtual LayoutRect boundingBox() const;
-    IntRect pixelSnappedBoundingBox() const { return pixelSnappedIntRect(boundingBox()); }
</del><span class="cx">     LayoutRect renderRect(bool* isReplaced);
</span><span class="cx">     IntRect pixelSnappedRenderRect(bool* isReplaced) { return pixelSnappedIntRect(renderRect(isReplaced)); }
</span><span class="cx"> 
</span><span class="lines">@@ -739,6 +737,8 @@
</span><span class="cx">     return parentNode();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IntRect rendererBoundingBox(const Node&amp;);
+
</ins><span class="cx"> #define NODE_TYPE_CASTS(ToClassName) \
</span><span class="cx">     TYPE_CASTS_BASE(ToClassName, Node, node, WebCore::is##ToClassName(*node), WebCore::is##ToClassName(node))
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCorehtmlColorInputTypecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/html/ColorInputType.cpp (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/html/ColorInputType.cpp        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/html/ColorInputType.cpp        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -204,7 +204,7 @@
</span><span class="cx"> 
</span><span class="cx"> IntRect ColorInputType::elementRectRelativeToRootView() const
</span><span class="cx"> {
</span><del>-    return element().document().view()-&gt;contentsToRootView(element().pixelSnappedBoundingBox());
</del><ins>+    return element().document().view()-&gt;contentsToRootView(rendererBoundingBox(element()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Color ColorInputType::currentColor()
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCorehtmlHTMLInputElementcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/html/HTMLInputElement.cpp (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/html/HTMLInputElement.cpp        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/html/HTMLInputElement.cpp        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -1909,7 +1909,7 @@
</span><span class="cx">         parameters.stepBase = 0;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    parameters.anchorRectInRootView = document().view()-&gt;contentsToRootView(pixelSnappedBoundingBox());
</del><ins>+    parameters.anchorRectInRootView = document().view()-&gt;contentsToRootView(rendererBoundingBox(*this));
</ins><span class="cx">     parameters.currentValue = value();
</span><span class="cx">     parameters.isAnchorElementRTL = computedStyle()-&gt;direction() == RTL;
</span><span class="cx"> #if ENABLE(DATALIST_ELEMENT)
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCorehtmlValidationMessagecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/html/ValidationMessage.cpp (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/html/ValidationMessage.cpp        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/html/ValidationMessage.cpp        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -178,7 +178,7 @@
</span><span class="cx">     m_bubble-&gt;setInlineStyleProperty(CSSPropertyPosition, CSSValueAbsolute);
</span><span class="cx">     shadowRoot.appendChild(m_bubble.get(), ASSERT_NO_EXCEPTION);
</span><span class="cx">     document.updateLayout();
</span><del>-    adjustBubblePosition(m_element-&gt;boundingBox(), m_bubble.get());
</del><ins>+    adjustBubblePosition(rendererBoundingBox(*m_element), m_bubble.get());
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;HTMLDivElement&gt; clipper = HTMLDivElement::create(document);
</span><span class="cx">     clipper-&gt;setPseudo(AtomicString(&quot;-webkit-validation-bubble-arrow-clipper&quot;, AtomicString::ConstructFromLiteral));
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCorehtmlshadowTextControlInnerElementscpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/html/shadow/TextControlInnerElements.cpp (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/html/shadow/TextControlInnerElements.cpp        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/html/shadow/TextControlInnerElements.cpp        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -448,7 +448,7 @@
</span><span class="cx">     RefPtr&lt;HTMLInputElement&gt; input = toHTMLInputElement(shadowHost());
</span><span class="cx">     AtomicString language = input-&gt;computeInheritedLanguage();
</span><span class="cx">     String grammar = input-&gt;getAttribute(webkitgrammarAttr);
</span><del>-    IntRect rect = document().view()-&gt;contentsToRootView(pixelSnappedBoundingBox());
</del><ins>+    IntRect rect = document().view()-&gt;contentsToRootView(rendererBoundingBox(*this));
</ins><span class="cx">     if (speechInput()-&gt;startRecognition(m_listenerId, rect, language, grammar, document().securityOrigin()))
</span><span class="cx">         setState(Recording);
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCoreloaderFrameLoadercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/loader/FrameLoader.cpp (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/loader/FrameLoader.cpp        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/loader/FrameLoader.cpp        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -1147,7 +1147,7 @@
</span><span class="cx">         parent-&gt;loader().checkCompleted();
</span><span class="cx"> 
</span><span class="cx">     if (m_frame.view())
</span><del>-        m_frame.view()-&gt;maintainScrollPositionAtAnchor(0);
</del><ins>+        m_frame.view()-&gt;maintainScrollPositionAtAnchor(nullptr);
</ins><span class="cx">     m_activityAssertion = nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/page/FrameView.cpp (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/page/FrameView.cpp        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/page/FrameView.cpp        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -1948,7 +1948,10 @@
</span><span class="cx">     if (!anchorElement &amp;&amp; !(name.isEmpty() || equalIgnoringCase(name, &quot;top&quot;)))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    maintainScrollPositionAtAnchor(anchorElement ? static_cast&lt;Node*&gt;(anchorElement) : frame().document());
</del><ins>+    ContainerNode* scrollPositionAnchor = anchorElement;
+    if (!scrollPositionAnchor)
+        scrollPositionAnchor = frame().document();
+    maintainScrollPositionAtAnchor(scrollPositionAnchor);
</ins><span class="cx">     
</span><span class="cx">     // If the anchor accepts keyboard focus, move focus there to aid users relying on keyboard navigation.
</span><span class="cx">     if (anchorElement &amp;&amp; anchorElement-&gt;isFocusable())
</span><span class="lines">@@ -1957,7 +1960,7 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void FrameView::maintainScrollPositionAtAnchor(Node* anchorNode)
</del><ins>+void FrameView::maintainScrollPositionAtAnchor(ContainerNode* anchorNode)
</ins><span class="cx"> {
</span><span class="cx">     m_maintainScrollPositionAnchor = anchorNode;
</span><span class="cx">     if (!m_maintainScrollPositionAnchor)
</span><span class="lines">@@ -1978,7 +1981,7 @@
</span><span class="cx"> {
</span><span class="cx">     frame().document()-&gt;updateLayoutIgnorePendingStylesheets();
</span><span class="cx"> 
</span><del>-    LayoutRect bounds = element-&gt;boundingBox();
</del><ins>+    LayoutRect bounds = rendererAnchorRect(*element);
</ins><span class="cx">     int centeringOffsetX = (rect.width() - bounds.width()) / 2;
</span><span class="cx">     int centeringOffsetY = (rect.height() - bounds.height()) / 2;
</span><span class="cx">     setScrollPosition(IntPoint(bounds.x() - centeringOffsetX - rect.x(), bounds.y() - centeringOffsetY - rect.y()));
</span><span class="lines">@@ -2721,7 +2724,7 @@
</span><span class="cx"> 
</span><span class="cx"> void FrameView::scrollToAnchor()
</span><span class="cx"> {
</span><del>-    RefPtr&lt;Node&gt; anchorNode = m_maintainScrollPositionAnchor;
</del><ins>+    RefPtr&lt;ContainerNode&gt; anchorNode = m_maintainScrollPositionAnchor;
</ins><span class="cx">     if (!anchorNode)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -2730,7 +2733,7 @@
</span><span class="cx"> 
</span><span class="cx">     LayoutRect rect;
</span><span class="cx">     if (anchorNode != frame().document())
</span><del>-        rect = anchorNode-&gt;boundingBox();
</del><ins>+        rect = rendererAnchorRect(*anchorNode.get());
</ins><span class="cx"> 
</span><span class="cx">     // Scroll nested layers and frames to reveal the anchor.
</span><span class="cx">     // Align to the top and to the closest side (this matches other browsers).
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCorepageFrameViewh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/page/FrameView.h (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/page/FrameView.h        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/page/FrameView.h        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;AdjustViewSizeOrNot.h&quot;
</span><span class="cx"> #include &quot;Color.h&quot;
</span><ins>+#include &quot;ContainerNode.h&quot;
</ins><span class="cx"> #include &quot;LayoutMilestones.h&quot;
</span><span class="cx"> #include &quot;LayoutRect.h&quot;
</span><span class="cx"> #include &quot;Pagination.h&quot;
</span><span class="lines">@@ -383,7 +384,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool scrollToFragment(const URL&amp;);
</span><span class="cx">     bool scrollToAnchor(const String&amp;);
</span><del>-    void maintainScrollPositionAtAnchor(Node*);
</del><ins>+    void maintainScrollPositionAtAnchor(ContainerNode*);
</ins><span class="cx">     void scrollElementToRect(Element*, const IntRect&amp;);
</span><span class="cx"> 
</span><span class="cx">     // Methods to convert points and rects between the coordinate space of the renderer, and this view.
</span><span class="lines">@@ -691,7 +692,7 @@
</span><span class="cx">     bool m_isVisuallyNonEmpty;
</span><span class="cx">     bool m_firstVisuallyNonEmptyLayoutCallbackPending;
</span><span class="cx"> 
</span><del>-    RefPtr&lt;Node&gt; m_maintainScrollPositionAnchor;
</del><ins>+    RefPtr&lt;ContainerNode&gt; m_maintainScrollPositionAnchor;
</ins><span class="cx"> 
</span><span class="cx">     // Renderer to hold our custom scroll corner.
</span><span class="cx">     RenderPtr&lt;RenderScrollbarPart&gt; m_scrollCorner;
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCorepageSpatialNavigationcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/page/SpatialNavigation.cpp (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/page/SpatialNavigation.cpp        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/page/SpatialNavigation.cpp        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -502,6 +502,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+// FIXME: This is completely broken. This should be deleted and callers should be calling ScrollView::contentsToWindow() instead.
</ins><span class="cx"> static LayoutRect rectToAbsoluteCoordinates(Frame* initialFrame, const LayoutRect&amp; initialRect)
</span><span class="cx"> {
</span><span class="cx">     LayoutRect rect = initialRect;
</span><span class="lines">@@ -522,8 +523,9 @@
</span><span class="cx"> 
</span><span class="cx">     if (node-&gt;isDocumentNode())
</span><span class="cx">         return frameRectInAbsoluteCoordinates(toDocument(node)-&gt;frame());
</span><del>-    LayoutRect rect = rectToAbsoluteCoordinates(node-&gt;document().frame(), node-&gt;boundingBox());
</del><span class="cx"> 
</span><ins>+    LayoutRect rect = rectToAbsoluteCoordinates(node-&gt;document().frame(), rendererBoundingBox(*node));
+
</ins><span class="cx">     // For authors that use border instead of outline in their CSS, we compensate by ignoring the border when calculating
</span><span class="cx">     // the rect of the focused element.
</span><span class="cx">     if (ignoreBorder) {
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCorerenderingRenderElementcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderElement.cpp (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderElement.cpp        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderElement.cpp        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -1355,4 +1355,127 @@
</span><span class="cx">     controlStatesRendererMap().add(o, states);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool RenderElement::getLeadingCorner(FloatPoint&amp; point) const
+{
+    if (!isInline() || isReplaced()) {
+        point = localToAbsolute(FloatPoint(), UseTransforms);
+        return true;
+    }
+
+    // find the next text/image child, to get a position
+    const RenderObject* o = this;
+    while (o) {
+        const RenderObject* p = o;
+        if (RenderObject* child = o-&gt;firstChildSlow())
+            o = child;
+        else if (o-&gt;nextSibling())
+            o = o-&gt;nextSibling();
+        else {
+            RenderObject* next = 0;
+            while (!next &amp;&amp; o-&gt;parent()) {
+                o = o-&gt;parent();
+                next = o-&gt;nextSibling();
+            }
+            o = next;
+
+            if (!o)
+                break;
+        }
+        ASSERT(o);
+
+        if (!o-&gt;isInline() || o-&gt;isReplaced()) {
+            point = o-&gt;localToAbsolute(FloatPoint(), UseTransforms);
+            return true;
+        }
+
+        if (p-&gt;node() &amp;&amp; p-&gt;node() == element() &amp;&amp; o-&gt;isText() &amp;&amp; !toRenderText(*o).firstTextBox()) {
+            // do nothing - skip unrendered whitespace that is a child or next sibling of the anchor
+        } else if (o-&gt;isText() || o-&gt;isReplaced()) {
+            point = FloatPoint();
+            if (o-&gt;isText() &amp;&amp; toRenderText(*o).firstTextBox())
+                point.move(toRenderText(*o).linesBoundingBox().x(), toRenderText(*o).topOfFirstText());
+            else if (o-&gt;isBox())
+                point.moveBy(toRenderBox(*o).location());
+            point = o-&gt;container()-&gt;localToAbsolute(point, UseTransforms);
+            return true;
+        }
+    }
+    
+    // If the target doesn't have any children or siblings that could be used to calculate the scroll position, we must be
+    // at the end of the document. Scroll to the bottom. FIXME: who said anything about scrolling?
+    if (!o &amp;&amp; document().view()) {
+        point = FloatPoint(0, document().view()-&gt;contentsHeight());
+        return true;
+    }
+    return false;
</ins><span class="cx"> }
</span><ins>+
+bool RenderElement::getTrailingCorner(FloatPoint&amp; point) const
+{
+    if (!isInline() || isReplaced()) {
+        point = localToAbsolute(LayoutPoint(toRenderBox(*this).size()), UseTransforms);
+        return true;
+    }
+
+    // find the last text/image child, to get a position
+    const RenderObject* o = this;
+    while (o) {
+        if (RenderObject* child = o-&gt;lastChildSlow())
+            o = child;
+        else if (o-&gt;previousSibling())
+            o = o-&gt;previousSibling();
+        else {
+            RenderObject* prev = 0;
+            while (!prev) {
+                o = o-&gt;parent();
+                if (!o)
+                    return false;
+                prev = o-&gt;previousSibling();
+            }
+            o = prev;
+        }
+        ASSERT(o);
+        if (o-&gt;isText() || o-&gt;isReplaced()) {
+            point = FloatPoint();
+            if (o-&gt;isText()) {
+                IntRect linesBox = toRenderText(*o).linesBoundingBox();
+                if (!linesBox.maxX() &amp;&amp; !linesBox.maxY())
+                    continue;
+                point.moveBy(linesBox.maxXMaxYCorner());
+            } else
+                point.moveBy(toRenderBox(*o).frameRect().maxXMaxYCorner());
+            point = o-&gt;container()-&gt;localToAbsolute(point, UseTransforms);
+            return true;
+        }
+    }
+    return true;
+}
+
+LayoutRect RenderElement::anchorRect() const
+{
+    FloatPoint leading, trailing;
+    bool foundLeading = getLeadingCorner(leading);
+    bool foundTrailing = getTrailingCorner(trailing);
+    
+    // If we've found one corner, but not the other,
+    // then we should just return a point at the corner that we did find.
+    if (foundLeading != foundTrailing) {
+        if (foundLeading)
+            foundTrailing = foundLeading;
+        else
+            foundLeading = foundTrailing;
+    }
+
+    FloatPoint upperLeft = leading;
+    FloatPoint lowerRight = trailing;
+
+    // Vertical writing modes might mean the leading point is not in the top left
+    if (!isInline() || isReplaced()) {
+        upperLeft = FloatPoint(std::min(leading.x(), trailing.x()), std::min(leading.y(), trailing.y()));
+        lowerRight = FloatPoint(std::max(leading.x(), trailing.x()), std::max(leading.y(), trailing.y()));
+    } // Otherwise, it's not obvious what to do.
+
+    return enclosingLayoutRect(FloatRect(upperLeft, lowerRight.expandedTo(upperLeft) - upperLeft));
+}
+
+}
</ins></span></pre></div>
<a id="branchessafari6001415branchSourceWebCorerenderingRenderElementh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderElement.h (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderElement.h        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderElement.h        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -132,6 +132,10 @@
</span><span class="cx">     bool hasClipPath() const { return style().clipPath(); }
</span><span class="cx">     bool hasHiddenBackface() const { return style().backfaceVisibility() == BackfaceVisibilityHidden; }
</span><span class="cx"> 
</span><ins>+    // anchorRect() is conceptually similar to absoluteBoundingBoxRect(), but is intended for scrolling to an anchor.
+    // It works differently than absoluteBoundingBoxRect() for inline renderers.
+    LayoutRect anchorRect() const;
+
</ins><span class="cx"> #if ENABLE(CSS_FILTERS)
</span><span class="cx">     bool hasFilter() const { return style().hasFilter(); }
</span><span class="cx"> #else
</span><span class="lines">@@ -224,6 +228,9 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void newImageAnimationFrameAvailable(CachedImage&amp;) final override;
</span><span class="cx"> 
</span><ins>+    bool getLeadingCorner(FloatPoint&amp; output) const;
+    bool getTrailingCorner(FloatPoint&amp; output) const;
+
</ins><span class="cx">     unsigned m_baseTypeFlags : 6;
</span><span class="cx">     bool m_ancestorLineBoxDirty : 1;
</span><span class="cx">     bool m_hasInitializedStyle : 1;
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCorerenderingRenderTextcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderText.cpp (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderText.cpp        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderText.cpp        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -987,6 +987,11 @@
</span><span class="cx">     return prev;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+LayoutUnit RenderText::topOfFirstText() const
+{
+    return firstTextBox()-&gt;root().lineTop();
+}
+
</ins><span class="cx"> void applyTextTransform(const RenderStyle&amp; style, String&amp; text, UChar previousCharacter)
</span><span class="cx"> {
</span><span class="cx">     switch (style.textTransform()) {
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebCorerenderingRenderTexth"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderText.h (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderText.h        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/rendering/RenderText.h        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -158,6 +158,8 @@
</span><span class="cx"> 
</span><span class="cx">     StringView stringView(int start = 0, int stop = -1) const;
</span><span class="cx"> 
</span><ins>+    LayoutUnit topOfFirstText() const;
+
</ins><span class="cx"> protected:
</span><span class="cx">     virtual void computePreferredLogicalWidths(float leadWidth);
</span><span class="cx">     virtual void willBeDestroyed() override;
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebKit/mac/ChangeLog (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebKit/mac/ChangeLog        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebKit/mac/ChangeLog        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2015-01-24  David Kilzer  &lt;ddkilzer@apple.com&gt;
+
+        Merge r177035.
+
+    2014-12-09  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        Delete Node::boundingBox()
+        https://bugs.webkit.org/show_bug.cgi?id=139333
+
+        Reviewed by Zalan Bujtas.
+
+        * WebView/WebActionMenuController.mm:
+        (elementBoundingBoxInWindowCoordinatesFromNode): Use
+        RenderObject::absoluteBoundingBoxRect().
+
</ins><span class="cx"> 2014-08-06  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r172172. &lt;rdar://problem/17862892&gt;
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebKit2/ChangeLog (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebKit2/ChangeLog        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebKit2/ChangeLog        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -1,5 +1,23 @@
</span><span class="cx"> 2015-01-24  David Kilzer  &lt;ddkilzer@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r177035.
+
+    2014-12-09  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        Delete Node::boundingBox()
+        https://bugs.webkit.org/show_bug.cgi?id=139333
+
+        Reviewed by Zalan Bujtas.
+
+        * Shared/WebHitTestResult.cpp:
+        (WebKit::WebHitTestResult::Data::elementBoundingBoxInWindowCoordinates):
+        Use RenderObject::absoluteBoundingBoxRect().
+        * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
+        (WebKit::WebPage::findZoomableAreaForPoint): Use
+        RenderObject::absoluteBoundingBoxRect().
+
+2015-01-24  David Kilzer  &lt;ddkilzer@apple.com&gt;
+
</ins><span class="cx">         Merge r176382.
</span><span class="cx"> 
</span><span class="cx">     2014-11-19  Yongjun Zhang  &lt;yongjun_zhang@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebKit2SharedWebHitTestResultcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebKit2/Shared/WebHitTestResult.cpp (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebKit2/Shared/WebHitTestResult.cpp        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebKit2/Shared/WebHitTestResult.cpp        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx"> #include &lt;WebCore/Frame.h&gt;
</span><span class="cx"> #include &lt;WebCore/FrameView.h&gt;
</span><span class="cx"> #include &lt;WebCore/HitTestResult.h&gt;
</span><ins>+#include &lt;WebCore/RenderObject.h&gt;
</ins><span class="cx"> #include &lt;WebCore/URL.h&gt;
</span><span class="cx"> #include &lt;WebCore/Node.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="lines">@@ -102,7 +103,7 @@
</span><span class="cx">     if (!view)
</span><span class="cx">         return IntRect();
</span><span class="cx"> 
</span><del>-    return view-&gt;contentsToWindow(node-&gt;pixelSnappedBoundingBox());
</del><ins>+    return view-&gt;contentsToWindow(rendererBoundingBox(*node));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // WebKit
</span></span></pre></div>
<a id="branchessafari6001415branchSourceWebKit2WebProcessWebPageCoordinatedGraphicsWebPageCoordinatedGraphicscpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1.4.15-branch/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp (179091 => 179092)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1.4.15-branch/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp        2015-01-25 19:40:18 UTC (rev 179091)
+++ branches/safari-600.1.4.15-branch/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp        2015-01-26 00:14:06 UTC (rev 179092)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> #include &lt;WebCore/EventHandler.h&gt;
</span><span class="cx"> #include &lt;WebCore/Frame.h&gt;
</span><span class="cx"> #include &lt;WebCore/FrameView.h&gt;
</span><ins>+#include &lt;WebCore/RenderObject.h&gt;
</ins><span class="cx"> #include &lt;WebCore/ScrollView.h&gt;
</span><span class="cx"> 
</span><span class="cx"> using namespace WebCore;
</span><span class="lines">@@ -54,7 +55,7 @@
</span><span class="cx">     if (!node)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    IntRect zoomableArea = node-&gt;pixelSnappedBoundingBox();
</del><ins>+    IntRect zoomableArea = rendererBoundingBox(*node);
</ins><span class="cx"> 
</span><span class="cx">     while (true) {
</span><span class="cx">         bool found = !node-&gt;isTextNode() &amp;&amp; !node-&gt;isShadowRoot();
</span><span class="lines">@@ -70,7 +71,7 @@
</span><span class="cx">             break;
</span><span class="cx"> 
</span><span class="cx">         node = node-&gt;parentNode();
</span><del>-        zoomableArea.unite(node-&gt;pixelSnappedBoundingBox());
</del><ins>+        zoomableArea.unite(rendererBoundingBox(*node));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (node-&gt;document().frame() &amp;&amp; node-&gt;document().frame()-&gt;view()) {
</span></span></pre>
</div>
</div>

</body>
</html>