OLD | NEW |
---|---|
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 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1264 | 1264 |
1265 // Move x/y to our coordinates. | 1265 // Move x/y to our coordinates. |
1266 LayoutRect localRect(frameRect); | 1266 LayoutRect localRect(frameRect); |
1267 flipForWritingMode(localRect); | 1267 flipForWritingMode(localRect); |
1268 LayoutPoint adjustedPaintoffset = paintOffset + localRect.location(); | 1268 LayoutPoint adjustedPaintoffset = paintOffset + localRect.location(); |
1269 | 1269 |
1270 GraphicsContext* context = paintInfo.context; | 1270 GraphicsContext* context = paintInfo.context; |
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 RenderObject* o = renderer(); |
dglazkov
2013/07/19 15:09:57
Should probably use "renderer" as the member varia
| |
1275 RenderStyle* styleToUse = o->style(isFirstLineStyle()); | |
1275 if ((!parent() && isFirstLineStyle() && styleToUse != renderer()->style()) | | (parent() && renderer()->hasBoxDecorations())) { | 1276 if ((!parent() && isFirstLineStyle() && styleToUse != renderer()->style()) | | (parent() && renderer()->hasBoxDecorations())) { |
1276 LayoutRect paintRect = LayoutRect(adjustedPaintoffset, frameRect.size()) ; | 1277 LayoutRect paintRect = LayoutRect(adjustedPaintoffset, frameRect.size()) ; |
1277 // Shadow comes first and is behind the background and border. | 1278 // Shadow comes first and is behind the background and border. |
1278 if (!boxModelObject()->boxShadowShouldBeAppliedToBackground(BackgroundBl eedNone, this)) | 1279 if (!boxModelObject()->boxShadowShouldBeAppliedToBackground(BackgroundBl eedNone, this)) |
1279 paintBoxShadow(paintInfo, styleToUse, Normal, paintRect); | 1280 paintBoxShadow(paintInfo, styleToUse, Normal, paintRect); |
1280 | 1281 |
1281 Color c = styleToUse->visitedDependentColor(CSSPropertyBackgroundColor); | 1282 Color c = o->resolveColor(styleToUse, CSSPropertyBackgroundColor); |
1282 paintFillLayers(paintInfo, c, styleToUse->backgroundLayers(), paintRect) ; | 1283 paintFillLayers(paintInfo, c, styleToUse->backgroundLayers(), paintRect) ; |
1283 paintBoxShadow(paintInfo, styleToUse, Inset, paintRect); | 1284 paintBoxShadow(paintInfo, styleToUse, Inset, paintRect); |
1284 | 1285 |
1285 // :first-line cannot be used to put borders on a line. Always paint bor ders with our | 1286 // :first-line cannot be used to put borders on a line. Always paint bor ders with our |
1286 // non-first-line style. | 1287 // non-first-line style. |
1287 if (parent() && renderer()->style()->hasBorder()) { | 1288 if (parent() && renderer()->style()->hasBorder()) { |
1288 const NinePieceImage& borderImage = renderer()->style()->borderImage (); | 1289 const NinePieceImage& borderImage = renderer()->style()->borderImage (); |
1289 StyleImage* borderImageSource = borderImage.image(); | 1290 StyleImage* borderImageSource = borderImage.image(); |
1290 bool hasBorderImage = borderImageSource && borderImageSource->canRen der(renderer(), styleToUse->effectiveZoom()); | 1291 bool hasBorderImage = borderImageSource && borderImageSource->canRen der(renderer(), styleToUse->effectiveZoom()); |
1291 if (hasBorderImage && !borderImageSource->isLoaded()) | 1292 if (hasBorderImage && !borderImageSource->isLoaded()) |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1635 ASSERT(child->prevOnLine() == prev); | 1636 ASSERT(child->prevOnLine() == prev); |
1636 prev = child; | 1637 prev = child; |
1637 } | 1638 } |
1638 ASSERT(prev == m_lastChild); | 1639 ASSERT(prev == m_lastChild); |
1639 #endif | 1640 #endif |
1640 } | 1641 } |
1641 | 1642 |
1642 #endif | 1643 #endif |
1643 | 1644 |
1644 } // namespace WebCore | 1645 } // namespace WebCore |
OLD | NEW |