OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> | 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. | 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. |
7 * Copyright (C) 2015 Google Inc. All rights reserved. | 7 * Copyright (C) 2015 Google Inc. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Lesser General Public | 10 * modify it under the terms of the GNU Lesser General Public |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #include "core/css/CSSURIValue.h" | 46 #include "core/css/CSSURIValue.h" |
47 #include "core/css/CSSValueList.h" | 47 #include "core/css/CSSValueList.h" |
48 #include "core/css/CSSValuePair.h" | 48 #include "core/css/CSSValuePair.h" |
49 #include "core/css/CSSValuePool.h" | 49 #include "core/css/CSSValuePool.h" |
50 #include "core/layout/LayoutBlock.h" | 50 #include "core/layout/LayoutBlock.h" |
51 #include "core/layout/LayoutBox.h" | 51 #include "core/layout/LayoutBox.h" |
52 #include "core/layout/LayoutGrid.h" | 52 #include "core/layout/LayoutGrid.h" |
53 #include "core/layout/LayoutObject.h" | 53 #include "core/layout/LayoutObject.h" |
54 #include "core/style/ComputedStyle.h" | 54 #include "core/style/ComputedStyle.h" |
55 #include "core/style/ContentData.h" | 55 #include "core/style/ContentData.h" |
56 #include "core/style/PathStyleMotionPath.h" | |
57 #include "core/style/QuotesData.h" | 56 #include "core/style/QuotesData.h" |
58 #include "core/style/ShadowList.h" | 57 #include "core/style/ShadowList.h" |
59 #include "core/style/StyleVariableData.h" | 58 #include "core/style/StyleVariableData.h" |
60 #include "core/svg/SVGPathUtilities.h" | |
61 #include "platform/LengthFunctions.h" | 59 #include "platform/LengthFunctions.h" |
62 | 60 |
63 namespace blink { | 61 namespace blink { |
64 | 62 |
65 inline static bool isFlexOrGrid(const ComputedStyle* style) | 63 inline static bool isFlexOrGrid(const ComputedStyle* style) |
66 { | 64 { |
67 return style && style->isDisplayFlexibleOrGridBox(); | 65 return style && style->isDisplayFlexibleOrGridBox(); |
68 } | 66 } |
69 | 67 |
70 inline static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> zoomAdjustedPixelValue(d
ouble value, const ComputedStyle& style) | 68 inline static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> zoomAdjustedPixelValue(d
ouble value, const ComputedStyle& style) |
(...skipping 2374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2445 case CSSPropertyPadding: | 2443 case CSSPropertyPadding: |
2446 return valuesForSidesShorthand(paddingShorthand(), style, layoutObject,
styledNode, allowVisitedStyle); | 2444 return valuesForSidesShorthand(paddingShorthand(), style, layoutObject,
styledNode, allowVisitedStyle); |
2447 // Individual properties not part of the spec. | 2445 // Individual properties not part of the spec. |
2448 case CSSPropertyBackgroundRepeatX: | 2446 case CSSPropertyBackgroundRepeatX: |
2449 case CSSPropertyBackgroundRepeatY: | 2447 case CSSPropertyBackgroundRepeatY: |
2450 return nullptr; | 2448 return nullptr; |
2451 | 2449 |
2452 case CSSPropertyMotion: | 2450 case CSSPropertyMotion: |
2453 return valuesForShorthandProperty(motionShorthand(), style, layoutObject
, styledNode, allowVisitedStyle); | 2451 return valuesForShorthandProperty(motionShorthand(), style, layoutObject
, styledNode, allowVisitedStyle); |
2454 | 2452 |
2455 case CSSPropertyMotionPath: { | 2453 case CSSPropertyMotionPath: |
2456 const StyleMotionPath* styleMotionPath = style.motionPath(); | 2454 if (const StylePath* styleMotionPath = style.motionPath()) |
2457 if (!styleMotionPath) | 2455 return styleMotionPath->computedCSSValue(); |
2458 return cssValuePool().createIdentifierValue(CSSValueNone); | 2456 return cssValuePool().createIdentifierValue(CSSValueNone); |
2459 | |
2460 ASSERT(styleMotionPath->isPathStyleMotionPath()); | |
2461 return CSSPathValue::create(toPathStyleMotionPath(styleMotionPath)->path
String()); | |
2462 } | |
2463 | 2457 |
2464 case CSSPropertyMotionOffset: | 2458 case CSSPropertyMotionOffset: |
2465 return zoomAdjustedPixelValueForLength(style.motionOffset(), style); | 2459 return zoomAdjustedPixelValueForLength(style.motionOffset(), style); |
2466 | 2460 |
2467 case CSSPropertyMotionRotation: { | 2461 case CSSPropertyMotionRotation: { |
2468 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparat
ed(); | 2462 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparat
ed(); |
2469 if (style.motionRotation().type == MotionRotationAuto) | 2463 if (style.motionRotation().type == MotionRotationAuto) |
2470 list->append(cssValuePool().createIdentifierValue(CSSValueAuto)); | 2464 list->append(cssValuePool().createIdentifierValue(CSSValueAuto)); |
2471 list->append(cssValuePool().createValue(style.motionRotation().angle, CS
SPrimitiveValue::UnitType::Degrees)); | 2465 list->append(cssValuePool().createValue(style.motionRotation().angle, CS
SPrimitiveValue::UnitType::Degrees)); |
2472 return list.release(); | 2466 return list.release(); |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2735 case CSSPropertyAll: | 2729 case CSSPropertyAll: |
2736 return nullptr; | 2730 return nullptr; |
2737 default: | 2731 default: |
2738 break; | 2732 break; |
2739 } | 2733 } |
2740 ASSERT_NOT_REACHED(); | 2734 ASSERT_NOT_REACHED(); |
2741 return nullptr; | 2735 return nullptr; |
2742 } | 2736 } |
2743 | 2737 |
2744 } // namespace blink | 2738 } // namespace blink |
OLD | NEW |