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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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" | 56 #include "core/style/PathStyleMotionPath.h" |
57 #include "core/style/QuotesData.h" | 57 #include "core/style/QuotesData.h" |
58 #include "core/style/ShadowList.h" | 58 #include "core/style/ShadowList.h" |
| 59 #include "core/svg/SVGPathUtilities.h" |
59 #include "platform/LengthFunctions.h" | 60 #include "platform/LengthFunctions.h" |
60 | 61 |
61 namespace blink { | 62 namespace blink { |
62 | 63 |
63 inline static bool isFlexOrGrid(const ComputedStyle* style) | 64 inline static bool isFlexOrGrid(const ComputedStyle* style) |
64 { | 65 { |
65 return style && style->isDisplayFlexibleOrGridBox(); | 66 return style && style->isDisplayFlexibleOrGridBox(); |
66 } | 67 } |
67 | 68 |
68 inline static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> zoomAdjustedPixelValue(d
ouble value, const ComputedStyle& style) | 69 inline static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> zoomAdjustedPixelValue(d
ouble value, const ComputedStyle& style) |
(...skipping 2529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2598 return CSSPrimitiveValue::create(svgStyle.bufferedRendering()); | 2599 return CSSPrimitiveValue::create(svgStyle.bufferedRendering()); |
2599 case CSSPropertyPaintOrder: | 2600 case CSSPropertyPaintOrder: |
2600 return paintOrderToCSSValueList(svgStyle); | 2601 return paintOrderToCSSValueList(svgStyle); |
2601 case CSSPropertyVectorEffect: | 2602 case CSSPropertyVectorEffect: |
2602 return CSSPrimitiveValue::create(svgStyle.vectorEffect()); | 2603 return CSSPrimitiveValue::create(svgStyle.vectorEffect()); |
2603 case CSSPropertyMaskType: | 2604 case CSSPropertyMaskType: |
2604 return CSSPrimitiveValue::create(svgStyle.maskType()); | 2605 return CSSPrimitiveValue::create(svgStyle.maskType()); |
2605 case CSSPropertyMarker: | 2606 case CSSPropertyMarker: |
2606 // the above properties are not yet implemented in the engine | 2607 // the above properties are not yet implemented in the engine |
2607 return nullptr; | 2608 return nullptr; |
| 2609 case CSSPropertyD: { |
| 2610 String pathString; |
| 2611 if (svgStyle.d()) |
| 2612 pathString = buildStringFromByteStream(*svgStyle.d(), UnalteredParsi
ng); |
| 2613 return CSSStringValue::create(pathString); |
| 2614 } |
2608 case CSSPropertyCx: | 2615 case CSSPropertyCx: |
2609 return zoomAdjustedPixelValueForLength(svgStyle.cx(), style); | 2616 return zoomAdjustedPixelValueForLength(svgStyle.cx(), style); |
2610 case CSSPropertyCy: | 2617 case CSSPropertyCy: |
2611 return zoomAdjustedPixelValueForLength(svgStyle.cy(), style); | 2618 return zoomAdjustedPixelValueForLength(svgStyle.cy(), style); |
2612 case CSSPropertyX: | 2619 case CSSPropertyX: |
2613 return zoomAdjustedPixelValueForLength(svgStyle.x(), style); | 2620 return zoomAdjustedPixelValueForLength(svgStyle.x(), style); |
2614 case CSSPropertyY: | 2621 case CSSPropertyY: |
2615 return zoomAdjustedPixelValueForLength(svgStyle.y(), style); | 2622 return zoomAdjustedPixelValueForLength(svgStyle.y(), style); |
2616 case CSSPropertyR: | 2623 case CSSPropertyR: |
2617 return zoomAdjustedPixelValueForLength(svgStyle.r(), style); | 2624 return zoomAdjustedPixelValueForLength(svgStyle.r(), style); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2686 case CSSPropertyAll: | 2693 case CSSPropertyAll: |
2687 return nullptr; | 2694 return nullptr; |
2688 default: | 2695 default: |
2689 break; | 2696 break; |
2690 } | 2697 } |
2691 ASSERT_NOT_REACHED(); | 2698 ASSERT_NOT_REACHED(); |
2692 return nullptr; | 2699 return nullptr; |
2693 } | 2700 } |
2694 | 2701 |
2695 } | 2702 } |
OLD | NEW |