Bug 177096

Summary: Experiment with deferring MediaQueryListListener dispatch until the end of the current EventQueueScope
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: UI EventsAssignee: Wenson Hsieh <wenson_hsieh>
Status: NEW    
Severity: Normal CC: ddkilzer, koivisto, rniwa, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
EWS trial run none

Wenson Hsieh
Reported 2017-09-18 12:42:52 PDT
Experiment with deferring MediaQueryListListener dispatch until the end of the current EventQueueScope. While not ideal, this is a way to mitigate abuse of MediaQueryList.addEventListener in combination with Document.execCommand to cause various issues in editing code. This was the original motivation behind introducing scoped Events in the first place, but the existing mechanism to dispatch scoped events doesn't help us here, since MediaQueryList evaluation does not fire WebCore::Events.
Attachments
EWS trial run (6.80 KB, patch)
2017-09-18 13:01 PDT, Wenson Hsieh
no flags
Wenson Hsieh
Comment 1 2017-09-18 13:01:54 PDT
Created attachment 321121 [details] EWS trial run
Radar WebKit Bug Importer
Comment 2 2017-09-20 02:40:29 PDT
Ryosuke Niwa
Comment 3 2018-09-19 21:21:34 PDT
Comment on attachment 321121 [details] EWS trial run View in context: https://bugs.webkit.org/attachment.cgi?id=321121&action=review > Source/WebCore/css/MediaQueryMatcher.cpp:135 > - listener.listener->handleEvent(listener.query); > + ScopedEventQueue::singleton().enqueueMediaQueryListener(WTFMove(listener.listener), WTFMove(listener.query)); We should try making this completely async.
Note You need to log in before you can comment on or make changes to this bug.