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

Unified Diff: Source/core/events/EventDispatcher.cpp

Issue 291563009: Don't repaint button when its click() method is called (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: NeedsRebaseline on mac Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/repaint/button-checkbox-click-method-repaint-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/EventDispatcher.cpp
diff --git a/Source/core/events/EventDispatcher.cpp b/Source/core/events/EventDispatcher.cpp
index 75567c9b363f4439df74b6aee338baf55da8d647..73403214f84dff1b334164ef74e514c3c28fb6e1 100644
--- a/Source/core/events/EventDispatcher.cpp
+++ b/Source/core/events/EventDispatcher.cpp
@@ -87,11 +87,13 @@ void EventDispatcher::dispatchSimulatedClick(Node* node, Event* underlyingEvent,
if (mouseEventOptions == SendMouseOverUpDownEvents)
EventDispatcher(node, SimulatedMouseEvent::create(EventTypeNames::mouseover, node->document().domWindow(), underlyingEvent)).dispatch();
- if (mouseEventOptions != SendNoEvents)
+ if (mouseEventOptions != SendNoEvents) {
EventDispatcher(node, SimulatedMouseEvent::create(EventTypeNames::mousedown, node->document().domWindow(), underlyingEvent)).dispatch();
- node->setActive(true);
- if (mouseEventOptions != SendNoEvents)
+ node->setActive(true);
EventDispatcher(node, SimulatedMouseEvent::create(EventTypeNames::mouseup, node->document().domWindow(), underlyingEvent)).dispatch();
+ }
+ // Some elements (e.g. the color picker) may set active state to true before
+ // calling this method and expect the state to be reset during the call.
node->setActive(false);
// always send click
« no previous file with comments | « LayoutTests/fast/repaint/button-checkbox-click-method-repaint-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698