| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
| 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| (...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 } | 863 } |
| 864 | 864 |
| 865 Length StyleBuilderConverter::convertLengthMaxSizing(StyleResolverState& state,
CSSValue* value) | 865 Length StyleBuilderConverter::convertLengthMaxSizing(StyleResolverState& state,
CSSValue* value) |
| 866 { | 866 { |
| 867 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 867 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
| 868 if (primitiveValue->getValueID() == CSSValueNone) | 868 if (primitiveValue->getValueID() == CSSValueNone) |
| 869 return Length(Undefined); | 869 return Length(Undefined); |
| 870 return convertLengthSizing(state, value); | 870 return convertLengthSizing(state, value); |
| 871 } | 871 } |
| 872 | 872 |
| 873 LengthPoint StyleBuilderConverter::convertLengthPoint(StyleResolverState& state,
CSSValue* value) | |
| 874 { | |
| 875 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | |
| 876 Pair* pair = primitiveValue->getPairValue(); | |
| 877 Length x = pair->first()->convertToLength<FixedIntegerConversion | PercentCo
nversion>(state.style(), state.rootElementStyle(), state.style()->effectiveZoom(
)); | |
| 878 Length y = pair->second()->convertToLength<FixedIntegerConversion | PercentC
onversion>(state.style(), state.rootElementStyle(), state.style()->effectiveZoom
()); | |
| 879 return LengthPoint(x, y); | |
| 880 } | |
| 881 | |
| 882 LengthSize StyleBuilderConverter::convertRadius(StyleResolverState& state, CSSVa
lue* value) | 873 LengthSize StyleBuilderConverter::convertRadius(StyleResolverState& state, CSSVa
lue* value) |
| 883 { | 874 { |
| 884 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 875 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
| 885 Pair* pair = primitiveValue->getPairValue(); | 876 Pair* pair = primitiveValue->getPairValue(); |
| 886 Length radiusWidth = pair->first()->convertToLength<FixedIntegerConversion |
PercentConversion>(state.style(), state.rootElementStyle(), state.style()->effe
ctiveZoom()); | 877 Length radiusWidth = pair->first()->convertToLength<FixedIntegerConversion |
PercentConversion>(state.style(), state.rootElementStyle(), state.style()->effe
ctiveZoom()); |
| 887 Length radiusHeight = pair->second()->convertToLength<FixedIntegerConversion
| PercentConversion>(state.style(), state.rootElementStyle(), state.style()->ef
fectiveZoom()); | 878 Length radiusHeight = pair->second()->convertToLength<FixedIntegerConversion
| PercentConversion>(state.style(), state.rootElementStyle(), state.style()->ef
fectiveZoom()); |
| 888 float width = radiusWidth.value(); | 879 float width = radiusWidth.value(); |
| 889 float height = radiusHeight.value(); | 880 float height = radiusHeight.value(); |
| 890 ASSERT(width >= 0 && height >= 0); | 881 ASSERT(width >= 0 && height >= 0); |
| 891 if (width <= 0 || height <= 0) | 882 if (width <= 0 || height <= 0) |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1446 case CSSPropertyBorderImage: | 1437 case CSSPropertyBorderImage: |
| 1447 case CSSPropertyBorderLeft: | 1438 case CSSPropertyBorderLeft: |
| 1448 case CSSPropertyBorderRadius: | 1439 case CSSPropertyBorderRadius: |
| 1449 case CSSPropertyBorderRight: | 1440 case CSSPropertyBorderRight: |
| 1450 case CSSPropertyBorderSpacing: | 1441 case CSSPropertyBorderSpacing: |
| 1451 case CSSPropertyBorderStyle: | 1442 case CSSPropertyBorderStyle: |
| 1452 case CSSPropertyBorderTop: | 1443 case CSSPropertyBorderTop: |
| 1453 case CSSPropertyBorderWidth: | 1444 case CSSPropertyBorderWidth: |
| 1454 case CSSPropertyListStyle: | 1445 case CSSPropertyListStyle: |
| 1455 case CSSPropertyMargin: | 1446 case CSSPropertyMargin: |
| 1456 case CSSPropertyObjectPosition: | |
| 1457 case CSSPropertyOutline: | 1447 case CSSPropertyOutline: |
| 1458 case CSSPropertyOverflow: | 1448 case CSSPropertyOverflow: |
| 1459 case CSSPropertyPadding: | 1449 case CSSPropertyPadding: |
| 1460 case CSSPropertyTransition: | 1450 case CSSPropertyTransition: |
| 1461 case CSSPropertyWebkitAnimation: | 1451 case CSSPropertyWebkitAnimation: |
| 1462 case CSSPropertyWebkitBorderAfter: | 1452 case CSSPropertyWebkitBorderAfter: |
| 1463 case CSSPropertyWebkitBorderBefore: | 1453 case CSSPropertyWebkitBorderBefore: |
| 1464 case CSSPropertyWebkitBorderEnd: | 1454 case CSSPropertyWebkitBorderEnd: |
| 1465 case CSSPropertyWebkitBorderStart: | 1455 case CSSPropertyWebkitBorderStart: |
| 1466 case CSSPropertyWebkitBorderRadius: | 1456 case CSSPropertyWebkitBorderRadius: |
| (...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2395 break; | 2385 break; |
| 2396 } | 2386 } |
| 2397 case CSSPropertyEnableBackground: | 2387 case CSSPropertyEnableBackground: |
| 2398 // Silently ignoring this property for now | 2388 // Silently ignoring this property for now |
| 2399 // http://bugs.webkit.org/show_bug.cgi?id=6022 | 2389 // http://bugs.webkit.org/show_bug.cgi?id=6022 |
| 2400 break; | 2390 break; |
| 2401 } | 2391 } |
| 2402 } | 2392 } |
| 2403 | 2393 |
| 2404 } // namespace WebCore | 2394 } // namespace WebCore |
| OLD | NEW |