| 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 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 static bool isCandidateForOpaquenessTest(RenderBox* childBox) | 1229 static bool isCandidateForOpaquenessTest(RenderBox* childBox) |
| 1230 { | 1230 { |
| 1231 RenderStyle* childStyle = childBox->style(); | 1231 RenderStyle* childStyle = childBox->style(); |
| 1232 if (childStyle->position() != StaticPosition && childBox->containingBlock()
!= childBox->parent()) | 1232 if (childStyle->position() != StaticPosition && childBox->containingBlock()
!= childBox->parent()) |
| 1233 return false; | 1233 return false; |
| 1234 if (childStyle->visibility() != VISIBLE || childStyle->shapeOutside()) | 1234 if (childStyle->visibility() != VISIBLE || childStyle->shapeOutside()) |
| 1235 return false; | 1235 return false; |
| 1236 if (!childBox->width() || !childBox->height()) | 1236 if (!childBox->width() || !childBox->height()) |
| 1237 return false; | 1237 return false; |
| 1238 if (RenderLayer* childLayer = childBox->layer()) { | 1238 if (RenderLayer* childLayer = childBox->layer()) { |
| 1239 if (childLayer->isComposited()) | 1239 // FIXME: perhaps this could be less conservative? |
| 1240 if (childLayer->compositingState() != NotComposited) |
| 1240 return false; | 1241 return false; |
| 1241 // FIXME: Deal with z-index. | 1242 // FIXME: Deal with z-index. |
| 1242 if (!childStyle->hasAutoZIndex()) | 1243 if (!childStyle->hasAutoZIndex()) |
| 1243 return false; | 1244 return false; |
| 1244 if (childLayer->hasTransform() || childLayer->isTransparent() || childLa
yer->hasFilter()) | 1245 if (childLayer->hasTransform() || childLayer->isTransparent() || childLa
yer->hasFilter()) |
| 1245 return false; | 1246 return false; |
| 1246 } | 1247 } |
| 1247 return true; | 1248 return true; |
| 1248 } | 1249 } |
| 1249 | 1250 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1324 | 1325 |
| 1325 LayoutRect paintRect = LayoutRect(paintOffset, size()); | 1326 LayoutRect paintRect = LayoutRect(paintOffset, size()); |
| 1326 paintMaskImages(paintInfo, paintRect); | 1327 paintMaskImages(paintInfo, paintRect); |
| 1327 } | 1328 } |
| 1328 | 1329 |
| 1329 void RenderBox::paintClippingMask(PaintInfo& paintInfo, const LayoutPoint& paint
Offset) | 1330 void RenderBox::paintClippingMask(PaintInfo& paintInfo, const LayoutPoint& paint
Offset) |
| 1330 { | 1331 { |
| 1331 if (!paintInfo.shouldPaintWithinRoot(this) || style()->visibility() != VISIB
LE || paintInfo.phase != PaintPhaseClippingMask || paintInfo.context->paintingDi
sabled()) | 1332 if (!paintInfo.shouldPaintWithinRoot(this) || style()->visibility() != VISIB
LE || paintInfo.phase != PaintPhaseClippingMask || paintInfo.context->paintingDi
sabled()) |
| 1332 return; | 1333 return; |
| 1333 | 1334 |
| 1334 if (!layer() || !layer()->isComposited()) | 1335 if (!layer() || layer()->compositingState() != PaintsIntoOwnBacking) |
| 1335 return; | 1336 return; |
| 1336 | 1337 |
| 1337 LayoutRect paintRect = LayoutRect(paintOffset, size()); | 1338 LayoutRect paintRect = LayoutRect(paintOffset, size()); |
| 1338 paintInfo.context->fillRect(pixelSnappedIntRect(paintRect), Color::black); | 1339 paintInfo.context->fillRect(pixelSnappedIntRect(paintRect), Color::black); |
| 1339 } | 1340 } |
| 1340 | 1341 |
| 1341 void RenderBox::paintMaskImages(const PaintInfo& paintInfo, const LayoutRect& pa
intRect) | 1342 void RenderBox::paintMaskImages(const PaintInfo& paintInfo, const LayoutRect& pa
intRect) |
| 1342 { | 1343 { |
| 1343 // Figure out if we need to push a transparency layer to render our mask. | 1344 // Figure out if we need to push a transparency layer to render our mask. |
| 1344 bool pushTransparencyLayer = false; | 1345 bool pushTransparencyLayer = false; |
| (...skipping 3417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4762 return 0; | 4763 return 0; |
| 4763 | 4764 |
| 4764 if (!layoutState && !flowThreadContainingBlock()) | 4765 if (!layoutState && !flowThreadContainingBlock()) |
| 4765 return 0; | 4766 return 0; |
| 4766 | 4767 |
| 4767 RenderBlock* containerBlock = containingBlock(); | 4768 RenderBlock* containerBlock = containingBlock(); |
| 4768 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); | 4769 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); |
| 4769 } | 4770 } |
| 4770 | 4771 |
| 4771 } // namespace WebCore | 4772 } // namespace WebCore |
| OLD | NEW |