OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |