Summary: | Selection highlight not shown on programmatic focus after initial load | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Daniel Bates <dbates> | ||||||||||
Component: | WebKit Misc. | Assignee: | Nobody <webkit-unassigned> | ||||||||||
Status: | NEW --- | ||||||||||||
Severity: | Normal | CC: | ahmad.saleem792, ews-watchlist, megan_gardner, rniwa, webkit-bug-importer, wenson_hsieh | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Local Build | ||||||||||||
Hardware: | iPhone / iPad | ||||||||||||
OS: | Unspecified | ||||||||||||
URL: | data:text/html,<p>Hello World</p><script>let p = document.querySelector("p"); window.getSelection().setBaseAndExtent(p.firstChild, 0, p.firstChild, 2)</script> | ||||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=199204 | ||||||||||||
Attachments: |
|
Description
Daniel Bates
2019-06-25 16:38:34 PDT
Created attachment 372874 [details]
First stab
Comment on attachment 372874 [details] First stab Attachment 372874 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/12575966 New failing tests: editing/selection/selection-across-shadow-boundaries-readonly-2.html imported/mozilla/svg/text/selectSubString-3.svg fast/flexbox/flexbox-fail-to-select-same-line.html editing/selection/update-selection-by-style-change.html fast/text/international/hebrew-selection.html fast/dynamic/selection-gets-cleared-when-part-of-it-gets-removed.html svg/masking/mask-should-not-paint-selection.html imported/blink/editing/selection/deleteFromDocument-crash.html imported/mozilla/svg/text/multiple-chunks-selection.svg fast/dynamic/remove-invisible-node-inside-selection.html imported/mozilla/svg/text/selectSubString.svg fast/dynamic/remove-node-inside-selection.html Created attachment 372890 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2
The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.14.5
(In reply to Build Bot from comment #2) > Comment on attachment 372874 [details] > First stab > > Attachment 372874 [details] did not pass ios-sim-ews (ios-simulator-wk2): > Output: https://webkit-queues.webkit.org/results/12575966 > > New failing tests: > editing/selection/selection-across-shadow-boundaries-readonly-2.html > imported/mozilla/svg/text/selectSubString-3.svg > fast/flexbox/flexbox-fail-to-select-same-line.html > editing/selection/update-selection-by-style-change.html > fast/text/international/hebrew-selection.html > fast/dynamic/selection-gets-cleared-when-part-of-it-gets-removed.html > svg/masking/mask-should-not-paint-selection.html > imported/blink/editing/selection/deleteFromDocument-crash.html > imported/mozilla/svg/text/multiple-chunks-selection.svg > fast/dynamic/remove-invisible-node-inside-selection.html > imported/mozilla/svg/text/selectSubString.svg > fast/dynamic/remove-node-inside-selection.html These "failures" reveal various bugs in our code! Only one of the failures may indicate the patch is not quite right: svg/masking/mask-should-not-paint-selection.html, but quick glance at this test makes me think the mechanism to prevent selection is not enabled on iOS and the only reason we've been passing this test is because we do not paint selection on first load. ^^^ that last part is the reason for other failures in this list like fast/text/international/hebrew-selection.html. That is, we've been passing this test because both sides of the comparison have been broken. I fixed the -expected.html side, which uses programmatic selection API. The non-expected side used window.eventSender, which is known to be broken in WebKit2 on iOS. Haha Forgot to mention, other failure indicate a timing difference when we snapshot. Created attachment 372939 [details]
Simpler fix, let's see what happens
Comment on attachment 372939 [details] Simpler fix, let's see what happens Attachment 372939 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/12582947 New failing tests: editing/selection/selection-across-shadow-boundaries-readonly-2.html editing/selection/selection-across-shadow-boundaries-readonly-3.html imported/mozilla/svg/text/selectSubString-3.svg fast/flexbox/flexbox-fail-to-select-same-line.html fast/text/international/hebrew-selection.html editing/selection/update-selection-by-style-change.html editing/selection/selection-across-shadow-boundaries-readonly-1.html fast/dynamic/selection-gets-cleared-when-part-of-it-gets-removed.html imported/blink/fast/text/international/repaint-glyph-bounds.html svg/masking/mask-should-not-paint-selection.html imported/mozilla/svg/text/multiple-chunks-selection.svg imported/blink/editing/style/justify-left-crash.html fast/dynamic/remove-invisible-node-inside-selection.html imported/mozilla/svg/text/selectSubString.svg svg/foreignObject/viewport-foreignobject-crash.html fast/dynamic/remove-node-inside-selection.html Created attachment 372945 [details]
Archive of layout-test-results from ews126 for ios-simulator-wk2
The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.14.5
Using Comment 0: Chrome Canary 115: 'He'llo World <--- He is selected. Safari 16.4: 'He'llo World <--- He is selected. WebKit ToT (Mini-Browser): 'He'llo World <--- He is selected. Firefox Nightly 115: 'He'llo World <--- He is selected. __________ All browsers are matching.. The platform mention is iOS / iPadOS. Is it for it or due to Selection API, it now works? CCing - Ryosuke. The issue still reproduces on iOS 16.4.1 (a) |