Skip to content
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

[cssom] Declaration block serialization treats shorthands strangely #1774

Closed
jdm opened this issue Sep 1, 2017 · 1 comment
Closed

[cssom] Declaration block serialization treats shorthands strangely #1774

jdm opened this issue Sep 1, 2017 · 1 comment
Labels
cssom-1 Current Work

Comments

@jdm
Copy link

jdm commented Sep 1, 2017

The shorthand loop when serializing a declaration block has two odd parts to it:

  • it refers to the longhands array which consists of properties that have not yet been serialized, but that array is only defined before the start of the loop. As written, it's not clear if step 1 of the shorthand loop is supposed to account for properties serialized in previous iterations of the shorthand loop.
  • it's also not clear why it's worth continuing to execute subsequent iterations of the shorthand loop if a shorthand is successfully serialized. Given that shorthands are organized in preferred order, why would we end up serializing a less-preferred shorthand if a more-preferred one was already used?
@fantasai fantasai added the cssom-1 Current Work label Sep 5, 2017
bors-servo pushed a commit to servo/servo that referenced this issue Sep 13, 2017
Make serialization match Gecko in a few corner cases

This addresses the testcases from https://bugzilla.mozilla.org/show_bug.cgi?id=1345218. Gecko differs from the specification by doing the following:
* reusing longhands that have previously been serialized in order to serialize shorthands
* immediately breaking out of the shorthand loop for the current property as soon as a shorthand is successfully serialized

w3c/csswg-drafts#1774 is filed to track ways that the standard could be made more clear on these points.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [bug 1345218](https://bugzilla.mozilla.org/show_bug.cgi?id=1345218).
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18352)
<!-- Reviewable:end -->
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Sep 13, 2017
…cases (from jdm:serialize-fun); r=emilio

This addresses the testcases from https://bugzilla.mozilla.org/show_bug.cgi?id=1345218. Gecko differs from the specification by doing the following:
* reusing longhands that have previously been serialized in order to serialize shorthands
* immediately breaking out of the shorthand loop for the current property as soon as a shorthand is successfully serialized

w3c/csswg-drafts#1774 is filed to track ways that the standard could be made more clear on these points.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [bug 1345218](https://bugzilla.mozilla.org/show_bug.cgi?id=1345218).
- [X] There are tests for these changes

Source-Repo: https://github.com/servo/servo
Source-Revision: e50341d4a91beded42bdcdf37bfb8a7e53070234

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 7a6a5916d6c5fb63f277ceaad62cf83fe03d9705
xeonchen pushed a commit to xeonchen/gecko-cinnabar that referenced this issue Sep 14, 2017
…cases (from jdm:serialize-fun); r=emilio

This addresses the testcases from https://bugzilla.mozilla.org/show_bug.cgi?id=1345218. Gecko differs from the specification by doing the following:
* reusing longhands that have previously been serialized in order to serialize shorthands
* immediately breaking out of the shorthand loop for the current property as soon as a shorthand is successfully serialized

w3c/csswg-drafts#1774 is filed to track ways that the standard could be made more clear on these points.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [bug 1345218](https://bugzilla.mozilla.org/show_bug.cgi?id=1345218).
- [X] There are tests for these changes

Source-Repo: https://github.com/servo/servo
Source-Revision: e50341d4a91beded42bdcdf37bfb8a7e53070234
aethanyc pushed a commit to aethanyc/gecko-dev that referenced this issue Sep 14, 2017
…cases (from jdm:serialize-fun); r=emilio

This addresses the testcases from https://bugzilla.mozilla.org/show_bug.cgi?id=1345218. Gecko differs from the specification by doing the following:
* reusing longhands that have previously been serialized in order to serialize shorthands
* immediately breaking out of the shorthand loop for the current property as soon as a shorthand is successfully serialized

w3c/csswg-drafts#1774 is filed to track ways that the standard could be made more clear on these points.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [bug 1345218](https://bugzilla.mozilla.org/show_bug.cgi?id=1345218).
- [X] There are tests for these changes

Source-Repo: https://github.com/servo/servo
Source-Revision: e50341d4a91beded42bdcdf37bfb8a7e53070234
JerryShih pushed a commit to JerryShih/gecko-dev that referenced this issue Sep 14, 2017
…cases (from jdm:serialize-fun); r=emilio

This addresses the testcases from https://bugzilla.mozilla.org/show_bug.cgi?id=1345218. Gecko differs from the specification by doing the following:
* reusing longhands that have previously been serialized in order to serialize shorthands
* immediately breaking out of the shorthand loop for the current property as soon as a shorthand is successfully serialized

w3c/csswg-drafts#1774 is filed to track ways that the standard could be made more clear on these points.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [bug 1345218](https://bugzilla.mozilla.org/show_bug.cgi?id=1345218).
- [X] There are tests for these changes

Source-Repo: https://github.com/servo/servo
Source-Revision: e50341d4a91beded42bdcdf37bfb8a7e53070234
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 1, 2019
…cases (from jdm:serialize-fun); r=emilio

This addresses the testcases from https://bugzilla.mozilla.org/show_bug.cgi?id=1345218. Gecko differs from the specification by doing the following:
* reusing longhands that have previously been serialized in order to serialize shorthands
* immediately breaking out of the shorthand loop for the current property as soon as a shorthand is successfully serialized

w3c/csswg-drafts#1774 is filed to track ways that the standard could be made more clear on these points.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [bug 1345218](https://bugzilla.mozilla.org/show_bug.cgi?id=1345218).
- [X] There are tests for these changes

Source-Repo: https://github.com/servo/servo
Source-Revision: e50341d4a91beded42bdcdf37bfb8a7e53070234

UltraBlame original commit: db9ef4f3705b3a4541fef5093398ba43c110fc15
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 2, 2019
…cases (from jdm:serialize-fun); r=emilio

This addresses the testcases from https://bugzilla.mozilla.org/show_bug.cgi?id=1345218. Gecko differs from the specification by doing the following:
* reusing longhands that have previously been serialized in order to serialize shorthands
* immediately breaking out of the shorthand loop for the current property as soon as a shorthand is successfully serialized

w3c/csswg-drafts#1774 is filed to track ways that the standard could be made more clear on these points.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [bug 1345218](https://bugzilla.mozilla.org/show_bug.cgi?id=1345218).
- [X] There are tests for these changes

Source-Repo: https://github.com/servo/servo
Source-Revision: e50341d4a91beded42bdcdf37bfb8a7e53070234

UltraBlame original commit: db9ef4f3705b3a4541fef5093398ba43c110fc15
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 2, 2019
…cases (from jdm:serialize-fun); r=emilio

This addresses the testcases from https://bugzilla.mozilla.org/show_bug.cgi?id=1345218. Gecko differs from the specification by doing the following:
* reusing longhands that have previously been serialized in order to serialize shorthands
* immediately breaking out of the shorthand loop for the current property as soon as a shorthand is successfully serialized

w3c/csswg-drafts#1774 is filed to track ways that the standard could be made more clear on these points.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [bug 1345218](https://bugzilla.mozilla.org/show_bug.cgi?id=1345218).
- [X] There are tests for these changes

Source-Repo: https://github.com/servo/servo
Source-Revision: e50341d4a91beded42bdcdf37bfb8a7e53070234

UltraBlame original commit: db9ef4f3705b3a4541fef5093398ba43c110fc15
@emilio
Copy link
Collaborator

emilio commented Oct 25, 2020

This was fixed in #5655, second commit in particular.

@emilio emilio closed this as completed Oct 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cssom-1 Current Work
Projects
None yet
Development

No branches or pull requests

3 participants