Title: [219929] branches/safari-604-branch
Revision
219929
Author
[email protected]
Date
2017-07-26 02:52:06 -0700 (Wed, 26 Jul 2017)

Log Message

Cherry-pick r219829. rdar://problem/33523803

Modified Paths

Added Paths

Diff

Modified: branches/safari-604-branch/LayoutTests/ChangeLog (219928 => 219929)


--- branches/safari-604-branch/LayoutTests/ChangeLog	2017-07-26 09:52:02 UTC (rev 219928)
+++ branches/safari-604-branch/LayoutTests/ChangeLog	2017-07-26 09:52:06 UTC (rev 219929)
@@ -1,5 +1,30 @@
 2017-07-26  Jason Marcell  <[email protected]>
 
+        Cherry-pick r219829. rdar://problem/33523803
+
+    2017-07-24  Simon Fraser  <[email protected]>
+
+            Revert "client" coordinates to be in scrolling coordinates
+            https://bugs.webkit.org/show_bug.cgi?id=174734
+            rdar://problem/33336930
+
+            Reviewed by Tim Horton.
+
+            Rebaseline.
+
+            * fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe-expected.txt:
+            * fast/visual-viewport/client-coordinates-relative-to-layout-viewport-expected.txt:
+            * fast/visual-viewport/client-rects-relative-to-layout-viewport-expected.txt:
+            * fast/visual-viewport/zoomed-fixed-expected.txt:
+            * fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt:
+            * fast/zooming/client-rect-in-fixed-zoomed-expected.txt:
+            * platform/ios-wk2/fast/visual-viewport/client-rects-relative-to-layout-viewport-expected.txt:
+            * platform/ios-wk2/imported/w3c/web-platform-tests/cssom-view/elementFromPoint-expected.txt: Added.
+            * platform/ios/fast/visual-viewport/zoomed-fixed-expected.txt:
+            * platform/ios/fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt:
+
+2017-07-26  Jason Marcell  <[email protected]>
+
         Cherry-pick r219755. rdar://problem/33523843
 
     2017-07-21  Per Arne Vollan  <[email protected]>

Modified: branches/safari-604-branch/LayoutTests/fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe-expected.txt (219928 => 219929)


--- branches/safari-604-branch/LayoutTests/fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe-expected.txt	2017-07-26 09:52:02 UTC (rev 219928)
+++ branches/safari-604-branch/LayoutTests/fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe-expected.txt	2017-07-26 09:52:06 UTC (rev 219929)
@@ -1,10 +1,10 @@
 PASS document.body.scrollTop became different from 0
 PASS document.getElementById('touches').textContent is "1"
-PASS document.getElementById('touches').textContent is "1"
-PASS document.getElementById('touches').textContent is "2"
+FAIL document.getElementById('touches').textContent should be 1. Was 2.
+FAIL document.getElementById('touches').textContent should be 2. Was 3.
 PASS successfullyParsed is true
 
 TEST COMPLETE
 To manually test, swipe down to scroll in the document. The touch count should update to 1. Tap anywhere to stop scrolling while decelerating. The touch count should remain at 1. Then tap again in the document. The touch count should be 2.
 
-The touch count is: 2
+The touch count is: 3

Modified: branches/safari-604-branch/LayoutTests/fast/visual-viewport/client-coordinates-relative-to-layout-viewport-expected.txt (219928 => 219929)


