Repository navigation
Commit 7a63ecc
authored
* fix(html): keep a style attribute's lowered CSS however its source spelled it
The CSS minifier's answer is written whenever it differs from what the
source decodes to, at its shortest encoding, instead of only where it beat
the source's raw bytes. Run the html5lib CDATA tokenizer cases through the
tree builder and retire two HTML invariant exceptions.
* fix(css): quote a style attribute's strings so the list holds one quote kind
A string holding an apostrophe is written '-wrapped with \' escapes in a
block-contents print, so the attribute escapes nothing.
* fix(html): keep one `;` where a minified inline chunk ends its statement
* fix(html): print `<noscript>` as a scripting-on browser reads it
A head `<noscript>` read with scripting off lost its content to the body.
The wpt script-on tree cases now run under the flag.
* fix(css): merge distant rules past rules matching other element types
A rule whose subjects all name other element types never reaches an element
the moved selectors match. A block setting `all` no longer moves past what
declares anything since it was held.
* fix(css): keep a distant merge's grown list in the look-back join's record
The neighbor join read a list the merge grew by its old length and cut it
there, folding half a selector into the rule before it.
* test(css): hold mergeDistantRules to the cascade every element computes
Each stylesheet is printed with and without the merge, and every element its
selectors reach is read under both, over a seeded corpus, configCases and the
benchmark stylesheets.
* fix(html): keep the head whitespace a scripting-off reader reads as body text
Past a head `<noscript>` holding what the head cannot, such a reader has
left the head, so the whitespace after it is text in the body.
* test(css): adopt each cascade sheet rather than parse it from a <style>
Gecko leaves a <style> element's sheet null a while after an @import.
* fix(html): close a noscript comment where the tokenizer does
An abrupt `<!-->` or `<!--->` ends at once and `--!>` closes one too, so
text between them leaves the head for a reader with scripting off.
* test(css): name where an element differing in the cascade tier stands
* test(css): build no second html or body and compare only rendered elements
WebKit styles a nested <html>/<body> and a box-less element apart from the
tree around them, which read as cascade differences no page could show.
* test(javascript): spell the parse suite's import apart from loadSources
V8 hands back the function first compiled from the same text, bound to the
Jest environment that compiled it, so the suite failed whenever it ran after
syntax-printer.unittest.js in one worker.
* test(css): restyle the cascade probe's tree under each sheet
WebKit kept the Materialize probe root's inherited font and custom properties
from before its sheet applied, so the unmerged read differed from the merged
one on rules both prints hold alike. Reinserting the root before each read
resolves its subtree afresh against the sheet then adopted.
* test(css): insert the cascade probe's root once both sheets are adopted
Reinserting the root before each read reloaded replaced elements between the
reads, so Firefox laid the document out at different heights for one sheet.
Building the tree detached and inserting it after the adoptions styles the
root afresh, which is what WebKit needed, and leaves the reads one layout.
1 parent 26f5356 commit 7a63ecc
25 files changed
Lines changed: 1463 additions & 113 deletions
File tree
- .changeset
- declarations
- lib
- css
- html
- schemas
- test
- __snapshots__
- configCases/html/inline-script-minified
- helpers
- specCases
- unitCases
- tooling
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3153 | 3153 | | |
3154 | 3154 | | |
3155 | 3155 | | |
3156 | | - | |
| 3156 | + | |
3157 | 3157 | | |
3158 | 3158 | | |
3159 | 3159 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1785 | 1785 | | |
1786 | 1786 | | |
1787 | 1787 | | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
1788 | 1811 | | |
1789 | 1812 | | |
1790 | 1813 | | |
| |||
1804 | 1827 | | |
1805 | 1828 | | |
1806 | 1829 | | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
1807 | 1836 | | |
1808 | 1837 | | |
1809 | 1838 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
259 | 263 | | |
260 | 264 | | |
261 | 265 | | |
| |||
653 | 657 | | |
654 | 658 | | |
655 | 659 | | |
656 | | - | |
657 | | - | |
| 660 | + | |
| 661 | + | |
658 | 662 | | |
659 | 663 | | |
660 | | - | |
| 664 | + | |
661 | 665 | | |
662 | 666 | | |
663 | 667 | | |
| |||
683 | 687 | | |
684 | 688 | | |
685 | 689 | | |
686 | | - | |
| 690 | + | |
687 | 691 | | |
688 | 692 | | |
689 | 693 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1588 | 1588 | | |
1589 | 1589 | | |
1590 | 1590 | | |
1591 | | - | |
| 1591 | + | |
1592 | 1592 | | |
1593 | 1593 | | |
1594 | 1594 | | |
| |||
1598 | 1598 | | |
1599 | 1599 | | |
1600 | 1600 | | |
| 1601 | + | |
1601 | 1602 | | |
1602 | 1603 | | |
1603 | 1604 | | |
| |||
0 commit comments