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 17 matching lines...) Expand all Loading... |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "core/html/ColorInputType.h" | 32 #include "core/html/ColorInputType.h" |
33 | 33 |
34 #include "CSSPropertyNames.h" | 34 #include "CSSPropertyNames.h" |
35 #include "RuntimeEnabledFeatures.h" | 35 #include "RuntimeEnabledFeatures.h" |
36 #include "bindings/v8/ScriptController.h" | 36 #include "bindings/v8/ScriptController.h" |
37 #include "core/dom/MouseEvent.h" | 37 #include "core/dom/MouseEvent.h" |
38 #include "core/dom/shadow/ElementShadow.h" | |
39 #include "core/dom/shadow/ShadowRoot.h" | 38 #include "core/dom/shadow/ShadowRoot.h" |
40 #include "core/html/HTMLDataListElement.h" | 39 #include "core/html/HTMLDataListElement.h" |
41 #include "core/html/HTMLDivElement.h" | 40 #include "core/html/HTMLDivElement.h" |
42 #include "core/html/HTMLInputElement.h" | 41 #include "core/html/HTMLInputElement.h" |
43 #include "core/html/HTMLOptionElement.h" | 42 #include "core/html/HTMLOptionElement.h" |
44 #include "core/html/InputTypeNames.h" | 43 #include "core/html/InputTypeNames.h" |
45 #include "core/page/Chrome.h" | 44 #include "core/page/Chrome.h" |
46 #include "core/platform/graphics/Color.h" | 45 #include "core/platform/graphics/Color.h" |
47 #include "core/rendering/RenderObject.h" | |
48 #include "core/rendering/RenderView.h" | 46 #include "core/rendering/RenderView.h" |
49 #include <wtf/PassOwnPtr.h> | 47 #include "wtf/PassOwnPtr.h" |
50 #include <wtf/text/WTFString.h> | 48 #include "wtf/text/WTFString.h" |
51 | 49 |
52 namespace WebCore { | 50 namespace WebCore { |
53 | 51 |
54 using namespace HTMLNames; | 52 using namespace HTMLNames; |
55 | 53 |
56 static bool isValidColorString(const String& value) | 54 static bool isValidColorString(const String& value) |
57 { | 55 { |
58 if (value.isEmpty()) | 56 if (value.isEmpty()) |
59 return false; | 57 return false; |
60 if (value[0] != '#') | 58 if (value[0] != '#') |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 if (!color.isValid()) | 237 if (!color.isValid()) |
240 continue; | 238 continue; |
241 suggestions.append(color); | 239 suggestions.append(color); |
242 } | 240 } |
243 } | 241 } |
244 } | 242 } |
245 return suggestions; | 243 return suggestions; |
246 } | 244 } |
247 | 245 |
248 } // namespace WebCore | 246 } // namespace WebCore |
OLD | NEW |