--- branches/safari-604-branch/LayoutTests/fast/visual-viewport/client-coordinates-relative-to-layout-viewport-expected.txt	2017-07-26 09:52:02 UTC (rev 219928)
+++ branches/safari-604-branch/LayoutTests/fast/visual-viewport/client-coordinates-relative-to-layout-viewport-expected.txt	2017-07-26 09:52:06 UTC (rev 219929)
@@ -6,16 +6,16 @@
       RenderBlock {P} at (0,0) size 2000x18
         RenderText {#text} at (0,0) size 79x18
           text run at (0,0) width 79: "Got click at "
-        RenderInline {SPAN} at (0,0) size 123x18
-          RenderText {#text} at (78,0) size 123x18
-            text run at (78,0) width 123: "clicked at 292, 240"
-layer at (278,226) size 28x28
-  RenderBlock (positioned) {DIV} at (278,226) size 28x28 [bgcolor=#FF0000]
+        RenderInline {SPAN} at (0,0) size 104x18
+          RenderText {#text} at (78,0) size 104x18
+            text run at (78,0) width 104: "clicked at 52, -6"
+layer at (38,-20) size 28x28 backgroundClip at (0,0) size 2008x3024 clip at (0,0) size 2008x3024
+  RenderBlock (positioned) {DIV} at (38,-20) size 28x28 [bgcolor=#FF0000]
 layer at (280,228) size 25x25
   RenderBlock (positioned) {DIV} at (279,227) size 26x26 [bgcolor=#008000]
 layer at (281,229) size 22x22
   RenderBlock (positioned) {DIV} at (281,229) size 22x22 [bgcolor=#FFA500]
-layer at (284,232) size 16x16
-  RenderBlock (positioned) {DIV} at (284,232) size 16x16 [bgcolor=#0000FF]
+layer at (44,-14) size 16x16 backgroundClip at (0,0) size 2008x3024 clip at (0,0) size 2008x3024
+  RenderBlock (positioned) {DIV} at (44,-14) size 16x16 [bgcolor=#0000FF]
 caret: position 12 of child 0 {#text} of child 9 {P} of body
 scrolled to 120,123

Modified: branches/safari-604-branch/LayoutTests/fast/visual-viewport/client-rects-relative-to-layout-viewport-expected.txt (219928 => 219929)


--- branches/safari-604-branch/LayoutTests/fast/visual-viewport/client-rects-relative-to-layout-viewport-expected.txt	2017-07-26 09:52:02 UTC (rev 219928)
+++ branches/safari-604-branch/LayoutTests/fast/visual-viewport/client-rects-relative-to-layout-viewport-expected.txt	2017-07-26 09:52:06 UTC (rev 219929)
@@ -13,26 +13,26 @@
 Scrolled to 476, 526
 layoutViewport: 83.5, 233.5 - 785 x 585
 visualViewportRect: 476, 526 - 392.5 x 292.5
-fixed client bounds: 12, 10 - 30 x 20
-fixed client rect: 12, 10 - 30 x 20
-absolute client bounds: 36.5, -133.5 - 50 x 25
-absolute client rect: 36.5, -133.5 - 50 x 25
+fixed client bounds: -856.5, -808.5 - 30 x 20
+fixed client rect: -856.5, -808.5 - 30 x 20
+absolute client bounds: -832, -952 - 50 x 25
+absolute client rect: -832, -952 - 50 x 25
 
 Scrolled to 100, 776
 layoutViewport: 83.5, 483.5 - 785 x 585
 visualViewportRect: 100, 776 - 392.5 x 292.5
-fixed client bounds: 12, 10 - 30 x 20
-fixed client rect: 12, 10 - 30 x 20
-absolute client bounds: 36.5, -383.5 - 50 x 25
-absolute client rect: 36.5, -383.5 - 50 x 25
+fixed client bounds: -104.5, -1058.5 - 30 x 20
+fixed client rect: -104.5, -1058.5 - 30 x 20
+absolute client bounds: -80, -1452 - 50 x 25
+absolute client rect: -80, -1452 - 50 x 25
 
 Scrolled to 50, 300
 layoutViewport: 50, 300 - 785 x 585
 visualViewportRect: 50, 300 - 392.5 x 292.5
-fixed client bounds: 12, 10 - 30 x 20
-fixed client rect: 12, 10 - 30 x 20
-absolute client bounds: 70, -200 - 50 x 25
-absolute client rect: 70, -200 - 50 x 25
+fixed client bounds: -38, -290 - 30 x 20
+fixed client rect: -38, -290 - 30 x 20
+absolute client bounds: 20, -500 - 50 x 25
+absolute client rect: 20, -500 - 50 x 25
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: branches/safari-604-branch/LayoutTests/fast/visual-viewport/zoomed-fixed-expected.txt (219928 => 219929)


--- branches/safari-604-branch/LayoutTests/fast/visual-viewport/zoomed-fixed-expected.txt	2017-07-26 09:52:02 UTC (rev 219928)
+++ branches/safari-604-branch/LayoutTests/fast/visual-viewport/zoomed-fixed-expected.txt	2017-07-26 09:52:06 UTC (rev 219929)
@@ -18,37 +18,37 @@
 JSON.stringify(internals.layoutViewportRect()) is {"x":82.5,"y":232.5,"width":785,"height":585,"top":232.5,"right":867.5,"bottom":817.5,"left":82.5}
 JSON.stringify(internals.visualViewportRect()) is {"x":475,"y":525,"width":392.5,"height":292.5,"top":525,"right":867.5,"bottom":817.5,"left":475}
 client rect of top:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":785,"height":100,"top":0,"right":785,"bottom":100,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-867.5,"y":-817.5,"width":785,"height":100,"top":-817.5,"right":-82.5,"bottom":-717.5,"left":-867.5}
 client rect of bottom:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":485,"width":785,"height":100,"top":485,"right":785,"bottom":585,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-867.5,"y":-332.5,"width":785,"height":100,"top":-332.5,"right":-82.5,"bottom":-232.5,"left":-867.5}
 client rect of left:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":100,"height":585,"top":0,"right":100,"bottom":585,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-867.5,"y":-817.5,"width":100,"height":585,"top":-817.5,"right":-767.5,"bottom":-232.5,"left":-867.5}
 client rect of right:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":685,"y":0,"width":100,"height":585,"top":0,"right":785,"bottom":585,"left":685}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-182.5,"y":-817.5,"width":100,"height":585,"top":-817.5,"right":-82.5,"bottom":-232.5,"left":-182.5}
 
 Scrolled to 100, 776
 JSON.stringify(internals.layoutViewportRect()) is {"x":82.5,"y":483.5,"width":785,"height":585,"top":483.5,"right":867.5,"bottom":1068.5,"left":82.5}
 JSON.stringify(internals.visualViewportRect()) is {"x":100,"y":776,"width":392.5,"height":292.5,"top":776,"right":492.5,"bottom":1068.5,"left":100}
 client rect of top:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":785,"height":100,"top":0,"right":785,"bottom":100,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-117.5,"y":-1068.5,"width":785,"height":100,"top":-1068.5,"right":667.5,"bottom":-968.5,"left":-117.5}
 client rect of bottom:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":485,"width":785,"height":100,"top":485,"right":785,"bottom":585,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-117.5,"y":-583.5,"width":785,"height":100,"top":-583.5,"right":667.5,"bottom":-483.5,"left":-117.5}
 client rect of left:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":100,"height":585,"top":0,"right":100,"bottom":585,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-117.5,"y":-1068.5,"width":100,"height":585,"top":-1068.5,"right":-17.5,"bottom":-483.5,"left":-117.5}
 client rect of right:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":685,"y":0,"width":100,"height":585,"top":0,"right":785,"bottom":585,"left":685}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":567.5,"y":-1068.5,"width":100,"height":585,"top":-1068.5,"right":667.5,"bottom":-483.5,"left":567.5}
 
 Scrolled to 50, 300
 JSON.stringify(internals.layoutViewportRect()) is {"x":50,"y":300,"width":785,"height":585,"top":300,"right":835,"bottom":885,"left":50}
 JSON.stringify(internals.visualViewportRect()) is {"x":50,"y":300,"width":392.5,"height":292.5,"top":300,"right":442.5,"bottom":592.5,"left":50}
 client rect of top:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":785,"height":100,"top":0,"right":785,"bottom":100,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-50,"y":-300,"width":785,"height":100,"top":-300,"right":735,"bottom":-200,"left":-50}
 client rect of bottom:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":485,"width":785,"height":100,"top":485,"right":785,"bottom":585,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-50,"y":185,"width":785,"height":100,"top":185,"right":735,"bottom":285,"left":-50}
 client rect of left:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":100,"height":585,"top":0,"right":100,"bottom":585,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-50,"y":-300,"width":100,"height":585,"top":-300,"right":50,"bottom":285,"left":-50}
 client rect of right:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":685,"y":0,"width":100,"height":585,"top":0,"right":785,"bottom":585,"left":685}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":635,"y":-300,"width":100,"height":585,"top":-300,"right":735,"bottom":285,"left":635}
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: branches/safari-604-branch/LayoutTests/fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt (219928 => 219929)


--- branches/safari-604-branch/LayoutTests/fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt	2017-07-26 09:52:02 UTC (rev 219928)
+++ branches/safari-604-branch/LayoutTests/fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt	2017-07-26 09:52:06 UTC (rev 219929)
@@ -18,37 +18,37 @@
 JSON.stringify(internals.layoutViewportRect()) is {"x":82.5,"y":211,"width":785,"height":585,"top":211,"right":867.5,"bottom":796,"left":82.5}
 JSON.stringify(internals.visualViewportRect()) is {"x":475,"y":503.5,"width":392.5,"height":292.5,"top":503.5,"right":867.5,"bottom":796,"left":475}
 client rect of top:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":785,"height":100,"top":0,"right":785,"bottom":100,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-867.5,"y":-839,"width":785,"height":100,"top":-839,"right":-82.5,"bottom":-739,"left":-867.5}
 client rect of bottom:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":485,"width":785,"height":100,"top":485,"right":785,"bottom":585,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-867.5,"y":-354,"width":785,"height":100,"top":-354,"right":-82.5,"bottom":-254,"left":-867.5}
 client rect of left:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":100,"height":585,"top":0,"right":100,"bottom":585,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-867.5,"y":-839,"width":100,"height":585,"top":-839,"right":-767.5,"bottom":-254,"left":-867.5}
 client rect of right:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":685,"y":0,"width":100,"height":585,"top":0,"right":785,"bottom":585,"left":685}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-182.5,"y":-839,"width":100,"height":585,"top":-839,"right":-82.5,"bottom":-254,"left":-182.5}
 
 Scrolled to 100, 776
 JSON.stringify(internals.layoutViewportRect()) is {"x":82.5,"y":462,"width":785,"height":585,"top":462,"right":867.5,"bottom":1047,"left":82.5}
 JSON.stringify(internals.visualViewportRect()) is {"x":100,"y":754.5,"width":392.5,"height":292.5,"top":754.5,"right":492.5,"bottom":1047,"left":100}
 client rect of top:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":785,"height":100,"top":0,"right":785,"bottom":100,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-117.5,"y":-1090,"width":785,"height":100,"top":-1090,"right":667.5,"bottom":-990,"left":-117.5}
 client rect of bottom:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":485,"width":785,"height":100,"top":485,"right":785,"bottom":585,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-117.5,"y":-605,"width":785,"height":100,"top":-605,"right":667.5,"bottom":-505,"left":-117.5}
 client rect of left:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":100,"height":585,"top":0,"right":100,"bottom":585,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-117.5,"y":-1090,"width":100,"height":585,"top":-1090,"right":-17.5,"bottom":-505,"left":-117.5}
 client rect of right:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":685,"y":0,"width":100,"height":585,"top":0,"right":785,"bottom":585,"left":685}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":567.5,"y":-1090,"width":100,"height":585,"top":-1090,"right":667.5,"bottom":-505,"left":567.5}
 
 Scrolled to 50, 300
 JSON.stringify(internals.layoutViewportRect()) is {"x":50,"y":278.5,"width":785,"height":585,"top":278.5,"right":835,"bottom":863.5,"left":50}
 JSON.stringify(internals.visualViewportRect()) is {"x":50,"y":278.5,"width":392.5,"height":292.5,"top":278.5,"right":442.5,"bottom":571,"left":50}
 client rect of top:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":785,"height":100,"top":0,"right":785,"bottom":100,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-50,"y":-321.5,"width":785,"height":100,"top":-321.5,"right":735,"bottom":-221.5,"left":-50}
 client rect of bottom:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":485,"width":785,"height":100,"top":485,"right":785,"bottom":585,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-50,"y":163.5,"width":785,"height":100,"top":163.5,"right":735,"bottom":263.5,"left":-50}
 client rect of left:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":100,"height":585,"top":0,"right":100,"bottom":585,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-50,"y":-321.5,"width":100,"height":585,"top":-321.5,"right":50,"bottom":263.5,"left":-50}
 client rect of right:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":685,"y":0,"width":100,"height":585,"top":0,"right":785,"bottom":585,"left":685}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":635,"y":-321.5,"width":100,"height":585,"top":-321.5,"right":735,"bottom":263.5,"left":635}
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: branches/safari-604-branch/LayoutTests/fast/zooming/client-rect-in-fixed-zoomed-expected.txt (219928 => 219929)


--- branches/safari-604-branch/LayoutTests/fast/zooming/client-rect-in-fixed-zoomed-expected.txt	2017-07-26 09:52:02 UTC (rev 219928)
+++ branches/safari-604-branch/LayoutTests/fast/zooming/client-rect-in-fixed-zoomed-expected.txt	2017-07-26 09:52:06 UTC (rev 219929)
@@ -4,7 +4,7 @@
 
 
 PASS internals.pageScaleFactor() is 2
-PASS JSON.stringify(clientRect) is JSON.stringify({x: 22, y: 32, width: 20, height: 10, top: 32, right: 42, bottom:42, left: 22})
+FAIL JSON.stringify(clientRect) should be {"x":22,"y":32,"width":20,"height":10,"top":32,"right":42,"bottom":42,"left":22}. Was {"x":22,"y":-248,"width":20,"height":10,"top":-248,"right":42,"bottom":-238,"left":22}.
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: branches/safari-604-branch/LayoutTests/platform/ios/fast/visual-viewport/zoomed-fixed-expected.txt (219928 => 219929)


--- branches/safari-604-branch/LayoutTests/platform/ios/fast/visual-viewport/zoomed-fixed-expected.txt	2017-07-26 09:52:02 UTC (rev 219928)
+++ branches/safari-604-branch/LayoutTests/platform/ios/fast/visual-viewport/zoomed-fixed-expected.txt	2017-07-26 09:52:06 UTC (rev 219929)
@@ -18,25 +18,25 @@
 JSON.stringify(internals.layoutViewportRect()) is {"x":75,"y":225,"width":800,"height":600,"top":225,"right":875,"bottom":825,"left":75}
 JSON.stringify(internals.visualViewportRect()) is {"x":475,"y":525,"width":400,"height":300,"top":525,"right":875,"bottom":825,"left":475}
 client rect of top:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":800,"height":100,"top":0,"right":800,"bottom":100,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-400,"y":-300,"width":800,"height":100,"top":-300,"right":400,"bottom":-200,"left":-400}
 client rect of bottom:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":500,"width":800,"height":100,"top":500,"right":800,"bottom":600,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-400,"y":200,"width":800,"height":100,"top":200,"right":400,"bottom":300,"left":-400}
 client rect of left:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":100,"height":600,"top":0,"right":100,"bottom":600,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-400,"y":-300,"width":100,"height":600,"top":-300,"right":-300,"bottom":300,"left":-400}
 client rect of right:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":700,"y":0,"width":100,"height":600,"top":0,"right":800,"bottom":600,"left":700}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":300,"y":-300,"width":100,"height":600,"top":-300,"right":400,"bottom":300,"left":300}
 
 Scrolled to 100, 776
 JSON.stringify(internals.layoutViewportRect()) is {"x":75,"y":476,"width":800,"height":600,"top":476,"right":875,"bottom":1076,"left":75}
 JSON.stringify(internals.visualViewportRect()) is {"x":100,"y":776,"width":400,"height":300,"top":776,"right":500,"bottom":1076,"left":100}
 client rect of top:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":800,"height":100,"top":0,"right":800,"bottom":100,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-25,"y":-300,"width":800,"height":100,"top":-300,"right":775,"bottom":-200,"left":-25}
 client rect of bottom:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":500,"width":800,"height":100,"top":500,"right":800,"bottom":600,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-25,"y":200,"width":800,"height":100,"top":200,"right":775,"bottom":300,"left":-25}
 client rect of left:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":100,"height":600,"top":0,"right":100,"bottom":600,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-25,"y":-300,"width":100,"height":600,"top":-300,"right":75,"bottom":300,"left":-25}
 client rect of right:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":700,"y":0,"width":100,"height":600,"top":0,"right":800,"bottom":600,"left":700}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":675,"y":-300,"width":100,"height":600,"top":-300,"right":775,"bottom":300,"left":675}
 
 Scrolled to 50, 300
 JSON.stringify(internals.layoutViewportRect()) is {"x":50,"y":300,"width":800,"height":600,"top":300,"right":850,"bottom":900,"left":50}

Modified: branches/safari-604-branch/LayoutTests/platform/ios/fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt (219928 => 219929)


--- branches/safari-604-branch/LayoutTests/platform/ios/fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt	2017-07-26 09:52:02 UTC (rev 219928)
+++ branches/safari-604-branch/LayoutTests/platform/ios/fast/visual-viewport/zoomed-fixed-header-and-footer-expected.txt	2017-07-26 09:52:06 UTC (rev 219929)
@@ -18,37 +18,37 @@
 JSON.stringify(internals.layoutViewportRect()) is {"x":75,"y":182,"width":800,"height":600,"top":182,"right":875,"bottom":782,"left":75}
 JSON.stringify(internals.visualViewportRect()) is {"x":475,"y":482,"width":400,"height":300,"top":482,"right":875,"bottom":782,"left":475}
 client rect of top:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":800,"height":100,"top":0,"right":800,"bottom":100,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-400,"y":-343,"width":800,"height":100,"top":-343,"right":400,"bottom":-243,"left":-400}
 client rect of bottom:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":500,"width":800,"height":100,"top":500,"right":800,"bottom":600,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-400,"y":157,"width":800,"height":100,"top":157,"right":400,"bottom":257,"left":-400}
 client rect of left:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":100,"height":600,"top":0,"right":100,"bottom":600,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-400,"y":-343,"width":100,"height":600,"top":-343,"right":-300,"bottom":257,"left":-400}
 client rect of right:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":700,"y":0,"width":100,"height":600,"top":0,"right":800,"bottom":600,"left":700}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":300,"y":-343,"width":100,"height":600,"top":-343,"right":400,"bottom":257,"left":300}
 
 Scrolled to 100, 776
 JSON.stringify(internals.layoutViewportRect()) is {"x":75,"y":433,"width":800,"height":600,"top":433,"right":875,"bottom":1033,"left":75}
 JSON.stringify(internals.visualViewportRect()) is {"x":100,"y":733,"width":400,"height":300,"top":733,"right":500,"bottom":1033,"left":100}
 client rect of top:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":800,"height":100,"top":0,"right":800,"bottom":100,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-25,"y":-343,"width":800,"height":100,"top":-343,"right":775,"bottom":-243,"left":-25}
 client rect of bottom:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":500,"width":800,"height":100,"top":500,"right":800,"bottom":600,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-25,"y":157,"width":800,"height":100,"top":157,"right":775,"bottom":257,"left":-25}
 client rect of left:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":100,"height":600,"top":0,"right":100,"bottom":600,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":-25,"y":-343,"width":100,"height":600,"top":-343,"right":75,"bottom":257,"left":-25}
 client rect of right:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":700,"y":0,"width":100,"height":600,"top":0,"right":800,"bottom":600,"left":700}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":675,"y":-343,"width":100,"height":600,"top":-343,"right":775,"bottom":257,"left":675}
 
 Scrolled to 50, 300
 JSON.stringify(internals.layoutViewportRect()) is {"x":50,"y":257,"width":800,"height":600,"top":257,"right":850,"bottom":857,"left":50}
 JSON.stringify(internals.visualViewportRect()) is {"x":50,"y":257,"width":400,"height":300,"top":257,"right":450,"bottom":557,"left":50}
 client rect of top:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":800,"height":100,"top":0,"right":800,"bottom":100,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":-43,"width":800,"height":100,"top":-43,"right":800,"bottom":57,"left":0}
 client rect of bottom:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":500,"width":800,"height":100,"top":500,"right":800,"bottom":600,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":457,"width":800,"height":100,"top":457,"right":800,"bottom":557,"left":0}
 client rect of left:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":0,"width":100,"height":600,"top":0,"right":100,"bottom":600,"left":0}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":0,"y":-43,"width":100,"height":600,"top":-43,"right":100,"bottom":557,"left":0}
 client rect of right:
-JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":700,"y":0,"width":100,"height":600,"top":0,"right":800,"bottom":600,"left":700}
+JSON.stringify(fixedElement.getBoundingClientRect()) is {"x":700,"y":-43,"width":100,"height":600,"top":-43,"right":800,"bottom":557,"left":700}
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: branches/safari-604-branch/LayoutTests/platform/ios-wk2/fast/visual-viewport/client-rects-relative-to-layout-viewport-expected.txt (219928 => 219929)


--- branches/safari-604-branch/LayoutTests/platform/ios-wk2/fast/visual-viewport/client-rects-relative-to-layout-viewport-expected.txt	2017-07-26 09:52:02 UTC (rev 219928)
+++ branches/safari-604-branch/LayoutTests/platform/ios-wk2/fast/visual-viewport/client-rects-relative-to-layout-viewport-expected.txt	2017-07-26 09:52:06 UTC (rev 219929)
@@ -13,18 +13,18 @@
 Scrolled to 476, 526
 layoutViewport: 76, 226 - 800 x 600
 visualViewportRect: 476, 526 - 400 x 300
-fixed client bounds: 12, 10 - 30 x 20
-fixed client rect: 12, 10 - 30 x 20
-absolute client bounds: 44, -126 - 50 x 25
-absolute client rect: 44, -126 - 50 x 25
+fixed client bounds: -388, -290 - 30 x 20
+fixed client rect: -388, -290 - 30 x 20
+absolute client bounds: -356, -426 - 50 x 25
+absolute client rect: -356, -426 - 50 x 25
 
 Scrolled to 100, 776
 layoutViewport: 76, 476 - 800 x 600
 visualViewportRect: 100, 776 - 400 x 300
-fixed client bounds: 12, 10 - 30 x 20
-fixed client rect: 12, 10 - 30 x 20
-absolute client bounds: 44, -376 - 50 x 25
-absolute client rect: 44, -376 - 50 x 25
+fixed client bounds: -12, -290 - 30 x 20
+fixed client rect: -12, -290 - 30 x 20
+absolute client bounds: 20, -676 - 50 x 25
+absolute client rect: 20, -676 - 50 x 25
 
 Scrolled to 50, 300
 layoutViewport: 50, 300 - 800 x 600

Added: branches/safari-604-branch/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/cssom-view/elementFromPoint-expected.txt (0 => 219929)


--- branches/safari-604-branch/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/cssom-view/elementFromPoint-expected.txt	                        (rev 0)
+++ branches/safari-604-branch/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/cssom-view/elementFromPoint-expected.txt	2017-07-26 09:52:06 UTC (rev 219929)
@@ -0,0 +1,23 @@
+ 
+ 
+    
+Hello!
+ 
+Another teal
+ 
+
+PASS Negative co-ordinates 
+PASS co-ordinates larger than the viewport 
+PASS co-ordinates larger than the viewport from in iframe 
+PASS Return first element that is the target for hit testing 
+PASS First element to get mouse events with pointer-events css 
+FAIL SVG element at x,y assert_equals: Should have returned the line SVG expected Element node <svg id="squiggle" xmlns="http://www.w3.org/2000/svg" hei... but got Element node <body>
+  <div id="purple" class="size purple">&nbsp;</div...
+FAIL transformed element at x,y assert_equals: Should have returned SVG with Hello WPT! that has a transform expected Element node <rect x="50" y="50" height="60" width="60" style="stroke:... but got Element node <div style="position: absolute; width: 200px; height: 200...
+FAIL no hit target at x,y assert_equals: Should have returned the root as it has pointer-events:none expected Element node <body>
+  <div id="purple" class="size purple">&nbsp;</div... but got Element node <div id="purple" class="size purple">&nbsp;</div>
+PASS No viewport available 
+FAIL Image Maps assert_equals: Should have returned the area element expected Element node <area id="rectG" shape="rect" coords="0,0,90,100" href="" but got Element node <html><head><title>cssom-view - elementFromPoint</title>
+...
+FAIL Fieldsets assert_equals: The fieldset should not cover up the div it doesn't even overlap expected Element node <div id="fieldset-div" class="size" style="position: abso... but got null
+

