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

Issue 291563009: Don't repaint button when its click() method is called (Closed)

Created:
6 years, 7 months ago by Xianzhu
Modified:
6 years, 6 months ago
CC:
blink-reviews
Visibility:
Public.

Description

Don't repaint button when its click() method is called When click() method is called, previously we change the active status of the element to true and then back to false. This doesn't change anything for a button (or other elements that status doesn't change after click()) but causes a repaint. Don't change active status when click() method is called. (Elements that status changes after click() call (e.g. checkboxes) will still repaint.) This doesn't change how we handle real mouse down/up/click events. BUG=369358 TEST=fast/repaint/button-checkbox-click-method-repaint.html TEST=fast/events/button-mouse-active.html # ensures :active is correct on real mouse down events. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=174988

Patch Set 1 #

Patch Set 2 : Rebase #

Total comments: 2

Patch Set 3 : Rebase #

Patch Set 4 : Fix test #

Patch Set 5 : Call setActive if we dispatch mouseup and mousedown events #

Patch Set 6 : NeedsRebaseline on mac #

Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -4 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
A LayoutTests/fast/events/button-mouse-active.html View 1 2 1 chunk +26 lines, -0 lines 0 comments Download
A LayoutTests/fast/events/button-mouse-active-expected.txt View 1 chunk +7 lines, -0 lines 0 comments Download
A LayoutTests/fast/repaint/button-checkbox-click-method-repaint.html View 1 2 3 1 chunk +22 lines, -0 lines 0 comments Download
A + LayoutTests/fast/repaint/button-checkbox-click-method-repaint-expected.txt View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/core/events/EventDispatcher.cpp View 1 2 3 4 1 chunk +5 lines, -3 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
Xianzhu
6 years, 7 months ago (2014-05-16 20:49:41 UTC) #1
Xianzhu
PTAL. fast/events/label-click.html is separated into https://codereview.chromium.org/291243002/.
6 years, 7 months ago (2014-05-20 21:06:39 UTC) #2
Xianzhu
6 years, 7 months ago (2014-05-23 00:03:01 UTC) #3
Xianzhu
ping...
6 years, 7 months ago (2014-05-27 16:19:03 UTC) #4
leviw_travelin_and_unemployed
lgtm https://codereview.chromium.org/291563009/diff/20001/LayoutTests/fast/repaint/button-checkbox-click-method-repaint-expected.txt File LayoutTests/fast/repaint/button-checkbox-click-method-repaint-expected.txt (right): https://codereview.chromium.org/291563009/diff/20001/LayoutTests/fast/repaint/button-checkbox-click-method-repaint-expected.txt#newcode9 LayoutTests/fast/repaint/button-checkbox-click-method-repaint-expected.txt:9: (rect 74.00 13.00 13.00 13.00) I presume this ...
6 years, 7 months ago (2014-05-27 17:51:34 UTC) #5
Xianzhu
https://codereview.chromium.org/291563009/diff/20001/LayoutTests/fast/repaint/button-checkbox-click-method-repaint-expected.txt File LayoutTests/fast/repaint/button-checkbox-click-method-repaint-expected.txt (right): https://codereview.chromium.org/291563009/diff/20001/LayoutTests/fast/repaint/button-checkbox-click-method-repaint-expected.txt#newcode9 LayoutTests/fast/repaint/button-checkbox-click-method-repaint-expected.txt:9: (rect 74.00 13.00 13.00 13.00) On 2014/05/27 17:51:34, leviw ...
6 years, 7 months ago (2014-05-27 18:25:42 UTC) #6
Xianzhu
The CQ bit was checked by wangxianzhu@chromium.org
6 years, 7 months ago (2014-05-27 18:36:39 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/291563009/40001
6 years, 7 months ago (2014-05-27 18:38:12 UTC) #8
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_blink_dbg on tryserver.blink ...
6 years, 7 months ago (2014-05-27 20:30:42 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-27 21:11:07 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/9153)
6 years, 7 months ago (2014-05-27 21:11:08 UTC) #11
Xianzhu
The CQ bit was checked by wangxianzhu@chromium.org
6 years, 7 months ago (2014-05-27 23:01:47 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/291563009/60001
6 years, 7 months ago (2014-05-27 23:02:06 UTC) #13
esprehn
The CQ bit was unchecked by esprehn@chromium.org
6 years, 7 months ago (2014-05-27 23:11:46 UTC) #14
esprehn
This is web observable, if you do querySelector(":active") inside the click handler you can see ...
6 years, 7 months ago (2014-05-27 23:12:34 UTC) #15
Xianzhu
On 2014/05/27 23:12:34, esprehn wrote: > This is web observable, if you do querySelector(":active") inside ...
6 years, 7 months ago (2014-05-27 23:29:06 UTC) #16
Xianzhu
Done. PTAL.
6 years, 7 months ago (2014-05-27 23:37:45 UTC) #17
Xianzhu
I'm CQing as I believe esprehn@'s concern has been addressed :)
6 years, 6 months ago (2014-05-28 16:29:00 UTC) #18
Xianzhu
The CQ bit was checked by wangxianzhu@chromium.org
6 years, 6 months ago (2014-05-28 16:29:09 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/291563009/80001
6 years, 6 months ago (2014-05-28 16:29:37 UTC) #20
Xianzhu
The CQ bit was checked by wangxianzhu@chromium.org
6 years, 6 months ago (2014-05-28 18:33:27 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/291563009/100001
6 years, 6 months ago (2014-05-28 18:33:56 UTC) #22
commit-bot: I haz the power
6 years, 6 months ago (2014-05-28 20:31:09 UTC) #23
Message was sent while issue was closed.
Change committed as 174988

Powered by Google App Engine
This is Rietveld 408576698