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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |