Modified: trunk/LayoutTests/ChangeLog (288668 => 288669)
--- trunk/LayoutTests/ChangeLog 2022-01-27 07:21:34 UTC (rev 288668)
+++ trunk/LayoutTests/ChangeLog 2022-01-27 08:48:17 UTC (rev 288669)
@@ -1,3 +1,13 @@
+2022-01-27 Cameron McCormack <[email protected]>
+
+ Avoid setting and clearing :active state when dispatching synthetic click events when possible
+ https://bugs.webkit.org/show_bug.cgi?id=235672
+ <rdar://problem/88095418>
+
+ Reviewed by Simon Fraser.
+
+ * platform/gtk/inspector/timeline/line-column-expected.txt:
+
2022-01-26 ChangSeok Oh <[email protected]>
[GTK] WTR: Native HTML form validation popover is not supported
Modified: trunk/LayoutTests/platform/gtk/inspector/timeline/line-column-expected.txt (288668 => 288669)
--- trunk/LayoutTests/platform/gtk/inspector/timeline/line-column-expected.txt 2022-01-27 07:21:34 UTC (rev 288668)
+++ trunk/LayoutTests/platform/gtk/inspector/timeline/line-column-expected.txt 2022-01-27 08:48:17 UTC (rev 288669)
@@ -8,50 +8,7 @@
PASS: Capturing started.
{
"startTime": "<filtered>",
- "stackTrace": [
- {
- "functionName": "click",
- "url": "[native code]",
- "scriptId": "<filtered>",
- "lineNumber": 0,
- "columnNumber": 0
- },
- {
- "functionName": "willCallFunctionTest",
- "url": "timeline/line-column.html",
- "scriptId": "<filtered>",
- "lineNumber": 26,
- "columnNumber": 44
- },
- {
- "functionName": "global code",
- "url": "",
- "scriptId": "<filtered>",
- "lineNumber": 1,
- "columnNumber": 21
- },
- {
- "functionName": "evaluateWithScopeExtension",
- "url": "[native code]",
- "scriptId": "<filtered>",
- "lineNumber": 0,
- "columnNumber": 0
- },
- {
- "functionName": "",
- "url": "",
- "scriptId": "<filtered>",
- "lineNumber": 142,
- "columnNumber": 97
- }
- ],
- "data": {},
"frameId": "<filtered>",
- "type": "ScheduleStyleRecalculation"
-}
-{
- "startTime": "<filtered>",
- "frameId": "<filtered>",
"data": {
"type": "click",
"defaultPrevented": false
Modified: trunk/Source/WebCore/ChangeLog (288668 => 288669)
--- trunk/Source/WebCore/ChangeLog 2022-01-27 07:21:34 UTC (rev 288668)
+++ trunk/Source/WebCore/ChangeLog 2022-01-27 08:48:17 UTC (rev 288669)
@@ -1,3 +1,32 @@
+2022-01-27 Cameron McCormack <[email protected]>
+
+ Avoid setting and clearing :active state when dispatching synthetic click events when possible
+ https://bugs.webkit.org/show_bug.cgi?id=235672
+ <rdar://problem/88095418>
+
+ Reviewed by Simon Fraser.
+
+ Simulated click events are dispatched with two options:
+
+ - whether to send associated events mouseover, mouseup, mousedown
+ - whether to repaint the target element with its pressed look
+
+ We currently always set the element's :active state just after when we'd
+ send the mousedown event, and clear it just after that.
+
+ When we dispatch a simulated click event with neither of the above
+ options set, there's no way to observe the temporary :active state on
+ the element. We can skip it in that case.
+
+ We need to continue clearing clearing the :active state regardless,
+ because some callers have already set :active and are relying on
+ simulateClick to clear it.
+
+ This patch is a 0.3-0.4% improvement on Speedometer 2.
+
+ * dom/SimulatedClick.cpp:
+ (WebCore::simulateClick):
+
2022-01-26 Jean-Yves Avenard <[email protected]>
REGRESSION(r287684) speedtest.net uses many GB of memory
Modified: trunk/Source/WebCore/dom/SimulatedClick.cpp (288668 => 288669)
--- trunk/Source/WebCore/dom/SimulatedClick.cpp 2022-01-27 07:21:34 UTC (rev 288668)
+++ trunk/Source/WebCore/dom/SimulatedClick.cpp 2022-01-27 08:48:17 UTC (rev 288669)
@@ -95,7 +95,8 @@
if (mouseEventOptions != SendNoEvents)
simulateMouseEvent(eventNames().mousedownEvent, element, underlyingEvent, creationOptions);
- element.setActive(true, visualOptions == ShowPressedLook);
+ if (mouseEventOptions != SendNoEvents || visualOptions == ShowPressedLook)
+ element.setActive(true, true);
if (mouseEventOptions != SendNoEvents)
simulateMouseEvent(eventNames().mouseupEvent, element, underlyingEvent, creationOptions);
element.setActive(false);