| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1160 if (style()->hasAppearance()) | 1160 if (style()->hasAppearance()) |
| 1161 theme()->paintDecorations(this, paintInfo, snappedPaintRect); | 1161 theme()->paintDecorations(this, paintInfo, snappedPaintRect); |
| 1162 } | 1162 } |
| 1163 paintBoxShadow(paintInfo, paintRect, style(), Inset); | 1163 paintBoxShadow(paintInfo, paintRect, style(), Inset); |
| 1164 | 1164 |
| 1165 // The theme will tell us whether or not we should also paint the CSS border
. | 1165 // The theme will tell us whether or not we should also paint the CSS border
. |
| 1166 if (bleedAvoidance != BackgroundBleedBackgroundOverBorder && (!style()->hasA
ppearance() || (!themePainted && theme()->paintBorderOnly(this, paintInfo, snapp
edPaintRect))) && style()->hasBorder()) | 1166 if (bleedAvoidance != BackgroundBleedBackgroundOverBorder && (!style()->hasA
ppearance() || (!themePainted && theme()->paintBorderOnly(this, paintInfo, snapp
edPaintRect))) && style()->hasBorder()) |
| 1167 paintBorder(paintInfo, paintRect, style(), bleedAvoidance); | 1167 paintBorder(paintInfo, paintRect, style(), bleedAvoidance); |
| 1168 | 1168 |
| 1169 if (bleedAvoidance == BackgroundBleedUseTransparencyLayer) | 1169 if (bleedAvoidance == BackgroundBleedUseTransparencyLayer) |
| 1170 paintInfo.context->endTransparencyLayer(); | 1170 paintInfo.context->endLayer(); |
| 1171 } | 1171 } |
| 1172 | 1172 |
| 1173 void RenderBox::paintBackground(const PaintInfo& paintInfo, const LayoutRect& pa
intRect, BackgroundBleedAvoidance bleedAvoidance) | 1173 void RenderBox::paintBackground(const PaintInfo& paintInfo, const LayoutRect& pa
intRect, BackgroundBleedAvoidance bleedAvoidance) |
| 1174 { | 1174 { |
| 1175 if (isRoot()) { | 1175 if (isRoot()) { |
| 1176 paintRootBoxFillLayers(paintInfo); | 1176 paintRootBoxFillLayers(paintInfo); |
| 1177 return; | 1177 return; |
| 1178 } | 1178 } |
| 1179 if (isBody() && skipBodyBackground(this)) | 1179 if (isBody() && skipBodyBackground(this)) |
| 1180 return; | 1180 return; |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1364 paintInfo.context->beginTransparencyLayer(1); | 1364 paintInfo.context->beginTransparencyLayer(1); |
| 1365 compositeOp = CompositeSourceOver; | 1365 compositeOp = CompositeSourceOver; |
| 1366 } | 1366 } |
| 1367 | 1367 |
| 1368 if (allMaskImagesLoaded) { | 1368 if (allMaskImagesLoaded) { |
| 1369 paintFillLayers(paintInfo, Color(), style()->maskLayers(), paintRect, Ba
ckgroundBleedNone, compositeOp); | 1369 paintFillLayers(paintInfo, Color(), style()->maskLayers(), paintRect, Ba
ckgroundBleedNone, compositeOp); |
| 1370 paintNinePieceImage(paintInfo.context, paintRect, style(), style()->mask
BoxImage(), compositeOp); | 1370 paintNinePieceImage(paintInfo.context, paintRect, style(), style()->mask
BoxImage(), compositeOp); |
| 1371 } | 1371 } |
| 1372 | 1372 |
| 1373 if (pushTransparencyLayer) | 1373 if (pushTransparencyLayer) |
| 1374 paintInfo.context->endTransparencyLayer(); | 1374 paintInfo.context->endLayer(); |
| 1375 } | 1375 } |
| 1376 | 1376 |
| 1377 LayoutRect RenderBox::maskClipRect() | 1377 LayoutRect RenderBox::maskClipRect() |
| 1378 { | 1378 { |
| 1379 const NinePieceImage& maskBoxImage = style()->maskBoxImage(); | 1379 const NinePieceImage& maskBoxImage = style()->maskBoxImage(); |
| 1380 if (maskBoxImage.image()) { | 1380 if (maskBoxImage.image()) { |
| 1381 LayoutRect borderImageRect = borderBoxRect(); | 1381 LayoutRect borderImageRect = borderBoxRect(); |
| 1382 | 1382 |
| 1383 // Apply outsets to the border box. | 1383 // Apply outsets to the border box. |
| 1384 borderImageRect.expand(style()->maskBoxImageOutsets()); | 1384 borderImageRect.expand(style()->maskBoxImageOutsets()); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1426 if (!context) | 1426 if (!context) |
| 1427 shouldDrawBackgroundInSeparateBuffer = false; | 1427 shouldDrawBackgroundInSeparateBuffer = false; |
| 1428 if (shouldDrawBackgroundInSeparateBuffer) | 1428 if (shouldDrawBackgroundInSeparateBuffer) |
| 1429 context->beginTransparencyLayer(1); | 1429 context->beginTransparencyLayer(1); |
| 1430 | 1430 |
| 1431 Vector<const FillLayer*>::const_reverse_iterator topLayer = layers.rend(); | 1431 Vector<const FillLayer*>::const_reverse_iterator topLayer = layers.rend(); |
| 1432 for (Vector<const FillLayer*>::const_reverse_iterator it = layers.rbegin();
it != topLayer; ++it) | 1432 for (Vector<const FillLayer*>::const_reverse_iterator it = layers.rbegin();
it != topLayer; ++it) |
| 1433 paintFillLayer(paintInfo, c, *it, rect, bleedAvoidance, op, backgroundOb
ject); | 1433 paintFillLayer(paintInfo, c, *it, rect, bleedAvoidance, op, backgroundOb
ject); |
| 1434 | 1434 |
| 1435 if (shouldDrawBackgroundInSeparateBuffer) | 1435 if (shouldDrawBackgroundInSeparateBuffer) |
| 1436 context->endTransparencyLayer(); | 1436 context->endLayer(); |
| 1437 } | 1437 } |
| 1438 | 1438 |
| 1439 void RenderBox::paintFillLayer(const PaintInfo& paintInfo, const Color& c, const
FillLayer* fillLayer, const LayoutRect& rect, | 1439 void RenderBox::paintFillLayer(const PaintInfo& paintInfo, const Color& c, const
FillLayer* fillLayer, const LayoutRect& rect, |
| 1440 BackgroundBleedAvoidance bleedAvoidance, CompositeOperator op, RenderObject*
backgroundObject) | 1440 BackgroundBleedAvoidance bleedAvoidance, CompositeOperator op, RenderObject*
backgroundObject) |
| 1441 { | 1441 { |
| 1442 paintFillLayerExtended(paintInfo, c, fillLayer, rect, bleedAvoidance, 0, Lay
outSize(), op, backgroundObject); | 1442 paintFillLayerExtended(paintInfo, c, fillLayer, rect, bleedAvoidance, 0, Lay
outSize(), op, backgroundObject); |
| 1443 } | 1443 } |
| 1444 | 1444 |
| 1445 static bool layersUseImage(WrappedImagePtr image, const FillLayer* layers) | 1445 static bool layersUseImage(WrappedImagePtr image, const FillLayer* layers) |
| 1446 { | 1446 { |
| (...skipping 3287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4734 } | 4734 } |
| 4735 | 4735 |
| 4736 if (didSplitParentAnonymousBoxes) | 4736 if (didSplitParentAnonymousBoxes) |
| 4737 markBoxForRelayoutAfterSplit(this); | 4737 markBoxForRelayoutAfterSplit(this); |
| 4738 | 4738 |
| 4739 ASSERT(beforeChild->parent() == this); | 4739 ASSERT(beforeChild->parent() == this); |
| 4740 return beforeChild; | 4740 return beforeChild; |
| 4741 } | 4741 } |
| 4742 | 4742 |
| 4743 } // namespace WebCore | 4743 } // namespace WebCore |
| OLD | NEW |