| 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 21 matching lines...) Expand all Loading... |
| 32 #include "core/css/CSSCounterValue.h" | 32 #include "core/css/CSSCounterValue.h" |
| 33 #include "core/css/CSSFontFeatureValue.h" | 33 #include "core/css/CSSFontFeatureValue.h" |
| 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/CSSStringValueBase.h" |
| 42 #include "core/css/CSSTimingFunctionValue.h" | 43 #include "core/css/CSSTimingFunctionValue.h" |
| 43 #include "core/css/CSSValueList.h" | 44 #include "core/css/CSSValueList.h" |
| 44 #include "core/css/CSSValuePair.h" | 45 #include "core/css/CSSValuePair.h" |
| 45 #include "core/css/CSSValuePool.h" | 46 #include "core/css/CSSValuePool.h" |
| 46 #include "core/layout/LayoutBlock.h" | 47 #include "core/layout/LayoutBlock.h" |
| 47 #include "core/layout/LayoutBox.h" | 48 #include "core/layout/LayoutBox.h" |
| 48 #include "core/layout/LayoutGrid.h" | 49 #include "core/layout/LayoutGrid.h" |
| 49 #include "core/layout/LayoutObject.h" | 50 #include "core/layout/LayoutObject.h" |
| 50 #include "core/style/ComputedStyle.h" | 51 #include "core/style/ComputedStyle.h" |
| 51 #include "core/style/ContentData.h" | 52 #include "core/style/ContentData.h" |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 return CSSValueMonospace; | 484 return CSSValueMonospace; |
| 484 if (family == FontFamilyNames::webkit_pictograph) | 485 if (family == FontFamilyNames::webkit_pictograph) |
| 485 return CSSValueWebkitPictograph; | 486 return CSSValueWebkitPictograph; |
| 486 if (family == FontFamilyNames::webkit_sans_serif) | 487 if (family == FontFamilyNames::webkit_sans_serif) |
| 487 return CSSValueSansSerif; | 488 return CSSValueSansSerif; |
| 488 if (family == FontFamilyNames::webkit_serif) | 489 if (family == FontFamilyNames::webkit_serif) |
| 489 return CSSValueSerif; | 490 return CSSValueSerif; |
| 490 return CSSValueInvalid; | 491 return CSSValueInvalid; |
| 491 } | 492 } |
| 492 | 493 |
| 493 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForFamily(const AtomicStri
ng& family) | 494 static PassRefPtrWillBeRawPtr<CSSValue> valueForFamily(const AtomicString& famil
y) |
| 494 { | 495 { |
| 495 if (CSSValueID familyIdentifier = identifierForFamily(family)) | 496 if (CSSValueID familyIdentifier = identifierForFamily(family)) |
| 496 return cssValuePool().createIdentifierValue(familyIdentifier); | 497 return cssValuePool().createIdentifierValue(familyIdentifier); |
| 497 return cssValuePool().createValue(family.string(), CSSPrimitiveValue::UnitTy
pe::CustomIdentifier); | 498 return CSSCustomIdentValue::create(family.string()); |
| 498 } | 499 } |
| 499 | 500 |
| 500 static PassRefPtrWillBeRawPtr<CSSValueList> valueForFontFamily(const ComputedSty
le& style) | 501 static PassRefPtrWillBeRawPtr<CSSValueList> valueForFontFamily(const ComputedSty
le& style) |
| 501 { | 502 { |
| 502 const FontFamily& firstFamily = style.fontDescription().family(); | 503 const FontFamily& firstFamily = style.fontDescription().family(); |
| 503 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated()
; | 504 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated()
; |
| 504 for (const FontFamily* family = &firstFamily; family; family = family->next(
)) | 505 for (const FontFamily* family = &firstFamily; family; family = family->next(
)) |
| 505 list->append(valueForFamily(family->family())); | 506 list->append(valueForFamily(family->family())); |
| 506 return list.release(); | 507 return list.release(); |
| 507 } | 508 } |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 } | 559 } |
| 559 | 560 |
| 560 static void addValuesForNamedGridLinesAtIndex(const OrderedNamedGridLines& order
edNamedGridLines, size_t i, CSSValueList& list) | 561 static void addValuesForNamedGridLinesAtIndex(const OrderedNamedGridLines& order
edNamedGridLines, size_t i, CSSValueList& list) |
| 561 { | 562 { |
| 562 const Vector<String>& namedGridLines = orderedNamedGridLines.get(i); | 563 const Vector<String>& namedGridLines = orderedNamedGridLines.get(i); |
| 563 if (namedGridLines.isEmpty()) | 564 if (namedGridLines.isEmpty()) |
| 564 return; | 565 return; |
| 565 | 566 |
| 566 RefPtrWillBeRawPtr<CSSGridLineNamesValue> lineNames = CSSGridLineNamesValue:
:create(); | 567 RefPtrWillBeRawPtr<CSSGridLineNamesValue> lineNames = CSSGridLineNamesValue:
:create(); |
| 567 for (size_t j = 0; j < namedGridLines.size(); ++j) | 568 for (size_t j = 0; j < namedGridLines.size(); ++j) |
| 568 lineNames->append(cssValuePool().createValue(namedGridLines[j], CSSPrimi
tiveValue::UnitType::CustomIdentifier)); | 569 lineNames->append(CSSCustomIdentValue::create(namedGridLines[j])); |
| 569 list.append(lineNames.release()); | 570 list.append(lineNames.release()); |
| 570 } | 571 } |
| 571 | 572 |
| 572 static PassRefPtrWillBeRawPtr<CSSValue> valueForGridTrackList(GridTrackSizingDir
ection direction, const LayoutObject* layoutObject, const ComputedStyle& style) | 573 static PassRefPtrWillBeRawPtr<CSSValue> valueForGridTrackList(GridTrackSizingDir
ection direction, const LayoutObject* layoutObject, const ComputedStyle& style) |
| 573 { | 574 { |
| 574 const Vector<GridTrackSize>& trackSizes = direction == ForColumns ? style.gr
idTemplateColumns() : style.gridTemplateRows(); | 575 const Vector<GridTrackSize>& trackSizes = direction == ForColumns ? style.gr
idTemplateColumns() : style.gridTemplateRows(); |
| 575 const OrderedNamedGridLines& orderedNamedGridLines = direction == ForColumns
? style.orderedNamedGridColumnLines() : style.orderedNamedGridRowLines(); | 576 const OrderedNamedGridLines& orderedNamedGridLines = direction == ForColumns
? style.orderedNamedGridColumnLines() : style.orderedNamedGridRowLines(); |
| 576 bool isLayoutGrid = layoutObject && layoutObject->isLayoutGrid(); | 577 bool isLayoutGrid = layoutObject && layoutObject->isLayoutGrid(); |
| 577 | 578 |
| 578 // Handle the 'none' case. | 579 // Handle the 'none' case. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 addValuesForNamedGridLinesAtIndex(orderedNamedGridLines, insertionIndex, *li
st); | 614 addValuesForNamedGridLinesAtIndex(orderedNamedGridLines, insertionIndex, *li
st); |
| 614 return list.release(); | 615 return list.release(); |
| 615 } | 616 } |
| 616 | 617 |
| 617 static PassRefPtrWillBeRawPtr<CSSValue> valueForGridPosition(const GridPosition&
position) | 618 static PassRefPtrWillBeRawPtr<CSSValue> valueForGridPosition(const GridPosition&
position) |
| 618 { | 619 { |
| 619 if (position.isAuto()) | 620 if (position.isAuto()) |
| 620 return cssValuePool().createIdentifierValue(CSSValueAuto); | 621 return cssValuePool().createIdentifierValue(CSSValueAuto); |
| 621 | 622 |
| 622 if (position.isNamedGridArea()) | 623 if (position.isNamedGridArea()) |
| 623 return cssValuePool().createValue(position.namedGridLine(), CSSPrimitive
Value::UnitType::CustomIdentifier); | 624 return CSSCustomIdentValue::create(position.namedGridLine()); |
| 624 | 625 |
| 625 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; | 626 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; |
| 626 if (position.isSpan()) { | 627 if (position.isSpan()) { |
| 627 list->append(cssValuePool().createIdentifierValue(CSSValueSpan)); | 628 list->append(cssValuePool().createIdentifierValue(CSSValueSpan)); |
| 628 list->append(cssValuePool().createValue(position.spanPosition(), CSSPrim
itiveValue::UnitType::Number)); | 629 list->append(cssValuePool().createValue(position.spanPosition(), CSSPrim
itiveValue::UnitType::Number)); |
| 629 } else { | 630 } else { |
| 630 list->append(cssValuePool().createValue(position.integerPosition(), CSSP
rimitiveValue::UnitType::Number)); | 631 list->append(cssValuePool().createValue(position.integerPosition(), CSSP
rimitiveValue::UnitType::Number)); |
| 631 } | 632 } |
| 632 | 633 |
| 633 if (!position.namedGridLine().isNull()) | 634 if (!position.namedGridLine().isNull()) |
| 634 list->append(cssValuePool().createValue(position.namedGridLine(), CSSPri
mitiveValue::UnitType::CustomIdentifier)); | 635 list->append(CSSCustomIdentValue::create(position.namedGridLine())); |
| 635 return list; | 636 return list; |
| 636 } | 637 } |
| 637 | 638 |
| 638 static LayoutRect sizingBox(const LayoutObject* layoutObject) | 639 static LayoutRect sizingBox(const LayoutObject* layoutObject) |
| 639 { | 640 { |
| 640 if (!layoutObject->isBox()) | 641 if (!layoutObject->isBox()) |
| 641 return LayoutRect(); | 642 return LayoutRect(); |
| 642 | 643 |
| 643 const LayoutBox* box = toLayoutBox(layoutObject); | 644 const LayoutBox* box = toLayoutBox(layoutObject); |
| 644 return box->style()->boxSizing() == BORDER_BOX ? box->borderBoxRect() : box-
>computedCSSContentBoxRect(); | 645 return box->style()->boxSizing() == BORDER_BOX ? box->borderBoxRect() : box-
>computedCSSContentBoxRect(); |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 list->append(valueForMatrixTransform(transform, style)); | 935 list->append(valueForMatrixTransform(transform, style)); |
| 935 | 936 |
| 936 return list.release(); | 937 return list.release(); |
| 937 } | 938 } |
| 938 | 939 |
| 939 static PassRefPtrWillBeRawPtr<CSSValue> createTransitionPropertyValue(const CSST
ransitionData::TransitionProperty& property) | 940 static PassRefPtrWillBeRawPtr<CSSValue> createTransitionPropertyValue(const CSST
ransitionData::TransitionProperty& property) |
| 940 { | 941 { |
| 941 if (property.propertyType == CSSTransitionData::TransitionNone) | 942 if (property.propertyType == CSSTransitionData::TransitionNone) |
| 942 return cssValuePool().createIdentifierValue(CSSValueNone); | 943 return cssValuePool().createIdentifierValue(CSSValueNone); |
| 943 if (property.propertyType == CSSTransitionData::TransitionUnknownProperty) | 944 if (property.propertyType == CSSTransitionData::TransitionUnknownProperty) |
| 944 return cssValuePool().createValue(property.propertyString, CSSPrimitiveV
alue::UnitType::CustomIdentifier); | 945 return CSSCustomIdentValue::create(property.propertyString); |
| 945 ASSERT(property.propertyType == CSSTransitionData::TransitionKnownProperty); | 946 ASSERT(property.propertyType == CSSTransitionData::TransitionKnownProperty); |
| 946 return cssValuePool().createValue(getPropertyNameString(property.unresolvedP
roperty), CSSPrimitiveValue::UnitType::CustomIdentifier); | 947 return CSSCustomIdentValue::create(getPropertyNameString(property.unresolved
Property)); |
| 947 } | 948 } |
| 948 | 949 |
| 949 static PassRefPtrWillBeRawPtr<CSSValue> valueForTransitionProperty(const CSSTran
sitionData* transitionData) | 950 static PassRefPtrWillBeRawPtr<CSSValue> valueForTransitionProperty(const CSSTran
sitionData* transitionData) |
| 950 { | 951 { |
| 951 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated()
; | 952 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated()
; |
| 952 if (transitionData) { | 953 if (transitionData) { |
| 953 for (size_t i = 0; i < transitionData->propertyList().size(); ++i) | 954 for (size_t i = 0; i < transitionData->propertyList().size(); ++i) |
| 954 list->append(createTransitionPropertyValue(transitionData->propertyL
ist()[i])); | 955 list->append(createTransitionPropertyValue(transitionData->propertyL
ist()[i])); |
| 955 } else { | 956 } else { |
| 956 list->append(cssValuePool().createIdentifierValue(CSSValueAll)); | 957 list->append(cssValuePool().createIdentifierValue(CSSValueAll)); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 974 return CSSValueInvalid; | 975 return CSSValueInvalid; |
| 975 } | 976 } |
| 976 | 977 |
| 977 static PassRefPtrWillBeRawPtr<CSSValue> valueForContentData(const ComputedStyle&
style) | 978 static PassRefPtrWillBeRawPtr<CSSValue> valueForContentData(const ComputedStyle&
style) |
| 978 { | 979 { |
| 979 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; | 980 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; |
| 980 for (const ContentData* contentData = style.contentData(); contentData; cont
entData = contentData->next()) { | 981 for (const ContentData* contentData = style.contentData(); contentData; cont
entData = contentData->next()) { |
| 981 if (contentData->isCounter()) { | 982 if (contentData->isCounter()) { |
| 982 const CounterContent* counter = toCounterContentData(contentData)->c
ounter(); | 983 const CounterContent* counter = toCounterContentData(contentData)->c
ounter(); |
| 983 ASSERT(counter); | 984 ASSERT(counter); |
| 984 RefPtrWillBeRawPtr<CSSPrimitiveValue> identifier = cssValuePool().cr
eateValue(counter->identifier(), CSSPrimitiveValue::UnitType::CustomIdentifier); | 985 RefPtrWillBeRawPtr<CSSCustomIdentValue> identifier = CSSCustomIdentV
alue::create(counter->identifier()); |
| 985 RefPtrWillBeRawPtr<CSSPrimitiveValue> separator = cssValuePool().cre
ateValue(counter->separator(), CSSPrimitiveValue::UnitType::CustomIdentifier); | 986 RefPtrWillBeRawPtr<CSSCustomIdentValue> separator = CSSCustomIdentVa
lue::create(counter->separator()); |
| 986 CSSValueID listStyleIdent = CSSValueNone; | 987 CSSValueID listStyleIdent = CSSValueNone; |
| 987 if (counter->listStyle() != NoneListStyle) | 988 if (counter->listStyle() != NoneListStyle) |
| 988 listStyleIdent = static_cast<CSSValueID>(CSSValueDisc + counter-
>listStyle()); | 989 listStyleIdent = static_cast<CSSValueID>(CSSValueDisc + counter-
>listStyle()); |
| 989 RefPtrWillBeRawPtr<CSSPrimitiveValue> listStyle = cssValuePool().cre
ateIdentifierValue(listStyleIdent); | 990 RefPtrWillBeRawPtr<CSSPrimitiveValue> listStyle = cssValuePool().cre
ateIdentifierValue(listStyleIdent); |
| 990 list->append(CSSCounterValue::create(identifier.release(), listStyle
.release(), separator.release())); | 991 list->append(CSSCounterValue::create(identifier.release(), listStyle
.release(), separator.release())); |
| 991 } else if (contentData->isImage()) { | 992 } else if (contentData->isImage()) { |
| 992 const StyleImage* image = toImageContentData(contentData)->image(); | 993 const StyleImage* image = toImageContentData(contentData)->image(); |
| 993 ASSERT(image); | 994 ASSERT(image); |
| 994 list->append(image->cssValue()); | 995 list->append(image->cssValue()); |
| 995 } else if (contentData->isText()) { | 996 } else if (contentData->isText()) { |
| 996 list->append(cssValuePool().createValue(toTextContentData(contentDat
a)->text(), CSSPrimitiveValue::UnitType::String)); | 997 list->append(CSSStringValue::create(toTextContentData(contentData)->
text())); |
| 997 } else if (contentData->isQuote()) { | 998 } else if (contentData->isQuote()) { |
| 998 const QuoteType quoteType = toQuoteContentData(contentData)->quote()
; | 999 const QuoteType quoteType = toQuoteContentData(contentData)->quote()
; |
| 999 list->append(cssValuePool().createIdentifierValue(valueForQuoteType(
quoteType))); | 1000 list->append(cssValuePool().createIdentifierValue(valueForQuoteType(
quoteType))); |
| 1000 } else { | 1001 } else { |
| 1001 ASSERT_NOT_REACHED(); | 1002 ASSERT_NOT_REACHED(); |
| 1002 } | 1003 } |
| 1003 } | 1004 } |
| 1004 return list.release(); | 1005 return list.release(); |
| 1005 } | 1006 } |
| 1006 | 1007 |
| 1007 static PassRefPtrWillBeRawPtr<CSSValue> valueForCounterDirectives(const Computed
Style& style, CSSPropertyID propertyID) | 1008 static PassRefPtrWillBeRawPtr<CSSValue> valueForCounterDirectives(const Computed
Style& style, CSSPropertyID propertyID) |
| 1008 { | 1009 { |
| 1009 const CounterDirectiveMap* map = style.counterDirectives(); | 1010 const CounterDirectiveMap* map = style.counterDirectives(); |
| 1010 if (!map) | 1011 if (!map) |
| 1011 return cssValuePool().createIdentifierValue(CSSValueNone); | 1012 return cssValuePool().createIdentifierValue(CSSValueNone); |
| 1012 | 1013 |
| 1013 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; | 1014 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; |
| 1014 for (const auto& item : *map) { | 1015 for (const auto& item : *map) { |
| 1015 bool isValidCounterValue = propertyID == CSSPropertyCounterIncrement ? i
tem.value.isIncrement() : item.value.isReset(); | 1016 bool isValidCounterValue = propertyID == CSSPropertyCounterIncrement ? i
tem.value.isIncrement() : item.value.isReset(); |
| 1016 if (!isValidCounterValue) | 1017 if (!isValidCounterValue) |
| 1017 continue; | 1018 continue; |
| 1018 | 1019 |
| 1019 list->append(cssValuePool().createValue(item.key, CSSPrimitiveValue::Uni
tType::CustomIdentifier)); | 1020 list->append(CSSCustomIdentValue::create(item.key)); |
| 1020 short number = propertyID == CSSPropertyCounterIncrement ? item.value.in
crementValue() : item.value.resetValue(); | 1021 short number = propertyID == CSSPropertyCounterIncrement ? item.value.in
crementValue() : item.value.resetValue(); |
| 1021 list->append(cssValuePool().createValue((double)number, CSSPrimitiveValu
e::UnitType::Number)); | 1022 list->append(cssValuePool().createValue((double)number, CSSPrimitiveValu
e::UnitType::Number)); |
| 1022 } | 1023 } |
| 1023 | 1024 |
| 1024 if (!list->length()) | 1025 if (!list->length()) |
| 1025 return cssValuePool().createIdentifierValue(CSSValueNone); | 1026 return cssValuePool().createIdentifierValue(CSSValueNone); |
| 1026 | 1027 |
| 1027 return list.release(); | 1028 return list.release(); |
| 1028 } | 1029 } |
| 1029 | 1030 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1165 } | 1166 } |
| 1166 } | 1167 } |
| 1167 | 1168 |
| 1168 return list.release(); | 1169 return list.release(); |
| 1169 } | 1170 } |
| 1170 | 1171 |
| 1171 static PassRefPtrWillBeRawPtr<CSSValue> adjustSVGPaintForCurrentColor(SVGPaintTy
pe paintType, const String& url, const Color& color, const Color& currentColor) | 1172 static PassRefPtrWillBeRawPtr<CSSValue> adjustSVGPaintForCurrentColor(SVGPaintTy
pe paintType, const String& url, const Color& color, const Color& currentColor) |
| 1172 { | 1173 { |
| 1173 if (paintType >= SVG_PAINTTYPE_URI_NONE) { | 1174 if (paintType >= SVG_PAINTTYPE_URI_NONE) { |
| 1174 RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createSpaceSepar
ated(); | 1175 RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createSpaceSepar
ated(); |
| 1175 values->append(CSSPrimitiveValue::create(url, CSSPrimitiveValue::UnitTyp
e::URI)); | 1176 values->append(CSSURIValue::create(url)); |
| 1176 if (paintType == SVG_PAINTTYPE_URI_NONE) | 1177 if (paintType == SVG_PAINTTYPE_URI_NONE) |
| 1177 values->append(CSSPrimitiveValue::create(CSSValueNone)); | 1178 values->append(CSSPrimitiveValue::create(CSSValueNone)); |
| 1178 else if (paintType == SVG_PAINTTYPE_URI_CURRENTCOLOR) | 1179 else if (paintType == SVG_PAINTTYPE_URI_CURRENTCOLOR) |
| 1179 values->append(CSSPrimitiveValue::createColor(currentColor.rgb())); | 1180 values->append(CSSPrimitiveValue::createColor(currentColor.rgb())); |
| 1180 else if (paintType == SVG_PAINTTYPE_URI_RGBCOLOR) | 1181 else if (paintType == SVG_PAINTTYPE_URI_RGBCOLOR) |
| 1181 values->append(CSSPrimitiveValue::createColor(color.rgb())); | 1182 values->append(CSSPrimitiveValue::createColor(color.rgb())); |
| 1182 return values.release(); | 1183 return values.release(); |
| 1183 } | 1184 } |
| 1184 if (paintType == SVG_PAINTTYPE_NONE) | 1185 if (paintType == SVG_PAINTTYPE_NONE) |
| 1185 return CSSPrimitiveValue::create(CSSValueNone); | 1186 return CSSPrimitiveValue::create(CSSValueNone); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1224 | 1225 |
| 1225 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; | 1226 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; |
| 1226 | 1227 |
| 1227 RefPtrWillBeRawPtr<CSSFunctionValue> filterValue = nullptr; | 1228 RefPtrWillBeRawPtr<CSSFunctionValue> filterValue = nullptr; |
| 1228 | 1229 |
| 1229 for (const auto& operation : filterOperations.operations()) { | 1230 for (const auto& operation : filterOperations.operations()) { |
| 1230 FilterOperation* filterOperation = operation.get(); | 1231 FilterOperation* filterOperation = operation.get(); |
| 1231 switch (filterOperation->type()) { | 1232 switch (filterOperation->type()) { |
| 1232 case FilterOperation::REFERENCE: | 1233 case FilterOperation::REFERENCE: |
| 1233 filterValue = CSSFunctionValue::create(CSSValueUrl); | 1234 filterValue = CSSFunctionValue::create(CSSValueUrl); |
| 1234 filterValue->append(cssValuePool().createValue(toReferenceFilterOper
ation(filterOperation)->url(), CSSPrimitiveValue::UnitType::CustomIdentifier)); | 1235 filterValue->append(CSSCustomIdentValue::create(toReferenceFilterOpe
ration(filterOperation)->url())); |
| 1235 break; | 1236 break; |
| 1236 case FilterOperation::GRAYSCALE: | 1237 case FilterOperation::GRAYSCALE: |
| 1237 filterValue = CSSFunctionValue::create(CSSValueGrayscale); | 1238 filterValue = CSSFunctionValue::create(CSSValueGrayscale); |
| 1238 filterValue->append(cssValuePool().createValue(toBasicColorMatrixFil
terOperation(filterOperation)->amount(), CSSPrimitiveValue::UnitType::Number)); | 1239 filterValue->append(cssValuePool().createValue(toBasicColorMatrixFil
terOperation(filterOperation)->amount(), CSSPrimitiveValue::UnitType::Number)); |
| 1239 break; | 1240 break; |
| 1240 case FilterOperation::SEPIA: | 1241 case FilterOperation::SEPIA: |
| 1241 filterValue = CSSFunctionValue::create(CSSValueSepia); | 1242 filterValue = CSSFunctionValue::create(CSSValueSepia); |
| 1242 filterValue->append(cssValuePool().createValue(toBasicColorMatrixFil
terOperation(filterOperation)->amount(), CSSPrimitiveValue::UnitType::Number)); | 1243 filterValue->append(cssValuePool().createValue(toBasicColorMatrixFil
terOperation(filterOperation)->amount(), CSSPrimitiveValue::UnitType::Number)); |
| 1243 break; | 1244 break; |
| 1244 case FilterOperation::SATURATE: | 1245 case FilterOperation::SATURATE: |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1700 // According to http://www.w3.org/TR/CSS2/visudet.html#the-height-pr
operty, | 1701 // According to http://www.w3.org/TR/CSS2/visudet.html#the-height-pr
operty, |
| 1701 // the "height" property does not apply for non-replaced inline elem
ents. | 1702 // the "height" property does not apply for non-replaced inline elem
ents. |
| 1702 if (!layoutObject->isReplaced() && layoutObject->isInline()) | 1703 if (!layoutObject->isReplaced() && layoutObject->isInline()) |
| 1703 return cssValuePool().createIdentifierValue(CSSValueAuto); | 1704 return cssValuePool().createIdentifierValue(CSSValueAuto); |
| 1704 return zoomAdjustedPixelValue(sizingBox(layoutObject).height(), styl
e); | 1705 return zoomAdjustedPixelValue(sizingBox(layoutObject).height(), styl
e); |
| 1705 } | 1706 } |
| 1706 return zoomAdjustedPixelValueForLength(style.height(), style); | 1707 return zoomAdjustedPixelValueForLength(style.height(), style); |
| 1707 case CSSPropertyWebkitHighlight: | 1708 case CSSPropertyWebkitHighlight: |
| 1708 if (style.highlight() == nullAtom) | 1709 if (style.highlight() == nullAtom) |
| 1709 return cssValuePool().createIdentifierValue(CSSValueNone); | 1710 return cssValuePool().createIdentifierValue(CSSValueNone); |
| 1710 return cssValuePool().createValue(style.highlight(), CSSPrimitiveValue::
UnitType::String); | 1711 return CSSStringValue::create(style.highlight()); |
| 1711 case CSSPropertyWebkitHyphenateCharacter: | 1712 case CSSPropertyWebkitHyphenateCharacter: |
| 1712 if (style.hyphenationString().isNull()) | 1713 if (style.hyphenationString().isNull()) |
| 1713 return cssValuePool().createIdentifierValue(CSSValueAuto); | 1714 return cssValuePool().createIdentifierValue(CSSValueAuto); |
| 1714 return cssValuePool().createValue(style.hyphenationString(), CSSPrimitiv
eValue::UnitType::String); | 1715 return CSSStringValue::create(style.hyphenationString()); |
| 1715 case CSSPropertyImageRendering: | 1716 case CSSPropertyImageRendering: |
| 1716 return CSSPrimitiveValue::create(style.imageRendering()); | 1717 return CSSPrimitiveValue::create(style.imageRendering()); |
| 1717 case CSSPropertyImageOrientation: | 1718 case CSSPropertyImageOrientation: |
| 1718 if (style.respectImageOrientation() == RespectImageOrientation) | 1719 if (style.respectImageOrientation() == RespectImageOrientation) |
| 1719 return cssValuePool().createValue(CSSValueFromImage); | 1720 return cssValuePool().createValue(CSSValueFromImage); |
| 1720 return cssValuePool().createValue(0, CSSPrimitiveValue::UnitType::Degree
s); | 1721 return cssValuePool().createValue(0, CSSPrimitiveValue::UnitType::Degree
s); |
| 1721 case CSSPropertyIsolation: | 1722 case CSSPropertyIsolation: |
| 1722 return cssValuePool().createValue(style.isolation()); | 1723 return cssValuePool().createValue(style.isolation()); |
| 1723 case CSSPropertyJustifyItems: | 1724 case CSSPropertyJustifyItems: |
| 1724 return valueForItemPositionWithOverflowAlignment(resolveAlignmentAuto(st
yle.justifyItemsPosition(), styledNode), style.justifyItemsOverflowAlignment(),
style.justifyItemsPositionType()); | 1725 return valueForItemPositionWithOverflowAlignment(resolveAlignmentAuto(st
yle.justifyItemsPosition(), styledNode), style.justifyItemsOverflowAlignment(),
style.justifyItemsPositionType()); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1740 if (style.listStyleImage()) | 1741 if (style.listStyleImage()) |
| 1741 return style.listStyleImage()->cssValue(); | 1742 return style.listStyleImage()->cssValue(); |
| 1742 return cssValuePool().createIdentifierValue(CSSValueNone); | 1743 return cssValuePool().createIdentifierValue(CSSValueNone); |
| 1743 case CSSPropertyListStylePosition: | 1744 case CSSPropertyListStylePosition: |
| 1744 return cssValuePool().createValue(style.listStylePosition()); | 1745 return cssValuePool().createValue(style.listStylePosition()); |
| 1745 case CSSPropertyListStyleType: | 1746 case CSSPropertyListStyleType: |
| 1746 return cssValuePool().createValue(style.listStyleType()); | 1747 return cssValuePool().createValue(style.listStyleType()); |
| 1747 case CSSPropertyWebkitLocale: | 1748 case CSSPropertyWebkitLocale: |
| 1748 if (style.locale().isNull()) | 1749 if (style.locale().isNull()) |
| 1749 return cssValuePool().createIdentifierValue(CSSValueAuto); | 1750 return cssValuePool().createIdentifierValue(CSSValueAuto); |
| 1750 return cssValuePool().createValue(style.locale(), CSSPrimitiveValue::Uni
tType::String); | 1751 return CSSStringValue::create(style.locale()); |
| 1751 case CSSPropertyMarginTop: { | 1752 case CSSPropertyMarginTop: { |
| 1752 Length marginTop = style.marginTop(); | 1753 Length marginTop = style.marginTop(); |
| 1753 if (marginTop.isFixed() || !layoutObject || !layoutObject->isBox()) | 1754 if (marginTop.isFixed() || !layoutObject || !layoutObject->isBox()) |
| 1754 return zoomAdjustedPixelValueForLength(marginTop, style); | 1755 return zoomAdjustedPixelValueForLength(marginTop, style); |
| 1755 return zoomAdjustedPixelValue(toLayoutBox(layoutObject)->marginTop(), st
yle); | 1756 return zoomAdjustedPixelValue(toLayoutBox(layoutObject)->marginTop(), st
yle); |
| 1756 } | 1757 } |
| 1757 case CSSPropertyMarginRight: { | 1758 case CSSPropertyMarginRight: { |
| 1758 Length marginRight = style.marginRight(); | 1759 Length marginRight = style.marginRight(); |
| 1759 if (marginRight.isFixed() || !layoutObject || !layoutObject->isBox()) | 1760 if (marginRight.isFixed() || !layoutObject || !layoutObject->isBox()) |
| 1760 return zoomAdjustedPixelValueForLength(marginRight, style); | 1761 return zoomAdjustedPixelValueForLength(marginRight, style); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1878 case CSSPropertyPosition: | 1879 case CSSPropertyPosition: |
| 1879 return cssValuePool().createValue(style.position()); | 1880 return cssValuePool().createValue(style.position()); |
| 1880 case CSSPropertyQuotes: | 1881 case CSSPropertyQuotes: |
| 1881 if (!style.quotes()) { | 1882 if (!style.quotes()) { |
| 1882 // TODO(ramya.v): We should return the quote values that we're actua
lly using. | 1883 // TODO(ramya.v): We should return the quote values that we're actua
lly using. |
| 1883 return nullptr; | 1884 return nullptr; |
| 1884 } | 1885 } |
| 1885 if (style.quotes()->size()) { | 1886 if (style.quotes()->size()) { |
| 1886 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSep
arated(); | 1887 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSep
arated(); |
| 1887 for (int i = 0; i < style.quotes()->size(); i++) { | 1888 for (int i = 0; i < style.quotes()->size(); i++) { |
| 1888 list->append(cssValuePool().createValue(style.quotes()->getOpenQ
uote(i), CSSPrimitiveValue::UnitType::String)); | 1889 list->append(CSSStringValue::create(style.quotes()->getOpenQuote
(i))); |
| 1889 list->append(cssValuePool().createValue(style.quotes()->getClose
Quote(i), CSSPrimitiveValue::UnitType::String)); | 1890 list->append(CSSStringValue::create(style.quotes()->getCloseQuot
e(i))); |
| 1890 } | 1891 } |
| 1891 return list.release(); | 1892 return list.release(); |
| 1892 } | 1893 } |
| 1893 return cssValuePool().createIdentifierValue(CSSValueNone); | 1894 return cssValuePool().createIdentifierValue(CSSValueNone); |
| 1894 case CSSPropertyRight: | 1895 case CSSPropertyRight: |
| 1895 return valueForPositionOffset(style, CSSPropertyRight, layoutObject); | 1896 return valueForPositionOffset(style, CSSPropertyRight, layoutObject); |
| 1896 case CSSPropertyWebkitRubyPosition: | 1897 case CSSPropertyWebkitRubyPosition: |
| 1897 return cssValuePool().createValue(style.rubyPosition()); | 1898 return cssValuePool().createValue(style.rubyPosition()); |
| 1898 case CSSPropertyScrollBehavior: | 1899 case CSSPropertyScrollBehavior: |
| 1899 return cssValuePool().createValue(style.scrollBehavior()); | 1900 return cssValuePool().createValue(style.scrollBehavior()); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 1923 return currentColorOrValidColor(style, style.textFillColor()); | 1924 return currentColorOrValidColor(style, style.textFillColor()); |
| 1924 case CSSPropertyWebkitTextEmphasisColor: | 1925 case CSSPropertyWebkitTextEmphasisColor: |
| 1925 return currentColorOrValidColor(style, style.textEmphasisColor()); | 1926 return currentColorOrValidColor(style, style.textEmphasisColor()); |
| 1926 case CSSPropertyWebkitTextEmphasisPosition: | 1927 case CSSPropertyWebkitTextEmphasisPosition: |
| 1927 return cssValuePool().createValue(style.textEmphasisPosition()); | 1928 return cssValuePool().createValue(style.textEmphasisPosition()); |
| 1928 case CSSPropertyWebkitTextEmphasisStyle: | 1929 case CSSPropertyWebkitTextEmphasisStyle: |
| 1929 switch (style.textEmphasisMark()) { | 1930 switch (style.textEmphasisMark()) { |
| 1930 case TextEmphasisMarkNone: | 1931 case TextEmphasisMarkNone: |
| 1931 return cssValuePool().createIdentifierValue(CSSValueNone); | 1932 return cssValuePool().createIdentifierValue(CSSValueNone); |
| 1932 case TextEmphasisMarkCustom: | 1933 case TextEmphasisMarkCustom: |
| 1933 return cssValuePool().createValue(style.textEmphasisCustomMark(), CS
SPrimitiveValue::UnitType::String); | 1934 return CSSStringValue::create(style.textEmphasisCustomMark()); |
| 1934 case TextEmphasisMarkAuto: | 1935 case TextEmphasisMarkAuto: |
| 1935 ASSERT_NOT_REACHED(); | 1936 ASSERT_NOT_REACHED(); |
| 1936 // Fall through | 1937 // Fall through |
| 1937 case TextEmphasisMarkDot: | 1938 case TextEmphasisMarkDot: |
| 1938 case TextEmphasisMarkCircle: | 1939 case TextEmphasisMarkCircle: |
| 1939 case TextEmphasisMarkDoubleCircle: | 1940 case TextEmphasisMarkDoubleCircle: |
| 1940 case TextEmphasisMarkTriangle: | 1941 case TextEmphasisMarkTriangle: |
| 1941 case TextEmphasisMarkSesame: { | 1942 case TextEmphasisMarkSesame: { |
| 1942 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSep
arated(); | 1943 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSep
arated(); |
| 1943 list->append(cssValuePool().createValue(style.textEmphasisFill())); | 1944 list->append(cssValuePool().createValue(style.textEmphasisFill())); |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2101 } else { | 2102 } else { |
| 2102 list->append(cssValuePool().createValue(CSSAnimationData::initialIte
rationCount(), CSSPrimitiveValue::UnitType::Number)); | 2103 list->append(cssValuePool().createValue(CSSAnimationData::initialIte
rationCount(), CSSPrimitiveValue::UnitType::Number)); |
| 2103 } | 2104 } |
| 2104 return list.release(); | 2105 return list.release(); |
| 2105 } | 2106 } |
| 2106 case CSSPropertyAnimationName: { | 2107 case CSSPropertyAnimationName: { |
| 2107 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparat
ed(); | 2108 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparat
ed(); |
| 2108 const CSSAnimationData* animationData = style.animations(); | 2109 const CSSAnimationData* animationData = style.animations(); |
| 2109 if (animationData) { | 2110 if (animationData) { |
| 2110 for (size_t i = 0; i < animationData->nameList().size(); ++i) | 2111 for (size_t i = 0; i < animationData->nameList().size(); ++i) |
| 2111 list->append(cssValuePool().createValue(animationData->nameList(
)[i], CSSPrimitiveValue::UnitType::CustomIdentifier)); | 2112 list->append(CSSCustomIdentValue::create(animationData->nameList
()[i])); |
| 2112 } else { | 2113 } else { |
| 2113 list->append(cssValuePool().createIdentifierValue(CSSValueNone)); | 2114 list->append(cssValuePool().createIdentifierValue(CSSValueNone)); |
| 2114 } | 2115 } |
| 2115 return list.release(); | 2116 return list.release(); |
| 2116 } | 2117 } |
| 2117 case CSSPropertyAnimationPlayState: { | 2118 case CSSPropertyAnimationPlayState: { |
| 2118 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparat
ed(); | 2119 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparat
ed(); |
| 2119 const CSSAnimationData* animationData = style.animations(); | 2120 const CSSAnimationData* animationData = style.animations(); |
| 2120 if (animationData) { | 2121 if (animationData) { |
| 2121 for (size_t i = 0; i < animationData->playStateList().size(); ++i) | 2122 for (size_t i = 0; i < animationData->playStateList().size(); ++i) |
| 2122 list->append(valueForAnimationPlayState(animationData->playState
List()[i])); | 2123 list->append(valueForAnimationPlayState(animationData->playState
List()[i])); |
| 2123 } else { | 2124 } else { |
| 2124 list->append(cssValuePool().createIdentifierValue(CSSValueRunning)); | 2125 list->append(cssValuePool().createIdentifierValue(CSSValueRunning)); |
| 2125 } | 2126 } |
| 2126 return list.release(); | 2127 return list.release(); |
| 2127 } | 2128 } |
| 2128 case CSSPropertyAnimationTimingFunction: | 2129 case CSSPropertyAnimationTimingFunction: |
| 2129 return valueForAnimationTimingFunction(style.animations()); | 2130 return valueForAnimationTimingFunction(style.animations()); |
| 2130 case CSSPropertyAnimation: { | 2131 case CSSPropertyAnimation: { |
| 2131 const CSSAnimationData* animationData = style.animations(); | 2132 const CSSAnimationData* animationData = style.animations(); |
| 2132 if (animationData) { | 2133 if (animationData) { |
| 2133 RefPtrWillBeRawPtr<CSSValueList> animationsList = CSSValueList::crea
teCommaSeparated(); | 2134 RefPtrWillBeRawPtr<CSSValueList> animationsList = CSSValueList::crea
teCommaSeparated(); |
| 2134 for (size_t i = 0; i < animationData->nameList().size(); ++i) { | 2135 for (size_t i = 0; i < animationData->nameList().size(); ++i) { |
| 2135 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpac
eSeparated(); | 2136 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpac
eSeparated(); |
| 2136 list->append(cssValuePool().createValue(animationData->nameList(
)[i], CSSPrimitiveValue::UnitType::CustomIdentifier)); | 2137 list->append(CSSCustomIdentValue::create(animationData->nameList
()[i])); |
| 2137 list->append(cssValuePool().createValue(CSSTimingData::getRepeat
ed(animationData->durationList(), i), CSSPrimitiveValue::UnitType::Seconds)); | 2138 list->append(cssValuePool().createValue(CSSTimingData::getRepeat
ed(animationData->durationList(), i), CSSPrimitiveValue::UnitType::Seconds)); |
| 2138 list->append(createTimingFunctionValue(CSSTimingData::getRepeate
d(animationData->timingFunctionList(), i).get())); | 2139 list->append(createTimingFunctionValue(CSSTimingData::getRepeate
d(animationData->timingFunctionList(), i).get())); |
| 2139 list->append(cssValuePool().createValue(CSSTimingData::getRepeat
ed(animationData->delayList(), i), CSSPrimitiveValue::UnitType::Seconds)); | 2140 list->append(cssValuePool().createValue(CSSTimingData::getRepeat
ed(animationData->delayList(), i), CSSPrimitiveValue::UnitType::Seconds)); |
| 2140 list->append(valueForAnimationIterationCount(CSSTimingData::getR
epeated(animationData->iterationCountList(), i))); | 2141 list->append(valueForAnimationIterationCount(CSSTimingData::getR
epeated(animationData->iterationCountList(), i))); |
| 2141 list->append(valueForAnimationDirection(CSSTimingData::getRepeat
ed(animationData->directionList(), i))); | 2142 list->append(valueForAnimationDirection(CSSTimingData::getRepeat
ed(animationData->directionList(), i))); |
| 2142 list->append(valueForAnimationFillMode(CSSTimingData::getRepeate
d(animationData->fillModeList(), i))); | 2143 list->append(valueForAnimationFillMode(CSSTimingData::getRepeate
d(animationData->fillModeList(), i))); |
| 2143 list->append(valueForAnimationPlayState(CSSTimingData::getRepeat
ed(animationData->playStateList(), i))); | 2144 list->append(valueForAnimationPlayState(CSSTimingData::getRepeat
ed(animationData->playStateList(), i))); |
| 2144 animationsList->append(list); | 2145 animationsList->append(list); |
| 2145 } | 2146 } |
| 2146 return animationsList.release(); | 2147 return animationsList.release(); |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2308 return valueForContentData(style); | 2309 return valueForContentData(style); |
| 2309 case CSSPropertyCounterIncrement: | 2310 case CSSPropertyCounterIncrement: |
| 2310 return valueForCounterDirectives(style, propertyID); | 2311 return valueForCounterDirectives(style, propertyID); |
| 2311 case CSSPropertyCounterReset: | 2312 case CSSPropertyCounterReset: |
| 2312 return valueForCounterDirectives(style, propertyID); | 2313 return valueForCounterDirectives(style, propertyID); |
| 2313 case CSSPropertyWebkitClipPath: | 2314 case CSSPropertyWebkitClipPath: |
| 2314 if (ClipPathOperation* operation = style.clipPath()) { | 2315 if (ClipPathOperation* operation = style.clipPath()) { |
| 2315 if (operation->type() == ClipPathOperation::SHAPE) | 2316 if (operation->type() == ClipPathOperation::SHAPE) |
| 2316 return valueForBasicShape(style, toShapeClipPathOperation(operat
ion)->basicShape()); | 2317 return valueForBasicShape(style, toShapeClipPathOperation(operat
ion)->basicShape()); |
| 2317 if (operation->type() == ClipPathOperation::REFERENCE) | 2318 if (operation->type() == ClipPathOperation::REFERENCE) |
| 2318 return CSSPrimitiveValue::create(toReferenceClipPathOperation(op
eration)->url(), CSSPrimitiveValue::UnitType::URI); | 2319 return CSSURIValue::create(toReferenceClipPathOperation(operatio
n)->url()); |
| 2319 } | 2320 } |
| 2320 return cssValuePool().createIdentifierValue(CSSValueNone); | 2321 return cssValuePool().createIdentifierValue(CSSValueNone); |
| 2321 case CSSPropertyShapeMargin: | 2322 case CSSPropertyShapeMargin: |
| 2322 return cssValuePool().createValue(style.shapeMargin(), style); | 2323 return cssValuePool().createValue(style.shapeMargin(), style); |
| 2323 case CSSPropertyShapeImageThreshold: | 2324 case CSSPropertyShapeImageThreshold: |
| 2324 return cssValuePool().createValue(style.shapeImageThreshold(), CSSPrimit
iveValue::UnitType::Number); | 2325 return cssValuePool().createValue(style.shapeImageThreshold(), CSSPrimit
iveValue::UnitType::Number); |
| 2325 case CSSPropertyShapeOutside: | 2326 case CSSPropertyShapeOutside: |
| 2326 return valueForShape(style, style.shapeOutside()); | 2327 return valueForShape(style, style.shapeOutside()); |
| 2327 case CSSPropertyWebkitFilter: | 2328 case CSSPropertyWebkitFilter: |
| 2328 return valueForFilter(style, style.filter()); | 2329 return valueForFilter(style, style.filter()); |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2512 case CSSPropertyAlignmentBaseline: | 2513 case CSSPropertyAlignmentBaseline: |
| 2513 return CSSPrimitiveValue::create(svgStyle.alignmentBaseline()); | 2514 return CSSPrimitiveValue::create(svgStyle.alignmentBaseline()); |
| 2514 case CSSPropertyDominantBaseline: | 2515 case CSSPropertyDominantBaseline: |
| 2515 return CSSPrimitiveValue::create(svgStyle.dominantBaseline()); | 2516 return CSSPrimitiveValue::create(svgStyle.dominantBaseline()); |
| 2516 case CSSPropertyTextAnchor: | 2517 case CSSPropertyTextAnchor: |
| 2517 return CSSPrimitiveValue::create(svgStyle.textAnchor()); | 2518 return CSSPrimitiveValue::create(svgStyle.textAnchor()); |
| 2518 case CSSPropertyWritingMode: | 2519 case CSSPropertyWritingMode: |
| 2519 return CSSPrimitiveValue::create(svgStyle.writingMode()); | 2520 return CSSPrimitiveValue::create(svgStyle.writingMode()); |
| 2520 case CSSPropertyClipPath: | 2521 case CSSPropertyClipPath: |
| 2521 if (!svgStyle.clipperResource().isEmpty()) | 2522 if (!svgStyle.clipperResource().isEmpty()) |
| 2522 return CSSPrimitiveValue::create(serializeAsFragmentIdentifier(svgSt
yle.clipperResource()), CSSPrimitiveValue::UnitType::URI); | 2523 return CSSURIValue::create(serializeAsFragmentIdentifier(svgStyle.cl
ipperResource())); |
| 2523 return CSSPrimitiveValue::createIdentifier(CSSValueNone); | 2524 return CSSPrimitiveValue::createIdentifier(CSSValueNone); |
| 2524 case CSSPropertyMask: | 2525 case CSSPropertyMask: |
| 2525 if (!svgStyle.maskerResource().isEmpty()) | 2526 if (!svgStyle.maskerResource().isEmpty()) |
| 2526 return CSSPrimitiveValue::create(serializeAsFragmentIdentifier(svgSt
yle.maskerResource()), CSSPrimitiveValue::UnitType::URI); | 2527 return CSSURIValue::create(serializeAsFragmentIdentifier(svgStyle.ma
skerResource())); |
| 2527 return CSSPrimitiveValue::createIdentifier(CSSValueNone); | 2528 return CSSPrimitiveValue::createIdentifier(CSSValueNone); |
| 2528 case CSSPropertyFilter: | 2529 case CSSPropertyFilter: |
| 2529 if (!svgStyle.filterResource().isEmpty()) | 2530 if (!svgStyle.filterResource().isEmpty()) |
| 2530 return CSSPrimitiveValue::create(serializeAsFragmentIdentifier(svgSt
yle.filterResource()), CSSPrimitiveValue::UnitType::URI); | 2531 return CSSURIValue::create(serializeAsFragmentIdentifier(svgStyle.fi
lterResource())); |
| 2531 return CSSPrimitiveValue::createIdentifier(CSSValueNone); | 2532 return CSSPrimitiveValue::createIdentifier(CSSValueNone); |
| 2532 case CSSPropertyFloodColor: | 2533 case CSSPropertyFloodColor: |
| 2533 return currentColorOrValidColor(style, svgStyle.floodColor()); | 2534 return currentColorOrValidColor(style, svgStyle.floodColor()); |
| 2534 case CSSPropertyLightingColor: | 2535 case CSSPropertyLightingColor: |
| 2535 return currentColorOrValidColor(style, svgStyle.lightingColor()); | 2536 return currentColorOrValidColor(style, svgStyle.lightingColor()); |
| 2536 case CSSPropertyStopColor: | 2537 case CSSPropertyStopColor: |
| 2537 return currentColorOrValidColor(style, svgStyle.stopColor()); | 2538 return currentColorOrValidColor(style, svgStyle.stopColor()); |
| 2538 case CSSPropertyFill: | 2539 case CSSPropertyFill: |
| 2539 return adjustSVGPaintForCurrentColor(svgStyle.fillPaintType(), svgStyle.
fillPaintUri(), svgStyle.fillPaintColor(), style.color()); | 2540 return adjustSVGPaintForCurrentColor(svgStyle.fillPaintType(), svgStyle.
fillPaintUri(), svgStyle.fillPaintColor(), style.color()); |
| 2540 case CSSPropertyMarkerEnd: | 2541 case CSSPropertyMarkerEnd: |
| 2541 if (!svgStyle.markerEndResource().isEmpty()) | 2542 if (!svgStyle.markerEndResource().isEmpty()) |
| 2542 return CSSPrimitiveValue::create(serializeAsFragmentIdentifier(svgSt
yle.markerEndResource()), CSSPrimitiveValue::UnitType::URI); | 2543 return CSSURIValue::create(serializeAsFragmentIdentifier(svgStyle.ma
rkerEndResource())); |
| 2543 return CSSPrimitiveValue::createIdentifier(CSSValueNone); | 2544 return CSSPrimitiveValue::createIdentifier(CSSValueNone); |
| 2544 case CSSPropertyMarkerMid: | 2545 case CSSPropertyMarkerMid: |
| 2545 if (!svgStyle.markerMidResource().isEmpty()) | 2546 if (!svgStyle.markerMidResource().isEmpty()) |
| 2546 return CSSPrimitiveValue::create(serializeAsFragmentIdentifier(svgSt
yle.markerMidResource()), CSSPrimitiveValue::UnitType::URI); | 2547 return CSSURIValue::create(serializeAsFragmentIdentifier(svgStyle.ma
rkerMidResource())); |
| 2547 return CSSPrimitiveValue::createIdentifier(CSSValueNone); | 2548 return CSSPrimitiveValue::createIdentifier(CSSValueNone); |
| 2548 case CSSPropertyMarkerStart: | 2549 case CSSPropertyMarkerStart: |
| 2549 if (!svgStyle.markerStartResource().isEmpty()) | 2550 if (!svgStyle.markerStartResource().isEmpty()) |
| 2550 return CSSPrimitiveValue::create(serializeAsFragmentIdentifier(svgSt
yle.markerStartResource()), CSSPrimitiveValue::UnitType::URI); | 2551 return CSSURIValue::create(serializeAsFragmentIdentifier(svgStyle.ma
rkerStartResource())); |
| 2551 return CSSPrimitiveValue::createIdentifier(CSSValueNone); | 2552 return CSSPrimitiveValue::createIdentifier(CSSValueNone); |
| 2552 case CSSPropertyStroke: | 2553 case CSSPropertyStroke: |
| 2553 return adjustSVGPaintForCurrentColor(svgStyle.strokePaintType(), svgStyl
e.strokePaintUri(), svgStyle.strokePaintColor(), style.color()); | 2554 return adjustSVGPaintForCurrentColor(svgStyle.strokePaintType(), svgStyl
e.strokePaintUri(), svgStyle.strokePaintColor(), style.color()); |
| 2554 case CSSPropertyStrokeDasharray: | 2555 case CSSPropertyStrokeDasharray: |
| 2555 return strokeDashArrayToCSSValueList(*svgStyle.strokeDashArray(), style)
; | 2556 return strokeDashArrayToCSSValueList(*svgStyle.strokeDashArray(), style)
; |
| 2556 case CSSPropertyStrokeDashoffset: | 2557 case CSSPropertyStrokeDashoffset: |
| 2557 return zoomAdjustedPixelValueForLength(svgStyle.strokeDashOffset(), styl
e); | 2558 return zoomAdjustedPixelValueForLength(svgStyle.strokeDashOffset(), styl
e); |
| 2558 case CSSPropertyStrokeWidth: | 2559 case CSSPropertyStrokeWidth: |
| 2559 return pixelValueForUnzoomedLength(svgStyle.strokeWidth(), style); | 2560 return pixelValueForUnzoomedLength(svgStyle.strokeWidth(), style); |
| 2560 case CSSPropertyBaselineShift: { | 2561 case CSSPropertyBaselineShift: { |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2666 case CSSPropertyAll: | 2667 case CSSPropertyAll: |
| 2667 return nullptr; | 2668 return nullptr; |
| 2668 default: | 2669 default: |
| 2669 break; | 2670 break; |
| 2670 } | 2671 } |
| 2671 ASSERT_NOT_REACHED(); | 2672 ASSERT_NOT_REACHED(); |
| 2672 return nullptr; | 2673 return nullptr; |
| 2673 } | 2674 } |
| 2674 | 2675 |
| 2675 } | 2676 } |
| OLD | NEW |