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

Side by Side Diff: Source/core/rendering/RenderLayerBacking.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderInline.cpp ('k') | Source/core/rendering/RenderListBox.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 { 1085 {
1086 return hasBoxDecorations(style) || style->hasBackgroundImage(); 1086 return hasBoxDecorations(style) || style->hasBackgroundImage();
1087 } 1087 }
1088 1088
1089 Color RenderLayerBacking::rendererBackgroundColor() const 1089 Color RenderLayerBacking::rendererBackgroundColor() const
1090 { 1090 {
1091 RenderObject* backgroundRenderer = renderer(); 1091 RenderObject* backgroundRenderer = renderer();
1092 if (backgroundRenderer->isRoot()) 1092 if (backgroundRenderer->isRoot())
1093 backgroundRenderer = backgroundRenderer->rendererForRootBackground(); 1093 backgroundRenderer = backgroundRenderer->rendererForRootBackground();
1094 1094
1095 return backgroundRenderer->style()->visitedDependentColor(CSSPropertyBackgro undColor); 1095 return backgroundRenderer->resolveColor(CSSPropertyBackgroundColor);
1096 } 1096 }
1097 1097
1098 void RenderLayerBacking::updateBackgroundColor(bool isSimpleContainer) 1098 void RenderLayerBacking::updateBackgroundColor(bool isSimpleContainer)
1099 { 1099 {
1100 Color backgroundColor = rendererBackgroundColor(); 1100 Color backgroundColor = rendererBackgroundColor();
1101 if (isSimpleContainer) { 1101 if (isSimpleContainer) {
1102 m_graphicsLayer->setContentsToSolidColor(backgroundColor); 1102 m_graphicsLayer->setContentsToSolidColor(backgroundColor);
1103 m_graphicsLayer->setBackgroundColor(Color()); 1103 m_graphicsLayer->setBackgroundColor(Color());
1104 } else { 1104 } else {
1105 // An unset (invalid) color will remove the solid color. 1105 // An unset (invalid) color will remove the solid color.
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
1866 if (m_layerForVerticalScrollbar) 1866 if (m_layerForVerticalScrollbar)
1867 backingMemory += m_layerForVerticalScrollbar->backingStoreMemoryEstimate (); 1867 backingMemory += m_layerForVerticalScrollbar->backingStoreMemoryEstimate ();
1868 1868
1869 if (m_layerForScrollCorner) 1869 if (m_layerForScrollCorner)
1870 backingMemory += m_layerForScrollCorner->backingStoreMemoryEstimate(); 1870 backingMemory += m_layerForScrollCorner->backingStoreMemoryEstimate();
1871 1871
1872 return backingMemory; 1872 return backingMemory;
1873 } 1873 }
1874 1874
1875 } // namespace WebCore 1875 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderInline.cpp ('k') | Source/core/rendering/RenderListBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698