| Index: Source/core/css/resolver/StyleResolverState.cpp
|
| diff --git a/Source/core/css/resolver/StyleResolverState.cpp b/Source/core/css/resolver/StyleResolverState.cpp
|
| index cf5a7f5dc1eb1707146c589d267bb8c7a21e182d..86552e7e78d8c6913f18dda46d258be4e13fbb06 100644
|
| --- a/Source/core/css/resolver/StyleResolverState.cpp
|
| +++ b/Source/core/css/resolver/StyleResolverState.cpp
|
| @@ -28,7 +28,6 @@
|
| #include "core/dom/NodeRenderingContext.h"
|
| #include "core/dom/VisitedLinkState.h"
|
| #include "core/page/Page.h"
|
| -#include "core/rendering/RenderTheme.h"
|
|
|
| namespace WebCore {
|
|
|
| @@ -99,67 +98,4 @@ void StyleResolverState::initForStyleResolve(Document* document, Element* e, Ren
|
| m_elementStyleResources.setDeviceScaleFactor(page->deviceScaleFactor());
|
| }
|
|
|
| -
|
| -static Color colorForCSSValue(CSSValueID cssValueId)
|
| -{
|
| - struct ColorValue {
|
| - CSSValueID cssValueId;
|
| - RGBA32 color;
|
| - };
|
| -
|
| - static const ColorValue colorValues[] = {
|
| - { CSSValueAqua, 0xFF00FFFF },
|
| - { CSSValueBlack, 0xFF000000 },
|
| - { CSSValueBlue, 0xFF0000FF },
|
| - { CSSValueFuchsia, 0xFFFF00FF },
|
| - { CSSValueGray, 0xFF808080 },
|
| - { CSSValueGreen, 0xFF008000 },
|
| - { CSSValueGrey, 0xFF808080 },
|
| - { CSSValueLime, 0xFF00FF00 },
|
| - { CSSValueMaroon, 0xFF800000 },
|
| - { CSSValueNavy, 0xFF000080 },
|
| - { CSSValueOlive, 0xFF808000 },
|
| - { CSSValueOrange, 0xFFFFA500 },
|
| - { CSSValuePurple, 0xFF800080 },
|
| - { CSSValueRed, 0xFFFF0000 },
|
| - { CSSValueSilver, 0xFFC0C0C0 },
|
| - { CSSValueTeal, 0xFF008080 },
|
| - { CSSValueTransparent, 0x00000000 },
|
| - { CSSValueWhite, 0xFFFFFFFF },
|
| - { CSSValueYellow, 0xFFFFFF00 },
|
| - { CSSValueInvalid, CSSValueInvalid }
|
| - };
|
| -
|
| - for (const ColorValue* col = colorValues; col->cssValueId; ++col) {
|
| - if (col->cssValueId == cssValueId)
|
| - return col->color;
|
| - }
|
| - return RenderTheme::defaultTheme()->systemColor(cssValueId);
|
| -}
|
| -
|
| -Color StyleResolverState::resolveColorFromPrimitiveValue(CSSPrimitiveValue* value, bool forVisitedLink)
|
| -{
|
| - if (value->isRGBColor())
|
| - return Color(value->getRGBA32Value());
|
| -
|
| - CSSValueID valueID = value->getValueID();
|
| - switch (valueID) {
|
| - case 0:
|
| - return Color();
|
| - case CSSValueWebkitText:
|
| - return document()->textLinkColors().textColor();
|
| - case CSSValueWebkitLink:
|
| - return (element()->isLink() && forVisitedLink) ? document()->textLinkColors().visitedLinkColor() : document()->textLinkColors().linkColor();
|
| - case CSSValueWebkitActivelink:
|
| - return document()->textLinkColors().activeLinkColor();
|
| - case CSSValueWebkitFocusRingColor:
|
| - return RenderTheme::focusRingColor();
|
| - case CSSValueCurrentcolor:
|
| - m_isMatchedPropertiesCacheable = false;
|
| - return style()->color();
|
| - default:
|
| - return colorForCSSValue(valueID);
|
| - }
|
| -}
|
| -
|
| } // namespace WebCore
|
|
|