Bug 162645

Summary: [ios-simulator] LayoutTest imported/w3c/web-platform-tests/shadow-dom/scroll-to-the-fragment-in-shadow-tree.html failing
Product: WebKit Reporter: Ryan Haddad <ryanhaddad>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: rniwa, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: iOS 10   
See Also: https://bugs.webkit.org/show_bug.cgi?id=162629
Bug Depends on:    
Bug Blocks: 148695    

Description Ryan Haddad 2016-09-27 16:49:33 PDT
LayoutTest imported/w3c/web-platform-tests/shadow-dom/scroll-to-the-fragment-in-shadow-tree.html failing

This test was imported with http://trac.webkit.org/changeset/206463 and is failing on ios-simulator

https://build.webkit.org/results/Apple%20iOS%2010%20Simulator%20Release%20WK2%20(Tests)/r206466%20(374)/results.html

http://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=imported%2Fw3c%2Fweb-platform-tests%2Fshadow-dom%2Fscroll-to-the-fragment-in-shadow-tree.html

--- /Volumes/Data/slave/ios-simulator-10-release-tests-wk2/build/layout-test-results/imported/w3c/web-platform-tests/shadow-dom/scroll-to-the-fragment-in-shadow-tree-expected.txt
+++ /Volumes/Data/slave/ios-simulator-10-release-tests-wk2/build/layout-test-results/imported/w3c/web-platform-tests/shadow-dom/scroll-to-the-fragment-in-shadow-tree-actual.txt
@@ -1,12 +1,14 @@
 
 PASS The user agent scroll to the fragment when there is an element with an ID exactly equal to the decoded fragid 
-PASS The user agent scroll to the fragment when there is an anchor element with a name attribute exactly equal to the decoded fragid 
-PASS The user agent should not scroll to an element with an ID exactly equal to the decoded fragid in an open shadow tree 
+FAIL The user agent scroll to the fragment when there is an anchor element with a name attribute exactly equal to the decoded fragid assert_not_equals: got disallowed value 0
+FAIL The user agent should not scroll to an element with an ID exactly equal to the decoded fragid in an open shadow tree assert_equals: expected 0 but got 636
 PASS The user agent should not scroll to an element with an ID exactly equal to the decoded fragid in a closed shadow tree 
 PASS The user agent should not scroll to an anchor element with a name attribute exactly equal to the decoded fragid in an open shadow tree 
 PASS The user agent should not scroll to an anchor element with a name attribute exactly equal to the decoded fragid in a closed shadow tree 
 PASS The user agent should scroll to an element with an ID exactly equal to the decoded fragid in the document tree even if there was another element with the same ID inside an open shadow tree earlier in tree order 
 PASS The user agent should scroll to an element with an ID exactly equal to the decoded fragid in the document tree even if there was another element with the same ID inside a closed shadow tree earlier in tree order 
 PASS The user agent should scroll to an anchor element with a name attribute exactly equal to the decoded fragid in the document tree even if there was another element with the same ID inside an open shadow tree earlier in tree order 
-PASS The user agent should scroll to an anchor element with a name attribute exactly equal to the decoded fragid in the document tree even if there was another element with the same ID inside a closed shadow tree earlier in tree order 
-
+FAIL The user agent should scroll to an anchor element with a name attribute exactly equal to the decoded fragid in the document tree even if there was another element with the same ID inside a closed shadow tree earlier in tree order assert_equals: expected 0 but got 1856
+Go to fragment
+Go to fragment
+hello
Comment 1 Ryan Haddad 2016-09-27 17:17:51 PDT
Marked test as failing in http://trac.webkit.org/projects/webkit/changeset/206473
Comment 2 Radar WebKit Bug Importer 2016-11-15 11:17:17 PST
<rdar://problem/29271819>
Comment 3 Ryosuke Niwa 2016-12-19 20:04:31 PST
It looks like we need to wait more than 0ms on iOS for the page to scroll.

According to the latest HTML spec, scrolling should be happening in the next task so there appears to be a bug here:

a element: https://html.spec.whatwg.org/#the-a-element
follow a hyperlink: https://html.spec.whatwg.org/#following-hyperlinks-2
navigate: https://html.spec.whatwg.org/#navigate
navigate to a frament: https://html.spec.whatwg.org/#scroll-to-fragid
Comment 4 Simon Fraser (smfr) 2016-12-19 20:12:26 PST
Scrolling is an async round-trip to the UI process, so that's not surprising.
Comment 5 Ryosuke Niwa 2016-12-19 20:38:34 PST
(In reply to comment #4)
> Scrolling is an async round-trip to the UI process, so that's not surprising.

If we can’t fix it in WebKit, we should probably have the spec changed so that it’s fully async.