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

Side by Side Diff: Source/core/rendering/InlineFlowBox.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/EllipsisBox.cpp ('k') | Source/core/rendering/InlineTextBox.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) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1271 1271
1272 // You can use p::first-line to specify a background. If so, the root line b oxes for 1272 // You can use p::first-line to specify a background. If so, the root line b oxes for
1273 // a line may actually have to paint a background. 1273 // a line may actually have to paint a background.
1274 RenderStyle* styleToUse = renderer()->style(isFirstLineStyle()); 1274 RenderStyle* styleToUse = renderer()->style(isFirstLineStyle());
1275 if ((!parent() && isFirstLineStyle() && styleToUse != renderer()->style()) | | (parent() && renderer()->hasBoxDecorations())) { 1275 if ((!parent() && isFirstLineStyle() && styleToUse != renderer()->style()) | | (parent() && renderer()->hasBoxDecorations())) {
1276 LayoutRect paintRect = LayoutRect(adjustedPaintoffset, frameRect.size()) ; 1276 LayoutRect paintRect = LayoutRect(adjustedPaintoffset, frameRect.size()) ;
1277 // Shadow comes first and is behind the background and border. 1277 // Shadow comes first and is behind the background and border.
1278 if (!boxModelObject()->boxShadowShouldBeAppliedToBackground(BackgroundBl eedNone, this)) 1278 if (!boxModelObject()->boxShadowShouldBeAppliedToBackground(BackgroundBl eedNone, this))
1279 paintBoxShadow(paintInfo, styleToUse, Normal, paintRect); 1279 paintBoxShadow(paintInfo, styleToUse, Normal, paintRect);
1280 1280
1281 Color c = styleToUse->visitedDependentColor(CSSPropertyBackgroundColor); 1281 Color c = renderer()->resolveColor(styleToUse, CSSPropertyBackgroundColo r);
1282 paintFillLayers(paintInfo, c, styleToUse->backgroundLayers(), paintRect) ; 1282 paintFillLayers(paintInfo, c, styleToUse->backgroundLayers(), paintRect) ;
1283 paintBoxShadow(paintInfo, styleToUse, Inset, paintRect); 1283 paintBoxShadow(paintInfo, styleToUse, Inset, paintRect);
1284 1284
1285 // :first-line cannot be used to put borders on a line. Always paint bor ders with our 1285 // :first-line cannot be used to put borders on a line. Always paint bor ders with our
1286 // non-first-line style. 1286 // non-first-line style.
1287 if (parent() && renderer()->style()->hasBorder()) { 1287 if (parent() && renderer()->style()->hasBorder()) {
1288 const NinePieceImage& borderImage = renderer()->style()->borderImage (); 1288 const NinePieceImage& borderImage = renderer()->style()->borderImage ();
1289 StyleImage* borderImageSource = borderImage.image(); 1289 StyleImage* borderImageSource = borderImage.image();
1290 bool hasBorderImage = borderImageSource && borderImageSource->canRen der(renderer(), styleToUse->effectiveZoom()); 1290 bool hasBorderImage = borderImageSource && borderImageSource->canRen der(renderer(), styleToUse->effectiveZoom());
1291 if (hasBorderImage && !borderImageSource->isLoaded()) 1291 if (hasBorderImage && !borderImageSource->isLoaded())
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1635 ASSERT(child->prevOnLine() == prev); 1635 ASSERT(child->prevOnLine() == prev);
1636 prev = child; 1636 prev = child;
1637 } 1637 }
1638 ASSERT(prev == m_lastChild); 1638 ASSERT(prev == m_lastChild);
1639 #endif 1639 #endif
1640 } 1640 }
1641 1641
1642 #endif 1642 #endif
1643 1643
1644 } // namespace WebCore 1644 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/EllipsisBox.cpp ('k') | Source/core/rendering/InlineTextBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698