Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Issue 556813002: Fix behavior of label associated with control element (Closed)

Created:
6 years, 3 months ago by deepak.sa
Modified:
6 years, 3 months ago
Reviewers:
keishi, tkent, esprehn
CC:
blink-reviews, blink-reviews-html_chromium.org, dglazkov+blink
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Fix behavior of label associated with control element Continous clicking on label was not able to transfer the click event to associated control element. This was because we were not passing the events if there is selection on label. Now, the behaviour of label element is as follows: - If there is double click, two clicks will be passed to control element. Control element will *not* be focused. - If there is selection of label element by dragging, no click event is passed. Also, no focus on control element. - If there is already a selection on label element and then label is clicked, then click event is passed to control element and control element is focused. The above mentioned behaviour is same as Firefox. BUG=411065 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=182131

Patch Set 1 #

Patch Set 2 : Rebased #

Total comments: 3

Patch Set 3 : Without static variables #

Total comments: 16

Patch Set 4 : Addressing comments #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+142 lines, -18 lines) Patch
A LayoutTests/fast/forms/label/continous-click-on-label.html View 1 2 3 1 chunk +45 lines, -0 lines 0 comments Download
A LayoutTests/fast/forms/label/continous-click-on-label-expected.txt View 1 2 3 1 chunk +14 lines, -0 lines 0 comments Download
M LayoutTests/fast/forms/label/label-selection.html View 1 chunk +1 line, -1 line 0 comments Download
A LayoutTests/fast/forms/label/label-selection-by-dragging.html View 1 chunk +34 lines, -0 lines 0 comments Download
A + LayoutTests/fast/forms/label/label-selection-by-dragging-expected.txt View 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/html/HTMLLabelElement.cpp View 1 2 3 3 chunks +42 lines, -14 lines 1 comment Download
M Source/core/page/EventHandler.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (2 generated)
deepak.sa
PTAL? Thanks!
6 years, 3 months ago (2014-09-09 11:33:15 UTC) #2
esprehn
https://codereview.chromium.org/556813002/diff/20001/Source/core/html/HTMLLabelElement.cpp File Source/core/html/HTMLLabelElement.cpp (right): https://codereview.chromium.org/556813002/diff/20001/Source/core/html/HTMLLabelElement.cpp#newcode133 Source/core/html/HTMLLabelElement.cpp:133: isDragged = false; Static vars like this seem pretty ...
6 years, 3 months ago (2014-09-09 20:32:45 UTC) #3
tkent
> This behavior was due to the > selection of label on continous clicks. This ...
6 years, 3 months ago (2014-09-10 00:24:31 UTC) #4
deepak.sa
This is my understanding of events on label element (with associated control element) : 1) ...
6 years, 3 months ago (2014-09-10 15:16:32 UTC) #5
deepak.sa
On 2014/09/10 00:24:31, tkent (overloaded) wrote: > > This behavior was due to the > ...
6 years, 3 months ago (2014-09-10 15:29:10 UTC) #6
deepak.sa
On 2014/09/10 15:16:32, deepak.sa wrote: > This is my understanding of events on label element ...
6 years, 3 months ago (2014-09-10 15:32:46 UTC) #7
deepak.sa
Uploaded a new patchset. PTAL? Thanks!
6 years, 3 months ago (2014-09-15 16:17:17 UTC) #8
tkent
https://codereview.chromium.org/556813002/diff/40001/LayoutTests/fast/forms/label/continous-click-on-label.html File LayoutTests/fast/forms/label/continous-click-on-label.html (right): https://codereview.chromium.org/556813002/diff/40001/LayoutTests/fast/forms/label/continous-click-on-label.html#newcode25 LayoutTests/fast/forms/label/continous-click-on-label.html:25: // intially unchecked The comment should be replaced with ...
6 years, 3 months ago (2014-09-16 01:53:38 UTC) #9
deepak.sa
https://codereview.chromium.org/556813002/diff/40001/LayoutTests/fast/forms/label/continous-click-on-label.html File LayoutTests/fast/forms/label/continous-click-on-label.html (right): https://codereview.chromium.org/556813002/diff/40001/LayoutTests/fast/forms/label/continous-click-on-label.html#newcode25 LayoutTests/fast/forms/label/continous-click-on-label.html:25: // intially unchecked On 2014/09/16 01:53:37, tkent (overloaded) wrote: ...
6 years, 3 months ago (2014-09-16 10:31:16 UTC) #10
tkent
lgtm https://codereview.chromium.org/556813002/diff/60001/Source/core/html/HTMLLabelElement.cpp File Source/core/html/HTMLLabelElement.cpp (right): https://codereview.chromium.org/556813002/diff/60001/Source/core/html/HTMLLabelElement.cpp#newcode139 Source/core/html/HTMLLabelElement.cpp:139: // Behaviour of label element is as follows: ...
6 years, 3 months ago (2014-09-17 00:19:15 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/556813002/60001
6 years, 3 months ago (2014-09-17 00:19:58 UTC) #13
commit-bot: I haz the power
6 years, 3 months ago (2014-09-17 01:36:31 UTC) #14
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as 182131

Powered by Google App Engine
This is Rietveld 408576698