| 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 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1198 } | 1198 } |
| 1199 | 1199 |
| 1200 return true; | 1200 return true; |
| 1201 } | 1201 } |
| 1202 | 1202 |
| 1203 bool ComputedStyle::hasEntirelyFixedBackground() const | 1203 bool ComputedStyle::hasEntirelyFixedBackground() const |
| 1204 { | 1204 { |
| 1205 return allLayersAreFixed(backgroundLayers()); | 1205 return allLayersAreFixed(backgroundLayers()); |
| 1206 } | 1206 } |
| 1207 | 1207 |
| 1208 static bool allLayersAreSolidColorOrLocal(const FillLayer& layer) |
| 1209 { |
| 1210 for (const FillLayer* currLayer = &layer; currLayer; currLayer = currLayer->
next()) { |
| 1211 if (currLayer->attachment() != LocalBackgroundAttachment |
| 1212 && currLayer->image()) |
| 1213 return false; |
| 1214 } |
| 1215 |
| 1216 return true; |
| 1217 } |
| 1218 |
| 1219 bool ComputedStyle::hasEntirelyLocalBackground() const |
| 1220 { |
| 1221 return allLayersAreSolidColorOrLocal(backgroundLayers()); |
| 1222 } |
| 1223 |
| 1208 const CounterDirectiveMap* ComputedStyle::counterDirectives() const | 1224 const CounterDirectiveMap* ComputedStyle::counterDirectives() const |
| 1209 { | 1225 { |
| 1210 return m_rareNonInheritedData->m_counterDirectives.get(); | 1226 return m_rareNonInheritedData->m_counterDirectives.get(); |
| 1211 } | 1227 } |
| 1212 | 1228 |
| 1213 CounterDirectiveMap& ComputedStyle::accessCounterDirectives() | 1229 CounterDirectiveMap& ComputedStyle::accessCounterDirectives() |
| 1214 { | 1230 { |
| 1215 std::unique_ptr<CounterDirectiveMap>& map = m_rareNonInheritedData.access()-
>m_counterDirectives; | 1231 std::unique_ptr<CounterDirectiveMap>& map = m_rareNonInheritedData.access()-
>m_counterDirectives; |
| 1216 if (!map) | 1232 if (!map) |
| 1217 map = wrapUnique(new CounterDirectiveMap); | 1233 map = wrapUnique(new CounterDirectiveMap); |
| (...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1958 if (value < 0) | 1974 if (value < 0) |
| 1959 fvalue -= 0.5f; | 1975 fvalue -= 0.5f; |
| 1960 else | 1976 else |
| 1961 fvalue += 0.5f; | 1977 fvalue += 0.5f; |
| 1962 } | 1978 } |
| 1963 | 1979 |
| 1964 return roundForImpreciseConversion<int>(fvalue / zoomFactor); | 1980 return roundForImpreciseConversion<int>(fvalue / zoomFactor); |
| 1965 } | 1981 } |
| 1966 | 1982 |
| 1967 } // namespace blink | 1983 } // namespace blink |
| OLD | NEW |