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

Side by Side Diff: third_party/WebKit/Source/core/html/forms/ColorInputType.cpp

Issue 2447653002: INPUT element: Do not dispatch events in detachLayoutTree(). (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 if (element().isDisabledFormControl() || color == valueAsColor()) 195 if (element().isDisabledFormControl() || color == valueAsColor())
196 return; 196 return;
197 EventQueueScope scope; 197 EventQueueScope scope;
198 element().setValueFromRenderer(color.serialized()); 198 element().setValueFromRenderer(color.serialized());
199 element().updateView(); 199 element().updateView();
200 if (!LayoutTheme::theme().isModalColorChooser()) 200 if (!LayoutTheme::theme().isModalColorChooser())
201 element().dispatchFormControlChangeEvent(); 201 element().dispatchFormControlChangeEvent();
202 } 202 }
203 203
204 void ColorInputType::didEndChooser() { 204 void ColorInputType::didEndChooser() {
205 EventQueueScope scope;
206 if (LayoutTheme::theme().isModalColorChooser()) 205 if (LayoutTheme::theme().isModalColorChooser())
207 element().dispatchFormControlChangeEvent(); 206 element().enqueueChangeEvent();
208 m_chooser.clear(); 207 m_chooser.clear();
209 } 208 }
210 209
211 void ColorInputType::endColorChooser() { 210 void ColorInputType::endColorChooser() {
212 if (m_chooser) 211 if (m_chooser)
213 m_chooser->endChooser(); 212 m_chooser->endChooser();
214 } 213 }
215 214
216 void ColorInputType::updateView() { 215 void ColorInputType::updateView() {
217 HTMLElement* colorSwatch = shadowColorSwatch(); 216 HTMLElement* colorSwatch = shadowColorSwatch();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 266
268 AXObject* ColorInputType::popupRootAXObject() { 267 AXObject* ColorInputType::popupRootAXObject() {
269 return m_chooser ? m_chooser->rootAXObject() : nullptr; 268 return m_chooser ? m_chooser->rootAXObject() : nullptr;
270 } 269 }
271 270
272 ColorChooserClient* ColorInputType::colorChooserClient() { 271 ColorChooserClient* ColorInputType::colorChooserClient() {
273 return this; 272 return this;
274 } 273 }
275 274
276 } // namespace blink 275 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp ('k') | third_party/WebKit/Source/web/WebPagePopupImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698