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

Unified Diff: Source/core/rendering/RenderBox.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
Index: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index 8f0b817cb10c6c78888c2250885fb464bb9f4906..e64e9e33b1ee70f58586239cb192a93b6886a489 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -1052,7 +1052,7 @@ void RenderBox::paintRootBoxFillLayers(const PaintInfo& paintInfo)
RenderObject* rootBackgroundRenderer = rendererForRootBackground();
const FillLayer* bgLayer = rootBackgroundRenderer->style()->backgroundLayers();
- Color bgColor = rootBackgroundRenderer->style()->visitedDependentColor(CSSPropertyBackgroundColor);
+ Color bgColor = rootBackgroundRenderer->resolveColor(CSSPropertyBackgroundColor);
paintFillLayers(paintInfo, bgColor, bgLayer, view()->backgroundRect(this), BackgroundBleedNone, CompositeSourceOver, rootBackgroundRenderer);
}
@@ -1151,7 +1151,7 @@ void RenderBox::paintBackground(const PaintInfo& paintInfo, const LayoutRect& pa
return;
if (backgroundIsKnownToBeObscured())
return;
- paintFillLayers(paintInfo, style()->visitedDependentColor(CSSPropertyBackgroundColor), style()->backgroundLayers(), paintRect, bleedAvoidance);
+ paintFillLayers(paintInfo, resolveColor(CSSPropertyBackgroundColor), style()->backgroundLayers(), paintRect, bleedAvoidance);
}
LayoutRect RenderBox::backgroundPaintedExtent() const
@@ -1159,7 +1159,7 @@ LayoutRect RenderBox::backgroundPaintedExtent() const
ASSERT(hasBackground());
LayoutRect backgroundRect = pixelSnappedIntRect(borderBoxRect());
- Color backgroundColor = style()->visitedDependentColor(CSSPropertyBackgroundColor);
+ Color backgroundColor = resolveColor(CSSPropertyBackgroundColor);
if (backgroundColor.isValid() && backgroundColor.alpha())
return backgroundRect;
if (!style()->backgroundLayers()->image() || style()->backgroundLayers()->next())
@@ -1174,7 +1174,7 @@ bool RenderBox::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) c
if (isBody() && skipBodyBackground(this))
return false;
- Color backgroundColor = style()->visitedDependentColor(CSSPropertyBackgroundColor);
+ Color backgroundColor = resolveColor(CSSPropertyBackgroundColor);
if (!backgroundColor.isValid() || backgroundColor.hasAlpha())
return false;
@@ -1292,7 +1292,7 @@ bool RenderBox::backgroundHasOpaqueTopLayer() const
// If there is only one layer and no image, check whether the background color is opaque
if (!fillLayer->next() && !fillLayer->hasImage()) {
- Color bgColor = style()->visitedDependentColor(CSSPropertyBackgroundColor);
+ Color bgColor = resolveColor(CSSPropertyBackgroundColor);
if (bgColor.isValid() && bgColor.alpha() == 255)
return true;
}

Powered by Google App Engine
This is Rietveld 408576698