Closed Bug 1535954 Opened 7 years ago Closed 7 years ago

[wpt-sync] Sync PR 15817 - Reland "Make pointer capture work in same origin frame"

Categories

(Core :: DOM: Events, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 15817 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/15817
Details from upstream follow.

Ella Ge <eirage@chromium.org> wrote:

Reland "Make pointer capture work in same origin frame"

This is a reland of d44248f2a896421c1382c1dbbf0d7e1a9b798470

Original change's description:

Make pointer capture work in same origin frame

We used to send mouse event to the subframe before apply the pointer
capture target, and it causes the pointer capture doesn't work when
capture to a outer frame target and move to inner frame.

This CL changes three things:

  1. 'Rename' the |capturing_mouse_events_element_| to
    |capturing_subframe_element_| as it only used for the frame capture
    (There is plan to remove the frame capture logic once we have pointer
    capture work correctly)
  2. On HandleMouse*Event, instead of always perform a hit test, we use
    either frame capture target or pointer capture target to re-construct
    the HitTestResult.
  3. When using the capture target, update the hover active state for
    capture target.

This change makes captured pointer event sent correctly when over
same origin frame, and also decrease the hit_test_count because of
frame capturing.

Note that after this change, we still NOT allow set/release pointer
capture across same-origin frame as the pointer id and active statue
is per frame.

See design doc:
https://docs.google.com/document/d/1cOZu98UuKk5bdARUQKmj2Q8YoEMpd9l78T0k-cf5ttc/

This change is under a blink flag UnifiedPointerCaptureInBlink.

Change-Id: I61c6a02086535d2a145df9d414df0bdc9673101e
Bug: 936190, 919908
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1446556
Commit-Queue: Ella Ge \<eirage@chromium.org>
Reviewed-by: Navid Zolghadr \<nzolghadr@chromium.org>
Reviewed-by: David Bokan \<bokan@chromium.org>
Reviewed-by: Mustaq Ahmed \<mustaq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#640055}

Bug: 936190, 919908
Change-Id: Icc374c16b1aee0b9125593801c8787f28c7db554
Reviewed-on: https://chromium-review.googlesource.com/1520941
WPT-Export-Revision: fe28f975f6532e16e8ace2b78574ce7833877320

Component: web-platform-tests → DOM: Events
Product: Testing → Core
Ran 3 tests and 8 subtests OK : 2 PASS : 4 FAIL : 4 ERROR : 1 New tests that have failures or other problems: /pointerevents/pointerevent_mouse_capture_change_hover.html Mouse down and capture to green, move to blue and release capture: FAIL Mouse down at green and capture to blue.: FAIL /pointerevents/pointerevent_mouse_pointercapture_in_frame.html: ERROR Test pointer capture event route across the same-origin frame: Mouse down with set capture at inner frame, then release on next mouse move.: FAIL /pointerevents/pointerevent_mouse_pointercapture_inactivate_pointer.html setPointerCapture: outer frame capture pointer active in inner frame: FAIL
Pushed by james@hoppipolla.co.uk: https://hg.mozilla.org/integration/mozilla-inbound/rev/16ef3548e747 [wpt PR 15817] - Reland "Make pointer capture work in same origin frame", a=testonly
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.