| 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 23 matching lines...) Expand all Loading... |
| 34 #include "core/css/CSSFunctionValue.h" | 34 #include "core/css/CSSFunctionValue.h" |
| 35 #include "core/css/CSSGridLineNamesValue.h" | 35 #include "core/css/CSSGridLineNamesValue.h" |
| 36 #include "core/css/CSSGridTemplateAreasValue.h" | 36 #include "core/css/CSSGridTemplateAreasValue.h" |
| 37 #include "core/css/CSSPathValue.h" | 37 #include "core/css/CSSPathValue.h" |
| 38 #include "core/css/CSSPrimitiveValueMappings.h" | 38 #include "core/css/CSSPrimitiveValueMappings.h" |
| 39 #include "core/css/CSSQuadValue.h" | 39 #include "core/css/CSSQuadValue.h" |
| 40 #include "core/css/CSSReflectValue.h" | 40 #include "core/css/CSSReflectValue.h" |
| 41 #include "core/css/CSSShadowValue.h" | 41 #include "core/css/CSSShadowValue.h" |
| 42 #include "core/css/CSSTimingFunctionValue.h" | 42 #include "core/css/CSSTimingFunctionValue.h" |
| 43 #include "core/css/CSSValueList.h" | 43 #include "core/css/CSSValueList.h" |
| 44 #include "core/css/CSSValuePair.h" |
| 44 #include "core/css/CSSValuePool.h" | 45 #include "core/css/CSSValuePool.h" |
| 45 #include "core/css/Pair.h" | |
| 46 #include "core/layout/LayoutBlock.h" | 46 #include "core/layout/LayoutBlock.h" |
| 47 #include "core/layout/LayoutBox.h" | 47 #include "core/layout/LayoutBox.h" |
| 48 #include "core/layout/LayoutGrid.h" | 48 #include "core/layout/LayoutGrid.h" |
| 49 #include "core/layout/LayoutObject.h" | 49 #include "core/layout/LayoutObject.h" |
| 50 #include "core/style/ComputedStyle.h" | 50 #include "core/style/ComputedStyle.h" |
| 51 #include "core/style/ContentData.h" | 51 #include "core/style/ContentData.h" |
| 52 #include "core/style/PathStyleMotionPath.h" | 52 #include "core/style/PathStyleMotionPath.h" |
| 53 #include "core/style/QuotesData.h" | 53 #include "core/style/QuotesData.h" |
| 54 #include "core/style/ShadowList.h" | 54 #include "core/style/ShadowList.h" |
| 55 #include "platform/LengthFunctions.h" | 55 #include "platform/LengthFunctions.h" |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 static PassRefPtrWillBeRawPtr<CSSValue> valueForNinePieceImageRepeat(const NineP
ieceImage& image) | 304 static PassRefPtrWillBeRawPtr<CSSValue> valueForNinePieceImageRepeat(const NineP
ieceImage& image) |
| 305 { | 305 { |
| 306 RefPtrWillBeRawPtr<CSSPrimitiveValue> horizontalRepeat = nullptr; | 306 RefPtrWillBeRawPtr<CSSPrimitiveValue> horizontalRepeat = nullptr; |
| 307 RefPtrWillBeRawPtr<CSSPrimitiveValue> verticalRepeat = nullptr; | 307 RefPtrWillBeRawPtr<CSSPrimitiveValue> verticalRepeat = nullptr; |
| 308 | 308 |
| 309 horizontalRepeat = cssValuePool().createIdentifierValue(valueForRepeatRule(i
mage.horizontalRule())); | 309 horizontalRepeat = cssValuePool().createIdentifierValue(valueForRepeatRule(i
mage.horizontalRule())); |
| 310 if (image.horizontalRule() == image.verticalRule()) | 310 if (image.horizontalRule() == image.verticalRule()) |
| 311 verticalRepeat = horizontalRepeat; | 311 verticalRepeat = horizontalRepeat; |
| 312 else | 312 else |
| 313 verticalRepeat = cssValuePool().createIdentifierValue(valueForRepeatRule
(image.verticalRule())); | 313 verticalRepeat = cssValuePool().createIdentifierValue(valueForRepeatRule
(image.verticalRule())); |
| 314 return cssValuePool().createValue(Pair::create(horizontalRepeat.release(), v
erticalRepeat.release(), Pair::DropIdenticalValues)); | 314 return CSSValuePair::create(horizontalRepeat.release(), verticalRepeat.relea
se(), CSSValuePair::DropIdenticalValues); |
| 315 } | 315 } |
| 316 | 316 |
| 317 static PassRefPtrWillBeRawPtr<CSSValue> valueForNinePieceImage(const NinePieceIm
age& image, const ComputedStyle& style) | 317 static PassRefPtrWillBeRawPtr<CSSValue> valueForNinePieceImage(const NinePieceIm
age& image, const ComputedStyle& style) |
| 318 { | 318 { |
| 319 if (!image.hasImage()) | 319 if (!image.hasImage()) |
| 320 return cssValuePool().createIdentifierValue(CSSValueNone); | 320 return cssValuePool().createIdentifierValue(CSSValueNone); |
| 321 | 321 |
| 322 // Image first. | 322 // Image first. |
| 323 RefPtrWillBeRawPtr<CSSValue> imageValue = nullptr; | 323 RefPtrWillBeRawPtr<CSSValue> imageValue = nullptr; |
| 324 if (image.image()) | 324 if (image.image()) |
| (...skipping 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1812 case CSSPropertyMinWidth: | 1812 case CSSPropertyMinWidth: |
| 1813 if (style.minWidth().isAuto()) { | 1813 if (style.minWidth().isAuto()) { |
| 1814 if (isFlexOrGrid(styledNode->parentNode())) | 1814 if (isFlexOrGrid(styledNode->parentNode())) |
| 1815 return cssValuePool().createIdentifierValue(CSSValueAuto); | 1815 return cssValuePool().createIdentifierValue(CSSValueAuto); |
| 1816 return zoomAdjustedPixelValue(0, style); | 1816 return zoomAdjustedPixelValue(0, style); |
| 1817 } | 1817 } |
| 1818 return zoomAdjustedPixelValueForLength(style.minWidth(), style); | 1818 return zoomAdjustedPixelValueForLength(style.minWidth(), style); |
| 1819 case CSSPropertyObjectFit: | 1819 case CSSPropertyObjectFit: |
| 1820 return cssValuePool().createValue(style.objectFit()); | 1820 return cssValuePool().createValue(style.objectFit()); |
| 1821 case CSSPropertyObjectPosition: | 1821 case CSSPropertyObjectPosition: |
| 1822 return cssValuePool().createValue( | 1822 return CSSValuePair::create( |
| 1823 Pair::create( | 1823 zoomAdjustedPixelValueForLength(style.objectPosition().x(), style), |
| 1824 zoomAdjustedPixelValueForLength(style.objectPosition().x(), styl
e), | 1824 zoomAdjustedPixelValueForLength(style.objectPosition().y(), style), |
| 1825 zoomAdjustedPixelValueForLength(style.objectPosition().y(), styl
e), | 1825 CSSValuePair::KeepIdenticalValues); |
| 1826 Pair::KeepIdenticalValues)); | |
| 1827 case CSSPropertyOpacity: | 1826 case CSSPropertyOpacity: |
| 1828 return cssValuePool().createValue(style.opacity(), CSSPrimitiveValue::Un
itType::Number); | 1827 return cssValuePool().createValue(style.opacity(), CSSPrimitiveValue::Un
itType::Number); |
| 1829 case CSSPropertyOrphans: | 1828 case CSSPropertyOrphans: |
| 1830 if (style.hasAutoOrphans()) | 1829 if (style.hasAutoOrphans()) |
| 1831 return cssValuePool().createIdentifierValue(CSSValueAuto); | 1830 return cssValuePool().createIdentifierValue(CSSValueAuto); |
| 1832 return cssValuePool().createValue(style.orphans(), CSSPrimitiveValue::Un
itType::Number); | 1831 return cssValuePool().createValue(style.orphans(), CSSPrimitiveValue::Un
itType::Number); |
| 1833 case CSSPropertyOutlineColor: | 1832 case CSSPropertyOutlineColor: |
| 1834 return allowVisitedStyle ? cssValuePool().createColorValue(style.visited
DependentColor(CSSPropertyOutlineColor).rgb()) : currentColorOrValidColor(style,
style.outlineColor()); | 1833 return allowVisitedStyle ? cssValuePool().createColorValue(style.visited
DependentColor(CSSPropertyOutlineColor).rgb()) : currentColorOrValidColor(style,
style.outlineColor()); |
| 1835 case CSSPropertyOutlineOffset: | 1834 case CSSPropertyOutlineOffset: |
| 1836 return zoomAdjustedPixelValue(style.outlineOffset(), style); | 1835 return zoomAdjustedPixelValue(style.outlineOffset(), style); |
| (...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2674 case CSSPropertyAll: | 2673 case CSSPropertyAll: |
| 2675 return nullptr; | 2674 return nullptr; |
| 2676 default: | 2675 default: |
| 2677 break; | 2676 break; |
| 2678 } | 2677 } |
| 2679 ASSERT_NOT_REACHED(); | 2678 ASSERT_NOT_REACHED(); |
| 2680 return nullptr; | 2679 return nullptr; |
| 2681 } | 2680 } |
| 2682 | 2681 |
| 2683 } | 2682 } |
| OLD | NEW |