Bug 248311
| Summary: | Reuse the StylePropertyShorthand in StyleProperties::getPropertyValue() | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Oriol Brufau <obrufau> |
| Component: | CSS | Assignee: | Oriol Brufau <obrufau> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Oriol Brufau
StyleProperties::getPropertyValue() has a big switch like this:
switch (propertyID) {
case CSSPropertyAll:
return getCommonValue(allShorthand());
case CSSPropertyAnimation:
return getLayeredShorthandValue(animationShorthand());
case CSSPropertyBorderSpacing:
return borderSpacingValue(borderSpacingShorthand());
case CSSPropertyBackgroundPosition:
return getLayeredShorthandValue(backgroundPositionShorthand());
case CSSPropertyBackground:
return getLayeredShorthandValue(backgroundShorthand());
...
Most shorthands need to get the StylePropertyShorthand using allShorthand(), animationShorthand(), ...
But before the switch it calls commonShorthandChecks(), which uses shorthandForProperty(propertyID) to get the StylePropertyShorthand.
So this StylePropertyShorthand can be reused.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Oriol Brufau
Pull request: https://github.com/WebKit/WebKit/pull/6787
EWS
Committed 257011@main (70230d10f272): <https://commits.webkit.org/257011@main>
Reviewed commits have been landed. Closing PR #6787 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/102659948>