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

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

Issue 2458743004: Merge "INPUT element: Do not dispatch events in detachLayoutTree()." to M55 branch. (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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 if (element().isDisabledFormControl() || color == valueAsColor()) 196 if (element().isDisabledFormControl() || color == valueAsColor())
197 return; 197 return;
198 EventQueueScope scope; 198 EventQueueScope scope;
199 element().setValueFromRenderer(color.serialized()); 199 element().setValueFromRenderer(color.serialized());
200 element().updateView(); 200 element().updateView();
201 if (!LayoutTheme::theme().isModalColorChooser()) 201 if (!LayoutTheme::theme().isModalColorChooser())
202 element().dispatchFormControlChangeEvent(); 202 element().dispatchFormControlChangeEvent();
203 } 203 }
204 204
205 void ColorInputType::didEndChooser() { 205 void ColorInputType::didEndChooser() {
206 EventQueueScope scope;
207 if (LayoutTheme::theme().isModalColorChooser()) 206 if (LayoutTheme::theme().isModalColorChooser())
208 element().dispatchFormControlChangeEvent(); 207 element().enqueueChangeEvent();
209 m_chooser.clear(); 208 m_chooser.clear();
210 } 209 }
211 210
212 void ColorInputType::endColorChooser() { 211 void ColorInputType::endColorChooser() {
213 if (m_chooser) 212 if (m_chooser)
214 m_chooser->endChooser(); 213 m_chooser->endChooser();
215 } 214 }
216 215
217 void ColorInputType::updateView() { 216 void ColorInputType::updateView() {
218 HTMLElement* colorSwatch = shadowColorSwatch(); 217 HTMLElement* colorSwatch = shadowColorSwatch();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 267
269 AXObject* ColorInputType::popupRootAXObject() { 268 AXObject* ColorInputType::popupRootAXObject() {
270 return m_chooser ? m_chooser->rootAXObject() : nullptr; 269 return m_chooser ? m_chooser->rootAXObject() : nullptr;
271 } 270 }
272 271
273 ColorChooserClient* ColorInputType::colorChooserClient() { 272 ColorChooserClient* ColorInputType::colorChooserClient() {
274 return this; 273 return this;
275 } 274 }
276 275
277 } // namespace blink 276 } // 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