WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
233109
Implement parsing and animation support for offset shorthand
https://bugs.webkit.org/show_bug.cgi?id=233109
Summary
Implement parsing and animation support for offset shorthand
Kiet Ho
Reported
2021-11-14 13:39:55 PST
Implement parsing and animation support for offset shorthand
Attachments
WIP
(45.46 KB, patch)
2021-11-15 16:38 PST
,
Kiet Ho
no flags
Details
Formatted Diff
Diff
WIP
(45.33 KB, patch)
2021-11-15 18:00 PST
,
Kiet Ho
no flags
Details
Formatted Diff
Diff
WIP
(46.45 KB, patch)
2021-11-19 10:54 PST
,
Kiet Ho
no flags
Details
Formatted Diff
Diff
Patch
(46.90 KB, patch)
2022-02-10 23:56 PST
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Patch
(48.27 KB, patch)
2022-02-11 10:58 PST
,
Nikos Mouchtaris
dino
: review+
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(47.78 KB, patch)
2022-02-15 15:03 PST
,
Nikos Mouchtaris
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(47.78 KB, patch)
2022-02-15 16:47 PST
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Kiet Ho
Comment 1
2021-11-15 16:38:06 PST
Created
attachment 444318
[details]
WIP
EWS Watchlist
Comment 2
2021-11-15 16:38:55 PST
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see
https://trac.webkit.org/wiki/WPTExportProcess
Kiet Ho
Comment 3
2021-11-15 16:40:35 PST
***
Bug 232760
has been marked as a duplicate of this bug. ***
Kiet Ho
Comment 4
2021-11-15 18:00:24 PST
Created
attachment 444324
[details]
WIP
Kiet Ho
Comment 5
2021-11-19 10:54:34 PST
Created
attachment 444836
[details]
WIP
Kiet Ho
Comment 6
2021-11-19 10:58:56 PST
Still needs to figure out what is the correct serialization format. In particular, is it needed to make the serialization as short as possible? For example, Chrome and this patch serializes "auto none" to "auto none". However, "auto" is equivalent and shorter. On the other hand, "auto none reverse" must be serialized to "auto none reverse" and not "auto reverse", because according to the grammar, if offset-rotate is serialized, then so is offset-path.
Radar WebKit Bug Importer
Comment 7
2021-11-19 11:06:18 PST
<
rdar://problem/85611877
>
Nikos Mouchtaris
Comment 8
2022-02-10 23:56:01 PST
Created
attachment 451649
[details]
Patch
Nikos Mouchtaris
Comment 9
2022-02-11 10:58:37 PST
Created
attachment 451727
[details]
Patch
Dean Jackson
Comment 10
2022-02-15 12:57:26 PST
Comment on
attachment 451727
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=451727&action=review
> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2640 > + { > + auto innerList = CSSValueList::createSpaceSeparated(); > + innerList->append(valueForPositionOrAuto(style, style.offsetPosition())); > + innerList->append(valueForPathOperation(style, style.offsetPath(), SVGPathConversion::ForceAbsolute)); > + innerList->append(CSSValuePool::singleton().createValue(style.offsetDistance(), style)); > + innerList->append(valueForOffsetRotate(style.offsetRotate())); > + > + outerList->append(WTFMove(innerList)); > + }
Any reason for this being in its own scope?
> Source/WebCore/css/StyleProperties.cpp:466 > +static bool isAutoKeyword(const CSSValue& value) > +{ > + if (!is<CSSPrimitiveValue>(value)) > + return false; > + > + auto& primitiveValue = downcast<CSSPrimitiveValue>(value); > + return primitiveValue.isValueID() && primitiveValue.valueID() == CSSValueAuto; > +}
Is this really the first/only time we're checking for this keyword in the file?
> Source/WebCore/css/StyleProperties.cpp:508 > + if (!offsetDistance.value() || !is<CSSPrimitiveValue>(offsetDistance.value()))
Maybe a local variable for offsetDistance.value() to avoid calling it multiple times?
> Source/WebCore/css/StyleProperties.cpp:527 > + if (!offsetRotate.value() || !is<CSSOffsetRotateValue>(offsetRotate.value()))
Same with this .value()
Nikos Mouchtaris
Comment 11
2022-02-15 15:03:13 PST
Created
attachment 452096
[details]
Patch
Nikos Mouchtaris
Comment 12
2022-02-15 15:04:32 PST
(In reply to Dean Jackson from
comment #10
)
> Comment on
attachment 451727
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=451727&action=review
> > > Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2640 > > + { > > + auto innerList = CSSValueList::createSpaceSeparated(); > > + innerList->append(valueForPositionOrAuto(style, style.offsetPosition())); > > + innerList->append(valueForPathOperation(style, style.offsetPath(), SVGPathConversion::ForceAbsolute)); > > + innerList->append(CSSValuePool::singleton().createValue(style.offsetDistance(), style)); > > + innerList->append(valueForOffsetRotate(style.offsetRotate())); > > + > > + outerList->append(WTFMove(innerList)); > > + } > > Any reason for this being in its own scope?
Fixed.
> > > Source/WebCore/css/StyleProperties.cpp:466 > > +static bool isAutoKeyword(const CSSValue& value) > > +{ > > + if (!is<CSSPrimitiveValue>(value)) > > + return false; > > + > > + auto& primitiveValue = downcast<CSSPrimitiveValue>(value); > > + return primitiveValue.isValueID() && primitiveValue.valueID() == CSSValueAuto; > > +} > > Is this really the first/only time we're checking for this keyword in the > file?
No reason for this to be its own function.
> > > Source/WebCore/css/StyleProperties.cpp:508 > > + if (!offsetDistance.value() || !is<CSSPrimitiveValue>(offsetDistance.value())) > > Maybe a local variable for offsetDistance.value() to avoid calling it > multiple times?
Fixed.
> > > Source/WebCore/css/StyleProperties.cpp:527 > > + if (!offsetRotate.value() || !is<CSSOffsetRotateValue>(offsetRotate.value())) > > Same with this .value()
Fixed.
Nikos Mouchtaris
Comment 13
2022-02-15 16:47:47 PST
Created
attachment 452109
[details]
Patch
EWS
Comment 14
2022-02-15 21:28:19 PST
Committed
r289876
(
247314@main
): <
https://commits.webkit.org/247314@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 452109
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug