<!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>[172064] branches/safari-600.1-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/172064">172064</a></dd>
<dt>Author</dt> <dd>lforschler@apple.com</dd>
<dt>Date</dt> <dd>2014-08-05 13:47:21 -0700 (Tue, 05 Aug 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merged <a href="http://trac.webkit.org/projects/webkit/changeset/171891">r171891</a>. <rdar://problem/17850323></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari6001branchLayoutTestsChangeLog">branches/safari-600.1-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari6001branchLayoutTestsplatformmacwk1TestExpectations">branches/safari-600.1-branch/LayoutTests/platform/mac-wk1/TestExpectations</a></li>
<li><a href="#branchessafari6001branchSourceWebCoreChangeLog">branches/safari-600.1-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari6001branchSourceWebCoreWebCoreexpin">branches/safari-600.1-branch/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#branchessafari6001branchSourceWebCorepageFrameViewcpp">branches/safari-600.1-branch/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#branchessafari6001branchSourceWebCorepageFrameViewh">branches/safari-600.1-branch/Source/WebCore/page/FrameView.h</a></li>
<li><a href="#branchessafari6001branchSourceWebCorepagePagecpp">branches/safari-600.1-branch/Source/WebCore/page/Page.cpp</a></li>
<li><a href="#branchessafari6001branchSourceWebCoreplatformScrollViewcpp">branches/safari-600.1-branch/Source/WebCore/platform/ScrollView.cpp</a></li>
<li><a href="#branchessafari6001branchSourceWebCoreplatformScrollViewh">branches/safari-600.1-branch/Source/WebCore/platform/ScrollView.h</a></li>
<li><a href="#branchessafari6001branchSourceWebCoreplatformiosScrollViewIOSmm">branches/safari-600.1-branch/Source/WebCore/platform/ios/ScrollViewIOS.mm</a></li>
<li><a href="#branchessafari6001branchSourceWebCoreplatformmacScrollViewMacmm">branches/safari-600.1-branch/Source/WebCore/platform/mac/ScrollViewMac.mm</a></li>
<li><a href="#branchessafari6001branchSourceWebCorerenderingRenderLayercpp">branches/safari-600.1-branch/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#branchessafari6001branchSourceWebCorerenderingRenderListBoxcpp">branches/safari-600.1-branch/Source/WebCore/rendering/RenderListBox.cpp</a></li>
<li><a href="#branchessafari6001branchSourceWebKit2ChangeLog">branches/safari-600.1-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari6001branchSourceWebKit2WebProcessPluginsPDFPDFPluginmm">branches/safari-600.1-branch/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari6001branchLayoutTestsplatformmacfasteventscontentinsethittestingexpectedtxt">branches/safari-600.1-branch/LayoutTests/platform/mac/fast/events/content-inset-hit-testing-expected.txt</a></li>
<li><a href="#branchessafari6001branchLayoutTestsplatformmacfasteventscontentinsethittestinginframeexpectedtxt">branches/safari-600.1-branch/LayoutTests/platform/mac/fast/events/content-inset-hit-testing-in-frame-expected.txt</a></li>
<li><a href="#branchessafari6001branchLayoutTestsplatformmacfasteventscontentinsethittestinginframehtml">branches/safari-600.1-branch/LayoutTests/platform/mac/fast/events/content-inset-hit-testing-in-frame.html</a></li>
<li><a href="#branchessafari6001branchLayoutTestsplatformmacfasteventscontentinsethittestinghtml">branches/safari-600.1-branch/LayoutTests/platform/mac/fast/events/content-inset-hit-testing.html</a></li>
<li>branches/safari-600.1-branch/LayoutTests/platform/mac/fast/events/resources/</li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#branchessafari6001branchLayoutTestsplatformmacwk2tileddrawingcontentinsethittestingexpectedtxt">branches/safari-600.1-branch/LayoutTests/platform/mac-wk2/tiled-drawing/content-inset-hit-testing-expected.txt</a></li>
<li><a href="#branchessafari6001branchLayoutTestsplatformmacwk2tileddrawingcontentinsethittestinginframeexpectedtxt">branches/safari-600.1-branch/LayoutTests/platform/mac-wk2/tiled-drawing/content-inset-hit-testing-in-frame-expected.txt</a></li>
<li><a href="#branchessafari6001branchLayoutTestsplatformmacwk2tileddrawingcontentinsethittestinginframehtml">branches/safari-600.1-branch/LayoutTests/platform/mac-wk2/tiled-drawing/content-inset-hit-testing-in-frame.html</a></li>
<li><a href="#branchessafari6001branchLayoutTestsplatformmacwk2tileddrawingcontentinsethittestinghtml">branches/safari-600.1-branch/LayoutTests/platform/mac-wk2/tiled-drawing/content-inset-hit-testing.html</a></li>
<li><a href="#branchessafari6001branchLayoutTestsplatformmacwk2tileddrawingresourcesiframetohittesthtml">branches/safari-600.1-branch/LayoutTests/platform/mac-wk2/tiled-drawing/resources/iframe-to-hit-test.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari6001branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/LayoutTests/ChangeLog (172063 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/LayoutTests/ChangeLog        2014-08-05 20:43:18 UTC (rev 172063)
+++ branches/safari-600.1-branch/LayoutTests/ChangeLog        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -1,5 +1,34 @@
</span><span class="cx"> 2014-08-05 Lucas Forschler <lforschler@apple.com>
</span><span class="cx">
</span><ins>+ Merge r171891
+
+ 2014-07-31 Beth Dakin <bdakin@apple.com>
+
+ Hit-testing broken in WebKit 1 views with AppKit's contentInsets
+ https://bugs.webkit.org/show_bug.cgi?id=135434
+ -and corresponding-
+ <rdar://problem/17850323>
+
+ Reviewed by Benjamin Poulain.
+
+ These hit-testing related contentInset tests will now work for mac on wk1 on
+ Yosemite and wk2.
+
+ * platform/mac-wk1/TestExpectations:
+ * platform/mac-wk2/tiled-drawing/content-inset-hit-testing-expected.txt: Removed.
+ * platform/mac-wk2/tiled-drawing/content-inset-hit-testing-in-frame-expected.txt: Removed.
+ * platform/mac-wk2/tiled-drawing/content-inset-hit-testing-in-frame.html: Removed.
+ * platform/mac-wk2/tiled-drawing/content-inset-hit-testing.html: Removed.
+ * platform/mac-wk2/tiled-drawing/resources/iframe-to-hit-test.html: Removed.
+ * platform/mac/fast/events/content-inset-hit-testing-expected.txt: Copied from platform/mac-wk2/tiled-drawing/content-inset-hit-testing-expected.txt.
+ * platform/mac/fast/events/content-inset-hit-testing-in-frame-expected.txt: Copied from platform/mac-wk2/tiled-drawing/content-inset-hit-testing-in-frame-expected.txt.
+ * platform/mac/fast/events/content-inset-hit-testing-in-frame.html: Copied from platform/mac-wk2/tiled-drawing/content-inset-hit-testing-in-frame.html.
+ * platform/mac/fast/events/content-inset-hit-testing.html: Copied from platform/mac-wk2/tiled-drawing/content-inset-hit-testing.html.
+ * platform/mac/fast/events/resources: Added.
+ * platform/mac/fast/events/resources/iframe-to-hit-test.html: Copied from platform/mac-wk2/tiled-drawing/resources/iframe-to-hit-test.html.
+
+2014-08-05 Lucas Forschler <lforschler@apple.com>
+
</ins><span class="cx"> Merge r171882
</span><span class="cx">
</span><span class="cx"> 2014-07-31 Andrei Bucur <abucur@adobe.com>
</span></span></pre></div>
<a id="branchessafari6001branchLayoutTestsplatformmacfasteventscontentinsethittestingexpectedtxtfromrev171891trunkLayoutTestsplatformmacfasteventscontentinsethittestingexpectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-600.1-branch/LayoutTests/platform/mac/fast/events/content-inset-hit-testing-expected.txt (from rev 171891, trunk/LayoutTests/platform/mac/fast/events/content-inset-hit-testing-expected.txt) (0 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/LayoutTests/platform/mac/fast/events/content-inset-hit-testing-expected.txt         (rev 0)
+++ branches/safari-600.1-branch/LayoutTests/platform/mac/fast/events/content-inset-hit-testing-expected.txt        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+Pass!
</ins></span></pre></div>
<a id="branchessafari6001branchLayoutTestsplatformmacfasteventscontentinsethittestinginframeexpectedtxtfromrev171891trunkLayoutTestsplatformmacfasteventscontentinsethittestinginframeexpectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-600.1-branch/LayoutTests/platform/mac/fast/events/content-inset-hit-testing-in-frame-expected.txt (from rev 171891, trunk/LayoutTests/platform/mac/fast/events/content-inset-hit-testing-in-frame-expected.txt) (0 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/LayoutTests/platform/mac/fast/events/content-inset-hit-testing-in-frame-expected.txt         (rev 0)
+++ branches/safari-600.1-branch/LayoutTests/platform/mac/fast/events/content-inset-hit-testing-in-frame-expected.txt        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -0,0 +1,2 @@
</span><ins>+
+Pass!
</ins></span></pre></div>
<a id="branchessafari6001branchLayoutTestsplatformmacfasteventscontentinsethittestinginframehtmlfromrev171891trunkLayoutTestsplatformmacfasteventscontentinsethittestinginframehtml"></a>
<div class="copfile"><h4>Copied: branches/safari-600.1-branch/LayoutTests/platform/mac/fast/events/content-inset-hit-testing-in-frame.html (from rev 171891, trunk/LayoutTests/platform/mac/fast/events/content-inset-hit-testing-in-frame.html) (0 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/LayoutTests/platform/mac/fast/events/content-inset-hit-testing-in-frame.html         (rev 0)
+++ branches/safari-600.1-branch/LayoutTests/platform/mac/fast/events/content-inset-hit-testing-in-frame.html        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+<html>
+<head>
+<script>
+ function runTest() {
+ if (!window.eventSender)
+ return;
+ if (window.internals)
+ window.internals.setTopContentInset(100);
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ eventSender.mouseMoveTo(20, 120);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ }
+</script>
+</head>
+<body onload="runTest()">
+ <iframe src="resources/iframe-to-hit-test.html" scrolling="no" frameborder="no" height="300" width="600"></iframe>
+ <div id="result">This test needs to be run through WebKitTestRunner.</div>
+</body>
+</html>
</ins></span></pre></div>
<a id="branchessafari6001branchLayoutTestsplatformmacfasteventscontentinsethittestinghtmlfromrev171891trunkLayoutTestsplatformmacfasteventscontentinsethittestinghtml"></a>
<div class="copfile"><h4>Copied: branches/safari-600.1-branch/LayoutTests/platform/mac/fast/events/content-inset-hit-testing.html (from rev 171891, trunk/LayoutTests/platform/mac/fast/events/content-inset-hit-testing.html) (0 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/LayoutTests/platform/mac/fast/events/content-inset-hit-testing.html         (rev 0)
+++ branches/safari-600.1-branch/LayoutTests/platform/mac/fast/events/content-inset-hit-testing.html        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -0,0 +1,41 @@
</span><ins>+<html>
+<head>
+<style>
+ #target {
+ background-color:purple;
+ width:25px;
+ height:25px;
+ }
+</style>
+<script>
+ var numberOfClicks = 0;
+
+ function runTest() {
+ if (!window.eventSender)
+ return;
+ if (window.internals)
+ window.internals.setTopContentInset(100);
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ eventSender.mouseMoveTo(15, 115);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+
+ var result = document.getElementById("result");
+ if (numberOfClicks > 0)
+ result.innerHTML = "Pass!";
+ else
+ result.innerHTML = "Fail.";
+ }
+
+ function clicked() {
+ numberOfClicks = 1;
+ }
+</script>
+</head>
+<body onload="runTest()">
+ <div id="target" onclick="clicked()"></div>
+ <div id="result">This test needs to be run through WebKitTestRunner.</div>
+</body>
+</html>
</ins></span></pre></div>
<a id="branchessafari6001branchLayoutTestsplatformmacwk1TestExpectations"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/LayoutTests/platform/mac-wk1/TestExpectations (172063 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/LayoutTests/platform/mac-wk1/TestExpectations        2014-08-05 20:43:18 UTC (rev 172063)
+++ branches/safari-600.1-branch/LayoutTests/platform/mac-wk1/TestExpectations        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -49,5 +49,9 @@
</span><span class="cx"> # Disable snapshotting tests on WK1 only
</span><span class="cx"> plugins/snapshotting
</span><span class="cx">
</span><ins>+# Mavericks and prior do not support contentInset
+[ MountainLion Mavericks ] platform/mac/fast/events/content-inset-hit-testing.html [ Skip ]
+[ MountainLion Mavericks ] platform/mac/fast/events/content-inset-hit-testing-in-frame.html [ Skip ]
+
</ins><span class="cx"> ### END OF (2) Failures without bug reports
</span><span class="cx"> ########################################
</span></span></pre></div>
<a id="branchessafari6001branchLayoutTestsplatformmacwk2tileddrawingcontentinsethittestingexpectedtxt"></a>
<div class="delfile"><h4>Deleted: branches/safari-600.1-branch/LayoutTests/platform/mac-wk2/tiled-drawing/content-inset-hit-testing-expected.txt (172063 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/LayoutTests/platform/mac-wk2/tiled-drawing/content-inset-hit-testing-expected.txt        2014-08-05 20:43:18 UTC (rev 172063)
+++ branches/safari-600.1-branch/LayoutTests/platform/mac-wk2/tiled-drawing/content-inset-hit-testing-expected.txt        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -1 +0,0 @@
</span><del>-Pass!
</del></span></pre></div>
<a id="branchessafari6001branchLayoutTestsplatformmacwk2tileddrawingcontentinsethittestinginframeexpectedtxt"></a>
<div class="delfile"><h4>Deleted: branches/safari-600.1-branch/LayoutTests/platform/mac-wk2/tiled-drawing/content-inset-hit-testing-in-frame-expected.txt (172063 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/LayoutTests/platform/mac-wk2/tiled-drawing/content-inset-hit-testing-in-frame-expected.txt        2014-08-05 20:43:18 UTC (rev 172063)
+++ branches/safari-600.1-branch/LayoutTests/platform/mac-wk2/tiled-drawing/content-inset-hit-testing-in-frame-expected.txt        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -1,2 +0,0 @@
</span><del>-
-Pass!
</del></span></pre></div>
<a id="branchessafari6001branchLayoutTestsplatformmacwk2tileddrawingcontentinsethittestinginframehtml"></a>
<div class="delfile"><h4>Deleted: branches/safari-600.1-branch/LayoutTests/platform/mac-wk2/tiled-drawing/content-inset-hit-testing-in-frame.html (172063 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/LayoutTests/platform/mac-wk2/tiled-drawing/content-inset-hit-testing-in-frame.html        2014-08-05 20:43:18 UTC (rev 172063)
+++ branches/safari-600.1-branch/LayoutTests/platform/mac-wk2/tiled-drawing/content-inset-hit-testing-in-frame.html        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -1,22 +0,0 @@
</span><del>-<html>
-<head>
-<script>
- function runTest() {
- if (!window.eventSender)
- return;
- if (window.internals)
- window.internals.setTopContentInset(100);
- if (window.testRunner)
- testRunner.dumpAsText();
-
- eventSender.mouseMoveTo(20, 120);
- eventSender.mouseDown();
- eventSender.mouseUp();
- }
-</script>
-</head>
-<body onload="runTest()">
- <iframe src="resources/iframe-to-hit-test.html" scrolling="no" frameborder="no" height="300" width="600"></iframe>
- <div id="result">This test needs to be run through WebKitTestRunner.</div>
-</body>
-</html>
</del></span></pre></div>
<a id="branchessafari6001branchLayoutTestsplatformmacwk2tileddrawingcontentinsethittestinghtml"></a>
<div class="delfile"><h4>Deleted: branches/safari-600.1-branch/LayoutTests/platform/mac-wk2/tiled-drawing/content-inset-hit-testing.html (172063 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/LayoutTests/platform/mac-wk2/tiled-drawing/content-inset-hit-testing.html        2014-08-05 20:43:18 UTC (rev 172063)
+++ branches/safari-600.1-branch/LayoutTests/platform/mac-wk2/tiled-drawing/content-inset-hit-testing.html        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -1,41 +0,0 @@
</span><del>-<html>
-<head>
-<style>
- #target {
- background-color:purple;
- width:25px;
- height:25px;
- }
-</style>
-<script>
- var numberOfClicks = 0;
-
- function runTest() {
- if (!window.eventSender)
- return;
- if (window.internals)
- window.internals.setTopContentInset(100);
- if (window.testRunner)
- testRunner.dumpAsText();
-
- eventSender.mouseMoveTo(15, 115);
- eventSender.mouseDown();
- eventSender.mouseUp();
-
- var result = document.getElementById("result");
- if (numberOfClicks > 0)
- result.innerHTML = "Pass!";
- else
- result.innerHTML = "Fail.";
- }
-
- function clicked() {
- numberOfClicks = 1;
- }
-</script>
-</head>
-<body onload="runTest()">
- <div id="target" onclick="clicked()"></div>
- <div id="result">This test needs to be run through WebKitTestRunner.</div>
-</body>
-</html>
</del></span></pre></div>
<a id="branchessafari6001branchLayoutTestsplatformmacwk2tileddrawingresourcesiframetohittesthtml"></a>
<div class="delfile"><h4>Deleted: branches/safari-600.1-branch/LayoutTests/platform/mac-wk2/tiled-drawing/resources/iframe-to-hit-test.html (172063 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/LayoutTests/platform/mac-wk2/tiled-drawing/resources/iframe-to-hit-test.html        2014-08-05 20:43:18 UTC (rev 172063)
+++ branches/safari-600.1-branch/LayoutTests/platform/mac-wk2/tiled-drawing/resources/iframe-to-hit-test.html        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -1,20 +0,0 @@
</span><del>-<html>
-<head>
-<style>
- #target {
- background-color:purple;
- width:25px;
- height:25px;
- }
-</style>
-<script>
- function clicked() {
- var result = parent.document.getElementById("result");
- result.innerHTML = "Pass!";
- }
-</script>
-</head>
-<body>
- <div id="target" onclick="clicked()"></div>
-</body>
-</html>
</del></span></pre></div>
<a id="branchessafari6001branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebCore/ChangeLog (172063 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebCore/ChangeLog        2014-08-05 20:43:18 UTC (rev 172063)
+++ branches/safari-600.1-branch/Source/WebCore/ChangeLog        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -1,5 +1,84 @@
</span><span class="cx"> 2014-08-05 Lucas Forschler <lforschler@apple.com>
</span><span class="cx">
</span><ins>+ Merge r171891
+
+ 2014-07-31 Beth Dakin <bdakin@apple.com>
+
+ Hit-testing broken in WebKit 1 views with AppKit's contentInsets
+ https://bugs.webkit.org/show_bug.cgi?id=135434
+ -and corresponding-
+ <rdar://problem/17850323>
+
+ Reviewed by Benjamin Poulain.
+
+ AppKit's contentInsets are factored into scroll positions and mouse positions, but
+ in WebCore, we generally want all of those things to be factored out so that, for
+ example, the scroll position of a document pinned to the top is the same whether
+ or not there is a contentInset. So to fix hit-testing in WebKit 1 views with
+ contentInsets, this patch factors the inset out or into of all coordinate
+ conversion methods just like we do for the WebKit2 contentInset.
+
+ This patch also adds the ability to test WK1 platformContentInsets with
+ window.internals, and it re-names convertFromRenderer to
+ convertFromRendererToContainingView and also re-names convertToRenderer to
+ convertFromContainingViewToRenderer.
+
+ ScrollView::topContentInset() takes an optional parameter indicating whether the
+ caller wants the WebCore::Page contentInset or the platform content inset. It’s
+ necessary to distinguish between these cases because there is a lot of code that
+ only wants the WebCore::Page contentInset since that feature is actually
+ implemented in WebCore as opposed to being implemented at the platform level.
+ * WebCore.exp.in:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::topContentInset):
+
+ For layout test purposes, set the platforTopContentInset here if there is a
+ platformWidget().
+ (WebCore::FrameView::topContentInsetDidChange):
+
+ Re-named functions, also all coordinate conversion functions call
+ topContentInset(ManualOrPlatformContentInset)
+ (WebCore::FrameView::convertFromContainingViewToRenderer):
+ (WebCore::FrameView::convertToContainingView):
+ (WebCore::FrameView::convertFromContainingView):
+ (WebCore::FrameView::convertFromRenderer): Deleted.
+ (WebCore::FrameView::convertToRenderer): Deleted.
+ * page/FrameView.h:
+ * page/Page.cpp:
+ (WebCore::Page::setTopContentInset):
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::documentScrollOffsetRelativeToViewOrigin):
+ (WebCore::ScrollView::documentScrollPositionRelativeToViewOrigin):
+ (WebCore::ScrollView::contentsToRootView):
+ (WebCore::ScrollView::rootViewToTotalContents):
+ (WebCore::ScrollView::contentsToWindow):
+ (WebCore::ScrollView::platformTopContentInset):
+ (WebCore::ScrollView::platformSetTopContentInset):
+ * platform/ScrollView.h:
+ (WebCore::ScrollView::topContentInset):
+ * platform/ios/ScrollViewIOS.mm:
+ (WebCore::ScrollView::platformTopContentInset):
+ (WebCore::ScrollView::platformSetTopContentInset):
+
+ Implement new platform inset-related functions using AppKit's implementation.
+ * platform/mac/ScrollViewMac.mm:
+ (WebCore::ScrollView::platformTopContentInset):
+ (WebCore::ScrollView::platformSetTopContentInset):
+
+ When we set the scroll position for the documentView, we have to factor the inset
+ back into the WebCore scroll position.
+ (WebCore::ScrollView::platformSetScrollPosition):
+
+ Re-named functions.
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::convertFromScrollbarToContainingView):
+ (WebCore::RenderLayer::convertFromContainingViewToScrollbar):
+ * rendering/RenderListBox.cpp:
+ (WebCore::RenderListBox::convertFromScrollbarToContainingView):
+ (WebCore::RenderListBox::convertFromContainingViewToScrollbar):
+
+2014-08-05 Lucas Forschler <lforschler@apple.com>
+
</ins><span class="cx"> Merge r171889
</span><span class="cx">
</span><span class="cx"> 2014-07-31 Tim Horton <timothy_horton@apple.com>
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebCore/WebCore.exp.in (172063 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebCore/WebCore.exp.in        2014-08-05 20:43:18 UTC (rev 172063)
+++ branches/safari-600.1-branch/Source/WebCore/WebCore.exp.in        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -2018,18 +2018,18 @@
</span><span class="cx"> __ZNK7WebCore9FrameView13isTransparentEv
</span><span class="cx"> __ZNK7WebCore9FrameView13paintBehaviorEv
</span><span class="cx"> __ZNK7WebCore9FrameView14didFirstLayoutEv
</span><del>-__ZNK7WebCore9FrameView15topContentInsetEv
-__ZNK7WebCore9FrameView17convertToRendererEPKNS_13RenderElementERKNS_7IntRectE
-__ZNK7WebCore9FrameView17convertToRendererEPKNS_13RenderElementERKNS_8IntPointE
</del><ins>+__ZNK7WebCore9FrameView15topContentInsetENS_10ScrollView19TopContentInsetTypeE
</ins><span class="cx"> __ZNK7WebCore9FrameView19baseBackgroundColorEv
</span><del>-__ZNK7WebCore9FrameView19convertFromRendererEPKNS_13RenderElementERKNS_7IntRectE
-__ZNK7WebCore9FrameView19convertFromRendererEPKNS_13RenderElementERKNS_8IntPointE
</del><span class="cx"> __ZNK7WebCore9FrameView20isSoftwareRenderableEv
</span><span class="cx"> __ZNK7WebCore9FrameView21maximumScrollPositionEv
</span><span class="cx"> __ZNK7WebCore9FrameView21minimumScrollPositionEv
</span><span class="cx"> __ZNK7WebCore9FrameView23documentBackgroundColorEv
</span><span class="cx"> __ZNK7WebCore9FrameView27windowClipRectForFrameOwnerEPKNS_21HTMLFrameOwnerElementEb
</span><span class="cx"> __ZNK7WebCore9FrameView28isEnclosedInCompositingLayerEv
</span><ins>+__ZNK7WebCore9FrameView35convertFromContainingViewToRendererEPKNS_13RenderElementERKNS_7IntRectE
+__ZNK7WebCore9FrameView35convertFromContainingViewToRendererEPKNS_13RenderElementERKNS_8IntPointE
+__ZNK7WebCore9FrameView35convertFromRendererToContainingViewEPKNS_13RenderElementERKNS_7IntRectE
+__ZNK7WebCore9FrameView35convertFromRendererToContainingViewEPKNS_13RenderElementERKNS_8IntPointE
</ins><span class="cx"> __ZNK7WebCore9InlineBox10lineHeightEv
</span><span class="cx"> __ZNK7WebCore9InlineBox14caretMaxOffsetEv
</span><span class="cx"> __ZNK7WebCore9InlineBox14caretMinOffsetEv
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebCore/page/FrameView.cpp (172063 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebCore/page/FrameView.cpp        2014-08-05 20:43:18 UTC (rev 172063)
+++ branches/safari-600.1-branch/Source/WebCore/page/FrameView.cpp        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -930,8 +930,11 @@
</span><span class="cx"> renderView->setNeedsLayout();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-float FrameView::topContentInset() const
</del><ins>+float FrameView::topContentInset(TopContentInsetType contentInsetTypeToReturn) const
</ins><span class="cx"> {
</span><ins>+ if (platformWidget() && contentInsetTypeToReturn == TopContentInsetType::WebCoreOrPlatformContentInset)
+ return platformTopContentInset();
+
</ins><span class="cx"> if (!frame().isMainFrame())
</span><span class="cx"> return 0;
</span><span class="cx">
</span><span class="lines">@@ -939,11 +942,14 @@
</span><span class="cx"> return page ? page->topContentInset() : 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void FrameView::topContentInsetDidChange()
</del><ins>+void FrameView::topContentInsetDidChange(float newTopContentInset)
</ins><span class="cx"> {
</span><span class="cx"> RenderView* renderView = this->renderView();
</span><span class="cx"> if (!renderView)
</span><span class="cx"> return;
</span><ins>+
+ if (platformWidget())
+ platformSetTopContentInset(newTopContentInset);
</ins><span class="cx">
</span><span class="cx"> layout();
</span><span class="cx">
</span><span class="lines">@@ -952,7 +958,7 @@
</span><span class="cx"> renderView->compositor().frameViewDidChangeSize();
</span><span class="cx">
</span><span class="cx"> if (TiledBacking* tiledBacking = this->tiledBacking())
</span><del>- tiledBacking->setTopContentInset(topContentInset());
</del><ins>+ tiledBacking->setTopContentInset(newTopContentInset);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool FrameView::hasCompositedContent() const
</span><span class="lines">@@ -3931,18 +3937,18 @@
</span><span class="cx"> renderView->setPrintRect(IntRect());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-IntRect FrameView::convertFromRenderer(const RenderElement* renderer, const IntRect& rendererRect) const
</del><ins>+IntRect FrameView::convertFromRendererToContainingView(const RenderElement* renderer, const IntRect& rendererRect) const
</ins><span class="cx"> {
</span><span class="cx"> IntRect rect = pixelSnappedIntRect(enclosingLayoutRect(renderer->localToAbsoluteQuad(FloatRect(rendererRect)).boundingBox()));
</span><span class="cx">
</span><span class="cx"> // Convert from page ("absolute") to FrameView coordinates.
</span><span class="cx"> if (!delegatesScrolling())
</span><del>- rect.moveBy(-scrollPosition() + IntPoint(0, headerHeight() + topContentInset()));
</del><ins>+ rect.moveBy(-scrollPosition() + IntPoint(0, headerHeight() + topContentInset(TopContentInsetType::WebCoreOrPlatformContentInset)));
</ins><span class="cx">
</span><span class="cx"> return rect;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-IntRect FrameView::convertToRenderer(const RenderElement* renderer, const IntRect& viewRect) const
</del><ins>+IntRect FrameView::convertFromContainingViewToRenderer(const RenderElement* renderer, const IntRect& viewRect) const
</ins><span class="cx"> {
</span><span class="cx"> IntRect rect = viewRect;
</span><span class="cx">
</span><span class="lines">@@ -3956,17 +3962,17 @@
</span><span class="cx"> return rect;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-IntPoint FrameView::convertFromRenderer(const RenderElement* renderer, const IntPoint& rendererPoint) const
</del><ins>+IntPoint FrameView::convertFromRendererToContainingView(const RenderElement* renderer, const IntPoint& rendererPoint) const
</ins><span class="cx"> {
</span><span class="cx"> IntPoint point = roundedIntPoint(renderer->localToAbsolute(rendererPoint, UseTransforms));
</span><span class="cx">
</span><span class="cx"> // Convert from page ("absolute") to FrameView coordinates.
</span><span class="cx"> if (!delegatesScrolling())
</span><del>- point.moveBy(-scrollPosition() + IntPoint(0, headerHeight() + topContentInset()));
</del><ins>+ point.moveBy(-scrollPosition() + IntPoint(0, headerHeight() + topContentInset(TopContentInsetType::WebCoreOrPlatformContentInset)));
</ins><span class="cx"> return point;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-IntPoint FrameView::convertToRenderer(const RenderElement* renderer, const IntPoint& viewPoint) const
</del><ins>+IntPoint FrameView::convertFromContainingViewToRenderer(const RenderElement* renderer, const IntPoint& viewPoint) const
</ins><span class="cx"> {
</span><span class="cx"> IntPoint point = viewPoint;
</span><span class="cx">
</span><span class="lines">@@ -3991,7 +3997,7 @@
</span><span class="cx"> // Add borders and padding??
</span><span class="cx"> rect.move(renderer->borderLeft() + renderer->paddingLeft(),
</span><span class="cx"> renderer->borderTop() + renderer->paddingTop());
</span><del>- return parentView->convertFromRenderer(renderer, rect);
</del><ins>+ return parentView->convertFromRendererToContainingView(renderer, rect);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return Widget::convertToContainingView(localRect);
</span><span class="lines">@@ -4011,7 +4017,7 @@
</span><span class="cx"> if (!renderer)
</span><span class="cx"> return parentRect;
</span><span class="cx">
</span><del>- IntRect rect = parentView->convertToRenderer(renderer, parentRect);
</del><ins>+ IntRect rect = parentView->convertFromContainingViewToRenderer(renderer, parentRect);
</ins><span class="cx"> // Subtract borders and padding
</span><span class="cx"> rect.move(-renderer->borderLeft() - renderer->paddingLeft(),
</span><span class="cx"> -renderer->borderTop() - renderer->paddingTop());
</span><span class="lines">@@ -4040,7 +4046,7 @@
</span><span class="cx"> // Add borders and padding
</span><span class="cx"> point.move(renderer->borderLeft() + renderer->paddingLeft(),
</span><span class="cx"> renderer->borderTop() + renderer->paddingTop());
</span><del>- return parentView->convertFromRenderer(renderer, point);
</del><ins>+ return parentView->convertFromRendererToContainingView(renderer, point);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return Widget::convertToContainingView(localPoint);
</span><span class="lines">@@ -4060,7 +4066,7 @@
</span><span class="cx"> if (!renderer)
</span><span class="cx"> return parentPoint;
</span><span class="cx">
</span><del>- IntPoint point = parentView->convertToRenderer(renderer, parentPoint);
</del><ins>+ IntPoint point = parentView->convertFromContainingViewToRenderer(renderer, parentPoint);
</ins><span class="cx"> // Subtract borders and padding
</span><span class="cx"> point.move(-renderer->borderLeft() - renderer->paddingLeft(),
</span><span class="cx"> -renderer->borderTop() - renderer->paddingTop());
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebCorepageFrameViewh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebCore/page/FrameView.h (172063 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebCore/page/FrameView.h        2014-08-05 20:43:18 UTC (rev 172063)
+++ branches/safari-600.1-branch/Source/WebCore/page/FrameView.h        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -387,10 +387,10 @@
</span><span class="cx"> void scrollElementToRect(Element*, const IntRect&);
</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><del>- IntRect convertFromRenderer(const RenderElement*, const IntRect&) const;
- IntRect convertToRenderer(const RenderElement*, const IntRect&) const;
- IntPoint convertFromRenderer(const RenderElement*, const IntPoint&) const;
- IntPoint convertToRenderer(const RenderElement*, const IntPoint&) const;
</del><ins>+ IntRect convertFromRendererToContainingView(const RenderElement*, const IntRect&) const;
+ IntRect convertFromContainingViewToRenderer(const RenderElement*, const IntRect&) const;
+ IntPoint convertFromRendererToContainingView(const RenderElement*, const IntPoint&) const;
+ IntPoint convertFromContainingViewToRenderer(const RenderElement*, const IntPoint&) const;
</ins><span class="cx">
</span><span class="cx"> bool isFrameViewScrollCorner(RenderScrollbarPart* scrollCorner) const { return m_scrollCorner == scrollCorner; }
</span><span class="cx">
</span><span class="lines">@@ -465,8 +465,8 @@
</span><span class="cx"> virtual int footerHeight() const override { return m_footerHeight; }
</span><span class="cx"> void setFooterHeight(int);
</span><span class="cx">
</span><del>- virtual float topContentInset() const override;
- void topContentInsetDidChange();
</del><ins>+ virtual float topContentInset(TopContentInsetType = TopContentInsetType::WebCoreContentInset) const override;
+ void topContentInsetDidChange(float newTopContentInset);
</ins><span class="cx">
</span><span class="cx"> virtual void willStartLiveResize() override;
</span><span class="cx"> virtual void willEndLiveResize() override;
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebCorepagePagecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebCore/page/Page.cpp (172063 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebCore/page/Page.cpp        2014-08-05 20:43:18 UTC (rev 172063)
+++ branches/safari-600.1-branch/Source/WebCore/page/Page.cpp        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -806,7 +806,7 @@
</span><span class="cx"> m_topContentInset = contentInset;
</span><span class="cx">
</span><span class="cx"> if (FrameView* view = mainFrame().view())
</span><del>- view->topContentInsetDidChange();
</del><ins>+ view->topContentInsetDidChange(m_topContentInset);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Page::setShouldSuppressScrollbarAnimations(bool suppressAnimations)
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebCoreplatformScrollViewcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebCore/platform/ScrollView.cpp (172063 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebCore/platform/ScrollView.cpp        2014-08-05 20:43:18 UTC (rev 172063)
+++ branches/safari-600.1-branch/Source/WebCore/platform/ScrollView.cpp        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -410,13 +410,13 @@
</span><span class="cx">
</span><span class="cx"> IntSize ScrollView::documentScrollOffsetRelativeToViewOrigin() const
</span><span class="cx"> {
</span><del>- return scrollOffset() - IntSize(0, headerHeight() + topContentInset());
</del><ins>+ return scrollOffset() - IntSize(0, headerHeight() + topContentInset(TopContentInsetType::WebCoreOrPlatformContentInset));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IntPoint ScrollView::documentScrollPositionRelativeToViewOrigin() const
</span><span class="cx"> {
</span><span class="cx"> IntPoint scrollPosition = this->scrollPosition();
</span><del>- return IntPoint(scrollPosition.x(), scrollPosition.y() - headerHeight() - topContentInset());
</del><ins>+ return IntPoint(scrollPosition.x(), scrollPosition.y() - headerHeight() - topContentInset(TopContentInsetType::WebCoreOrPlatformContentInset));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IntSize ScrollView::documentScrollOffsetRelativeToScrollableAreaOrigin() const
</span><span class="lines">@@ -830,7 +830,7 @@
</span><span class="cx"> if (delegatesScrolling())
</span><span class="cx"> return convertToRootView(contentsPoint);
</span><span class="cx">
</span><del>- IntPoint viewPoint = contentsPoint + IntSize(0, headerHeight() + topContentInset()) - scrollOffset();
</del><ins>+ IntPoint viewPoint = contentsPoint + IntSize(0, headerHeight() + topContentInset(TopContentInsetType::WebCoreOrPlatformContentInset)) - scrollOffset();
</ins><span class="cx"> return convertToRootView(viewPoint);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -850,7 +850,7 @@
</span><span class="cx"> return convertToRootView(contentsRect);
</span><span class="cx">
</span><span class="cx"> IntRect viewRect = contentsRect;
</span><del>- viewRect.move(-scrollOffset() + IntSize(0, headerHeight() + topContentInset()));
</del><ins>+ viewRect.move(-scrollOffset() + IntSize(0, headerHeight() + topContentInset(TopContentInsetType::WebCoreOrPlatformContentInset)));
</ins><span class="cx"> return convertToRootView(viewRect);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -860,7 +860,7 @@
</span><span class="cx"> return convertFromRootView(rootViewPoint);
</span><span class="cx">
</span><span class="cx"> IntPoint viewPoint = convertFromRootView(rootViewPoint);
</span><del>- return viewPoint + scrollOffset() - IntSize(0, topContentInset());
</del><ins>+ return viewPoint + scrollOffset() - IntSize(0, topContentInset(TopContentInsetType::WebCoreOrPlatformContentInset));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IntPoint ScrollView::windowToContents(const IntPoint& windowPoint) const
</span><span class="lines">@@ -877,7 +877,7 @@
</span><span class="cx"> if (delegatesScrolling())
</span><span class="cx"> return convertToContainingWindow(contentsPoint);
</span><span class="cx">
</span><del>- IntPoint viewPoint = contentsPoint + IntSize(0, headerHeight() + topContentInset()) - scrollOffset();
</del><ins>+ IntPoint viewPoint = contentsPoint + IntSize(0, headerHeight() + topContentInset(TopContentInsetType::WebCoreOrPlatformContentInset)) - scrollOffset();
</ins><span class="cx"> return convertToContainingWindow(viewPoint);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -897,7 +897,7 @@
</span><span class="cx"> return convertToContainingWindow(contentsRect);
</span><span class="cx">
</span><span class="cx"> IntRect viewRect = contentsRect;
</span><del>- viewRect.move(-scrollOffset() + IntSize(0, headerHeight() + topContentInset()));
</del><ins>+ viewRect.move(-scrollOffset() + IntSize(0, headerHeight() + topContentInset(TopContentInsetType::WebCoreOrPlatformContentInset)));
</ins><span class="cx"> return convertToContainingWindow(viewRect);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1515,6 +1515,15 @@
</span><span class="cx"> return IntRect();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+float ScrollView::platformTopContentInset() const
+{
+ return 0;
+}
+
+void ScrollView::platformSetTopContentInset(float)
+{
+}
+
</ins><span class="cx"> IntSize ScrollView::platformVisibleContentSize(bool) const
</span><span class="cx"> {
</span><span class="cx"> return IntSize();
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebCoreplatformScrollViewh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebCore/platform/ScrollView.h (172063 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebCore/platform/ScrollView.h        2014-08-05 20:43:18 UTC (rev 172063)
+++ branches/safari-600.1-branch/Source/WebCore/platform/ScrollView.h        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -156,7 +156,13 @@
</span><span class="cx"> void setCanBlitOnScroll(bool);
</span><span class="cx"> bool canBlitOnScroll() const;
</span><span class="cx">
</span><del>- virtual float topContentInset() const { return 0; }
</del><ins>+ // There are at least three types of contentInset. Usually we just care about WebCoreContentInset, which is the inset
+ // that is set on a Page that requires WebCore to move its layers to accomodate the inset. However, there are platform
+ // concepts that are similar on both iOS and Mac when there is a platformWidget(). Sometimes we need the Mac platform value
+ // for topContentInset, so when the TopContentInsetType is WebCoreOrPlatformContentInset, platformTopContentInset()
+ // will be returned instead of the value set on Page.
+ enum class TopContentInsetType { WebCoreContentInset, WebCoreOrPlatformContentInset };
+ virtual float topContentInset(TopContentInsetType = TopContentInsetType::WebCoreContentInset) const { return 0; }
</ins><span class="cx">
</span><span class="cx"> // The visible content rect has a location that is the scrolled offset of the document. The width and height are the unobscured viewport
</span><span class="cx"> // width and height. By default the scrollbars themselves are excluded from this rectangle, but an optional boolean argument allows them
</span><span class="lines">@@ -408,6 +414,9 @@
</span><span class="cx"> // Called to update the scrollbars to accurately reflect the state of the view.
</span><span class="cx"> void updateScrollbars(const IntSize& desiredOffset);
</span><span class="cx">
</span><ins>+ float platformTopContentInset() const;
+ void platformSetTopContentInset(float);
+
</ins><span class="cx"> private:
</span><span class="cx"> virtual IntRect visibleContentRectInternal(VisibleContentRectIncludesScrollbars, VisibleContentRectBehavior) const override;
</span><span class="cx"> IntRect unobscuredContentRectInternal(VisibleContentRectIncludesScrollbars = ExcludeScrollbars) const;
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebCoreplatformiosScrollViewIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebCore/platform/ios/ScrollViewIOS.mm (172063 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebCore/platform/ios/ScrollViewIOS.mm        2014-08-05 20:43:18 UTC (rev 172063)
+++ branches/safari-600.1-branch/Source/WebCore/platform/ios/ScrollViewIOS.mm        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -161,6 +161,15 @@
</span><span class="cx"> END_BLOCK_OBJC_EXCEPTIONS;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+float ScrollView::platformTopContentInset(float) const
+{
+ return 0;
+}
+
+void ScrollView::platformSetTopContentInset()
+{
+}
+
</ins><span class="cx"> IntRect ScrollView::platformVisibleContentRect(bool includeScrollbars) const
</span><span class="cx"> {
</span><span class="cx"> BEGIN_BLOCK_OBJC_EXCEPTIONS;
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebCoreplatformmacScrollViewMacmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebCore/platform/mac/ScrollViewMac.mm (172063 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebCore/platform/mac/ScrollViewMac.mm        2014-08-05 20:43:18 UTC (rev 172063)
+++ branches/safari-600.1-branch/Source/WebCore/platform/mac/ScrollViewMac.mm        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -108,6 +108,35 @@
</span><span class="cx"> return [[scrollView() contentView] copiesOnScroll];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+float ScrollView::platformTopContentInset() const
+{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
+ return scrollView().contentInsets.top;
+#endif
+ END_BLOCK_OBJC_EXCEPTIONS;
+
+ return 0;
+}
+
+void ScrollView::platformSetTopContentInset(float topContentInset)
+{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
+ if (topContentInset)
+ scrollView().automaticallyAdjustsContentInsets = NO;
+ else
+ scrollView().automaticallyAdjustsContentInsets = YES;
+
+ NSEdgeInsets contentInsets = scrollView().contentInsets;
+ contentInsets.top = topContentInset;
+ scrollView().contentInsets = contentInsets;
+#else
+ UNUSED_PARAM(topContentInset);
+#endif
+ END_BLOCK_OBJC_EXCEPTIONS;
+}
+
</ins><span class="cx"> IntRect ScrollView::platformVisibleContentRect(bool includeScrollbars) const
</span><span class="cx"> {
</span><span class="cx"> BEGIN_BLOCK_OBJC_EXCEPTIONS;
</span><span class="lines">@@ -160,6 +189,14 @@
</span><span class="cx"> BEGIN_BLOCK_OBJC_EXCEPTIONS;
</span><span class="cx"> NSPoint floatPoint = scrollPoint;
</span><span class="cx"> NSPoint tempPoint = { std::max(-[scrollView() scrollOrigin].x, floatPoint.x), std::max(-[scrollView() scrollOrigin].y, floatPoint.y) }; // Don't use NSMakePoint to work around 4213314.
</span><ins>+
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
+ // AppKit has the inset factored into all of its scroll positions. In WebCore, we use positions that ignore
+ // the insets so that they are equivalent whether or not there is an inset.
+ tempPoint.x = tempPoint.x - scrollView().contentInsets.left;
+ tempPoint.y = tempPoint.y - scrollView().contentInsets.top;
+#endif
+
</ins><span class="cx"> [documentView() scrollPoint:tempPoint];
</span><span class="cx"> END_BLOCK_OBJC_EXCEPTIONS;
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebCore/rendering/RenderLayer.cpp (172063 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebCore/rendering/RenderLayer.cpp        2014-08-05 20:43:18 UTC (rev 172063)
+++ branches/safari-600.1-branch/Source/WebCore/rendering/RenderLayer.cpp        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -2730,12 +2730,12 @@
</span><span class="cx"> IntRect rect = scrollbarRect;
</span><span class="cx"> rect.move(scrollbarOffset(scrollbar));
</span><span class="cx">
</span><del>- return renderer().view().frameView().convertFromRenderer(&renderer(), rect);
</del><ins>+ return renderer().view().frameView().convertFromRendererToContainingView(&renderer(), rect);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IntRect RenderLayer::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntRect& parentRect) const
</span><span class="cx"> {
</span><del>- IntRect rect = renderer().view().frameView().convertToRenderer(&renderer(), parentRect);
</del><ins>+ IntRect rect = renderer().view().frameView().convertFromContainingViewToRenderer(&renderer(), parentRect);
</ins><span class="cx"> rect.move(-scrollbarOffset(scrollbar));
</span><span class="cx"> return rect;
</span><span class="cx"> }
</span><span class="lines">@@ -2744,12 +2744,12 @@
</span><span class="cx"> {
</span><span class="cx"> IntPoint point = scrollbarPoint;
</span><span class="cx"> point.move(scrollbarOffset(scrollbar));
</span><del>- return renderer().view().frameView().convertFromRenderer(&renderer(), point);
</del><ins>+ return renderer().view().frameView().convertFromRendererToContainingView(&renderer(), point);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IntPoint RenderLayer::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntPoint& parentPoint) const
</span><span class="cx"> {
</span><del>- IntPoint point = renderer().view().frameView().convertToRenderer(&renderer(), parentPoint);
</del><ins>+ IntPoint point = renderer().view().frameView().convertFromContainingViewToRenderer(&renderer(), parentPoint);
</ins><span class="cx"> point.move(-scrollbarOffset(scrollbar));
</span><span class="cx"> return point;
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebCorerenderingRenderListBoxcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebCore/rendering/RenderListBox.cpp (172063 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebCore/rendering/RenderListBox.cpp        2014-08-05 20:43:18 UTC (rev 172063)
+++ branches/safari-600.1-branch/Source/WebCore/rendering/RenderListBox.cpp        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -725,12 +725,12 @@
</span><span class="cx"> int scrollbarLeft = width() - borderRight() - scrollbar->width();
</span><span class="cx"> int scrollbarTop = borderTop();
</span><span class="cx"> rect.move(scrollbarLeft, scrollbarTop);
</span><del>- return view().frameView().convertFromRenderer(this, rect);
</del><ins>+ return view().frameView().convertFromRendererToContainingView(this, rect);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IntRect RenderListBox::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntRect& parentRect) const
</span><span class="cx"> {
</span><del>- IntRect rect = view().frameView().convertToRenderer(this, parentRect);
</del><ins>+ IntRect rect = view().frameView().convertFromContainingViewToRenderer(this, parentRect);
</ins><span class="cx"> int scrollbarLeft = width() - borderRight() - scrollbar->width();
</span><span class="cx"> int scrollbarTop = borderTop();
</span><span class="cx"> rect.move(-scrollbarLeft, -scrollbarTop);
</span><span class="lines">@@ -743,12 +743,12 @@
</span><span class="cx"> int scrollbarLeft = width() - borderRight() - scrollbar->width();
</span><span class="cx"> int scrollbarTop = borderTop();
</span><span class="cx"> point.move(scrollbarLeft, scrollbarTop);
</span><del>- return view().frameView().convertFromRenderer(this, point);
</del><ins>+ return view().frameView().convertFromRendererToContainingView(this, point);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IntPoint RenderListBox::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntPoint& parentPoint) const
</span><span class="cx"> {
</span><del>- IntPoint point = view().frameView().convertToRenderer(this, parentPoint);
</del><ins>+ IntPoint point = view().frameView().convertFromContainingViewToRenderer(this, parentPoint);
</ins><span class="cx"> int scrollbarLeft = width() - borderRight() - scrollbar->width();
</span><span class="cx"> int scrollbarTop = borderTop();
</span><span class="cx"> point.move(-scrollbarLeft, -scrollbarTop);
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebKit2/ChangeLog (172063 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebKit2/ChangeLog        2014-08-05 20:43:18 UTC (rev 172063)
+++ branches/safari-600.1-branch/Source/WebKit2/ChangeLog        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -1,5 +1,23 @@
</span><span class="cx"> 2014-08-05 Lucas Forschler <lforschler@apple.com>
</span><span class="cx">
</span><ins>+ Merge r171891
+
+ 2014-07-31 Beth Dakin <bdakin@apple.com>
+
+ Hit-testing broken in WebKit 1 views with AppKit's contentInsets
+ https://bugs.webkit.org/show_bug.cgi?id=135434
+ -and corresponding-
+ <rdar://problem/17850323>
+
+ Reviewed by Benjamin Poulain.
+
+ Re-named functions.
+ * WebProcess/Plugins/PDF/PDFPlugin.mm:
+ (WebKit::PDFPlugin::convertFromScrollbarToContainingView):
+ (WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
+
+2014-08-05 Lucas Forschler <lforschler@apple.com>
+
</ins><span class="cx"> Merge r171887
</span><span class="cx">
</span><span class="cx"> 2014-07-31 Oliver Hunt <oliver@apple.com>
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebKit2WebProcessPluginsPDFPDFPluginmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm (172063 => 172064)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm        2014-08-05 20:43:18 UTC (rev 172063)
+++ branches/safari-600.1-branch/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm        2014-08-05 20:47:21 UTC (rev 172064)
</span><span class="lines">@@ -679,12 +679,12 @@
</span><span class="cx"> IntRect rect = scrollbarRect;
</span><span class="cx"> rect.move(scrollbar->location() - pluginView()->location());
</span><span class="cx">
</span><del>- return pluginView()->frame()->view()->convertFromRenderer(pluginView()->renderer(), rect);
</del><ins>+ return pluginView()->frame()->view()->convertFromRendererToContainingView(pluginView()->renderer(), rect);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IntRect PDFPlugin::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntRect& parentRect) const
</span><span class="cx"> {
</span><del>- IntRect rect = pluginView()->frame()->view()->convertToRenderer(pluginView()->renderer(), parentRect);
</del><ins>+ IntRect rect = pluginView()->frame()->view()->convertFromContainingViewToRenderer(pluginView()->renderer(), parentRect);
</ins><span class="cx"> rect.move(pluginView()->location() - scrollbar->location());
</span><span class="cx">
</span><span class="cx"> return rect;
</span><span class="lines">@@ -695,12 +695,12 @@
</span><span class="cx"> IntPoint point = scrollbarPoint;
</span><span class="cx"> point.move(scrollbar->location() - pluginView()->location());
</span><span class="cx">
</span><del>- return pluginView()->frame()->view()->convertFromRenderer(pluginView()->renderer(), point);
</del><ins>+ return pluginView()->frame()->view()->convertFromRendererToContainingView(pluginView()->renderer(), point);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IntPoint PDFPlugin::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntPoint& parentPoint) const
</span><span class="cx"> {
</span><del>- IntPoint point = pluginView()->frame()->view()->convertToRenderer(pluginView()->renderer(), parentPoint);
</del><ins>+ IntPoint point = pluginView()->frame()->view()->convertFromContainingViewToRenderer(pluginView()->renderer(), parentPoint);
</ins><span class="cx"> point.move(pluginView()->location() - scrollbar->location());
</span><span class="cx">
</span><span class="cx"> return point;
</span></span></pre>
</div>
</div>
</body>
</html>