Changeset 252336 in webkit
- Timestamp:
- Nov 11, 2019 11:42:17 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r252335 r252336 1 2019-11-11 Matt Lewis <jlewis3@apple.com> 2 3 Unreviewed, rolling out r252076. 4 5 This broke internal builds and tests. For more information 6 discuss with your reviewers. 7 8 Reverted changeset: 9 10 "[css-lists] Implement list-style-type: <string>" 11 https://bugs.webkit.org/show_bug.cgi?id=167729 12 https://trac.webkit.org/changeset/252076 13 1 14 2019-11-11 Eric Carlson <eric.carlson@apple.com> 2 15 -
trunk/LayoutTests/TestExpectations
r252325 r252336 3575 3575 imported/w3c/web-platform-tests/css/css-lists/counter-reset-inside-display-contents.html [ ImageOnlyFailure ] 3576 3576 imported/w3c/web-platform-tests/css/css-lists/list-marker-with-lineheight-and-overflow-hidden-001.html [ ImageOnlyFailure ] 3577 webkit.org/b/202849 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-005a.html [ ImageOnlyFailure ] 3578 webkit.org/b/202849 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-005b.html [ ImageOnlyFailure ] 3579 webkit.org/b/202849 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-006.html [ ImageOnlyFailure ] 3577 webkit.org/b/167729 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-001a.html [ ImageOnlyFailure ] 3578 webkit.org/b/167729 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-001b.html [ ImageOnlyFailure ] 3579 webkit.org/b/167729 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-002.html [ ImageOnlyFailure ] 3580 webkit.org/b/167729 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-003.html [ ImageOnlyFailure ] 3581 webkit.org/b/167729 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-005a.html [ ImageOnlyFailure ] 3582 webkit.org/b/167729 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-005b.html [ ImageOnlyFailure ] 3583 webkit.org/b/167729 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-006.html [ ImageOnlyFailure ] 3584 webkit.org/b/167729 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-007.html [ ImageOnlyFailure ] 3580 3585 imported/w3c/web-platform-tests/css/css-lists/list-with-image-display-changed-001.html [ ImageOnlyFailure ] 3581 3586 -
trunk/LayoutTests/imported/w3c/ChangeLog
r252335 r252336 1 2019-11-11 Matt Lewis <jlewis3@apple.com> 2 3 Unreviewed, rolling out r252076. 4 5 This broke internal builds and tests. For more information 6 discuss with your reviewers. 7 8 * web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt: 9 * web-platform-tests/css/css-lists/parsing/list-style-type-valid-expected.txt: 10 1 11 2019-11-11 Eric Carlson <eric.carlson@apple.com> 2 12 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt
r252076 r252336 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 PASS Property list-style-type value '"marker string"' computes to '"marker string"' 18 PASS Property list-style-type value '"Note: "' computes to '"Note: "' 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 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
r252076 r252336 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 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 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 "" 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
r252317 r252336 3462 3462 webkit.org/b/203416 imported/w3c/web-platform-tests/css/css-transitions/before-load-001.html [ Pass Failure ] 3463 3463 webkit.org/b/203416 imported/w3c/web-platform-tests/css/css-transitions/properties-value-auto-001.html [ Pass Failure ] 3464 3465 # This test fails in iOS due to subpixel differences for the marker position3466 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-002.html [ ImageOnlyFailure ] -
trunk/LayoutTests/platform/mac/TestExpectations
r252325 r252336 2007 2007 # rdar://54275897 ([ macOS ] Add support for batched key requests) 2008 2008 platform/mac/media/encrypted-media/fps-multiple-pssh.html [ Skip ] 2009 2010 # These tests fail in Mac due to subpixel differences for the marker position2011 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-002.html [ ImageOnlyFailure ]2012 imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-004.html [ ImageOnlyFailure ] -
trunk/Source/WebCore/ChangeLog
r252334 r252336 1 2019-11-11 Matt Lewis <jlewis3@apple.com> 2 3 Unreviewed, rolling out r252076. 4 5 This broke internal builds and tests. For more information 6 discuss with your reviewers. 7 8 * css/CSSComputedStyleDeclaration.cpp: 9 (WebCore::ComputedStyleExtractor::valueForPropertyInStyle): 10 * css/CSSPrimitiveValueMappings.h: 11 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): 12 * css/CSSProperties.json: 13 * css/parser/CSSParserFastPaths.cpp: 14 (WebCore::CSSParserFastPaths::isPartialKeywordPropertyID): Deleted. 15 * css/parser/CSSParserFastPaths.h: 16 * css/parser/CSSPropertyParser.cpp: 17 (WebCore::CSSPropertyParser::parseSingleValue): 18 * rendering/RenderListMarker.cpp: 19 (WebCore::effectiveListMarkerType): 20 (WebCore::listMarkerSuffix): 21 (WebCore::listMarkerText): 22 (WebCore::RenderListMarker::styleDidChange): 23 (WebCore::RenderListMarker::paint): 24 (WebCore::RenderListMarker::updateContent): 25 (WebCore::RenderListMarker::computePreferredLogicalWidths): 26 (WebCore::RenderListMarker::updateMargins): 27 (WebCore::RenderListMarker::suffix const): 28 (WebCore::RenderListMarker::getRelativeMarkerRect): 29 * rendering/style/CounterContent.h: 30 (WebCore::CounterContent::CounterContent): 31 * rendering/style/RenderStyle.h: 32 (WebCore::RenderStyle::initialListStylePosition): 33 (WebCore::RenderStyle::listStyleStringValue const): Deleted. 34 (WebCore::RenderStyle::setListStyleStringValue): Deleted. 35 (WebCore::RenderStyle::initialListStyleStringValue): Deleted. 36 * rendering/style/RenderStyleConstants.cpp: 37 (WebCore::operator<<): 38 * rendering/style/RenderStyleConstants.h: 39 * rendering/style/StyleRareInheritedData.cpp: 40 (WebCore::StyleRareInheritedData::StyleRareInheritedData): 41 (WebCore::StyleRareInheritedData::operator== const): 42 * rendering/style/StyleRareInheritedData.h: 43 * style/StyleBuilderCustom.h: 44 (WebCore::Style::BuilderCustom::applyInheritListStyleType): Deleted. 45 (WebCore::Style::BuilderCustom::applyInitialListStyleType): Deleted. 46 (WebCore::Style::BuilderCustom::applyValueListStyleType): Deleted. 47 1 48 2019-11-11 Matt Lewis <jlewis3@apple.com> 2 49 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r252176 r252336 2925 2925 return cssValuePool.createValue(style.listStylePosition()); 2926 2926 case CSSPropertyListStyleType: 2927 if (style.listStyleType() == ListStyleType::String)2928 return cssValuePool.createValue(style.listStyleStringValue(), CSSPrimitiveValue::CSS_STRING);2929 2927 return cssValuePool.createValue(style.listStyleType()); 2930 2928 case CSSPropertyWebkitLocale: -
trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h
r252076 r252336 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;1937 1933 break; 1938 1934 case ListStyleType::Telugu: -
trunk/Source/WebCore/css/CSSProperties.json
r252076 r252336 2818 2818 "none" 2819 2819 ], 2820 "codegen-properties": {2821 "custom": "All"2822 },2823 2820 "specification": { 2824 2821 "category": "css-lists", -
trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp
r252076 r252336 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 996 986 static bool isUniversalKeyword(const String& string) 997 987 { -
trunk/Source/WebCore/css/parser/CSSParserFastPaths.h
r252076 r252336 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 other53 // non-keyword values which should be handled by the CSSPropertyParser.54 static bool isPartialKeywordPropertyID(CSSPropertyID);55 56 51 static bool isValidKeywordPropertyAndValue(CSSPropertyID, CSSValueID, const CSSParserContext&); 57 52 -
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp
r252076 r252336 3793 3793 { 3794 3794 if (CSSParserFastPaths::isKeywordPropertyID(property)) { 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; 3795 if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(property, m_range.peek().id(), m_context)) 3796 return nullptr; 3797 3798 return consumeIdent(m_range); 3801 3799 } 3802 3800 switch (property) { … … 4251 4249 return consumeColorScheme(m_range); 4252 4250 #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);4256 4251 default: 4257 4252 return nullptr; -
trunk/Source/WebCore/rendering/RenderListMarker.cpp
r252076 r252336 497 497 case ListStyleType::UpperNorwegian: 498 498 return (value < 1) ? ListStyleType::Decimal : type; 499 case ListStyleType::String:500 ASSERT_NOT_REACHED();501 break;502 499 } 503 500 … … 599 596 case ListStyleType::Urdu: 600 597 return '.'; 601 case ListStyleType::String:602 ASSERT_NOT_REACHED();603 break;604 598 } 605 599 … … 1055 1049 case ListStyleType::Hebrew: 1056 1050 return toHebrew(value); 1057 case ListStyleType::String:1058 ASSERT_NOT_REACHED();1059 break;1060 1051 } 1061 1052 … … 1088 1079 { 1089 1080 RenderBox::styleDidChange(diff, oldStyle); 1081 1090 1082 if (oldStyle) { 1091 if (style().listStylePosition() != oldStyle->listStylePosition() || style().listStyleType() != oldStyle->listStyleType() || (style().listStyleType() == ListStyleType::String && style().listStyleStringValue() != oldStyle->listStyleStringValue()))1083 if (style().listStylePosition() != oldStyle->listStylePosition() || style().listStyleType() != oldStyle->listStyleType()) 1092 1084 setNeedsLayoutAndPrefWidthsRecalc(); 1093 1085 if (oldStyle->isDisplayInlineType() && !style().isDisplayInlineType()) { … … 1267 1259 case ListStyleType::Asterisks: 1268 1260 case ListStyleType::Footnotes: 1269 case ListStyleType::String:1270 1261 break; 1271 1262 } … … 1290 1281 textOrigin = roundPointToDevicePixels(LayoutPoint(textOrigin), document().deviceScaleFactor(), style().isLeftToRightDirection()); 1291 1282 1292 if (type == ListStyleType::Asterisks || type == ListStyleType::Footnotes || type == ListStyleType::String)1283 if (type == ListStyleType::Asterisks || type == ListStyleType::Footnotes) 1293 1284 context.drawText(font, textRun, textOrigin); 1294 1285 else { … … 1404 1395 switch (type) { 1405 1396 case ListStyleType::None: 1406 break;1407 case ListStyleType::String:1408 m_text = style().listStyleStringValue();1409 1397 break; 1410 1398 case ListStyleType::Circle: … … 1516 1504 break; 1517 1505 case ListStyleType::Asterisks: 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 } 1506 case ListStyleType::Footnotes: { 1507 TextRun run = RenderBlock::constructTextRun(m_text, style()); 1508 logicalWidth = font.width(run); // no suffix for these types 1524 1509 break; 1525 1510 } … … 1644 1629 break; 1645 1630 } 1646 } else if (isImage()) {1647 marginStart = -minPreferredLogicalWidth() - cMarkerPadding;1648 marginEnd = cMarkerPadding;1649 1631 } else { 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; 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 } 1668 1648 } 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(); 1669 1668 } 1669 1670 1670 } 1671 1671 … … 1691 1691 { 1692 1692 ListStyleType type = style().listStyleType(); 1693 if (type == ListStyleType::String)1694 return ""_str;1695 1696 1693 const UChar suffix = listMarkerSuffix(type, m_listItem->value()); 1697 1694 … … 1726 1723 switch (type) { 1727 1724 case ListStyleType::Asterisks: 1728 case ListStyleType::Footnotes: 1729 case ListStyleType::String: { 1730 if (m_text.isEmpty()) 1731 return FloatRect(); 1725 case ListStyleType::Footnotes: { 1732 1726 const FontCascade& font = style().fontCascade(); 1733 1727 TextRun run = RenderBlock::constructTextRun(m_text, style()); -
trunk/Source/WebCore/rendering/style/CounterContent.h
r252076 r252336 38 38 , m_separator(separator) 39 39 { 40 ASSERT(style != ListStyleType::String);41 40 } 42 41 -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r252076 r252336 447 447 CaptionSide captionSide() const { return static_cast<CaptionSide>(m_inheritedFlags.captionSide); } 448 448 449 const AtomString& listStyleStringValue() const { return m_rareInheritedData->listStyleStringValue; }450 449 ListStyleType listStyleType() const { return static_cast<ListStyleType>(m_inheritedFlags.listStyleType); } 451 450 StyleImage* listStyleImage() const; … … 996 995 void setAspectRatioNumerator(float v) { SET_VAR(m_rareNonInheritedData, aspectRatioNumerator, v); } 997 996 998 void setListStyleStringValue(const AtomString& s) { SET_VAR(m_rareInheritedData, listStyleStringValue, s); }999 997 void setListStyleType(ListStyleType v) { m_inheritedFlags.listStyleType = static_cast<unsigned>(v); } 1000 998 void setListStyleImage(RefPtr<StyleImage>&&); … … 1473 1471 static EmptyCell initialEmptyCells() { return EmptyCell::Show; } 1474 1472 static ListStylePosition initialListStylePosition() { return ListStylePosition::Outside; } 1475 static const AtomString& initialListStyleStringValue() { return nullAtom(); }1476 1473 static ListStyleType initialListStyleType() { return ListStyleType::Disc; } 1477 1474 static TextTransform initialTextTransform() { return TextTransform::None; } -
trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp
r252076 r252336 759 759 case ListStyleType::KatakanaIroha: ts << "katakana-iroha"; break; 760 760 case ListStyleType::None: ts << "none"; break; 761 case ListStyleType::String: ts << "string"; break;762 761 } 763 762 return ts; -
trunk/Source/WebCore/rendering/style/RenderStyleConstants.h
r252334 r252336 632 632 HiraganaIroha, 633 633 KatakanaIroha, 634 None, 635 String 634 None 636 635 }; 637 636 -
trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp
r252076 r252336 43 43 Color colors[9]; 44 44 void* ownPtrs[1]; 45 AtomString atomStrings[ 6];45 AtomString atomStrings[5]; 46 46 void* refPtrs[3]; 47 47 Length lengths[2]; … … 76 76 StyleRareInheritedData::StyleRareInheritedData() 77 77 : listStyleImage(RenderStyle::initialListStyleImage()) 78 , listStyleStringValue(RenderStyle::initialListStyleStringValue())79 78 , textStrokeWidth(RenderStyle::initialTextStrokeWidth()) 80 79 , indent(RenderStyle::initialTextIndent()) … … 165 164 : RefCounted<StyleRareInheritedData>() 166 165 , listStyleImage(o.listStyleImage) 167 , listStyleStringValue(o.listStyleStringValue)168 166 , textStrokeColor(o.textStrokeColor) 169 167 , textStrokeWidth(o.textStrokeWidth) … … 367 365 && miterLimit == o.miterLimit 368 366 && customProperties == o.customProperties 369 && arePointingToEqualData(listStyleImage, o.listStyleImage) 370 && listStyleStringValue == o.listStyleStringValue; 367 && arePointingToEqualData(listStyleImage, o.listStyleImage); 371 368 } 372 369 -
trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h
r252076 r252336 69 69 70 70 RefPtr<StyleImage> listStyleImage; 71 AtomString listStyleStringValue;72 71 73 72 Color textStrokeColor; -
trunk/Source/WebCore/style/StyleBuilderCustom.h
r252161 r252336 90 90 DECLARE_PROPERTY_CUSTOM_HANDLERS(LineHeight); 91 91 #endif 92 DECLARE_PROPERTY_CUSTOM_HANDLERS(ListStyleType);93 92 DECLARE_PROPERTY_CUSTOM_HANDLERS(OutlineStyle); 94 93 DECLARE_PROPERTY_CUSTOM_HANDLERS(Size); … … 680 679 681 680 #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 }706 681 707 682 inline void BuilderCustom::applyInheritOutlineStyle(BuilderState& builderState)
Note: See TracChangeset
for help on using the changeset viewer.