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

Unified Diff: Source/core/rendering/RenderThemeChromiumDefault.cpp

Issue 19697011: Change rendering code to use RenderObject::resolveColor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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
« no previous file with comments | « Source/core/rendering/RenderTheme.cpp ('k') | Source/core/rendering/RenderTreeAsText.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderThemeChromiumDefault.cpp
diff --git a/Source/core/rendering/RenderThemeChromiumDefault.cpp b/Source/core/rendering/RenderThemeChromiumDefault.cpp
index 7aab69b3efc296a756a7664a341ae68e0d543983..41b12d27bfddd46b6d2765dfbae38f7f2b2cda59 100644
--- a/Source/core/rendering/RenderThemeChromiumDefault.cpp
+++ b/Source/core/rendering/RenderThemeChromiumDefault.cpp
@@ -272,7 +272,7 @@ bool RenderThemeChromiumDefault::paintButton(RenderObject* o, const PaintInfo& i
extraParams.button.hasBorder = true;
extraParams.button.backgroundColor = defaultButtonBackgroundColor;
if (o->hasBackground())
- extraParams.button.backgroundColor = o->style()->visitedDependentColor(CSSPropertyBackgroundColor).rgb();
+ extraParams.button.backgroundColor = o->resolveColor(CSSPropertyBackgroundColor).rgb();
WebKit::Platform::current()->themeEngine()->paint(canvas, WebKit::WebThemeEngine::PartButton, getWebThemeState(this, o), WebKit::WebRect(rect), &extraParams);
return false;
@@ -294,9 +294,7 @@ bool RenderThemeChromiumDefault::paintTextField(RenderObject* o, const PaintInfo
WebKit::WebCanvas* canvas = i.context->canvas();
// Fallback to white if the specified color object is invalid.
- Color backgroundColor(Color::white);
- if (o->style()->visitedDependentColor(CSSPropertyBackgroundColor).isValid())
- backgroundColor = o->style()->visitedDependentColor(CSSPropertyBackgroundColor);
+ Color backgroundColor = o->resolveColor(CSSPropertyBackgroundColor, Color::white);
extraParams.textField.backgroundColor = backgroundColor.rgb();
WebKit::Platform::current()->themeEngine()->paint(canvas, WebKit::WebThemeEngine::PartTextField, getWebThemeState(this, o), WebKit::WebRect(rect), &extraParams);
@@ -321,7 +319,7 @@ bool RenderThemeChromiumDefault::paintMenuList(RenderObject* o, const PaintInfo&
// Fallback to transparent if the specified color object is invalid.
extraParams.menuList.backgroundColor = Color::transparent;
if (o->hasBackground())
- extraParams.menuList.backgroundColor = o->style()->visitedDependentColor(CSSPropertyBackgroundColor).rgb();
+ extraParams.menuList.backgroundColor = o->resolveColor(CSSPropertyBackgroundColor).rgb();
WebKit::WebCanvas* canvas = i.context->canvas();
« no previous file with comments | « Source/core/rendering/RenderTheme.cpp ('k') | Source/core/rendering/RenderTreeAsText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698