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

Unified Diff: Source/core/html/HTMLInputElement.cpp

Issue 15376006: Added window.internals.isColorChooserShown() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/html/HTMLInputElement.cpp
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp
index 315c4b93e67247cacfb2357dc8cfde8bfe6b718c..214cc576c0152673ff0ac2099295fdadb9c7c2af 100644
--- a/Source/core/html/HTMLInputElement.cpp
+++ b/Source/core/html/HTMLInputElement.cpp
@@ -1487,6 +1487,13 @@ void HTMLInputElement::selectColorInColorChooser(const Color& color)
return;
static_cast<ColorInputType*>(m_inputType.get())->didChooseColor(color);
}
+
+bool HTMLInputElement::isColorChooserShown() const
+{
+ if (!m_inputType->isColorControl())
keishi 2013/05/21 05:20:54 We decided not to branch depending on type inside
Hajime Morrita 2013/05/21 06:11:23 OK, let me do that.
+ return false;
+ return static_cast<ColorInputType*>(m_inputType.get())->hasChooser();
+}
#endif
#if ENABLE(DATALIST_ELEMENT)

Powered by Google App Engine
This is Rietveld 408576698