| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) | 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
| 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1005 RoundedRect roundedRect(pixelSnappedIntRect(innerRect)); | 1005 RoundedRect roundedRect(pixelSnappedIntRect(innerRect)); |
| 1006 | 1006 |
| 1007 if (hasBorderRadius()) { | 1007 if (hasBorderRadius()) { |
| 1008 RoundedRect::Radii radii = getRoundedBorderFor(borderRect).radii(); | 1008 RoundedRect::Radii radii = getRoundedBorderFor(borderRect).radii(); |
| 1009 radii.shrink(topWidth, bottomWidth, leftWidth, rightWidth); | 1009 radii.shrink(topWidth, bottomWidth, leftWidth, rightWidth); |
| 1010 roundedRect.includeLogicalEdges(radii, isHorizontalWritingMode(), includ
eLogicalLeftEdge, includeLogicalRightEdge); | 1010 roundedRect.includeLogicalEdges(radii, isHorizontalWritingMode(), includ
eLogicalLeftEdge, includeLogicalRightEdge); |
| 1011 } | 1011 } |
| 1012 return roundedRect; | 1012 return roundedRect; |
| 1013 } | 1013 } |
| 1014 | 1014 |
| 1015 static bool allLayersAreFixed(const FillLayer* layer) | 1015 static bool allLayersAreFixed(const FillLayer& layer) |
| 1016 { | 1016 { |
| 1017 bool allFixed = true; | 1017 for (const FillLayer* currLayer = &layer; currLayer; currLayer = currLayer->
next()) { |
| 1018 if (!currLayer->image() || currLayer->attachment() != FixedBackgroundAtt
achment) |
| 1019 return false; |
| 1020 } |
| 1018 | 1021 |
| 1019 for (const FillLayer* currLayer = layer; currLayer; currLayer = currLayer->n
ext()) | 1022 return true; |
| 1020 allFixed &= (currLayer->image() && currLayer->attachment() == FixedBackg
roundAttachment); | |
| 1021 | |
| 1022 return layer && allFixed; | |
| 1023 } | 1023 } |
| 1024 | 1024 |
| 1025 bool RenderStyle::hasEntirelyFixedBackground() const | 1025 bool RenderStyle::hasEntirelyFixedBackground() const |
| 1026 { | 1026 { |
| 1027 return allLayersAreFixed(backgroundLayers()); | 1027 return allLayersAreFixed(backgroundLayers()); |
| 1028 } | 1028 } |
| 1029 | 1029 |
| 1030 const CounterDirectiveMap* RenderStyle::counterDirectives() const | 1030 const CounterDirectiveMap* RenderStyle::counterDirectives() const |
| 1031 { | 1031 { |
| 1032 return rareNonInheritedData->m_counterDirectives.get(); | 1032 return rareNonInheritedData->m_counterDirectives.get(); |
| (...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1687 // right | 1687 // right |
| 1688 radiiSum = radii.topRight().height() + radii.bottomRight().height(); | 1688 radiiSum = radii.topRight().height() + radii.bottomRight().height(); |
| 1689 if (radiiSum > rect.height()) | 1689 if (radiiSum > rect.height()) |
| 1690 factor = std::min(rect.height() / radiiSum, factor); | 1690 factor = std::min(rect.height() / radiiSum, factor); |
| 1691 | 1691 |
| 1692 ASSERT(factor <= 1); | 1692 ASSERT(factor <= 1); |
| 1693 return factor; | 1693 return factor; |
| 1694 } | 1694 } |
| 1695 | 1695 |
| 1696 } // namespace WebCore | 1696 } // namespace WebCore |
| OLD | NEW |