Changeset 291260 in webkit
- Timestamp:
- Mar 14, 2022 6:48:15 PM (4 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 6 edited
- 1 copied
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop-expected.txt (modified) (4 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-noop-expected.txt (copied) (copied from trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop-expected.txt) (4 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-noop.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/style/PropertyCascade.cpp (modified) (1 diff)
-
Source/WebCore/style/PropertyCascade.h (modified) (3 diffs)
-
Source/WebCore/style/StyleBuilder.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r291228 r291260 1 2022-03-14 Oriol Brufau <obrufau@igalia.com> 2 3 [css-cascade] Fix 'revert' on low-priority properties 4 https://bugs.webkit.org/show_bug.cgi?id=236272 5 6 Reviewed by Darin Adler. 7 8 Add one test and expect an existing one to pass. 9 10 * web-platform-tests/css/css-cascade/all-prop-revert-layer-noop-expected.txt: 11 * web-platform-tests/css/css-cascade/all-prop-revert-noop-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop-expected.txt. 12 * web-platform-tests/css/css-cascade/all-prop-revert-noop.html: Added. 13 1 14 2022-03-14 Antoine Quint <graouts@webkit.org> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop-expected.txt
r290864 r291260 24 24 PASS datalist 25 25 PASS dd 26 FAIL del assert_equals: text-decoration expected "line-through" but got "none" 26 PASS del 27 27 PASS details 28 28 PASS dfn … … 52 52 PASS img 53 53 PASS input 54 FAIL ins assert_equals: text-decoration expected "underline" but got "none" 54 PASS ins 55 55 PASS kbd 56 56 PASS label … … 80 80 PASS rt 81 81 PASS ruby 82 FAIL s assert_equals: text-decoration expected "line-through" but got "none" 82 PASS s 83 83 PASS samp 84 84 PASS script … … 107 107 PASS tr 108 108 PASS track 109 FAIL u assert_equals: text-decoration expected "underline" but got "none" 109 PASS u 110 110 PASS ul 111 111 PASS var -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-noop-expected.txt
r291259 r291260 24 24 PASS datalist 25 25 PASS dd 26 FAIL del assert_equals: text-decoration expected "line-through" but got "none" 26 PASS del 27 27 PASS details 28 28 PASS dfn … … 52 52 PASS img 53 53 PASS input 54 FAIL ins assert_equals: text-decoration expected "underline" but got "none" 54 PASS ins 55 55 PASS kbd 56 56 PASS label … … 80 80 PASS rt 81 81 PASS ruby 82 FAIL s assert_equals: text-decoration expected "line-through" but got "none" 82 PASS s 83 83 PASS samp 84 84 PASS script … … 107 107 PASS tr 108 108 PASS track 109 FAIL u assert_equals: text-decoration expected "underline" but got "none" 109 PASS u 110 110 PASS ul 111 111 PASS var -
trunk/Source/WebCore/ChangeLog
r291259 r291260 1 2022-03-14 Oriol Brufau <obrufau@igalia.com> 2 3 [css-cascade] Fix 'revert' on low-priority properties 4 https://bugs.webkit.org/show_bug.cgi?id=236272 5 6 Reviewed by Darin Adler. 7 8 Some CSS properties are low-priority (a.k.a deferred or applied in parse 9 order). The logic for the 'revert' keyword was not taking these into 10 account, so it just behaved as 'unset'. 11 That made elements like <del>, <ins>, <s> and <u> lose the line-through 12 or underline thet they get in UA origin, when styled with 'all: revert' 13 or 'text-decoration: revert'. 14 15 This patch takes these properties into account so that 'revert' works. 16 17 Tests: imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-noop.html 18 imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-noop.html 19 20 * style/PropertyCascade.cpp: 21 (WebCore::Style::PropertyCascade::setDeferred): 22 * style/PropertyCascade.h: 23 (WebCore::Style::PropertyCascade::hasDeferredProperty const): 24 (WebCore::Style::PropertyCascade::deferredProperty const): 25 * style/StyleBuilder.cpp: 26 (WebCore::Style::Builder::applyProperty): 27 1 28 2022-03-14 Eric Carlson <eric.carlson@apple.com> 2 29 -
trunk/Source/WebCore/style/PropertyCascade.cpp
r287018 r291260 174 174 memset(property.cssValue, 0, sizeof(property.cssValue)); 175 175 setPropertyInternal(property, id, cssValue, matchedProperties, cascadeLevel); 176 m_deferredPropertiesIndices.set(id, m_deferredProperties.size()); 176 177 m_deferredProperties.append(property); 177 178 } -
trunk/Source/WebCore/style/PropertyCascade.h
r287018 r291260 63 63 const Property& property(CSSPropertyID) const; 64 64 65 bool hasDeferredProperty(CSSPropertyID) const; 66 const Property& deferredProperty(CSSPropertyID) const; 67 65 68 bool hasCustomProperty(const String&) const; 66 69 Property customProperty(const String&) const; … … 94 97 95 98 Vector<Property, 8> m_deferredProperties; 99 HashMap<CSSPropertyID, unsigned> m_deferredPropertiesIndices; 100 96 101 HashMap<AtomString, Property> m_customProperties; 97 102 }; … … 108 113 } 109 114 115 inline bool PropertyCascade::hasDeferredProperty(CSSPropertyID id) const 116 { 117 return m_deferredPropertiesIndices.contains(id); 118 } 119 120 inline const PropertyCascade::Property& PropertyCascade::deferredProperty(CSSPropertyID id) const 121 { 122 ASSERT(hasDeferredProperty(id)); 123 unsigned index = m_deferredPropertiesIndices.get(id); 124 ASSERT(index < m_deferredProperties.size()); 125 return m_deferredProperties[index]; 126 } 127 110 128 inline bool PropertyCascade::hasCustomProperty(const String& name) const 111 129 { -
trunk/Source/WebCore/style/StyleBuilder.cpp
r290864 r291260 321 321 applyRollbackCascadeProperty(property, linkMatchMask); 322 322 return; 323 } else if (rollbackCascade->hasDeferredProperty(id)) { 324 auto& property = rollbackCascade->deferredProperty(id); 325 applyRollbackCascadeProperty(property, linkMatchMask); 326 return; 323 327 } 324 328 }
Note: See TracChangeset
for help on using the changeset viewer.