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

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

Issue 23581008: Revert r154797: "Move isValid/isCurrentColor from Color to StyleColor" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 996d7946293786456d2d92121ec7ade47b579826..f85491d9e53d2309644b7e4a8ff5ea752b021cb6 100644
--- a/Source/core/rendering/RenderMenuList.cpp
+++ b/Source/core/rendering/RenderMenuList.cpp
@@ -493,13 +493,9 @@ 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.alpha();
- } else {
- itemHasCustomBackgroundColor = false;
- }
-
+ itemHasCustomBackgroundColor = backgroundColor.isValid() && backgroundColor.alpha();
// If the item has an opaque background color, return that.
if (!backgroundColor.hasAlpha()) {
itemBackgroundColor = backgroundColor;

Powered by Google App Engine
This is Rietveld 408576698