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

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

Issue 1799253002: Stricter user gestures for touch - measure and warn (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweaks Created 4 years, 8 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 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 element().updateView(); 153 element().updateView();
154 if (m_chooser) 154 if (m_chooser)
155 m_chooser->setSelectedColor(valueAsColor()); 155 m_chooser->setSelectedColor(valueAsColor());
156 } 156 }
157 157
158 void ColorInputType::handleDOMActivateEvent(Event* event) 158 void ColorInputType::handleDOMActivateEvent(Event* event)
159 { 159 {
160 if (element().isDisabledFormControl() || !element().layoutObject()) 160 if (element().isDisabledFormControl() || !element().layoutObject())
161 return; 161 return;
162 162
163 if (!UserGestureIndicator::processingUserGesture()) 163 if (!UserGestureIndicator::utilizeUserGesture())
164 return; 164 return;
165 165
166 ChromeClient* chromeClient = this->chromeClient(); 166 ChromeClient* chromeClient = this->chromeClient();
167 if (chromeClient && !m_chooser) 167 if (chromeClient && !m_chooser)
168 m_chooser = chromeClient->openColorChooser(element().document().frame(), this, valueAsColor()); 168 m_chooser = chromeClient->openColorChooser(element().document().frame(), this, valueAsColor());
169 169
170 event->setDefaultHandled(); 170 event->setDefaultHandled();
171 } 171 }
172 172
173 void ColorInputType::closePopupView() 173 void ColorInputType::closePopupView()
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 { 282 {
283 return m_chooser ? m_chooser->rootAXObject() : nullptr; 283 return m_chooser ? m_chooser->rootAXObject() : nullptr;
284 } 284 }
285 285
286 ColorChooserClient* ColorInputType::colorChooserClient() 286 ColorChooserClient* ColorInputType::colorChooserClient()
287 { 287 {
288 return this; 288 return this;
289 } 289 }
290 290
291 } // namespace blink 291 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMediaElement.cpp ('k') | third_party/WebKit/Source/core/html/forms/FileInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698