Modified: branches/safari-604-branch/Source/WebCore/ChangeLog (219928 => 219929)


--- branches/safari-604-branch/Source/WebCore/ChangeLog	2017-07-26 09:52:02 UTC (rev 219928)
+++ branches/safari-604-branch/Source/WebCore/ChangeLog	2017-07-26 09:52:06 UTC (rev 219929)
@@ -1,5 +1,28 @@
 2017-07-26  Jason Marcell  <[email protected]>
 
+        Cherry-pick r219829. rdar://problem/33523803
+
+    2017-07-24  Simon Fraser  <[email protected]>
+
+            Change "client" coordinates back to match scrolling coordinates
+            https://bugs.webkit.org/show_bug.cgi?id=174734
+            rdar://problem/33336930
+
+            Reviewed by Tim Horton.
+
+            Baidu.com (which uses jQuery), and various iOS apps make the assumption that getBoundingClientRect() returns a rectangle
+            that can be used to set or compare with the scroll position. With visual viewports, that assumption is no longer valid
+            when the page is zoomed, or when the keyboard has caused the visual viewport to detach from the layout viewport.
+
+            At this point the compatibility cost of shipping layout viewport-based client rects seems higher than the gain, so revert
+            to the shipping behavior. This reverts r216803, and will re-introduce bugs that occurred on zoomed pages on macOS,
+            many of which are noted in webkit.org/b/170981.
+
+            * page/FrameView.cpp:
+            (WebCore::FrameView::documentToClientOffset):
+
+2017-07-26  Jason Marcell  <[email protected]>
+
         Cherry-pick r219761. rdar://problem/33523829
 
     2017-07-22  Timothy Horton  <[email protected]>

Modified: branches/safari-604-branch/Source/WebCore/page/FrameView.cpp (219928 => 219929)


--- branches/safari-604-branch/Source/WebCore/page/FrameView.cpp	2017-07-26 09:52:02 UTC (rev 219928)
+++ branches/safari-604-branch/Source/WebCore/page/FrameView.cpp	2017-07-26 09:52:06 UTC (rev 219929)
@@ -4931,7 +4931,7 @@
 
 FloatSize FrameView::documentToClientOffset() const
 {
-    FloatSize clientOrigin = frame().settings().visualViewportEnabled() ? -toFloatSize(layoutViewportRect().location()) : -toFloatSize(visibleContentRect().location());
+    FloatSize clientOrigin = -toFloatSize(visibleContentRect().location());
 
     // Layout and visual viewports are affected by page zoom, so we need to factor that out.
     return clientOrigin.scaled(1 / frame().pageZoomFactor());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to