Changeset 235337 in webkit


Ignore:
Timestamp:
Aug 24, 2018 4:12:28 PM (6 years ago)
Author:
rniwa@webkit.org
Message:

Click event from click() is not composed
https://bugs.webkit.org/show_bug.cgi?id=170211

Reviewed by Wenson Hsieh.

LayoutTests/imported/w3c:

Rebaselined the test now that all test cases pass.

  • web-platform-tests/shadow-dom/event-composed-expected.txt:

Source/WebCore:

Fixed the bug. All simulated clicks should be composed regardless of whether it's trusted or not.
See: https://html.spec.whatwg.org/multipage/interaction.html#dom-click

https://html.spec.whatwg.org/multipage/webappapis.html#fire-a-synthetic-mouse-event

  • dom/SimulatedClick.cpp:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r235327 r235337  
     12018-08-24  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Click event from click() is not composed
     4        https://bugs.webkit.org/show_bug.cgi?id=170211
     5
     6        Reviewed by Wenson Hsieh.
     7
     8        Rebaselined the test now that all test cases pass.
     9
     10        * web-platform-tests/shadow-dom/event-composed-expected.txt:
     11
    1122018-08-24  Youenn Fablet  <youenn@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/event-composed-expected.txt

    r206463 r235337  
    88PASS A synthetic FocusEvent should be scoped by default
    99PASS A synthetic FocusEvent with composed=true should not be scoped
    10 FAIL A UA click event should not be scoped assert_equals: expected 3 but got 2
     10PASS A UA click event should not be scoped
    1111
  • trunk/Source/WebCore/ChangeLog

    r235335 r235337  
     12018-08-24  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Click event from click() is not composed
     4        https://bugs.webkit.org/show_bug.cgi?id=170211
     5
     6        Reviewed by Wenson Hsieh.
     7
     8        Fixed the bug. All simulated clicks should be composed regardless of whether it's trusted or not.
     9        See: https://html.spec.whatwg.org/multipage/interaction.html#dom-click
     10             https://html.spec.whatwg.org/multipage/webappapis.html#fire-a-synthetic-mouse-event
     11
     12        * dom/SimulatedClick.cpp:
     13
    1142018-08-24  Ryosuke Niwa  <rniwa@webkit.org>
    215
  • trunk/Source/WebCore/dom/SimulatedClick.cpp

    r235335 r235337  
    4545private:
    4646    SimulatedMouseEvent(const AtomicString& eventType, RefPtr<WindowProxy>&& view, RefPtr<Event>&& underlyingEvent, Element& target, SimulatedClickSource source)
    47         : MouseEvent(eventType, CanBubble::Yes, IsCancelable::Yes, source == SimulatedClickSource::Bindings ? IsComposed::No : IsComposed::Yes,
     47        : MouseEvent(eventType, CanBubble::Yes, IsCancelable::Yes, IsComposed::Yes,
    4848            underlyingEvent ? underlyingEvent->timeStamp() : MonotonicTime::now(), WTFMove(view), /* detail */ 0,
    4949            { }, { }, { }, modifiersFromUnderlyingEvent(underlyingEvent), 0, 0, nullptr, 0, 0, nullptr, IsSimulated::Yes,
Note: See TracChangeset for help on using the changeset viewer.