Summary: | Content in <iframe> should override "touch-action" set in embedding document | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||||||||
Component: | CSS | Assignee: | Nobody <webkit-unassigned> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | commit-queue, graouts, koivisto, simon.fraser | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=200205 https://bugs.webkit.org/show_bug.cgi?id=210041 |
||||||||||||
Bug Depends on: | 200853 | ||||||||||||
Bug Blocks: | |||||||||||||
Attachments: |
|
Description
Simon Fraser (smfr)
2019-07-28 12:38:06 PDT
I would have expected them to, but the spec doesn't seem to say anything in that regard. Empirically, the attached test shows in the Chrome dev tools using Pixel 2 as the emulated device that scrollable content in an <iframe> does scroll when the top-level document has "touch-action: none" set. Created attachment 376484 [details]
Test
Created attachment 376493 [details]
patch
(In reply to Antoine Quint from comment #1) > I would have expected them to, but the spec doesn't seem to say anything in > that regard. Empirically, the attached test shows in the Chrome dev tools > using Pixel 2 as the emulated device that scrollable content in an <iframe> > does scroll when the top-level document has "touch-action: none" set. I don't think spec is ambiguous about this: "A touch behavior is supported if it conforms to the touch-action property of each element between the hit tested element and its nearest ancestor with the default touch behavior (including both the hit tested element and the element with the default touch behavior)." With iframe content the "nearest ancestor with the default touch behavior" is the iframe. If there is no 'touch-action' set in any of the elements between the touch element and the iframe then default touch-action (auto) is applied, no matter what it is set in iframes ancestors. Well, I suppose it is bit ambiguous what "nearest ancestor with the default touch behavior" exactly means for frame content as <iframe> is not a DOM ancestor of its content document. Whatever the interpretation is it doesn't affect this bug though. Comment on attachment 376493 [details] patch Clearing flags on attachment: 376493 Committed r248772: <https://trac.webkit.org/changeset/248772> All reviewed patches have been landed. Closing bug. Re-opened since this is blocked by bug 200853 Created attachment 376598 [details]
alternative fix
Instead of generating the event region for frame top layer (the previous patch) simply treat the missing region as indicating touch-action:none when resolving touch-actions in UI process.
Created attachment 376599 [details]
patch
Comment on attachment 376599 [details] patch Clearing flags on attachment: 376599 Committed r248819: <https://trac.webkit.org/changeset/248819> All reviewed patches have been landed. Closing bug. |