Index: third_party/WebKit/Source/core/css/StyleColor.cpp |
diff --git a/third_party/WebKit/Source/core/css/StyleColor.cpp b/third_party/WebKit/Source/core/css/StyleColor.cpp |
index 05e74e317a816926463bb759b5709c22c6d2ecd7..da8c09a2bd31e76e6056e11391d30ca5c539662f 100644 |
--- a/third_party/WebKit/Source/core/css/StyleColor.cpp |
+++ b/third_party/WebKit/Source/core/css/StyleColor.cpp |
@@ -17,4 +17,33 @@ Color StyleColor::colorFromKeyword(CSSValueID keyword) |
return LayoutTheme::theme().systemColor(keyword); |
} |
+bool StyleColor::isColorKeyword(CSSValueID id) |
+{ |
+ // Named colors and color keywords: |
+ // |
+ // <named-color> |
+ // 'aqua', 'black', 'blue', ..., 'yellow' (CSS3: "basic color keywords") |
+ // 'aliceblue', ..., 'yellowgreen' (CSS3: "extended color keywords") |
+ // 'transparent' |
+ // |
+ // 'currentcolor' |
+ // |
+ // <deprecated-system-color> |
+ // 'ActiveBorder', ..., 'WindowText' |
+ // |
+ // WebKit proprietary/internal: |
+ // '-webkit-link' |
+ // '-webkit-activelink' |
+ // '-internal-active-list-box-selection' |
+ // '-internal-active-list-box-selection-text' |
+ // '-internal-inactive-list-box-selection' |
+ // '-internal-inactive-list-box-selection-text' |
+ // '-webkit-focus-ring-color' |
+ // '-internal-quirk-inherit' |
+ // |
+ return (id >= CSSValueAqua && id <= CSSValueInternalQuirkInherit) |
+ || (id >= CSSValueAliceblue && id <= CSSValueYellowgreen) |
+ || id == CSSValueMenu; |
+} |
+ |
} // namespace blink |