| 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 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1161 if (style()->hasAppearance()) | 1161 if (style()->hasAppearance()) |
| 1162 theme()->paintDecorations(this, paintInfo, snappedPaintRect); | 1162 theme()->paintDecorations(this, paintInfo, snappedPaintRect); |
| 1163 } | 1163 } |
| 1164 paintBoxShadow(paintInfo, paintRect, style(), Inset); | 1164 paintBoxShadow(paintInfo, paintRect, style(), Inset); |
| 1165 | 1165 |
| 1166 // The theme will tell us whether or not we should also paint the CSS border
. | 1166 // The theme will tell us whether or not we should also paint the CSS border
. |
| 1167 if (bleedAvoidance != BackgroundBleedBackgroundOverBorder && (!style()->hasA
ppearance() || (!themePainted && theme()->paintBorderOnly(this, paintInfo, snapp
edPaintRect))) && style()->hasBorder()) | 1167 if (bleedAvoidance != BackgroundBleedBackgroundOverBorder && (!style()->hasA
ppearance() || (!themePainted && theme()->paintBorderOnly(this, paintInfo, snapp
edPaintRect))) && style()->hasBorder()) |
| 1168 paintBorder(paintInfo, paintRect, style(), bleedAvoidance); | 1168 paintBorder(paintInfo, paintRect, style(), bleedAvoidance); |
| 1169 | 1169 |
| 1170 if (bleedAvoidance == BackgroundBleedUseTransparencyLayer) | 1170 if (bleedAvoidance == BackgroundBleedUseTransparencyLayer) |
| 1171 paintInfo.context->endTransparencyLayer(); | 1171 paintInfo.context->endLayer(); |
| 1172 } | 1172 } |
| 1173 | 1173 |
| 1174 void RenderBox::paintBackground(const PaintInfo& paintInfo, const LayoutRect& pa
intRect, BackgroundBleedAvoidance bleedAvoidance) | 1174 void RenderBox::paintBackground(const PaintInfo& paintInfo, const LayoutRect& pa
intRect, BackgroundBleedAvoidance bleedAvoidance) |
| 1175 { | 1175 { |
| 1176 if (isRoot()) { | 1176 if (isRoot()) { |
| 1177 paintRootBoxFillLayers(paintInfo); | 1177 paintRootBoxFillLayers(paintInfo); |
| 1178 return; | 1178 return; |
| 1179 } | 1179 } |
| 1180 if (isBody() && skipBodyBackground(this)) | 1180 if (isBody() && skipBodyBackground(this)) |
| 1181 return; | 1181 return; |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1365 paintInfo.context->beginTransparencyLayer(1); | 1365 paintInfo.context->beginTransparencyLayer(1); |
| 1366 compositeOp = CompositeSourceOver; | 1366 compositeOp = CompositeSourceOver; |
| 1367 } | 1367 } |
| 1368 | 1368 |
| 1369 if (allMaskImagesLoaded) { | 1369 if (allMaskImagesLoaded) { |
| 1370 paintFillLayers(paintInfo, Color(), style()->maskLayers(), paintRect, Ba
ckgroundBleedNone, compositeOp); | 1370 paintFillLayers(paintInfo, Color(), style()->maskLayers(), paintRect, Ba
ckgroundBleedNone, compositeOp); |
| 1371 paintNinePieceImage(paintInfo.context, paintRect, style(), style()->mask
BoxImage(), compositeOp); | 1371 paintNinePieceImage(paintInfo.context, paintRect, style(), style()->mask
BoxImage(), compositeOp); |
| 1372 } | 1372 } |
| 1373 | 1373 |
| 1374 if (pushTransparencyLayer) | 1374 if (pushTransparencyLayer) |
| 1375 paintInfo.context->endTransparencyLayer(); | 1375 paintInfo.context->endLayer(); |
| 1376 } | 1376 } |
| 1377 | 1377 |
| 1378 LayoutRect RenderBox::maskClipRect() | 1378 LayoutRect RenderBox::maskClipRect() |
| 1379 { | 1379 { |
| 1380 const NinePieceImage& maskBoxImage = style()->maskBoxImage(); | 1380 const NinePieceImage& maskBoxImage = style()->maskBoxImage(); |
| 1381 if (maskBoxImage.image()) { | 1381 if (maskBoxImage.image()) { |
| 1382 LayoutRect borderImageRect = borderBoxRect(); | 1382 LayoutRect borderImageRect = borderBoxRect(); |
| 1383 | 1383 |
| 1384 // Apply outsets to the border box. | 1384 // Apply outsets to the border box. |
| 1385 borderImageRect.expand(style()->maskBoxImageOutsets()); | 1385 borderImageRect.expand(style()->maskBoxImageOutsets()); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1427 if (!context) | 1427 if (!context) |
| 1428 shouldDrawBackgroundInSeparateBuffer = false; | 1428 shouldDrawBackgroundInSeparateBuffer = false; |
| 1429 if (shouldDrawBackgroundInSeparateBuffer) | 1429 if (shouldDrawBackgroundInSeparateBuffer) |
| 1430 context->beginTransparencyLayer(1); | 1430 context->beginTransparencyLayer(1); |
| 1431 | 1431 |
| 1432 Vector<const FillLayer*>::const_reverse_iterator topLayer = layers.rend(); | 1432 Vector<const FillLayer*>::const_reverse_iterator topLayer = layers.rend(); |
| 1433 for (Vector<const FillLayer*>::const_reverse_iterator it = layers.rbegin();
it != topLayer; ++it) | 1433 for (Vector<const FillLayer*>::const_reverse_iterator it = layers.rbegin();
it != topLayer; ++it) |
| 1434 paintFillLayer(paintInfo, c, *it, rect, bleedAvoidance, op, backgroundOb
ject); | 1434 paintFillLayer(paintInfo, c, *it, rect, bleedAvoidance, op, backgroundOb
ject); |
| 1435 | 1435 |
| 1436 if (shouldDrawBackgroundInSeparateBuffer) | 1436 if (shouldDrawBackgroundInSeparateBuffer) |
| 1437 context->endTransparencyLayer(); | 1437 context->endLayer(); |
| 1438 } | 1438 } |
| 1439 | 1439 |
| 1440 void RenderBox::paintFillLayer(const PaintInfo& paintInfo, const Color& c, const
FillLayer* fillLayer, const LayoutRect& rect, | 1440 void RenderBox::paintFillLayer(const PaintInfo& paintInfo, const Color& c, const
FillLayer* fillLayer, const LayoutRect& rect, |
| 1441 BackgroundBleedAvoidance bleedAvoidance, CompositeOperator op, RenderObject*
backgroundObject) | 1441 BackgroundBleedAvoidance bleedAvoidance, CompositeOperator op, RenderObject*
backgroundObject) |
| 1442 { | 1442 { |
| 1443 paintFillLayerExtended(paintInfo, c, fillLayer, rect, bleedAvoidance, 0, Lay
outSize(), op, backgroundObject); | 1443 paintFillLayerExtended(paintInfo, c, fillLayer, rect, bleedAvoidance, 0, Lay
outSize(), op, backgroundObject); |
| 1444 } | 1444 } |
| 1445 | 1445 |
| 1446 static bool layersUseImage(WrappedImagePtr image, const FillLayer* layers) | 1446 static bool layersUseImage(WrappedImagePtr image, const FillLayer* layers) |
| 1447 { | 1447 { |
| (...skipping 3287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4735 } | 4735 } |
| 4736 | 4736 |
| 4737 if (didSplitParentAnonymousBoxes) | 4737 if (didSplitParentAnonymousBoxes) |
| 4738 markBoxForRelayoutAfterSplit(this); | 4738 markBoxForRelayoutAfterSplit(this); |
| 4739 | 4739 |
| 4740 ASSERT(beforeChild->parent() == this); | 4740 ASSERT(beforeChild->parent() == this); |
| 4741 return beforeChild; | 4741 return beforeChild; |
| 4742 } | 4742 } |
| 4743 | 4743 |
| 4744 } // namespace WebCore | 4744 } // namespace WebCore |
| OLD | NEW |