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 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 BackgroundBleedAvoidance RenderBox::determineBackgroundBleedAvoidance(GraphicsCo
ntext* context) const | 1120 BackgroundBleedAvoidance RenderBox::determineBackgroundBleedAvoidance(GraphicsCo
ntext* context) const |
1121 { | 1121 { |
1122 if (context->paintingDisabled()) | 1122 if (context->paintingDisabled()) |
1123 return BackgroundBleedNone; | 1123 return BackgroundBleedNone; |
1124 | 1124 |
1125 const RenderStyle* style = this->style(); | 1125 const RenderStyle* style = this->style(); |
1126 | 1126 |
1127 if (!style->hasBackground() || !style->hasBorder() || !style->hasBorderRadiu
s() || canRenderBorderImage()) | 1127 if (!style->hasBackground() || !style->hasBorder() || !style->hasBorderRadiu
s() || canRenderBorderImage()) |
1128 return BackgroundBleedNone; | 1128 return BackgroundBleedNone; |
1129 | 1129 |
| 1130 // FIXME: See crbug.com/382491. getCTM does not accurately reflect the scale
at the time content is |
| 1131 // rasterized, and should not be relied on to make decisions about bleeding. |
1130 AffineTransform ctm = context->getCTM(); | 1132 AffineTransform ctm = context->getCTM(); |
1131 FloatSize contextScaling(static_cast<float>(ctm.xScale()), static_cast<float
>(ctm.yScale())); | 1133 FloatSize contextScaling(static_cast<float>(ctm.xScale()), static_cast<float
>(ctm.yScale())); |
1132 | 1134 |
1133 // Because RoundedRect uses IntRect internally the inset applied by the | 1135 // Because RoundedRect uses IntRect internally the inset applied by the |
1134 // BackgroundBleedShrinkBackground strategy cannot be less than one integer | 1136 // BackgroundBleedShrinkBackground strategy cannot be less than one integer |
1135 // layout coordinate, even with subpixel layout enabled. To take that into | 1137 // layout coordinate, even with subpixel layout enabled. To take that into |
1136 // account, we clamp the contextScaling to 1.0 for the following test so | 1138 // account, we clamp the contextScaling to 1.0 for the following test so |
1137 // that borderObscuresBackgroundEdge can only return true if the border | 1139 // that borderObscuresBackgroundEdge can only return true if the border |
1138 // widths are greater than 2 in both layout coordinates and screen | 1140 // widths are greater than 2 in both layout coordinates and screen |
1139 // coordinates. | 1141 // coordinates. |
(...skipping 3555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4695 return 0; | 4697 return 0; |
4696 | 4698 |
4697 if (!layoutState && !flowThreadContainingBlock()) | 4699 if (!layoutState && !flowThreadContainingBlock()) |
4698 return 0; | 4700 return 0; |
4699 | 4701 |
4700 RenderBlock* containerBlock = containingBlock(); | 4702 RenderBlock* containerBlock = containingBlock(); |
4701 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); | 4703 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); |
4702 } | 4704 } |
4703 | 4705 |
4704 } // namespace WebCore | 4706 } // namespace WebCore |
OLD | NEW |