[webkit-changes] [WebKit/WebKit] a97990: Don't copy shorthands in ComputedStyleExtractor::c...
Oriol Brufau
noreply at github.com
Sat Oct 8 17:32:32 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a97990a34197b717e7f5edabb148b94de15992cf
https://github.com/WebKit/WebKit/commit/a97990a34197b717e7f5edabb148b94de15992cf
Author: Oriol Brufau <obrufau at igalia.com>
Date: 2022-10-08 (Sat, 08 Oct 2022)
Changed paths:
M Source/WebCore/css/CSSProperty.h
M Source/WebCore/css/ComputedStyleExtractor.cpp
Log Message:
-----------
Don't copy shorthands in ComputedStyleExtractor::copyProperties()
https://bugs.webkit.org/show_bug.cgi?id=246239
Reviewed by Darin Adler.
ComputedStyleExtractor::copyProperties() was copying both CSS longhands
and shorthands, without expanding the shorthands.
This caused problems like shorthands appearing twice in asText(), and
retrieving the value of a shorthand after updating a longhand would
still provide the old value.
Not sure if these problems were webexposed since copyProperties() is
basically used internally for editing. So I'm not adding any test.
* Source/WebCore/css/CSSProperty.h:
(WebCore::StylePropertyMetadata::StylePropertyMetadata):
Add asserts.
* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::ComputedStyleExtractor::copyProperties):
Only copy longhands, not shorthands.
Canonical link: https://commits.webkit.org/255318@main
More information about the webkit-changes
mailing list