Changeset 252076 in webkit
- Timestamp:
- Nov 5, 2019 1:41:48 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r252070 r252076 1 2019-11-05 Oriol Brufau <obrufau@igalia.com> 2 3 [css-lists] Implement list-style-type: <string> 4 https://bugs.webkit.org/show_bug.cgi?id=167729 5 6 Reviewed by Antti Koivisto. 7 8 Most tests pass now, but some still fail because mixed-bidi is not 9 supported in markers (https://bugs.webkit.org/show_bug.cgi?id=202849). 10 11 iOS and Mac have some extra failures due to subpixel differences for the 12 marker position. 13 14 * TestExpectations: 15 * platform/ios/TestExpectations: 16 * platform/mac/TestExpectations: 17 1 18 2019-11-05 Simon Fraser <simon.fraser@apple.com> 2 19 -
trunk/LayoutTests/TestExpectations
r252047 r252076 3586 3586 imported/w3c/web-platform-tests/css/css-lists/counter-reset-inside-display-contents.html [ ImageOnlyFailure ] 3587 3587 imported/w3c/web-platform-tests/css/css-lists/list-marker-with-lineheight-and-overflow-hidden-001.html [ ImageOnlyFailure ] 3588 webkit.org/b/167729 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-001a.html [ ImageOnlyFailure ] 3589 webkit.org/b/167729 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-001b.html [ ImageOnlyFailure ] 3590 webkit.org/b/167729 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-002.html [ ImageOnlyFailure ] 3591 webkit.org/b/167729 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-003.html [ ImageOnlyFailure ] 3592 webkit.org/b/167729 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-005a.html [ ImageOnlyFailure ] 3593 webkit.org/b/167729 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-005b.html [ ImageOnlyFailure ] 3594 webkit.org/b/167729 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-006.html [ ImageOnlyFailure ] 3595 webkit.org/b/167729 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-007.html [ ImageOnlyFailure ] 3588 webkit.org/b/202849 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-005a.html [ ImageOnlyFailure ] 3589 webkit.org/b/202849 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-005b.html [ ImageOnlyFailure ] 3590 webkit.org/b/202849 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-006.html [ ImageOnlyFailure ] 3596 3591 imported/w3c/web-platform-tests/css/css-lists/list-with-image-display-changed-001.html [ ImageOnlyFailure ] 3597 3592 -
trunk/LayoutTests/imported/w3c/ChangeLog
r252069 r252076 1 2019-11-05 Oriol Brufau <obrufau@igalia.com> 2 3 [css-lists] Implement list-style-type: <string> 4 https://bugs.webkit.org/show_bug.cgi?id=167729 5 6 Reviewed by Antti Koivisto. 7 8 Some tests pass now. 9 10 * web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt: 11 * web-platform-tests/css/css-lists/parsing/list-style-type-valid-expected.txt: 12 1 13 2019-11-05 Said Abou-Hallawa <sabouhallawa@apple.com> 2 14 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt
r252009 r252076 15 15 PASS Property list-style-type value 'lower-alpha' computes to 'lower-alpha' 16 16 PASS Property list-style-type value 'upper-alpha' computes to 'upper-alpha' 17 FAIL Property list-style-type value '"marker string"' computes to '"marker string"' assert_true: '"marker string"' is a supported value for list-style-type. expected true got false 18 FAIL Property list-style-type value '"Note: "' computes to '"Note: "' assert_true: '"Note: "' is a supported value for list-style-type. expected true got false 17 PASS Property list-style-type value '"marker string"' computes to '"marker string"' 18 PASS Property list-style-type value '"Note: "' computes to '"Note: "' 19 19 FAIL Property list-style-type value 'counter-Style-Name' computes to 'counter-Style-Name' assert_true: 'counter-Style-Name' is a supported value for list-style-type. expected true got false 20 20 FAIL Property list-style-type value 'CounterStyleName' computes to 'CounterStyleName' assert_true: 'CounterStyleName' is a supported value for list-style-type. expected true got false -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-valid-expected.txt
r252009 r252076 15 15 PASS e.style['list-style-type'] = "lower-alpha" should set the property value 16 16 PASS e.style['list-style-type'] = "upper-alpha" should set the property value 17 FAIL e.style['list-style-type'] = "\"marker string\"" should set the property value assert_not_equals: property should be set got disallowed value "" 18 FAIL e.style['list-style-type'] = "\"Note: \"" should set the property value assert_not_equals: property should be set got disallowed value "" 17 PASS e.style['list-style-type'] = "\"marker string\"" should set the property value 18 PASS e.style['list-style-type'] = "\"Note: \"" should set the property value 19 19 FAIL e.style['list-style-type'] = "counter-Style-Name" should set the property value assert_not_equals: property should be set got disallowed value "" 20 20 FAIL e.style['list-style-type'] = "CounterStyleName" should set the property value assert_not_equals: property should be set got disallowed value "" -
trunk/LayoutTests/platform/ios/TestExpectations
r252038 r252076 3469 3469 webkit.org/b/203416 imported/w3c/web-platform-tests/css/css-transitions/before-load-001.html [ Pass Failure ] 3470 3470 webkit.org/b/203416 imported/w3c/web-platform-tests/css/css-transitions/properties-value-auto-001.html [ Pass Failure ] 3471 3472 # This test fails in iOS due to subpixel differences for the marker position 3473 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-002.html [ ImageOnlyFailure ] -
trunk/LayoutTests/platform/mac/TestExpectations
r252064 r252076 2028 2028 # rdar://54275897 ([ macOS ] Add support for batched key requests) 2029 2029 platform/mac/media/encrypted-media/fps-multiple-pssh.html [ Skip ] 2030 2031 # These tests fail in Mac due to subpixel differences for the marker position 2032 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-002.html [ ImageOnlyFailure ] 2033 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-004.html [ ImageOnlyFailure ] -
trunk/Source/WebCore/ChangeLog
r252070 r252076 1 2019-11-05 Oriol Brufau <obrufau@igalia.com> 2 3 [css-lists] Implement list-style-type: <string> 4 https://bugs.webkit.org/show_bug.cgi?id=167729 5 6 Reviewed by Antti Koivisto. 7 8 This patch extends the syntax of the list-style-type property to accept 9 arbitrary string values in order to customize the marker contents. 10 11 When a string is specified for list-style-type, the patch sets it to a 12 special ListStyleType::String, and the string value is stored in an 13 extra field. 14 15 Tests: imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-001a.html 16 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-001b.html 17 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-002.html 18 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-003.html 19 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-004.html 20 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-005a.html 21 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-005b.html 22 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-006.html 23 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-007.html 24 imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed.html 25 imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-valid.html 26 27 Some tests fail because mixed-bidi is not supported in markers 28 (https://bugs.webkit.org/show_bug.cgi?id=202849). 29 30 * css/CSSComputedStyleDeclaration.cpp: 31 (WebCore::ComputedStyleExtractor::valueForPropertyInStyle): 32 * css/CSSPrimitiveValueMappings.h: 33 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): 34 * css/CSSProperties.json: 35 * css/parser/CSSParserFastPaths.cpp: 36 (WebCore::CSSParserFastPaths::isPartialKeywordPropertyID): 37 * css/parser/CSSParserFastPaths.h: 38 * css/parser/CSSPropertyParser.cpp: 39 (WebCore::CSSPropertyParser::parseSingleValue): 40 * rendering/RenderListMarker.cpp: 41 (WebCore::effectiveListMarkerType): 42 (WebCore::listMarkerSuffix): 43 (WebCore::listMarkerText): 44 (WebCore::RenderListMarker::styleDidChange): 45 (WebCore::RenderListMarker::paint): 46 (WebCore::RenderListMarker::updateContent): 47 (WebCore::RenderListMarker::computePreferredLogicalWidths): 48 (WebCore::RenderListMarker::updateMargins): 49 (WebCore::RenderListMarker::suffix const): 50 (WebCore::RenderListMarker::getRelativeMarkerRect): 51 * rendering/style/CounterContent.h: 52 (WebCore::CounterContent::CounterContent): 53 * rendering/style/RenderStyle.h: 54 (WebCore::RenderStyle::listStyleStringValue const): 55 (WebCore::RenderStyle::setListStyleStringValue): 56 (WebCore::RenderStyle::initialListStyleStringValue): 57 * rendering/style/RenderStyleConstants.cpp: 58 (WebCore::operator<<): 59 * rendering/style/RenderStyleConstants.h: 60 * rendering/style/StyleRareInheritedData.cpp: 61 (WebCore::StyleRareInheritedData::StyleRareInheritedData): 62 (WebCore::StyleRareInheritedData::operator== const): 63 * rendering/style/StyleRareInheritedData.h: 64 * style/StyleBuilderCustom.h: 65 (WebCore::Style::BuilderCustom::applyInheritListStyleType): 66 (WebCore::Style::BuilderCustom::applyInitialListStyleType): 67 (WebCore::Style::BuilderCustom::applyValueListStyleType): 68 1 69 2019-11-05 Simon Fraser <simon.fraser@apple.com> 2 70 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r251965 r252076 2934 2934 return cssValuePool.createValue(style.listStylePosition()); 2935 2935 case CSSPropertyListStyleType: 2936 if (style.listStyleType() == ListStyleType::String) 2937 return cssValuePool.createValue(style.listStyleStringValue(), CSSPrimitiveValue::CSS_STRING); 2936 2938 return cssValuePool.createValue(style.listStyleType()); 2937 2939 case CSSPropertyWebkitLocale: -
trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h
r251444 r252076 1931 1931 case ListStyleType::Square: 1932 1932 m_value.valueID = CSSValueSquare; 1933 break; 1934 case ListStyleType::String: 1935 ASSERT_NOT_REACHED(); 1936 m_value.valueID = CSSValueInvalid; 1933 1937 break; 1934 1938 case ListStyleType::Telugu: -
trunk/Source/WebCore/css/CSSProperties.json
r251776 r252076 2818 2818 "none" 2819 2819 ], 2820 "codegen-properties": { 2821 "custom": "All" 2822 }, 2820 2823 "specification": { 2821 2824 "category": "css-lists", -
trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp
r251444 r252076 984 984 } 985 985 986 bool CSSParserFastPaths::isPartialKeywordPropertyID(CSSPropertyID propertyId) 987 { 988 switch (propertyId) { 989 case CSSPropertyListStyleType: 990 return true; 991 default: 992 return false; 993 } 994 } 995 986 996 static bool isUniversalKeyword(const String& string) 987 997 { -
trunk/Source/WebCore/css/parser/CSSParserFastPaths.h
r243318 r252076 49 49 // Properties handled here shouldn't be explicitly handled in CSSPropertyParser 50 50 static bool isKeywordPropertyID(CSSPropertyID); 51 52 // Returns whether a property may be handled by the fast path but has other 53 // non-keyword values which should be handled by the CSSPropertyParser. 54 static bool isPartialKeywordPropertyID(CSSPropertyID); 55 51 56 static bool isValidKeywordPropertyAndValue(CSSPropertyID, CSSValueID, const CSSParserContext&); 52 57 -
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp
r251864 r252076 3793 3793 { 3794 3794 if (CSSParserFastPaths::isKeywordPropertyID(property)) { 3795 if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(property, m_range.peek().id(), m_context)) 3796 return nullptr; 3797 3798 return consumeIdent(m_range); 3795 if (CSSParserFastPaths::isValidKeywordPropertyAndValue(property, m_range.peek().id(), m_context)) 3796 return consumeIdent(m_range); 3797 3798 // Some properties need to fallback onto the regular parser. 3799 if (!CSSParserFastPaths::isPartialKeywordPropertyID(property)) 3800 return nullptr; 3799 3801 } 3800 3802 switch (property) { … … 4249 4251 return consumeColorScheme(m_range); 4250 4252 #endif 4253 case CSSPropertyListStyleType: 4254 // NOTE: All the keyword values for the list-style-type property are handled by the CSSParserFastPaths. 4255 return consumeString(m_range); 4251 4256 default: 4252 4257 return nullptr; -
trunk/Source/WebCore/rendering/RenderListMarker.cpp
r246034 r252076 497 497 case ListStyleType::UpperNorwegian: 498 498 return (value < 1) ? ListStyleType::Decimal : type; 499 case ListStyleType::String: 500 ASSERT_NOT_REACHED(); 501 break; 499 502 } 500 503 … … 596 599 case ListStyleType::Urdu: 597 600 return '.'; 601 case ListStyleType::String: 602 ASSERT_NOT_REACHED(); 603 break; 598 604 } 599 605 … … 1049 1055 case ListStyleType::Hebrew: 1050 1056 return toHebrew(value); 1057 case ListStyleType::String: 1058 ASSERT_NOT_REACHED(); 1059 break; 1051 1060 } 1052 1061 … … 1079 1088 { 1080 1089 RenderBox::styleDidChange(diff, oldStyle); 1081 1082 1090 if (oldStyle) { 1083 if (style().listStylePosition() != oldStyle->listStylePosition() || style().listStyleType() != oldStyle->listStyleType() )1091 if (style().listStylePosition() != oldStyle->listStylePosition() || style().listStyleType() != oldStyle->listStyleType() || (style().listStyleType() == ListStyleType::String && style().listStyleStringValue() != oldStyle->listStyleStringValue())) 1084 1092 setNeedsLayoutAndPrefWidthsRecalc(); 1085 1093 if (oldStyle->isDisplayInlineType() && !style().isDisplayInlineType()) { … … 1259 1267 case ListStyleType::Asterisks: 1260 1268 case ListStyleType::Footnotes: 1269 case ListStyleType::String: 1261 1270 break; 1262 1271 } … … 1281 1290 textOrigin = roundPointToDevicePixels(LayoutPoint(textOrigin), document().deviceScaleFactor(), style().isLeftToRightDirection()); 1282 1291 1283 if (type == ListStyleType::Asterisks || type == ListStyleType::Footnotes )1292 if (type == ListStyleType::Asterisks || type == ListStyleType::Footnotes || type == ListStyleType::String) 1284 1293 context.drawText(font, textRun, textOrigin); 1285 1294 else { … … 1395 1404 switch (type) { 1396 1405 case ListStyleType::None: 1406 break; 1407 case ListStyleType::String: 1408 m_text = style().listStyleStringValue(); 1397 1409 break; 1398 1410 case ListStyleType::Circle: … … 1504 1516 break; 1505 1517 case ListStyleType::Asterisks: 1506 case ListStyleType::Footnotes: { 1507 TextRun run = RenderBlock::constructTextRun(m_text, style()); 1508 logicalWidth = font.width(run); // no suffix for these types 1518 case ListStyleType::Footnotes: 1519 case ListStyleType::String: { 1520 if (!m_text.isEmpty()) { 1521 TextRun run = RenderBlock::constructTextRun(m_text, style()); 1522 logicalWidth = font.width(run); // no suffix for these types 1523 } 1509 1524 break; 1510 1525 } … … 1629 1644 break; 1630 1645 } 1646 } else if (isImage()) { 1647 marginStart = -minPreferredLogicalWidth() - cMarkerPadding; 1648 marginEnd = cMarkerPadding; 1631 1649 } else { 1632 if (style().isLeftToRightDirection()) { 1633 if (isImage()) 1634 marginStart = -minPreferredLogicalWidth() - cMarkerPadding; 1635 else { 1636 int offset = fontMetrics.ascent() * 2 / 3; 1637 switch (style().listStyleType()) { 1638 case ListStyleType::Disc: 1639 case ListStyleType::Circle: 1640 case ListStyleType::Square: 1641 marginStart = -offset - cMarkerPadding - 1; 1642 break; 1643 case ListStyleType::None: 1644 break; 1645 default: 1646 marginStart = m_text.isEmpty() ? 0_lu : -minPreferredLogicalWidth() - offset / 2; 1647 } 1650 int offset = fontMetrics.ascent() * 2 / 3; 1651 switch (style().listStyleType()) { 1652 case ListStyleType::Disc: 1653 case ListStyleType::Circle: 1654 case ListStyleType::Square: 1655 marginStart = -offset - cMarkerPadding - 1; 1656 marginEnd = offset + cMarkerPadding + 1 - minPreferredLogicalWidth(); 1657 break; 1658 case ListStyleType::None: 1659 break; 1660 case ListStyleType::String: 1661 if (!m_text.isEmpty()) 1662 marginStart = -minPreferredLogicalWidth(); 1663 break; 1664 default: 1665 if (!m_text.isEmpty()) { 1666 marginStart = -minPreferredLogicalWidth() - offset / 2; 1667 marginEnd = offset / 2; 1648 1668 } 1649 marginEnd = -marginStart - minPreferredLogicalWidth();1650 } else {1651 if (isImage())1652 marginEnd = cMarkerPadding;1653 else {1654 int offset = fontMetrics.ascent() * 2 / 3;1655 switch (style().listStyleType()) {1656 case ListStyleType::Disc:1657 case ListStyleType::Circle:1658 case ListStyleType::Square:1659 marginEnd = offset + cMarkerPadding + 1 - minPreferredLogicalWidth();1660 break;1661 case ListStyleType::None:1662 break;1663 default:1664 marginEnd = m_text.isEmpty() ? 0 : offset / 2;1665 }1666 }1667 marginStart = -marginEnd - minPreferredLogicalWidth();1668 1669 } 1669 1670 1670 } 1671 1671 … … 1691 1691 { 1692 1692 ListStyleType type = style().listStyleType(); 1693 if (type == ListStyleType::String) 1694 return ""_str; 1695 1693 1696 const UChar suffix = listMarkerSuffix(type, m_listItem->value()); 1694 1697 … … 1723 1726 switch (type) { 1724 1727 case ListStyleType::Asterisks: 1725 case ListStyleType::Footnotes: { 1728 case ListStyleType::Footnotes: 1729 case ListStyleType::String: { 1730 if (m_text.isEmpty()) 1731 return FloatRect(); 1726 1732 const FontCascade& font = style().fontCascade(); 1727 1733 TextRun run = RenderBlock::constructTextRun(m_text, style()); -
trunk/Source/WebCore/rendering/style/CounterContent.h
r246490 r252076 38 38 , m_separator(separator) 39 39 { 40 ASSERT(style != ListStyleType::String); 40 41 } 41 42 -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r251119 r252076 447 447 CaptionSide captionSide() const { return static_cast<CaptionSide>(m_inheritedFlags.captionSide); } 448 448 449 const AtomString& listStyleStringValue() const { return m_rareInheritedData->listStyleStringValue; } 449 450 ListStyleType listStyleType() const { return static_cast<ListStyleType>(m_inheritedFlags.listStyleType); } 450 451 StyleImage* listStyleImage() const; … … 995 996 void setAspectRatioNumerator(float v) { SET_VAR(m_rareNonInheritedData, aspectRatioNumerator, v); } 996 997 998 void setListStyleStringValue(const AtomString& s) { SET_VAR(m_rareInheritedData, listStyleStringValue, s); } 997 999 void setListStyleType(ListStyleType v) { m_inheritedFlags.listStyleType = static_cast<unsigned>(v); } 998 1000 void setListStyleImage(RefPtr<StyleImage>&&); … … 1471 1473 static EmptyCell initialEmptyCells() { return EmptyCell::Show; } 1472 1474 static ListStylePosition initialListStylePosition() { return ListStylePosition::Outside; } 1475 static const AtomString& initialListStyleStringValue() { return nullAtom(); } 1473 1476 static ListStyleType initialListStyleType() { return ListStyleType::Disc; } 1474 1477 static TextTransform initialTextTransform() { return TextTransform::None; } -
trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp
r251444 r252076 759 759 case ListStyleType::KatakanaIroha: ts << "katakana-iroha"; break; 760 760 case ListStyleType::None: ts << "none"; break; 761 case ListStyleType::String: ts << "string"; break; 761 762 } 762 763 return ts; -
trunk/Source/WebCore/rendering/style/RenderStyleConstants.h
r251444 r252076 632 632 HiraganaIroha, 633 633 KatakanaIroha, 634 None 634 None, 635 String 635 636 }; 636 637 -
trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp
r251058 r252076 43 43 Color colors[9]; 44 44 void* ownPtrs[1]; 45 AtomString atomStrings[ 5];45 AtomString atomStrings[6]; 46 46 void* refPtrs[3]; 47 47 Length lengths[2]; … … 76 76 StyleRareInheritedData::StyleRareInheritedData() 77 77 : listStyleImage(RenderStyle::initialListStyleImage()) 78 , listStyleStringValue(RenderStyle::initialListStyleStringValue()) 78 79 , textStrokeWidth(RenderStyle::initialTextStrokeWidth()) 79 80 , indent(RenderStyle::initialTextIndent()) … … 164 165 : RefCounted<StyleRareInheritedData>() 165 166 , listStyleImage(o.listStyleImage) 167 , listStyleStringValue(o.listStyleStringValue) 166 168 , textStrokeColor(o.textStrokeColor) 167 169 , textStrokeWidth(o.textStrokeWidth) … … 365 367 && miterLimit == o.miterLimit 366 368 && customProperties == o.customProperties 367 && arePointingToEqualData(listStyleImage, o.listStyleImage); 369 && arePointingToEqualData(listStyleImage, o.listStyleImage) 370 && listStyleStringValue == o.listStyleStringValue; 368 371 } 369 372 -
trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h
r251058 r252076 69 69 70 70 RefPtr<StyleImage> listStyleImage; 71 AtomString listStyleStringValue; 71 72 72 73 Color textStrokeColor; -
trunk/Source/WebCore/style/StyleBuilderCustom.h
r251916 r252076 90 90 DECLARE_PROPERTY_CUSTOM_HANDLERS(LineHeight); 91 91 #endif 92 DECLARE_PROPERTY_CUSTOM_HANDLERS(ListStyleType); 92 93 DECLARE_PROPERTY_CUSTOM_HANDLERS(OutlineStyle); 93 94 DECLARE_PROPERTY_CUSTOM_HANDLERS(Size); … … 679 680 680 681 #endif 682 683 inline void BuilderCustom::applyInheritListStyleType(BuilderState& builderState) 684 { 685 builderState.style().setListStyleType(builderState.parentStyle().listStyleType()); 686 builderState.style().setListStyleStringValue(builderState.parentStyle().listStyleStringValue()); 687 } 688 689 inline void BuilderCustom::applyInitialListStyleType(BuilderState& builderState) 690 { 691 builderState.style().setListStyleType(RenderStyle::initialListStyleType()); 692 builderState.style().setListStyleStringValue(RenderStyle::initialListStyleStringValue()); 693 } 694 695 inline void BuilderCustom::applyValueListStyleType(BuilderState& builderState, CSSValue& value) 696 { 697 auto& primitiveValue = downcast<CSSPrimitiveValue>(value); 698 if (primitiveValue.isValueID()) { 699 builderState.style().setListStyleType(primitiveValue); 700 builderState.style().setListStyleStringValue(RenderStyle::initialListStyleStringValue()); 701 return; 702 } 703 builderState.style().setListStyleType(ListStyleType::String); 704 builderState.style().setListStyleStringValue(primitiveValue.stringValue()); 705 } 681 706 682 707 inline void BuilderCustom::applyInheritOutlineStyle(BuilderState& builderState)
Note: See TracChangeset
for help on using the changeset viewer.