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

Unified Diff: Source/core/rendering/RenderMenuList.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/RenderMenuList.cpp
diff --git a/Source/core/rendering/RenderMenuList.cpp b/Source/core/rendering/RenderMenuList.cpp
index b984d7ea5e151c3ea58d8dec7715dca7b5a28724..241185f9ea83bdec168e0d4980d91edb2a481847 100644
--- a/Source/core/rendering/RenderMenuList.cpp
+++ b/Source/core/rendering/RenderMenuList.cpp
@@ -491,9 +491,13 @@ void RenderMenuList::getItemBackgroundColor(unsigned listIndex, Color& itemBackg
HTMLElement* element = listItems[listIndex];
Color backgroundColor;
- if (element->renderStyle())
+ if (element->renderStyle()) {
backgroundColor = resolveColor(element->renderStyle(), CSSPropertyBackgroundColor);
- itemHasCustomBackgroundColor = backgroundColor.isValid() && backgroundColor.alpha();
+ itemHasCustomBackgroundColor = backgroundColor.alpha();
+ } else {
+ itemHasCustomBackgroundColor = false;
+ }
+
// If the item has an opaque background color, return that.
if (!backgroundColor.hasAlpha()) {
itemBackgroundColor = backgroundColor;

Powered by Google App Engine
This is Rietveld 408576698