[Webkit-unassigned] [Bug 219255] WTR: handle iframe elements in testdriver pointer move action

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 3 05:19:25 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=219255

Sam Sneddon [:gsnedders] <gsnedders at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gsnedders at apple.com

--- Comment #12 from Sam Sneddon [:gsnedders] <gsnedders at apple.com> ---
Comment on attachment 415871
  --> https://bugs.webkit.org/attachment.cgi?id=415871
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=415871&action=review

Mildly surprised this doesn't progress anything in infrastructure/, given that has a number of tests for testdriver like this. But this generally looks good to me, modulo the comments below (and Darin's one above).

> LayoutTests/imported/w3c/web-platform-tests/resources/testdriver-vendor.js:24
> +      let frames = document.getElementsByTagName("iframe");
> +      for (let i = 0; i < frames.length; i++) {

Would it not be better to use window.frames here? As it is, this only handles iframes and not framesets. (This is likely a marginal issue, but an easy fix.)

> LayoutTests/imported/w3c/web-platform-tests/resources/testdriver-vendor.js:68
> +                        let frame = findElementInFrame(action.origin, window);
> +                        if (!frame)
> +                            return Promise.reject(new Error("Pointer origin element in different document or iframe."));

Given `findElementInFrame` above recurses, this seems slightly unclear. Maybe "Pointer origin element not in this document or descendent document"? I'm not really happy with that either, though.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210203/8f0649dc/attachment.htm>


More information about the webkit-unassigned mailing list