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

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

Issue 20061003: Move isValid/isCurrentColor from Color to StyleColor (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 f631c5cc430a6eb3afa0b32d99ad65d29ca9c6f0..12360edf7b267c5af49bc04fa11a77a32bebeedd 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -1171,7 +1171,7 @@ LayoutRect RenderBox::backgroundPaintedExtent() const
ASSERT(hasBackground());
LayoutRect backgroundRect = pixelSnappedIntRect(borderBoxRect());
- Color backgroundColor = resolveColor(CSSPropertyBackgroundColor);
+ StyleColor backgroundColor = resolveStyleColor(CSSPropertyBackgroundColor);
if (backgroundColor.isValid() && backgroundColor.alpha())
return backgroundRect;
if (!style()->backgroundLayers()->image() || style()->backgroundLayers()->next())
@@ -1186,7 +1186,7 @@ bool RenderBox::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) c
if (isBody() && skipBodyBackground(this))
return false;
- Color backgroundColor = resolveColor(CSSPropertyBackgroundColor);
+ StyleColor backgroundColor = resolveStyleColor(CSSPropertyBackgroundColor);
if (!backgroundColor.isValid() || backgroundColor.hasAlpha())
return false;
@@ -1304,7 +1304,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 = resolveColor(CSSPropertyBackgroundColor);
+ StyleColor bgColor = resolveStyleColor(CSSPropertyBackgroundColor);
if (bgColor.isValid() && bgColor.alpha() == 255)
return true;
}

Powered by Google App Engine
This is Rietveld 408576698