Skip to content

[css-text-4] 'white-space' and longhand integration #8274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 1, 2023

Conversation

fantasai
Copy link
Collaborator

Series of commits for properly integrating the L3 'white-space' shorthand and L4 longhand definitions in CSS Text Level 4.

@fantasai fantasai force-pushed the white-space branch 4 times, most recently from 6dcd4be to 4905670 Compare March 1, 2023 05:27
@frivoal frivoal merged commit 4a19da1 into w3c:main Mar 1, 2023
@frivoal frivoal added Closed Accepted by Editor Discretion Testing Unnecessary Memory aid - issue doesn't require tests labels Mar 1, 2023
@fantasai fantasai deleted the white-space branch March 21, 2023 06:43
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 28, 2023
This patch turns the `white-space` property to a shorthand
under a runtime switch `CSSWhiteSpaceShorthand`.

The parser and serializer in this CL supports the spec change
committed on 1st March, 2023[1], which addressed the
multi-value syntax request[2].

This patch also adds:
* The `white-space-collapse` property.
* The `nowrap` value to the `text-wrap` property.
to map all the existing `white-space` values.

The switch is currently off, because enabling it causes
several test failures in DOM, editing, copy/paste,
accessibility, and more, but when it's turned on, CSS parsing
tests added in this CL should pass. The plan is to fix these
failures in following CLs. When all tests and additional tests
for editing/etc. are all fixed, we can turn the switch on.

The `EWhiteSpace` enum is changed to bit-flags of the
longhands (`white-space-collapse` and `text-wrap`.) See
`white_spae.h`.

Regarding the storage in the `ComputedStyleBase`, having both
storage (for when the flag is on and off) is a waste, both
from memory and from read/write code performance point of view,
so the longhands storage is used even when the flag is off by
customized `ComputedStyle` functions; i.e., the storage for
the longhand version of the `white-space` is no longer used.
But this CL still preserves 1 bit for the `white-space` to
avoid changing the generator only for this transition period.

[1] w3c/csswg-drafts#8274
[2] w3c/csswg-drafts#5382

Bug: 1417543
Change-Id: I47080d0f10a4a5f366e3d855acfa5e584c029595
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 28, 2023
This patch turns the `white-space` property to a shorthand
under a runtime switch `CSSWhiteSpaceShorthand`.

The parser and serializer in this CL supports the spec change
committed on 1st March, 2023[1], which addressed the
multi-value syntax request[2].

This patch also adds:
* The `white-space-collapse` property.
* The `nowrap` value to the `text-wrap` property.
to map all the existing `white-space` values.

The switch is currently off, because enabling it causes
several test failures in DOM, editing, copy/paste,
accessibility, and more, but when it's turned on, CSS parsing
tests added in this CL should pass. The plan is to fix these
failures in following CLs. When all tests and additional tests
for editing/etc. are all fixed, we can turn the switch on.

The `EWhiteSpace` enum is changed to bit-flags of the
longhands (`white-space-collapse` and `text-wrap`.) See
`white_spae.h`.

Regarding the storage in the `ComputedStyleBase`, having both
storage (for when the flag is on and off) is a waste, both
from memory and from read/write code performance point of view,
so the longhands storage is used even when the flag is off by
customized `ComputedStyle` functions; i.e., the storage for
the longhand version of the `white-space` is no longer used.
But this CL still preserves 1 bit for the `white-space` to
avoid changing the generator only for this transition period.

[1] w3c/csswg-drafts#8274
[2] w3c/csswg-drafts#5382

Bug: 1417543
Change-Id: I47080d0f10a4a5f366e3d855acfa5e584c029595
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 28, 2023
This patch turns the `white-space` property to a shorthand
under a runtime switch `CSSWhiteSpaceShorthand`.

The parser and serializer in this CL supports the spec change
committed on 1st March, 2023[1], which addressed the
multi-value syntax request[2].

This patch also adds:
* The `white-space-collapse` property.
* The `nowrap` value to the `text-wrap` property.
to map all the existing `white-space` values.

The switch is currently off, because enabling it causes
several test failures in DOM, editing, copy/paste,
accessibility, and more, but when it's turned on, CSS parsing
tests added in this CL should pass. The plan is to fix these
failures in following CLs. When all tests and additional tests
for editing/etc. are all fixed, we can turn the switch on.

The `EWhiteSpace` enum is changed to bit-flags of the
longhands (`white-space-collapse` and `text-wrap`.) See
`white_spae.h`.

Regarding the storage in the `ComputedStyleBase`, having both
storage (for when the flag is on and off) is a waste, both
from memory and from read/write code performance point of view,
so the longhands storage is used even when the flag is off by
customized `ComputedStyle` functions; i.e., the storage for
the longhand version of the `white-space` is no longer used.
But this CL still preserves 1 bit for the `white-space` to
avoid changing the generator only for this transition period.

[1] w3c/csswg-drafts#8274
[2] w3c/csswg-drafts#5382

Bug: 1417543
Change-Id: I47080d0f10a4a5f366e3d855acfa5e584c029595
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 28, 2023
This patch turns the `white-space` property to a shorthand
under a runtime switch `CSSWhiteSpaceShorthand`.

The parser and serializer in this CL supports the spec change
committed on 1st March, 2023[1], which addressed the
multi-value syntax request[2].

This patch also adds:
* The `white-space-collapse` property.
* The `nowrap` value to the `text-wrap` property.
to map all the existing `white-space` values.

The switch is currently off, because enabling it causes
several test failures in DOM, editing, copy/paste,
accessibility, and more, but when it's turned on, CSS parsing
tests added in this CL should pass. The plan is to fix these
failures in following CLs. When all tests and additional tests
for editing/etc. are all fixed, we can turn the switch on.

The `EWhiteSpace` enum is changed to bit-flags of the
longhands (`white-space-collapse` and `text-wrap`.) See
`white_spae.h`.

Regarding the storage in the `ComputedStyleBase`, having both
storage (for when the flag is on and off) is a waste, both
from memory and from read/write code performance point of view,
so the longhands storage is used even when the flag is off by
customized `ComputedStyle` functions; i.e., the storage for
the longhand version of the `white-space` is no longer used.
But this CL still preserves 1 bit for the `white-space` to
avoid changing the generator only for this transition period.

[1] w3c/csswg-drafts#8274
[2] w3c/csswg-drafts#5382

Bug: 1417543
Change-Id: I47080d0f10a4a5f366e3d855acfa5e584c029595
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4232738
Reviewed-by: Anders Hartvoll Ruud <[email protected]>
Commit-Queue: Koji Ishii <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1123192}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 28, 2023
This patch turns the `white-space` property to a shorthand
under a runtime switch `CSSWhiteSpaceShorthand`.

The parser and serializer in this CL supports the spec change
committed on 1st March, 2023[1], which addressed the
multi-value syntax request[2].

This patch also adds:
* The `white-space-collapse` property.
* The `nowrap` value to the `text-wrap` property.
to map all the existing `white-space` values.

The switch is currently off, because enabling it causes
several test failures in DOM, editing, copy/paste,
accessibility, and more, but when it's turned on, CSS parsing
tests added in this CL should pass. The plan is to fix these
failures in following CLs. When all tests and additional tests
for editing/etc. are all fixed, we can turn the switch on.

The `EWhiteSpace` enum is changed to bit-flags of the
longhands (`white-space-collapse` and `text-wrap`.) See
`white_spae.h`.

Regarding the storage in the `ComputedStyleBase`, having both
storage (for when the flag is on and off) is a waste, both
from memory and from read/write code performance point of view,
so the longhands storage is used even when the flag is off by
customized `ComputedStyle` functions; i.e., the storage for
the longhand version of the `white-space` is no longer used.
But this CL still preserves 1 bit for the `white-space` to
avoid changing the generator only for this transition period.

[1] w3c/csswg-drafts#8274
[2] w3c/csswg-drafts#5382

Bug: 1417543
Change-Id: I47080d0f10a4a5f366e3d855acfa5e584c029595
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4232738
Reviewed-by: Anders Hartvoll Ruud <[email protected]>
Commit-Queue: Koji Ishii <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1123192}
cookiecrook pushed a commit to cookiecrook/wpt that referenced this pull request Mar 29, 2023
This patch turns the `white-space` property to a shorthand
under a runtime switch `CSSWhiteSpaceShorthand`.

The parser and serializer in this CL supports the spec change
committed on 1st March, 2023[1], which addressed the
multi-value syntax request[2].

This patch also adds:
* The `white-space-collapse` property.
* The `nowrap` value to the `text-wrap` property.
to map all the existing `white-space` values.

The switch is currently off, because enabling it causes
several test failures in DOM, editing, copy/paste,
accessibility, and more, but when it's turned on, CSS parsing
tests added in this CL should pass. The plan is to fix these
failures in following CLs. When all tests and additional tests
for editing/etc. are all fixed, we can turn the switch on.

The `EWhiteSpace` enum is changed to bit-flags of the
longhands (`white-space-collapse` and `text-wrap`.) See
`white_spae.h`.

Regarding the storage in the `ComputedStyleBase`, having both
storage (for when the flag is on and off) is a waste, both
from memory and from read/write code performance point of view,
so the longhands storage is used even when the flag is off by
customized `ComputedStyle` functions; i.e., the storage for
the longhand version of the `white-space` is no longer used.
But this CL still preserves 1 bit for the `white-space` to
avoid changing the generator only for this transition period.

[1] w3c/csswg-drafts#8274
[2] w3c/csswg-drafts#5382

Bug: 1417543
Change-Id: I47080d0f10a4a5f366e3d855acfa5e584c029595
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4232738
Reviewed-by: Anders Hartvoll Ruud <[email protected]>
Commit-Queue: Koji Ishii <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1123192}
cookiecrook pushed a commit to cookiecrook/wpt that referenced this pull request Apr 8, 2023
This patch turns the `white-space` property to a shorthand
under a runtime switch `CSSWhiteSpaceShorthand`.

The parser and serializer in this CL supports the spec change
committed on 1st March, 2023[1], which addressed the
multi-value syntax request[2].

This patch also adds:
* The `white-space-collapse` property.
* The `nowrap` value to the `text-wrap` property.
to map all the existing `white-space` values.

The switch is currently off, because enabling it causes
several test failures in DOM, editing, copy/paste,
accessibility, and more, but when it's turned on, CSS parsing
tests added in this CL should pass. The plan is to fix these
failures in following CLs. When all tests and additional tests
for editing/etc. are all fixed, we can turn the switch on.

The `EWhiteSpace` enum is changed to bit-flags of the
longhands (`white-space-collapse` and `text-wrap`.) See
`white_spae.h`.

Regarding the storage in the `ComputedStyleBase`, having both
storage (for when the flag is on and off) is a waste, both
from memory and from read/write code performance point of view,
so the longhands storage is used even when the flag is off by
customized `ComputedStyle` functions; i.e., the storage for
the longhand version of the `white-space` is no longer used.
But this CL still preserves 1 bit for the `white-space` to
avoid changing the generator only for this transition period.

[1] w3c/csswg-drafts#8274
[2] w3c/csswg-drafts#5382

Bug: 1417543
Change-Id: I47080d0f10a4a5f366e3d855acfa5e584c029595
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4232738
Reviewed-by: Anders Hartvoll Ruud <[email protected]>
Commit-Queue: Koji Ishii <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1123192}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Apr 13, 2023
…orthand, a=testonly

Automatic update from web-platform-tests
[white-space] Turn `white-space` to a shorthand

This patch turns the `white-space` property to a shorthand
under a runtime switch `CSSWhiteSpaceShorthand`.

The parser and serializer in this CL supports the spec change
committed on 1st March, 2023[1], which addressed the
multi-value syntax request[2].

This patch also adds:
* The `white-space-collapse` property.
* The `nowrap` value to the `text-wrap` property.
to map all the existing `white-space` values.

The switch is currently off, because enabling it causes
several test failures in DOM, editing, copy/paste,
accessibility, and more, but when it's turned on, CSS parsing
tests added in this CL should pass. The plan is to fix these
failures in following CLs. When all tests and additional tests
for editing/etc. are all fixed, we can turn the switch on.

The `EWhiteSpace` enum is changed to bit-flags of the
longhands (`white-space-collapse` and `text-wrap`.) See
`white_spae.h`.

Regarding the storage in the `ComputedStyleBase`, having both
storage (for when the flag is on and off) is a waste, both
from memory and from read/write code performance point of view,
so the longhands storage is used even when the flag is off by
customized `ComputedStyle` functions; i.e., the storage for
the longhand version of the `white-space` is no longer used.
But this CL still preserves 1 bit for the `white-space` to
avoid changing the generator only for this transition period.

[1] w3c/csswg-drafts#8274
[2] w3c/csswg-drafts#5382

Bug: 1417543
Change-Id: I47080d0f10a4a5f366e3d855acfa5e584c029595
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4232738
Reviewed-by: Anders Hartvoll Ruud <[email protected]>
Commit-Queue: Koji Ishii <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1123192}

--

wpt-commits: c5dc05f232b36134c54031244de60d7bd5c32721
wpt-pr: 39244
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted by Editor Discretion Testing Unnecessary Memory aid - issue doesn't require tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants