RESOLVED FIXED232932
Default computed value for "content" should be "none" for ::before and ::after
https://bugs.webkit.org/show_bug.cgi?id=232932
Summary Default computed value for "content" should be "none" for ::before and ::after
Antoine Quint
Reported 2021-11-10 02:17:07 PST
Default computed value for "content" should be "none" for ::before and ::after
Attachments
Patch (2.94 KB, patch)
2021-11-10 02:17 PST, Antoine Quint
no flags
Patch (30.90 KB, patch)
2021-11-10 06:49 PST, Antoine Quint
koivisto: review+
ews-feeder: commit-queue-
Patch (16.06 KB, patch)
2021-11-10 12:23 PST, Antoine Quint
no flags
Antoine Quint
Comment 1 2021-11-10 02:17:43 PST
Antoine Quint
Comment 2 2021-11-10 06:49:52 PST
Antoine Quint
Comment 3 2021-11-10 12:23:33 PST
Darin Adler
Comment 4 2021-11-10 14:13:38 PST
Comment on attachment 443846 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=443846&action=review > Source/WebCore/css/CSSComputedStyleDeclaration.cpp:1822 > + list->append(cssValuePool.createIdentifierValue(isBeforeOrAfter ? CSSValueNone : CSSValueNormal)); Is it correct that we return this in a list rather than just the identifier, not in a list? Seems to me that it should not be a list, just a single value. Are we testing any code path that can tell the two apart, or only tests that involve serializing as text where we can’t tell a list with one element apart from a value?
Antoine Quint
Comment 5 2021-11-10 23:41:35 PST
(In reply to Darin Adler from comment #4) > Comment on attachment 443846 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=443846&action=review > > > Source/WebCore/css/CSSComputedStyleDeclaration.cpp:1822 > > + list->append(cssValuePool.createIdentifierValue(isBeforeOrAfter ? CSSValueNone : CSSValueNormal)); > > Is it correct that we return this in a list rather than just the identifier, > not in a list? Seems to me that it should not be a list, just a single value. I assume as much as we return all values, even single ones, in a list as well. For instance, `content: "test"` will return that single value in a list. > Are we testing any code path that can tell the two apart, or only tests that > involve serializing as text where we can’t tell a list with one element > apart from a value? I haven't looked at all the WPT coverage for `content` to answer this, but the particular tests that are progressing only look at the serialized text value.
Antoine Quint
Comment 6 2021-11-10 23:42:02 PST
I will land this as-is because returning a single value within a list is not a new behavior here.
EWS
Comment 7 2021-11-11 00:08:32 PST
Committed r285621 (244122@main): <https://commits.webkit.org/244122@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 443846 [details].
Radar WebKit Bug Importer
Comment 8 2021-11-11 00:09:20 PST
Darin Adler
Comment 9 2021-11-11 10:39:40 PST
Comment on attachment 443846 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=443846&action=review >>> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:1822 >>> + list->append(cssValuePool.createIdentifierValue(isBeforeOrAfter ? CSSValueNone : CSSValueNormal)); >> >> Is it correct that we return this in a list rather than just the identifier, not in a list? Seems to me that it should not be a list, just a single value. >> >> Are we testing any code path that can tell the two apart, or only tests that involve serializing as text where we can’t tell a list with one element apart from a value? > > I assume as much as we return all values, even single ones, in a list as well. For instance, `content: "test"` will return that single value in a list. This patch is fine. Separately, I think that we need to add tests that can tell the difference between lists and single values to WPT. Otherwise, differences between browsers can crop up and cause website incompatibilities.
Note You need to log in before you can comment on or make changes to this bug.