Modified: trunk/LayoutTests/imported/w3c/ChangeLog (235336 => 235337)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2018-08-24 22:54:23 UTC (rev 235336)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2018-08-24 23:12:28 UTC (rev 235337)
@@ -1,3 +1,14 @@
+2018-08-24 Ryosuke Niwa <[email protected]>
+
+ Click event from click() is not composed
+ https://bugs.webkit.org/show_bug.cgi?id=170211
+
+ Reviewed by Wenson Hsieh.
+
+ Rebaselined the test now that all test cases pass.
+
+ * web-platform-tests/shadow-dom/event-composed-expected.txt:
+
2018-08-24 Youenn Fablet <[email protected]>
libwebrtc PeerConnection::AddTrack sometimes fail
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/event-composed-expected.txt (235336 => 235337)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/event-composed-expected.txt 2018-08-24 22:54:23 UTC (rev 235336)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/shadow-dom/event-composed-expected.txt 2018-08-24 23:12:28 UTC (rev 235337)
@@ -7,5 +7,5 @@
PASS A synthetic MouseEvent with composed=true should not be scoped
PASS A synthetic FocusEvent should be scoped by default
PASS A synthetic FocusEvent with composed=true should not be scoped
-FAIL A UA click event should not be scoped assert_equals: expected 3 but got 2
+PASS A UA click event should not be scoped
Modified: trunk/Source/WebCore/ChangeLog (235336 => 235337)
--- trunk/Source/WebCore/ChangeLog 2018-08-24 22:54:23 UTC (rev 235336)
+++ trunk/Source/WebCore/ChangeLog 2018-08-24 23:12:28 UTC (rev 235337)
@@ -1,5 +1,18 @@
2018-08-24 Ryosuke Niwa <[email protected]>
+ Click event from click() is not composed
+ https://bugs.webkit.org/show_bug.cgi?id=170211
+
+ Reviewed by Wenson Hsieh.
+
+ 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:
+
+2018-08-24 Ryosuke Niwa <[email protected]>
+
Avoid calling setUntrusted in SimulatedMouseEvent
https://bugs.webkit.org/show_bug.cgi?id=188929
Modified: trunk/Source/WebCore/dom/SimulatedClick.cpp (235336 => 235337)
--- trunk/Source/WebCore/dom/SimulatedClick.cpp 2018-08-24 22:54:23 UTC (rev 235336)
+++ trunk/Source/WebCore/dom/SimulatedClick.cpp 2018-08-24 23:12:28 UTC (rev 235337)
@@ -44,7 +44,7 @@
private:
SimulatedMouseEvent(const AtomicString& eventType, RefPtr<WindowProxy>&& view, RefPtr<Event>&& underlyingEvent, Element& target, SimulatedClickSource source)
- : MouseEvent(eventType, CanBubble::Yes, IsCancelable::Yes, source == SimulatedClickSource::Bindings ? IsComposed::No : IsComposed::Yes,
+ : MouseEvent(eventType, CanBubble::Yes, IsCancelable::Yes, IsComposed::Yes,
underlyingEvent ? underlyingEvent->timeStamp() : MonotonicTime::now(), WTFMove(view), /* detail */ 0,
{ }, { }, { }, modifiersFromUnderlyingEvent(underlyingEvent), 0, 0, nullptr, 0, 0, nullptr, IsSimulated::Yes,
source == SimulatedClickSource::UserAgent ? IsTrusted::Yes : IsTrusted::No)