Closed Bug 1293175 Opened 8 years ago Closed 8 years ago

[Pointer Event] Add Element.hasPointerCapture API

Categories

(Core :: DOM: Events, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: stone, Assigned: stone)

References

Details

Attachments

(1 file, 3 obsolete files)

Add new API to Element interface

partial interface Element {
  boolean hasPointerCapture (long pointerId);


Reference
https://github.com/w3c/pointerevents/issues/121
Blocks: 1292062
Assignee: nobody → sshih
Attachment #8779953 - Attachment is obsolete: true
Attachment #8779953 - Flags: feedback?(btseng)
Attachment #8779965 - Flags: feedback?(btseng)
Comment on attachment 8779965 [details] [diff] [review]
Bug 1293175 - [Pointer Event] Add Element.hasPointerCapture API (V2)

Review of attachment 8779965 [details] [diff] [review]:
-----------------------------------------------------------------

f=me after the following issue is addressed, thanks!

::: dom/events/test/pointerevents/test_pointerevent_element_haspointercapture.html
@@ +18,5 @@
> +        iframe.src = "pointerevent_element_haspointercapture.html";
> +      }
> +      function executeTest(int_win) {
> +        sendMouseEvent(int_win, "target0", "mousemove");
> +        sendMouseEvent(int_win, "target0", "mousedown", {button:0, buttons:1});

property of "buttons" looks meaningless according the usage in defined in sendMouseEvent in mochitest_support_external.js.
Please remove it if not used.

@@ +19,5 @@
> +      }
> +      function executeTest(int_win) {
> +        sendMouseEvent(int_win, "target0", "mousemove");
> +        sendMouseEvent(int_win, "target0", "mousedown", {button:0, buttons:1});
> +        sendMouseEvent(int_win, "target0", "mousemove", {button:0, buttons:1});

ditto

@@ +20,5 @@
> +      function executeTest(int_win) {
> +        sendMouseEvent(int_win, "target0", "mousemove");
> +        sendMouseEvent(int_win, "target0", "mousedown", {button:0, buttons:1});
> +        sendMouseEvent(int_win, "target0", "mousemove", {button:0, buttons:1});
> +        sendMouseEvent(int_win, "target1", "mousemove", {button:0, buttons:1});

ditto

@@ +21,5 @@
> +        sendMouseEvent(int_win, "target0", "mousemove");
> +        sendMouseEvent(int_win, "target0", "mousedown", {button:0, buttons:1});
> +        sendMouseEvent(int_win, "target0", "mousemove", {button:0, buttons:1});
> +        sendMouseEvent(int_win, "target1", "mousemove", {button:0, buttons:1});
> +        sendMouseEvent(int_win, "target1", "mouseup", {button:0, buttons:1});

ditto
Attachment #8779965 - Flags: feedback?(btseng) → feedback+
Attachment #8779965 - Attachment is obsolete: true
Attachment #8779994 - Flags: review?(bugs)
Comment on attachment 8779994 [details] [diff] [review]
Bug 1293175 - [Pointer Event] Add Element.hasPointerCapture API (V3)

>+                        assert_equals(target0.hasPointerCapture(e.pointerId), false,
>+                                      "before target0.setPointerCapture, target0.hasPoineterCapture should be false")
hasPoineterCapture  -> hasPointerCapture
Same also elsewhere.


Why to have the same test twice? wpt tests should be enough, assuming we run them automatically. Please explain.
Attachment #8779994 - Flags: review?(bugs) → review+
The wpt tests in testing\web-platform\tests\pointerevents are synchronized with wpt tests on github. These pointer event tests can't be run automatically because they need to be triggered by user inputs. I think the tests in dom\events\test\pointerevents are copied from testing\web-platform\tests\pointerevents and wrapped by corresponding mochitest tests which synthesize input events. So I add tests to both folders. Please let me know if any suggestions. Thanks.
Flags: needinfo?(bugs)
ok, thanks for reminding about that. so,two tests for now.
Flags: needinfo?(bugs)
Fixed typo and updated the patch summary
Attachment #8779994 - Attachment is obsolete: true
Attachment #8780958 - Flags: review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/fb4b9ceaaa02
[Pointer Event] Add Element.hasPointerCapture API. r=smaug
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/fb4b9ceaaa02
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
This patch didn't add the web platform test to the manifest, so it's not actually being run.....
Flags: needinfo?(sshih)
Yes, I missed it, so another bug1296194 is created to add it. BTW, it can't be run as web platform tests because it needs to be triggered by user inputs. We wrap it and run it as mochitests. The wrappers and tests are in dom/events/test/pointerevents
Flags: needinfo?(sshih)
Thanks for adding the new test!  See some discussion upstream here: https://github.com/w3c/web-platform-tests/pull/3566
Blocks: 1298255
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: