Title: [123997] trunk/Source/WebCore
- Revision
- 123997
- Author
- [email protected]
- Date
- 2012-07-29 22:49:29 -0700 (Sun, 29 Jul 2012)
Log Message
Fix removing invalid values from color input suggestions
https://bugs.webkit.org/show_bug.cgi?id=92502
Reviewed by Kent Tamura.
Make ColorInputType::typeMismatchFor() return false for invalid color
values so that they don't appear in the list of suggestions that
ColorInputType::suggestions() returns.
No new tests. Tests to be added in Bug 92075.
* html/ColorInputType.cpp:
(WebCore::ColorInputType::typeMismatchFor):
(WebCore):
* html/ColorInputType.h:
(ColorInputType):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (123996 => 123997)
--- trunk/Source/WebCore/ChangeLog 2012-07-30 05:28:45 UTC (rev 123996)
+++ trunk/Source/WebCore/ChangeLog 2012-07-30 05:49:29 UTC (rev 123997)
@@ -1,3 +1,22 @@
+2012-07-29 Keishi Hattori <[email protected]>
+
+ Fix removing invalid values from color input suggestions
+ https://bugs.webkit.org/show_bug.cgi?id=92502
+
+ Reviewed by Kent Tamura.
+
+ Make ColorInputType::typeMismatchFor() return false for invalid color
+ values so that they don't appear in the list of suggestions that
+ ColorInputType::suggestions() returns.
+
+ No new tests. Tests to be added in Bug 92075.
+
+ * html/ColorInputType.cpp:
+ (WebCore::ColorInputType::typeMismatchFor):
+ (WebCore):
+ * html/ColorInputType.h:
+ (ColorInputType):
+
2012-07-29 Li Yin <[email protected]>
getChannelData should raise exception when index is more than numberOfChannels.
Modified: trunk/Source/WebCore/html/ColorInputType.cpp (123996 => 123997)
--- trunk/Source/WebCore/html/ColorInputType.cpp 2012-07-30 05:28:45 UTC (rev 123996)
+++ trunk/Source/WebCore/html/ColorInputType.cpp 2012-07-30 05:49:29 UTC (rev 123997)
@@ -166,6 +166,11 @@
return InputType::themeSupportsDataListUI(this);
}
+bool ColorInputType::typeMismatchFor(const String& value) const
+{
+ return isValidColorString(value);
+}
+
void ColorInputType::didChooseColor(const Color& color)
{
if (element()->disabled() || element()->readOnly() || color == valueAsColor())
Modified: trunk/Source/WebCore/html/ColorInputType.h (123996 => 123997)
--- trunk/Source/WebCore/html/ColorInputType.h 2012-07-30 05:28:45 UTC (rev 123996)
+++ trunk/Source/WebCore/html/ColorInputType.h 2012-07-30 05:49:29 UTC (rev 123997)
@@ -63,6 +63,7 @@
virtual void handleDOMActivateEvent(Event*) OVERRIDE;
virtual void detach() OVERRIDE;
virtual bool shouldRespectListAttribute() OVERRIDE;
+ virtual bool typeMismatchFor(const String&) const OVERRIDE;
Color valueAsColor() const;
void endColorChooser();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes