| 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 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1261 } | 1261 } |
| 1262 | 1262 |
| 1263 return true; | 1263 return true; |
| 1264 } | 1264 } |
| 1265 | 1265 |
| 1266 bool ComputedStyle::hasEntirelyFixedBackground() const | 1266 bool ComputedStyle::hasEntirelyFixedBackground() const |
| 1267 { | 1267 { |
| 1268 return allLayersAreFixed(backgroundLayers()); | 1268 return allLayersAreFixed(backgroundLayers()); |
| 1269 } | 1269 } |
| 1270 | 1270 |
| 1271 bool ComputedStyle::hasEntirelyLocalBackground() const | |
| 1272 { | |
| 1273 const FillLayer* layer = &backgroundLayers(); | |
| 1274 for (; layer; layer = layer->next()) { | |
| 1275 if (layer->attachment() == LocalBackgroundAttachment) | |
| 1276 continue; | |
| 1277 // Solid color layers with a background clip of the padding box can be t
reated | |
| 1278 // as local. | |
| 1279 // TODO(flackr): We can handle other fill boxes with solid colors as lon
g as they | |
| 1280 // are essentially the same (i.e. PaddingFillBox == ContentFillBox when
padding = 0). | |
| 1281 if (!layer->image() && !layer->next() && layer->clip() == PaddingFillBox
) | |
| 1282 continue; | |
| 1283 return false; | |
| 1284 } | |
| 1285 return true; | |
| 1286 } | |
| 1287 | |
| 1288 const CounterDirectiveMap* ComputedStyle::counterDirectives() const | 1271 const CounterDirectiveMap* ComputedStyle::counterDirectives() const |
| 1289 { | 1272 { |
| 1290 return m_rareNonInheritedData->m_counterDirectives.get(); | 1273 return m_rareNonInheritedData->m_counterDirectives.get(); |
| 1291 } | 1274 } |
| 1292 | 1275 |
| 1293 CounterDirectiveMap& ComputedStyle::accessCounterDirectives() | 1276 CounterDirectiveMap& ComputedStyle::accessCounterDirectives() |
| 1294 { | 1277 { |
| 1295 std::unique_ptr<CounterDirectiveMap>& map = m_rareNonInheritedData.access()-
>m_counterDirectives; | 1278 std::unique_ptr<CounterDirectiveMap>& map = m_rareNonInheritedData.access()-
>m_counterDirectives; |
| 1296 if (!map) | 1279 if (!map) |
| 1297 map = wrapUnique(new CounterDirectiveMap); | 1280 map = wrapUnique(new CounterDirectiveMap); |
| (...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2058 if (value < 0) | 2041 if (value < 0) |
| 2059 fvalue -= 0.5f; | 2042 fvalue -= 0.5f; |
| 2060 else | 2043 else |
| 2061 fvalue += 0.5f; | 2044 fvalue += 0.5f; |
| 2062 } | 2045 } |
| 2063 | 2046 |
| 2064 return roundForImpreciseConversion<int>(fvalue / zoomFactor); | 2047 return roundForImpreciseConversion<int>(fvalue / zoomFactor); |
| 2065 } | 2048 } |
| 2066 | 2049 |
| 2067 } // namespace blink | 2050 } // namespace blink |
| OLD | NEW |