| 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 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1267 top = 0; | 1267 top = 0; |
| 1268 right = 0; | 1268 right = 0; |
| 1269 bottom = 0; | 1269 bottom = 0; |
| 1270 left = 0; | 1270 left = 0; |
| 1271 | 1271 |
| 1272 size_t shadowCount = shadowList ? shadowList->shadows().size() : 0; | 1272 size_t shadowCount = shadowList ? shadowList->shadows().size() : 0; |
| 1273 for (size_t i = 0; i < shadowCount; ++i) { | 1273 for (size_t i = 0; i < shadowCount; ++i) { |
| 1274 const ShadowData& shadow = shadowList->shadows()[i]; | 1274 const ShadowData& shadow = shadowList->shadows()[i]; |
| 1275 if (shadow.style() == Inset) | 1275 if (shadow.style() == Inset) |
| 1276 continue; | 1276 continue; |
| 1277 int blurAndSpread = shadow.blur() + shadow.spread(); | 1277 LayoutUnit blurAndSpread = shadow.blur() + shadow.spread(); |
| 1278 | 1278 |
| 1279 top = min<LayoutUnit>(top, shadow.y() - blurAndSpread); | 1279 top = min<LayoutUnit>(top, shadow.y() - blurAndSpread); |
| 1280 right = max<LayoutUnit>(right, shadow.x() + blurAndSpread); | 1280 right = max<LayoutUnit>(right, shadow.x() + blurAndSpread); |
| 1281 bottom = max<LayoutUnit>(bottom, shadow.y() + blurAndSpread); | 1281 bottom = max<LayoutUnit>(bottom, shadow.y() + blurAndSpread); |
| 1282 left = min<LayoutUnit>(left, shadow.x() - blurAndSpread); | 1282 left = min<LayoutUnit>(left, shadow.x() - blurAndSpread); |
| 1283 } | 1283 } |
| 1284 } | 1284 } |
| 1285 | 1285 |
| 1286 LayoutBoxExtent RenderStyle::getShadowInsetExtent(const ShadowList* shadowList)
const | 1286 LayoutBoxExtent RenderStyle::getShadowInsetExtent(const ShadowList* shadowList)
const |
| 1287 { | 1287 { |
| 1288 LayoutUnit top = 0; | 1288 LayoutUnit top = 0; |
| 1289 LayoutUnit right = 0; | 1289 LayoutUnit right = 0; |
| 1290 LayoutUnit bottom = 0; | 1290 LayoutUnit bottom = 0; |
| 1291 LayoutUnit left = 0; | 1291 LayoutUnit left = 0; |
| 1292 | 1292 |
| 1293 size_t shadowCount = shadowList ? shadowList->shadows().size() : 0; | 1293 size_t shadowCount = shadowList ? shadowList->shadows().size() : 0; |
| 1294 for (size_t i = 0; i < shadowCount; ++i) { | 1294 for (size_t i = 0; i < shadowCount; ++i) { |
| 1295 const ShadowData& shadow = shadowList->shadows()[i]; | 1295 const ShadowData& shadow = shadowList->shadows()[i]; |
| 1296 if (shadow.style() == Normal) | 1296 if (shadow.style() == Normal) |
| 1297 continue; | 1297 continue; |
| 1298 int blurAndSpread = shadow.blur() + shadow.spread(); | 1298 LayoutUnit blurAndSpread = shadow.blur() + shadow.spread(); |
| 1299 top = max<LayoutUnit>(top, shadow.y() + blurAndSpread); | 1299 top = max<LayoutUnit>(top, shadow.y() + blurAndSpread); |
| 1300 right = min<LayoutUnit>(right, shadow.x() - blurAndSpread); | 1300 right = min<LayoutUnit>(right, shadow.x() - blurAndSpread); |
| 1301 bottom = min<LayoutUnit>(bottom, shadow.y() - blurAndSpread); | 1301 bottom = min<LayoutUnit>(bottom, shadow.y() - blurAndSpread); |
| 1302 left = max<LayoutUnit>(left, shadow.x() + blurAndSpread); | 1302 left = max<LayoutUnit>(left, shadow.x() + blurAndSpread); |
| 1303 } | 1303 } |
| 1304 | 1304 |
| 1305 return LayoutBoxExtent(top, right, bottom, left); | 1305 return LayoutBoxExtent(top, right, bottom, left); |
| 1306 } | 1306 } |
| 1307 | 1307 |
| 1308 void RenderStyle::getShadowHorizontalExtent(const ShadowList* shadowList, Layout
Unit &left, LayoutUnit &right) const | 1308 void RenderStyle::getShadowHorizontalExtent(const ShadowList* shadowList, Layout
Unit &left, LayoutUnit &right) const |
| 1309 { | 1309 { |
| 1310 left = 0; | 1310 left = 0; |
| 1311 right = 0; | 1311 right = 0; |
| 1312 | 1312 |
| 1313 size_t shadowCount = shadowList ? shadowList->shadows().size() : 0; | 1313 size_t shadowCount = shadowList ? shadowList->shadows().size() : 0; |
| 1314 for (size_t i = 0; i < shadowCount; ++i) { | 1314 for (size_t i = 0; i < shadowCount; ++i) { |
| 1315 const ShadowData& shadow = shadowList->shadows()[i]; | 1315 const ShadowData& shadow = shadowList->shadows()[i]; |
| 1316 if (shadow.style() == Inset) | 1316 if (shadow.style() == Inset) |
| 1317 continue; | 1317 continue; |
| 1318 int blurAndSpread = shadow.blur() + shadow.spread(); | 1318 LayoutUnit blurAndSpread = shadow.blur() + shadow.spread(); |
| 1319 | 1319 |
| 1320 left = min<LayoutUnit>(left, shadow.x() - blurAndSpread); | 1320 left = min<LayoutUnit>(left, shadow.x() - blurAndSpread); |
| 1321 right = max<LayoutUnit>(right, shadow.x() + blurAndSpread); | 1321 right = max<LayoutUnit>(right, shadow.x() + blurAndSpread); |
| 1322 } | 1322 } |
| 1323 } | 1323 } |
| 1324 | 1324 |
| 1325 void RenderStyle::getShadowVerticalExtent(const ShadowList* shadowList, LayoutUn
it &top, LayoutUnit &bottom) const | 1325 void RenderStyle::getShadowVerticalExtent(const ShadowList* shadowList, LayoutUn
it &top, LayoutUnit &bottom) const |
| 1326 { | 1326 { |
| 1327 top = 0; | 1327 top = 0; |
| 1328 bottom = 0; | 1328 bottom = 0; |
| 1329 | 1329 |
| 1330 size_t shadowCount = shadowList ? shadowList->shadows().size() : 0; | 1330 size_t shadowCount = shadowList ? shadowList->shadows().size() : 0; |
| 1331 for (size_t i = 0; i < shadowCount; ++i) { | 1331 for (size_t i = 0; i < shadowCount; ++i) { |
| 1332 const ShadowData& shadow = shadowList->shadows()[i]; | 1332 const ShadowData& shadow = shadowList->shadows()[i]; |
| 1333 if (shadow.style() == Inset) | 1333 if (shadow.style() == Inset) |
| 1334 continue; | 1334 continue; |
| 1335 int blurAndSpread = shadow.blur() + shadow.spread(); | 1335 LayoutUnit blurAndSpread = shadow.blur() + shadow.spread(); |
| 1336 | 1336 |
| 1337 top = min<LayoutUnit>(top, shadow.y() - blurAndSpread); | 1337 top = min<LayoutUnit>(top, shadow.y() - blurAndSpread); |
| 1338 bottom = max<LayoutUnit>(bottom, shadow.y() + blurAndSpread); | 1338 bottom = max<LayoutUnit>(bottom, shadow.y() + blurAndSpread); |
| 1339 } | 1339 } |
| 1340 } | 1340 } |
| 1341 | 1341 |
| 1342 Color RenderStyle::colorIncludingFallback(int colorProperty, bool visitedLink) c
onst | 1342 Color RenderStyle::colorIncludingFallback(int colorProperty, bool visitedLink) c
onst |
| 1343 { | 1343 { |
| 1344 Color result; | 1344 Color result; |
| 1345 EBorderStyle borderStyle = BNONE; | 1345 EBorderStyle borderStyle = BNONE; |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1608 surround.access()->border.m_image.setOutset(outset); | 1608 surround.access()->border.m_image.setOutset(outset); |
| 1609 } | 1609 } |
| 1610 | 1610 |
| 1611 ShapeValue* RenderStyle::initialShapeInside() | 1611 ShapeValue* RenderStyle::initialShapeInside() |
| 1612 { | 1612 { |
| 1613 DEFINE_STATIC_REF(ShapeValue, sOutsideValue, (ShapeValue::createOutsideValue
())); | 1613 DEFINE_STATIC_REF(ShapeValue, sOutsideValue, (ShapeValue::createOutsideValue
())); |
| 1614 return sOutsideValue; | 1614 return sOutsideValue; |
| 1615 } | 1615 } |
| 1616 | 1616 |
| 1617 } // namespace WebCore | 1617 } // namespace WebCore |
| OLD | NEW |