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 |
873 LengthSize StyleBuilderConverter::convertRadius(StyleResolverState& state, CSSVa
lue* value) | 882 LengthSize StyleBuilderConverter::convertRadius(StyleResolverState& state, CSSVa
lue* value) |
874 { | 883 { |
875 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 884 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
876 Pair* pair = primitiveValue->getPairValue(); | 885 Pair* pair = primitiveValue->getPairValue(); |
877 Length radiusWidth = pair->first()->convertToLength<FixedIntegerConversion |
PercentConversion>(state.style(), state.rootElementStyle(), state.style()->effe
ctiveZoom()); | 886 Length radiusWidth = pair->first()->convertToLength<FixedIntegerConversion |
PercentConversion>(state.style(), state.rootElementStyle(), state.style()->effe
ctiveZoom()); |
878 Length radiusHeight = pair->second()->convertToLength<FixedIntegerConversion
| PercentConversion>(state.style(), state.rootElementStyle(), state.style()->ef
fectiveZoom()); | 887 Length radiusHeight = pair->second()->convertToLength<FixedIntegerConversion
| PercentConversion>(state.style(), state.rootElementStyle(), state.style()->ef
fectiveZoom()); |
879 float width = radiusWidth.value(); | 888 float width = radiusWidth.value(); |
880 float height = radiusHeight.value(); | 889 float height = radiusHeight.value(); |
881 ASSERT(width >= 0 && height >= 0); | 890 ASSERT(width >= 0 && height >= 0); |
882 if (width <= 0 || height <= 0) | 891 if (width <= 0 || height <= 0) |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1437 case CSSPropertyBorderImage: | 1446 case CSSPropertyBorderImage: |
1438 case CSSPropertyBorderLeft: | 1447 case CSSPropertyBorderLeft: |
1439 case CSSPropertyBorderRadius: | 1448 case CSSPropertyBorderRadius: |
1440 case CSSPropertyBorderRight: | 1449 case CSSPropertyBorderRight: |
1441 case CSSPropertyBorderSpacing: | 1450 case CSSPropertyBorderSpacing: |
1442 case CSSPropertyBorderStyle: | 1451 case CSSPropertyBorderStyle: |
1443 case CSSPropertyBorderTop: | 1452 case CSSPropertyBorderTop: |
1444 case CSSPropertyBorderWidth: | 1453 case CSSPropertyBorderWidth: |
1445 case CSSPropertyListStyle: | 1454 case CSSPropertyListStyle: |
1446 case CSSPropertyMargin: | 1455 case CSSPropertyMargin: |
| 1456 case CSSPropertyObjectPosition: |
1447 case CSSPropertyOutline: | 1457 case CSSPropertyOutline: |
1448 case CSSPropertyOverflow: | 1458 case CSSPropertyOverflow: |
1449 case CSSPropertyPadding: | 1459 case CSSPropertyPadding: |
1450 case CSSPropertyTransition: | 1460 case CSSPropertyTransition: |
1451 case CSSPropertyWebkitAnimation: | 1461 case CSSPropertyWebkitAnimation: |
1452 case CSSPropertyWebkitBorderAfter: | 1462 case CSSPropertyWebkitBorderAfter: |
1453 case CSSPropertyWebkitBorderBefore: | 1463 case CSSPropertyWebkitBorderBefore: |
1454 case CSSPropertyWebkitBorderEnd: | 1464 case CSSPropertyWebkitBorderEnd: |
1455 case CSSPropertyWebkitBorderStart: | 1465 case CSSPropertyWebkitBorderStart: |
1456 case CSSPropertyWebkitBorderRadius: | 1466 case CSSPropertyWebkitBorderRadius: |
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2386 break; | 2396 break; |
2387 } | 2397 } |
2388 case CSSPropertyEnableBackground: | 2398 case CSSPropertyEnableBackground: |
2389 // Silently ignoring this property for now | 2399 // Silently ignoring this property for now |
2390 // http://bugs.webkit.org/show_bug.cgi?id=6022 | 2400 // http://bugs.webkit.org/show_bug.cgi?id=6022 |
2391 break; | 2401 break; |
2392 } | 2402 } |
2393 } | 2403 } |
2394 | 2404 |
2395 } // namespace WebCore | 2405 } // namespace WebCore |
OLD | NEW |