Diff
Modified: branches/safari-603-branch/LayoutTests/ChangeLog (211689 => 211690)
--- branches/safari-603-branch/LayoutTests/ChangeLog 2017-02-06 04:03:20 UTC (rev 211689)
+++ branches/safari-603-branch/LayoutTests/ChangeLog 2017-02-06 04:03:24 UTC (rev 211690)
@@ -1,5 +1,20 @@
2017-02-02 Matthew Hanson <matthew_han...@apple.com>
+ Merge r211433. rdar://problem/30091558
+
+ 2017-01-31 Simon Fraser <simon.fra...@apple.com>
+
+ REGRESSION (r209411): Scrolling to a fragment identifier in overflow:scroll inside position:fixed no longer works
+ https://bugs.webkit.org/show_bug.cgi?id=167630
+ rdar://problem/30091558
+
+ Reviewed by Zalan Bujtas.
+
+ * fast/overflow/scroll-anchor-in-overflow-in-position-fixed-expected.txt: Added.
+ * fast/overflow/scroll-anchor-in-overflow-in-position-fixed.html: Added.
+
+2017-02-02 Matthew Hanson <matthew_han...@apple.com>
+
Merge r211302. rdar://problem/23601055
2017-01-27 Jer Noble <jer.no...@apple.com>
Added: branches/safari-603-branch/LayoutTests/fast/overflow/scroll-anchor-in-overflow-in-position-fixed-expected.txt (0 => 211690)
--- branches/safari-603-branch/LayoutTests/fast/overflow/scroll-anchor-in-overflow-in-position-fixed-expected.txt (rev 0)
+++ branches/safari-603-branch/LayoutTests/fast/overflow/scroll-anchor-in-overflow-in-position-fixed-expected.txt 2017-02-06 04:03:24 UTC (rev 211690)
@@ -0,0 +1,13 @@
+Tests scrolling to an anchor inside overflow:scroll inside position:fixed correctly scrolls the overflow, and not the page
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS scroller.scrollTop is 465
+PASS scroller.scrollLeft is 0
+PASS document.scrollingElement.scrollTop is 800
+PASS document.scrollingElement.scrollLeft is 100
+PASS successfullyParsed is true
+
+TEST COMPLETE
+Anchor is here
Added: branches/safari-603-branch/LayoutTests/fast/overflow/scroll-anchor-in-overflow-in-position-fixed.html (0 => 211690)
--- branches/safari-603-branch/LayoutTests/fast/overflow/scroll-anchor-in-overflow-in-position-fixed.html (rev 0)
+++ branches/safari-603-branch/LayoutTests/fast/overflow/scroll-anchor-in-overflow-in-position-fixed.html 2017-02-06 04:03:24 UTC (rev 211690)
@@ -0,0 +1,76 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ body {
+ height: 2000px;
+ width: 2000px;
+ }
+
+ .fixed {
+ position: fixed;
+ top: 250px;
+ left: 40px;
+ height: 200px;
+ width: 200px;
+ border: 1px solid black;
+ }
+
+ #scroller {
+ height: 100%;
+ width: 100%;
+ overflow: scroll;
+ }
+
+ #scroller > a {
+ display: block;
+ height: 50px;
+ margin-top: 600px;
+ }
+ </style>
+ <script src=""
+ <script>
+ description("Tests scrolling to an anchor inside overflow:scroll inside position:fixed correctly scrolls the overflow, and not the page");
+ window.jsTestIsAsync = true;
+
+ function runTest()
+ {
+ window.scrollTo(100, 800);
+ setTimeout(function() {
+ window.location='#anchor';
+ setTimeout(finishTest, 0);
+ }, 0);
+ }
+
+ var scroller;
+ function finishTest()
+ {
+ if (window.location.toString().indexOf("#") == -1) {
+ setTimeout(finishTest, 0);
+ return;
+ }
+
+ scroller = document.getElementById('scroller');
+
+ shouldBe('scroller.scrollTop', '465');
+ shouldBe('scroller.scrollLeft', '0');
+
+ shouldBe('document.scrollingElement.scrollTop', '800');
+ shouldBe('document.scrollingElement.scrollLeft', '100');
+
+ window.scrollTo(0, 0);
+ finishJSTest();
+ }
+ </script>
+</head>
+<body _onload_="runTest()">
+
+<div class="fixed">
+ <div id="scroller">
+ <a name="anchor">Anchor is here</a>
+ </div>
+</div>
+
+<script src=""
+
+</body></html>
Modified: branches/safari-603-branch/Source/WebCore/ChangeLog (211689 => 211690)
--- branches/safari-603-branch/Source/WebCore/ChangeLog 2017-02-06 04:03:20 UTC (rev 211689)
+++ branches/safari-603-branch/Source/WebCore/ChangeLog 2017-02-06 04:03:24 UTC (rev 211690)
@@ -1,3 +1,24 @@
+2017-02-02 Matthew Hanson <matthew_han...@apple.com>
+
+ Merge r211433. rdar://problem/30091558
+
+ 2017-01-31 Simon Fraser <simon.fra...@apple.com>
+
+ REGRESSION (r209411): Scrolling to a fragment identifier in overflow:scroll inside position:fixed no longer works
+ https://bugs.webkit.org/show_bug.cgi?id=167630
+ rdar://problem/30091558
+
+ Reviewed by Zalan Bujtas.
+
+ r209411 added special handling for scrolling inside position:fixed, but cut off all scrolling, breaking
+ overflow:scroll inside position:fixed. Fix by only handling the position:fixed case when we get to
+ the root layer, which is where we scroll the document.
+
+ Test: fast/overflow/scroll-anchor-in-overflow-in-position-fixed.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::getRectToExpose):
+
2017-02-01 Matthew Hanson <matthew_han...@apple.com>
Merge r211502. rdar://problem/30298722
Modified: branches/safari-603-branch/Source/WebCore/rendering/RenderLayer.cpp (211689 => 211690)
--- branches/safari-603-branch/Source/WebCore/rendering/RenderLayer.cpp 2017-02-06 04:03:20 UTC (rev 211689)
+++ branches/safari-603-branch/Source/WebCore/rendering/RenderLayer.cpp 2017-02-06 04:03:24 UTC (rev 211690)
@@ -2614,7 +2614,7 @@
LayoutRect RenderLayer::getRectToExpose(const LayoutRect &visibleRect, const LayoutRect &exposeRect, bool insideFixed, const ScrollAlignment& alignX, const ScrollAlignment& alignY) const
{
FrameView& frameView = renderer().view().frameView();
- if (insideFixed) {
+ if (renderer().isRenderView() && insideFixed) {
// If the element is inside position:fixed and we're not scaled, no amount of scrolling is going to move things around.
if (frameView.frameScaleFactor() == 1)
return visibleRect;