Title: [289792] trunk
- Revision
- 289792
- Author
- [email protected]
- Date
- 2022-02-15 00:34:24 -0800 (Tue, 15 Feb 2022)
Log Message
REGRESSION(r195447): [GTK] document.activeElement not set on mouse click
https://bugs.webkit.org/show_bug.cgi?id=236217
Reviewed by Michael Catanzaro.
Source/WebCore:
Bring back the behavior before r195447 and focus the links on click which is consistent with other browser in
Linux and ensures active element is the expected one on a click event listener.
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::isMouseFocusable const):
LayoutTests:
* fast/events/click-focus-anchor-expected.txt:
* fast/events/click-focus-anchor.html:
* platform/glib/TestExpectations: Mark imported/blink/fast/events/click-focus-keydown-no-ring.html as failure.
* platform/glib/fast/events/click-focus-anchor-expected.txt: Copied from LayoutTests/fast/events/click-focus-anchor-expected.txt.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (289791 => 289792)
--- trunk/LayoutTests/ChangeLog 2022-02-15 08:26:18 UTC (rev 289791)
+++ trunk/LayoutTests/ChangeLog 2022-02-15 08:34:24 UTC (rev 289792)
@@ -1,3 +1,15 @@
+2022-02-15 Carlos Garcia Campos <[email protected]>
+
+ REGRESSION(r195447): [GTK] document.activeElement not set on mouse click
+ https://bugs.webkit.org/show_bug.cgi?id=236217
+
+ Reviewed by Michael Catanzaro.
+
+ * fast/events/click-focus-anchor-expected.txt:
+ * fast/events/click-focus-anchor.html:
+ * platform/glib/TestExpectations: Mark imported/blink/fast/events/click-focus-keydown-no-ring.html as failure.
+ * platform/glib/fast/events/click-focus-anchor-expected.txt: Copied from LayoutTests/fast/events/click-focus-anchor-expected.txt.
+
2022-02-14 Antti Koivisto <[email protected]>
[CSS Container Queries] Support range operators in size queries
Modified: trunk/LayoutTests/fast/events/click-focus-anchor-expected.txt (289791 => 289792)
--- trunk/LayoutTests/fast/events/click-focus-anchor-expected.txt 2022-02-15 08:26:18 UTC (rev 289791)
+++ trunk/LayoutTests/fast/events/click-focus-anchor-expected.txt 2022-02-15 08:34:24 UTC (rev 289792)
@@ -1,6 +1,6 @@
This test ensures that we can click to focus an a element. Click on the element below.
-The expected result is platform specific. GTK, QT and EFL allows all links to be mouse focusable.
+The expected result is platform specific. GTK and WPE allow all links to be mouse focusable.
Result
Modified: trunk/LayoutTests/fast/events/click-focus-anchor.html (289791 => 289792)
--- trunk/LayoutTests/fast/events/click-focus-anchor.html 2022-02-15 08:26:18 UTC (rev 289791)
+++ trunk/LayoutTests/fast/events/click-focus-anchor.html 2022-02-15 08:34:24 UTC (rev 289792)
@@ -7,13 +7,13 @@
<p>This test ensures that we can click to focus an a element.
Click on the element below.
-<p>The expected result is platform specific. GTK, QT and EFL allows all links to be
+<p>The expected result is platform specific. GTK and WPE allow all links to be
mouse focusable.
<div id=test-container>
<p><a id=a1 tabindex=0 title="focusable">Anchor with tab index</a>
<p><a id=a2 title="not focusable">Anchor without tab index</a>
-<p><a id=a3 href="" title="focusable on GTK, QT and EFL">Link without tab index</a>
+<p><a id=a3 href="" title="focusable on GTK and WPE">Link without tab index</a>
<p><a id=a4 href="" tabindex=0 title="focusable">Link with tab index</a>
<p><a id=a5 href="" contentEditable title="focusable">Link with contentEditable</a>
<p contentEditable><a id=a6 href="" focusable="not focusable">Link inside contentEditable</a>
Modified: trunk/LayoutTests/platform/glib/TestExpectations (289791 => 289792)
--- trunk/LayoutTests/platform/glib/TestExpectations 2022-02-15 08:26:18 UTC (rev 289791)
+++ trunk/LayoutTests/platform/glib/TestExpectations 2022-02-15 08:34:24 UTC (rev 289792)
@@ -723,6 +723,9 @@
webkit.org/b/218931 fast/events/wheel/wheel-event-in-passive-region-non-cancelable.html [ Timeout ]
webkit.org/b/218931 fast/events/wheel/wheel-events-become-non-cancelable.html [ Timeout ]
+# We draw the focus ring of focused links on keydown event.
+imported/blink/fast/events/click-focus-keydown-no-ring.html [ ImageOnlyFailure ]
+
#////////////////////////////////////////////////////////////////////////////////////////
# End of Events-related bugs
#////////////////////////////////////////////////////////////////////////////////////////
Copied: trunk/LayoutTests/platform/glib/fast/events/click-focus-anchor-expected.txt (from rev 289791, trunk/LayoutTests/fast/events/click-focus-anchor-expected.txt) (0 => 289792)
--- trunk/LayoutTests/platform/glib/fast/events/click-focus-anchor-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/glib/fast/events/click-focus-anchor-expected.txt 2022-02-15 08:34:24 UTC (rev 289792)
@@ -0,0 +1,11 @@
+This test ensures that we can click to focus an a element. Click on the element below.
+
+The expected result is platform specific. GTK and WPE allow all links to be mouse focusable.
+
+Result
+
+
+a1 received focus (focusable)
+a3 received focus (focusable on GTK and WPE)
+a4 received focus (focusable)
+a5 received focus (focusable)
Modified: trunk/Source/WebCore/ChangeLog (289791 => 289792)
--- trunk/Source/WebCore/ChangeLog 2022-02-15 08:26:18 UTC (rev 289791)
+++ trunk/Source/WebCore/ChangeLog 2022-02-15 08:34:24 UTC (rev 289792)
@@ -1,3 +1,16 @@
+2022-02-15 Carlos Garcia Campos <[email protected]>
+
+ REGRESSION(r195447): [GTK] document.activeElement not set on mouse click
+ https://bugs.webkit.org/show_bug.cgi?id=236217
+
+ Reviewed by Michael Catanzaro.
+
+ Bring back the behavior before r195447 and focus the links on click which is consistent with other browser in
+ Linux and ensures active element is the expected one on a click event listener.
+
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::HTMLAnchorElement::isMouseFocusable const):
+
2022-02-14 Kimmo Kinnunen <[email protected]>
ExtensionsGL is not useful class, it should be removed
Modified: trunk/Source/WebCore/html/HTMLAnchorElement.cpp (289791 => 289792)
--- trunk/Source/WebCore/html/HTMLAnchorElement.cpp 2022-02-15 08:26:18 UTC (rev 289791)
+++ trunk/Source/WebCore/html/HTMLAnchorElement.cpp 2022-02-15 08:34:24 UTC (rev 289792)
@@ -102,9 +102,11 @@
bool HTMLAnchorElement::isMouseFocusable() const
{
+#if !(PLATFORM(GTK) || PLATFORM(WPE))
// Only allow links with tabIndex or contentEditable to be mouse focusable.
if (isLink())
return HTMLElement::supportsFocus();
+#endif
return HTMLElement::isMouseFocusable();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes