[webkit-changes] [WebKit/WebKit] 4ee89e: Fix behavior of nested click event on label elemen...
Ahmad Saleem
noreply at github.com
Fri Dec 23 00:33:19 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4ee89ea3f12cb36cc05e36f80c77c73553e62d28
https://github.com/WebKit/WebKit/commit/4ee89ea3f12cb36cc05e36f80c77c73553e62d28
Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
Date: 2022-12-23 (Fri, 23 Dec 2022)
Changed paths:
A LayoutTests/fast/forms/checkbox-nested-click-event-on-label-expected.txt
A LayoutTests/fast/forms/checkbox-nested-click-event-on-label.html
M Source/WebCore/html/HTMLLabelElement.cpp
M Source/WebCore/html/HTMLLabelElement.h
Log Message:
-----------
Fix behavior of nested click event on label element with checkbox
Fix behavior of nested click event on label element with checkbox
https://bugs.webkit.org/show_bug.cgi?id=249789
Reviewed by Ryosuke Niwa.
This patch is to align WebKit with Blink / Chromium and Gecko / Firefox.
Merge - https://src.chromium.org/viewvc/blink?view=revision&revision=183243
This patch removes static variable in HTMLLabelElement::defaultEventHandler, which interferes with handling of nested event on another label element. This is to promote this variable to class variable in the header so this interference can be avoided.
* Source/WebCore/html/HTMLLabelElement.cpp:
(HTMLLabelElement::defaultEventHandler): removed static variable and rename usage with SetForScope
* Source/WebCore/html/HTMLLabelElement.h: Add bool 'm_processingClick' with false
* LayoutTests/fast/form/checkbox-nested-click-event-on-label.html: Add Test Case
* LayoutTests/fast/form/checkbox-nested-click-event-on-label-expected.txt: Add Test Case Expectation
Canonical link: https://commits.webkit.org/258287@main
More information about the webkit-changes
mailing list