Gitweb links:
...log
http://git.netsurf-browser.org/libcss.git/shortlog/99cd3758f85614529f53ac...
...commit
http://git.netsurf-browser.org/libcss.git/commit/99cd3758f85614529f53ac78...
...tree
http://git.netsurf-browser.org/libcss.git/tree/99cd3758f85614529f53ac7883...
The branch, master has been updated
via 99cd3758f85614529f53ac788313b4da586edd73 (commit)
via 2fc58495a7865170a05e385aa54ca931c0c453c3 (commit)
via 7b6641c66fa14b0512ea601cc0d7ea8ca7e8eeab (commit)
via 4729e025decd4d92ceeeb40659decf6183594ac6 (commit)
via 24207928eb8ba5cc40db4ddd60c60866ec8af684 (commit)
via 30833a1ad59bc1f20a4995b23d2794be17227b51 (commit)
via 8bce7365823f887113c73af46ecdfee6322653f9 (commit)
via 5965aa66899dcd1b97d35656c56d512815a6579d (commit)
via c8a369173ed4139471e531db8a52c3529417e3c4 (commit)
via 193640287aba0c574c1a4b2fd63133f29e1b42d6 (commit)
via e66f4133ef6c036f2f8a53b8df94fe80453c7983 (commit)
via db3a3e164a45fe59d7df3c36495d97f4105b665d (commit)
via 2fff3afe1a29825213a2eb134065834ae08b1140 (commit)
via 3eb5209c42d45458c34e554cef6a626f0326b511 (commit)
via dee446280575217e81fdf2787e231ba92113c403 (commit)
from 78c9527819b6acbf4d3826383eaa328780170b48 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/libcss.git/commit/?id=99cd3758f85614529f53...
commit 99cd3758f85614529f53ac788313b4da586edd73
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Add break-* property selection tests.
diff --git a/test/data/select/tests1.dat b/test/data/select/tests1.dat
index 92ac7a0..786e19a 100644
--- a/test/data/select/tests1.dat
+++ b/test/data/select/tests1.dat
@@ -4886,3 +4886,312 @@ writing-mode: horizontal-tb
z-index: auto
#reset
+#tree
+| div
+| id=foo
+| p*
+| class=green
+#ua
+p { display: block; break-after: avoid; break-before: column; }
+#user
+#author
+#errors
+#expected
+background-attachment: scroll
+background-color: #00000000
+background-image: none
+background-position: 0% 0%
+background-repeat: repeat
+border-collapse: inherit
+border-spacing: inherit
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
+border-top-style: none
+border-right-style: none
+border-bottom-style: none
+border-left-style: none
+border-top-width: medium
+border-right-width: medium
+border-bottom-width: medium
+border-left-width: medium
+bottom: auto
+break-after: avoid
+break-before: column
+break-inside: auto
+caption-side: inherit
+clear: none
+clip: auto
+color: inherit
+column-count: auto
+column-fill: balance
+column-gap: normal
+column-rule-color: inherit
+column-rule-style: none
+column-rule-width: medium
+column-span: none
+column-width: auto
+content: normal
+counter-increment: none
+counter-reset: none
+cursor: inherit
+direction: inherit
+display: block
+empty-cells: inherit
+float: none
+font-family: inherit
+font-size: inherit
+font-style: inherit
+font-variant: inherit
+font-weight: inherit
+height: auto
+left: auto
+letter-spacing: inherit
+line-height: inherit
+list-style-image: inherit
+list-style-position: inherit
+list-style-type: inherit
+margin-top: 0px
+margin-right: 0px
+margin-bottom: 0px
+margin-left: 0px
+max-height: none
+max-width: none
+min-height: 0px
+min-width: 0px
+opacity: 1.000
+outline-color: invert
+outline-style: none
+outline-width: medium
+overflow-x: visible
+overflow-y: visible
+padding-top: 0px
+padding-right: 0px
+padding-bottom: 0px
+padding-left: 0px
+position: static
+quotes: inherit
+right: auto
+table-layout: auto
+text-align: inherit
+text-decoration: none
+text-indent: inherit
+text-transform: inherit
+top: auto
+unicode-bidi: normal
+vertical-align: baseline
+visibility: inherit
+white-space: inherit
+width: auto
+word-spacing: inherit
+writing-mode: horizontal-tb
+z-index: auto
+#reset
+
+#tree
+| div
+| id=foo
+| p*
+| class=green
+#ua
+p { display: block; break-after: avoid-page; break-before: always; }
+#user
+#author
+#errors
+#expected
+background-attachment: scroll
+background-color: #00000000
+background-image: none
+background-position: 0% 0%
+background-repeat: repeat
+border-collapse: inherit
+border-spacing: inherit
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
+border-top-style: none
+border-right-style: none
+border-bottom-style: none
+border-left-style: none
+border-top-width: medium
+border-right-width: medium
+border-bottom-width: medium
+border-left-width: medium
+bottom: auto
+break-after: avoid-page
+break-before: always
+break-inside: auto
+caption-side: inherit
+clear: none
+clip: auto
+color: inherit
+column-count: auto
+column-fill: balance
+column-gap: normal
+column-rule-color: inherit
+column-rule-style: none
+column-rule-width: medium
+column-span: none
+column-width: auto
+content: normal
+counter-increment: none
+counter-reset: none
+cursor: inherit
+direction: inherit
+display: block
+empty-cells: inherit
+float: none
+font-family: inherit
+font-size: inherit
+font-style: inherit
+font-variant: inherit
+font-weight: inherit
+height: auto
+left: auto
+letter-spacing: inherit
+line-height: inherit
+list-style-image: inherit
+list-style-position: inherit
+list-style-type: inherit
+margin-top: 0px
+margin-right: 0px
+margin-bottom: 0px
+margin-left: 0px
+max-height: none
+max-width: none
+min-height: 0px
+min-width: 0px
+opacity: 1.000
+outline-color: invert
+outline-style: none
+outline-width: medium
+overflow-x: visible
+overflow-y: visible
+padding-top: 0px
+padding-right: 0px
+padding-bottom: 0px
+padding-left: 0px
+position: static
+quotes: inherit
+right: auto
+table-layout: auto
+text-align: inherit
+text-decoration: none
+text-indent: inherit
+text-transform: inherit
+top: auto
+unicode-bidi: normal
+vertical-align: baseline
+visibility: inherit
+white-space: inherit
+width: auto
+word-spacing: inherit
+writing-mode: horizontal-tb
+z-index: auto
+#reset
+
+#tree
+| div
+| id=foo
+| p*
+| class=green
+#ua
+p { display: block; break-after: avoid-page; break-before: always; break-inside: avoid;
}
+#user
+#author
+#errors
+#expected
+background-attachment: scroll
+background-color: #00000000
+background-image: none
+background-position: 0% 0%
+background-repeat: repeat
+border-collapse: inherit
+border-spacing: inherit
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
+border-top-style: none
+border-right-style: none
+border-bottom-style: none
+border-left-style: none
+border-top-width: medium
+border-right-width: medium
+border-bottom-width: medium
+border-left-width: medium
+bottom: auto
+break-after: avoid-page
+break-before: always
+break-inside: avoid
+caption-side: inherit
+clear: none
+clip: auto
+color: inherit
+column-count: auto
+column-fill: balance
+column-gap: normal
+column-rule-color: inherit
+column-rule-style: none
+column-rule-width: medium
+column-span: none
+column-width: auto
+content: normal
+counter-increment: none
+counter-reset: none
+cursor: inherit
+direction: inherit
+display: block
+empty-cells: inherit
+float: none
+font-family: inherit
+font-size: inherit
+font-style: inherit
+font-variant: inherit
+font-weight: inherit
+height: auto
+left: auto
+letter-spacing: inherit
+line-height: inherit
+list-style-image: inherit
+list-style-position: inherit
+list-style-type: inherit
+margin-top: 0px
+margin-right: 0px
+margin-bottom: 0px
+margin-left: 0px
+max-height: none
+max-width: none
+min-height: 0px
+min-width: 0px
+opacity: 1.000
+outline-color: invert
+outline-style: none
+outline-width: medium
+overflow-x: visible
+overflow-y: visible
+padding-top: 0px
+padding-right: 0px
+padding-bottom: 0px
+padding-left: 0px
+position: static
+quotes: inherit
+right: auto
+table-layout: auto
+text-align: inherit
+text-decoration: none
+text-indent: inherit
+text-transform: inherit
+top: auto
+unicode-bidi: normal
+vertical-align: baseline
+visibility: inherit
+white-space: inherit
+width: auto
+word-spacing: inherit
+writing-mode: horizontal-tb
+z-index: auto
+#reset
+
commitdiff
http://git.netsurf-browser.org/libcss.git/commit/?id=2fc58495a7865170a05e...
commit 2fc58495a7865170a05e385aa54ca931c0c453c3
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Fixup break-inside.
diff --git a/src/select/properties/break_inside.c b/src/select/properties/break_inside.c
index 58931b3..af0259f 100644
--- a/src/select/properties/break_inside.c
+++ b/src/select/properties/break_inside.c
@@ -17,8 +17,33 @@
css_error css__cascade_break_inside(uint32_t opv, css_style *style,
css_select_state *state)
{
- return css__cascade_break_after_before_inside(opv, style, state,
- set_break_inside);
+ uint16_t value = CSS_BREAK_AFTER_AUTO;
+
+ UNUSED(style);
+
+ if (isInherit(opv) == false) {
+ switch (getValue(opv)) {
+ case BREAK_INSIDE_AUTO:
+ value = CSS_BREAK_AFTER_AUTO;
+ break;
+ case BREAK_INSIDE_AVOID:
+ value = CSS_BREAK_AFTER_AVOID;
+ break;
+ case BREAK_INSIDE_AVOID_PAGE:
+ value = CSS_BREAK_AFTER_AVOID_PAGE;
+ break;
+ case BREAK_INSIDE_AVOID_COLUMN:
+ value = CSS_BREAK_AFTER_AVOID_COLUMN;
+ break;
+ }
+ }
+
+ if (css__outranks_existing(getOpcode(opv), isImportant(opv), state,
+ isInherit(opv))) {
+ return set_break_inside(state->computed, value);
+ }
+
+ return CSS_OK;
}
css_error css__set_break_inside_from_hint(const css_hint *hint,
commitdiff
http://git.netsurf-browser.org/libcss.git/commit/?id=7b6641c66fa14b0512ea...
commit 7b6641c66fa14b0512ea601cc0d7ea8ca7e8eeab
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Dump break-* properties from computed styles, and update test data.
diff --git a/test/data/select/tests1.dat b/test/data/select/tests1.dat
index a2a5806..92ac7a0 100644
--- a/test/data/select/tests1.dat
+++ b/test/data/select/tests1.dat
@@ -29,6 +29,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -133,6 +136,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -238,6 +244,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -343,6 +352,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -448,6 +460,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -545,6 +560,9 @@ border-right-width: 2px
border-bottom-width: 2px
border-left-width: 2px
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: top
clear: none
clip: auto
@@ -640,6 +658,9 @@ border-right-width: 2px
border-bottom-width: 2px
border-left-width: 2px
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: top
clear: none
clip: auto
@@ -736,6 +757,9 @@ border-right-width: 2px
border-bottom-width: 2px
border-left-width: 2px
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: top
clear: none
clip: auto
@@ -832,6 +856,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -927,6 +954,9 @@ border-right-width: 2px
border-bottom-width: 2px
border-left-width: 2px
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: top
clear: none
clip: auto
@@ -1027,6 +1057,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -1127,6 +1160,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -1228,6 +1264,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -1332,6 +1371,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -1435,6 +1477,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -1544,6 +1589,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -1653,6 +1701,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -1762,6 +1813,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -1875,6 +1929,9 @@ border-right-width: medium
border-bottom-width: thick
border-left-width: 2px
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -1987,6 +2044,9 @@ border-right-width: 2em
border-bottom-width: thick
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -2097,6 +2157,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -2206,6 +2269,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -2315,6 +2381,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -2424,6 +2493,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -2533,6 +2605,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -2642,6 +2717,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: inherit
clip: auto
@@ -2751,6 +2829,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: left
clip: auto
@@ -2860,6 +2941,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: both
clip: auto
@@ -2969,6 +3053,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -3078,6 +3165,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -3187,6 +3277,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -3296,6 +3389,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -3405,6 +3501,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -3514,6 +3613,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -3623,6 +3725,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -3732,6 +3837,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -3841,6 +3949,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -3950,6 +4061,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -4059,6 +4173,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -4168,6 +4285,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -4277,6 +4397,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -4379,6 +4502,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -4481,6 +4607,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -4583,6 +4712,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -4682,6 +4814,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
diff --git a/test/dump_computed.h b/test/dump_computed.h
index a4c0b89..8efd2ca 100644
--- a/test/dump_computed.h
+++ b/test/dump_computed.h
@@ -715,6 +715,111 @@ static void dump_computed_style(const css_computed_style *style,
char *buf,
ptr += wrote;
*len -= wrote;
+ /* break-after */
+ val = css_computed_break_after(style);
+ switch (val) {
+ case CSS_BREAK_AFTER_INHERIT:
+ wrote = snprintf(ptr, *len, "break-after: inherit\n");
+ break;
+ case CSS_BREAK_AFTER_AUTO:
+ wrote = snprintf(ptr, *len, "break-after: auto\n");
+ break;
+ case CSS_BREAK_AFTER_ALWAYS:
+ wrote = snprintf(ptr, *len, "break-after: always\n");
+ break;
+ case CSS_BREAK_AFTER_AVOID:
+ wrote = snprintf(ptr, *len, "break-after: avoid\n");
+ break;
+ case CSS_BREAK_AFTER_LEFT:
+ wrote = snprintf(ptr, *len, "break-after: left\n");
+ break;
+ case CSS_BREAK_AFTER_RIGHT:
+ wrote = snprintf(ptr, *len, "break-after: right\n");
+ break;
+ case CSS_BREAK_AFTER_PAGE:
+ wrote = snprintf(ptr, *len, "break-after: page\n");
+ break;
+ case CSS_BREAK_AFTER_COLUMN:
+ wrote = snprintf(ptr, *len, "break-after: column\n");
+ break;
+ case CSS_BREAK_AFTER_AVOID_PAGE:
+ wrote = snprintf(ptr, *len, "break-after: avoid-page\n");
+ break;
+ case CSS_BREAK_AFTER_AVOID_COLUMN:
+ wrote = snprintf(ptr, *len, "break-after: avoid-column\n");
+ break;
+ default:
+ wrote = 0;
+ break;
+ }
+ ptr += wrote;
+ *len -= wrote;
+
+ /* break-before */
+ val = css_computed_break_before(style);
+ switch (val) {
+ case CSS_BREAK_BEFORE_INHERIT:
+ wrote = snprintf(ptr, *len, "break-before: inherit\n");
+ break;
+ case CSS_BREAK_BEFORE_AUTO:
+ wrote = snprintf(ptr, *len, "break-before: auto\n");
+ break;
+ case CSS_BREAK_BEFORE_ALWAYS:
+ wrote = snprintf(ptr, *len, "break-before: always\n");
+ break;
+ case CSS_BREAK_BEFORE_AVOID:
+ wrote = snprintf(ptr, *len, "break-before: avoid\n");
+ break;
+ case CSS_BREAK_BEFORE_LEFT:
+ wrote = snprintf(ptr, *len, "break-before: left\n");
+ break;
+ case CSS_BREAK_BEFORE_RIGHT:
+ wrote = snprintf(ptr, *len, "break-before: right\n");
+ break;
+ case CSS_BREAK_BEFORE_PAGE:
+ wrote = snprintf(ptr, *len, "break-before: page\n");
+ break;
+ case CSS_BREAK_BEFORE_COLUMN:
+ wrote = snprintf(ptr, *len, "break-before: column\n");
+ break;
+ case CSS_BREAK_BEFORE_AVOID_PAGE:
+ wrote = snprintf(ptr, *len, "break-before: avoid-page\n");
+ break;
+ case CSS_BREAK_BEFORE_AVOID_COLUMN:
+ wrote = snprintf(ptr, *len, "break-before: avoid-column\n");
+ break;
+ default:
+ wrote = 0;
+ break;
+ }
+ ptr += wrote;
+ *len -= wrote;
+
+ /* break-inside */
+ val = css_computed_break_inside(style);
+ switch (val) {
+ case CSS_BREAK_INSIDE_INHERIT:
+ wrote = snprintf(ptr, *len, "break-inside: inherit\n");
+ break;
+ case CSS_BREAK_INSIDE_AUTO:
+ wrote = snprintf(ptr, *len, "break-inside: auto\n");
+ break;
+ case CSS_BREAK_INSIDE_AVOID:
+ wrote = snprintf(ptr, *len, "break-inside: avoid\n");
+ break;
+ case CSS_BREAK_INSIDE_AVOID_PAGE:
+ wrote = snprintf(ptr, *len, "break-inside: avoid-page\n");
+ break;
+ case CSS_BREAK_INSIDE_AVOID_COLUMN:
+ wrote = snprintf(ptr, *len, "break-inside: avoid-column\n");
+ break;
+ default:
+ wrote = 0;
+ break;
+ }
+ ptr += wrote;
+ *len -= wrote;
+
/* caption-side */
val = css_computed_caption_side(style);
switch (val) {
commitdiff
http://git.netsurf-browser.org/libcss.git/commit/?id=4729e025decd4d92ceee...
commit 4729e025decd4d92ceeeb40659decf6183594ac6
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Add break-inside property support.
diff --git a/include/libcss/computed.h b/include/libcss/computed.h
index d027b4f..233265c 100644
--- a/include/libcss/computed.h
+++ b/include/libcss/computed.h
@@ -338,6 +338,9 @@ uint8_t css_computed_break_after(
uint8_t css_computed_break_before(
const css_computed_style *style);
+uint8_t css_computed_break_inside(
+ const css_computed_style *style);
+
uint8_t css_computed_column_count(
const css_computed_style *style,
int32_t *column_count);
diff --git a/src/select/computed.c b/src/select/computed.c
index 20fa082..a33b6a2 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -797,6 +797,11 @@ uint8_t css_computed_break_before(const css_computed_style *style)
return get_break_before(style);
}
+uint8_t css_computed_break_inside(const css_computed_style *style)
+{
+ return get_break_inside(style);
+}
+
uint8_t css_computed_column_count(const css_computed_style *style,
int32_t *column_count)
{
diff --git a/src/select/properties/break_inside.c b/src/select/properties/break_inside.c
index 82cf09c..58931b3 100644
--- a/src/select/properties/break_inside.c
+++ b/src/select/properties/break_inside.c
@@ -17,51 +17,31 @@
css_error css__cascade_break_inside(uint32_t opv, css_style *style,
css_select_state *state)
{
- UNUSED(style);
-
- if (isInherit(opv) == false) {
- switch (getValue(opv)) {
- case BREAK_INSIDE_AUTO:
- case BREAK_INSIDE_AVOID:
- case BREAK_INSIDE_AVOID_PAGE:
- case BREAK_INSIDE_AVOID_COLUMN:
- /** \todo convert to public values */
- break;
- }
- }
-
- if (css__outranks_existing(getOpcode(opv), isImportant(opv), state,
- isInherit(opv))) {
- /** \todo set computed elevation */
- }
-
- return CSS_OK;
+ return css__cascade_break_after_before_inside(opv, style, state,
+ set_break_inside);
}
css_error css__set_break_inside_from_hint(const css_hint *hint,
css_computed_style *style)
{
- UNUSED(hint);
- UNUSED(style);
-
- return CSS_OK;
+ return set_break_inside(style, hint->status);
}
css_error css__initial_break_inside(css_select_state *state)
{
- UNUSED(state);
-
- return CSS_OK;
+ return set_break_inside(state->computed, CSS_BREAK_INSIDE_AUTO);
}
css_error css__compose_break_inside(const css_computed_style *parent,
const css_computed_style *child,
css_computed_style *result)
{
- UNUSED(parent);
- UNUSED(child);
- UNUSED(result);
+ uint8_t type = get_break_inside(child);
+
+ if (type == CSS_BREAK_INSIDE_INHERIT) {
+ type = get_break_inside(parent);
+ }
- return CSS_OK;
+ return set_break_inside(result, type);
}
diff --git a/src/select/propget.h b/src/select/propget.h
index 93d96da..45c773f 100644
--- a/src/select/propget.h
+++ b/src/select/propget.h
@@ -188,6 +188,28 @@ static inline uint8_t get_break_before(
#undef BREAK_BEFORE_SHIFT
#undef BREAK_BEFORE_INDEX
+#define BREAK_INSIDE_INDEX 13
+#define BREAK_INSIDE_SHIFT 4
+#define BREAK_INSIDE_MASK (0xf << 4)
+static inline uint8_t get_break_inside(
+ const css_computed_style *style)
+{
+ if (style->uncommon != NULL) {
+ uint8_t bits = style->uncommon->bits[BREAK_INSIDE_INDEX];
+ bits &= BREAK_INSIDE_MASK;
+ bits >>= BREAK_INSIDE_SHIFT;
+
+ /* 4bits: type */
+ return bits;
+ }
+
+ /* Not inherited; initial value */
+ return CSS_BREAK_INSIDE_AUTO;
+}
+#undef BREAK_INSIDE_MASK
+#undef BREAK_INSIDE_SHIFT
+#undef BREAK_INSIDE_INDEX
+
#define WORD_SPACING_INDEX 3
#define WORD_SPACING_SHIFT 2
#define WORD_SPACING_MASK 0xfc
diff --git a/src/select/propset.h b/src/select/propset.h
index d5db8e0..d3d6fb1 100644
--- a/src/select/propset.h
+++ b/src/select/propset.h
@@ -242,6 +242,28 @@ static inline css_error set_break_before(
#undef BREAK_BEFORE_SHIFT
#undef BREAK_BEFORE_INDEX
+#define BREAK_INSIDE_INDEX 13
+#define BREAK_INSIDE_SHIFT 4
+#define BREAK_INSIDE_MASK (0xf << 4)
+static inline css_error set_break_inside(
+ css_computed_style *style, uint8_t type)
+{
+ uint8_t *bits;
+
+ ENSURE_UNCOMMON;
+
+ bits = &style->uncommon->bits[BREAK_INSIDE_INDEX];
+
+ /* 4bits: type */
+ *bits = (*bits & ~BREAK_INSIDE_MASK) |
+ ((type & 0xf) << BREAK_INSIDE_SHIFT);
+
+ return CSS_OK;
+}
+#undef BREAK_INSIDE_MASK
+#undef BREAK_INSIDE_SHIFT
+#undef BREAK_INSIDE_INDEX
+
#define WORD_SPACING_INDEX 3
#define WORD_SPACING_SHIFT 2
#define WORD_SPACING_MASK 0xfc
commitdiff
http://git.netsurf-browser.org/libcss.git/commit/?id=24207928eb8ba5cc40db...
commit 24207928eb8ba5cc40db4ddd60c60866ec8af684
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Add break-before property support.
diff --git a/include/libcss/computed.h b/include/libcss/computed.h
index 58011e3..d027b4f 100644
--- a/include/libcss/computed.h
+++ b/include/libcss/computed.h
@@ -335,6 +335,9 @@ uint8_t css_computed_background_position(
uint8_t css_computed_break_after(
const css_computed_style *style);
+uint8_t css_computed_break_before(
+ const css_computed_style *style);
+
uint8_t css_computed_column_count(
const css_computed_style *style,
int32_t *column_count);
diff --git a/src/select/computed.c b/src/select/computed.c
index ff6da17..20fa082 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -792,6 +792,11 @@ uint8_t css_computed_break_after(const css_computed_style *style)
return get_break_after(style);
}
+uint8_t css_computed_break_before(const css_computed_style *style)
+{
+ return get_break_before(style);
+}
+
uint8_t css_computed_column_count(const css_computed_style *style,
int32_t *column_count)
{
diff --git a/src/select/properties/break_before.c b/src/select/properties/break_before.c
index 73137f4..b8a8d77 100644
--- a/src/select/properties/break_before.c
+++ b/src/select/properties/break_before.c
@@ -17,56 +17,31 @@
css_error css__cascade_break_before(uint32_t opv, css_style *style,
css_select_state *state)
{
- UNUSED(style);
-
- if (isInherit(opv) == false) {
- switch (getValue(opv)) {
- case BREAK_BEFORE_AUTO:
- case BREAK_BEFORE_ALWAYS:
- case BREAK_BEFORE_AVOID:
- case BREAK_BEFORE_LEFT:
- case BREAK_BEFORE_RIGHT:
- case BREAK_BEFORE_PAGE:
- case BREAK_BEFORE_COLUMN:
- case BREAK_BEFORE_AVOID_PAGE:
- case BREAK_BEFORE_AVOID_COLUMN:
- /** \todo convert to public values */
- break;
- }
- }
-
- if (css__outranks_existing(getOpcode(opv), isImportant(opv), state,
- isInherit(opv))) {
- /** \todo set computed elevation */
- }
-
- return CSS_OK;
+ return css__cascade_break_after_before_inside(opv, style, state,
+ set_break_before);
}
css_error css__set_break_before_from_hint(const css_hint *hint,
css_computed_style *style)
{
- UNUSED(hint);
- UNUSED(style);
-
- return CSS_OK;
+ return set_break_before(style, hint->status);
}
css_error css__initial_break_before(css_select_state *state)
{
- UNUSED(state);
-
- return CSS_OK;
+ return set_break_before(state->computed, CSS_BREAK_BEFORE_AUTO);
}
css_error css__compose_break_before(const css_computed_style *parent,
const css_computed_style *child,
css_computed_style *result)
{
- UNUSED(parent);
- UNUSED(child);
- UNUSED(result);
+ uint8_t type = get_break_before(child);
+
+ if (type == CSS_BREAK_BEFORE_INHERIT) {
+ type = get_break_before(parent);
+ }
- return CSS_OK;
+ return set_break_before(result, type);
}
diff --git a/src/select/propget.h b/src/select/propget.h
index 756a7b3..93d96da 100644
--- a/src/select/propget.h
+++ b/src/select/propget.h
@@ -166,6 +166,28 @@ static inline uint8_t get_break_after(
#undef BREAK_AFTER_SHIFT
#undef BREAK_AFTER_INDEX
+#define BREAK_BEFORE_INDEX 12
+#define BREAK_BEFORE_SHIFT 4
+#define BREAK_BEFORE_MASK (0xf << 4)
+static inline uint8_t get_break_before(
+ const css_computed_style *style)
+{
+ if (style->uncommon != NULL) {
+ uint8_t bits = style->uncommon->bits[BREAK_BEFORE_INDEX];
+ bits &= BREAK_BEFORE_MASK;
+ bits >>= BREAK_BEFORE_SHIFT;
+
+ /* 4bits: type */
+ return bits;
+ }
+
+ /* Not inherited; initial value */
+ return CSS_BREAK_BEFORE_AUTO;
+}
+#undef BREAK_BEFORE_MASK
+#undef BREAK_BEFORE_SHIFT
+#undef BREAK_BEFORE_INDEX
+
#define WORD_SPACING_INDEX 3
#define WORD_SPACING_SHIFT 2
#define WORD_SPACING_MASK 0xfc
diff --git a/src/select/propset.h b/src/select/propset.h
index c202ce7..d5db8e0 100644
--- a/src/select/propset.h
+++ b/src/select/propset.h
@@ -220,6 +220,28 @@ static inline css_error set_break_after(
#undef BREAK_AFTER_SHIFT
#undef BREAK_AFTER_INDEX
+#define BREAK_BEFORE_INDEX 12
+#define BREAK_BEFORE_SHIFT 4
+#define BREAK_BEFORE_MASK (0xf << 4)
+static inline css_error set_break_before(
+ css_computed_style *style, uint8_t type)
+{
+ uint8_t *bits;
+
+ ENSURE_UNCOMMON;
+
+ bits = &style->uncommon->bits[BREAK_BEFORE_INDEX];
+
+ /* 4bits: type */
+ *bits = (*bits & ~BREAK_BEFORE_MASK) |
+ ((type & 0xf) << BREAK_BEFORE_SHIFT);
+
+ return CSS_OK;
+}
+#undef BREAK_BEFORE_MASK
+#undef BREAK_BEFORE_SHIFT
+#undef BREAK_BEFORE_INDEX
+
#define WORD_SPACING_INDEX 3
#define WORD_SPACING_SHIFT 2
#define WORD_SPACING_MASK 0xfc
commitdiff
http://git.netsurf-browser.org/libcss.git/commit/?id=30833a1ad59bc1f20a49...
commit 30833a1ad59bc1f20a4995b23d2794be17227b51
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Add break-after property support.
diff --git a/include/libcss/computed.h b/include/libcss/computed.h
index b384cba..58011e3 100644
--- a/include/libcss/computed.h
+++ b/include/libcss/computed.h
@@ -332,6 +332,9 @@ uint8_t css_computed_background_position(
css_fixed *hlength, css_unit *hunit,
css_fixed *vlength, css_unit *vunit);
+uint8_t css_computed_break_after(
+ const css_computed_style *style);
+
uint8_t css_computed_column_count(
const css_computed_style *style,
int32_t *column_count);
diff --git a/src/select/computed.c b/src/select/computed.c
index ddaad6e..ff6da17 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -787,6 +787,11 @@ uint8_t css_computed_background_position(const css_computed_style
*style,
return get_background_position(style, hlength, hunit, vlength, vunit);
}
+uint8_t css_computed_break_after(const css_computed_style *style)
+{
+ return get_break_after(style);
+}
+
uint8_t css_computed_column_count(const css_computed_style *style,
int32_t *column_count)
{
diff --git a/src/select/computed.h b/src/select/computed.h
index 574d36b..0ca01d9 100644
--- a/src/select/computed.h
+++ b/src/select/computed.h
@@ -16,6 +16,9 @@
typedef struct css_computed_uncommon {
/*
* border_spacing 1 + 2(4) 2(4)
+ * break_before 4 0
+ * break_after 4 0
+ * break_inside 4 0
* clip 2 + 4(4) + 4 4(4)
* column_count 2 4
* column_fill 2 0
@@ -30,7 +33,7 @@ typedef struct css_computed_uncommon {
* outline_width 3 + 4 4
* word_spacing 2 + 4 4
* --- ---
- * 83 bits 60 bytes
+ * 95 bits 60 bytes
*
* Encode counter_increment and _reset as an array of name, value pairs,
* terminated with a blank entry.
@@ -54,11 +57,11 @@ typedef struct css_computed_uncommon {
* 2 bits sizeof(ptr)
*
* ___ ___
- * 96 bits 62 + 4sizeof(ptr) bytes
+ * 108 bits 62 + 4sizeof(ptr) bytes
*
- * 12 bytes 62 + 4sizeof(ptr) bytes
+ * 14 bytes 62 + 4sizeof(ptr) bytes
* ===================
- * 72 + 4sizeof(ptr) bytes
+ * 74 + 4sizeof(ptr) bytes
*
* Bit allocations:
*
@@ -75,8 +78,10 @@ typedef struct css_computed_uncommon {
* 10 ggggggcc column-gap | column-rule-color
* 11 wwwwwww. column-rule-width | <unused>
* 12 sswwwwww column-span | column_width
+ * 13 bbbbaaaa break-before | break-after
+ * 14 iiii.... break-inside | <unused>
*/
- uint8_t bits[12];
+ uint8_t bits[14];
css_fixed border_spacing[2];
diff --git a/src/select/properties/break_after.c b/src/select/properties/break_after.c
index 8a2cffc..496a59b 100644
--- a/src/select/properties/break_after.c
+++ b/src/select/properties/break_after.c
@@ -17,56 +17,31 @@
css_error css__cascade_break_after(uint32_t opv, css_style *style,
css_select_state *state)
{
- UNUSED(style);
-
- if (isInherit(opv) == false) {
- switch (getValue(opv)) {
- case BREAK_AFTER_AUTO:
- case BREAK_AFTER_ALWAYS:
- case BREAK_AFTER_AVOID:
- case BREAK_AFTER_LEFT:
- case BREAK_AFTER_RIGHT:
- case BREAK_AFTER_PAGE:
- case BREAK_AFTER_COLUMN:
- case BREAK_AFTER_AVOID_PAGE:
- case BREAK_AFTER_AVOID_COLUMN:
- /** \todo convert to public values */
- break;
- }
- }
-
- if (css__outranks_existing(getOpcode(opv), isImportant(opv), state,
- isInherit(opv))) {
- /** \todo set computed elevation */
- }
-
- return CSS_OK;
+ return css__cascade_break_after_before_inside(opv, style, state,
+ set_break_after);
}
css_error css__set_break_after_from_hint(const css_hint *hint,
css_computed_style *style)
{
- UNUSED(hint);
- UNUSED(style);
-
- return CSS_OK;
+ return set_break_after(style, hint->status);
}
css_error css__initial_break_after(css_select_state *state)
{
- UNUSED(state);
-
- return CSS_OK;
+ return set_break_after(state->computed, CSS_BREAK_AFTER_AUTO);
}
css_error css__compose_break_after(const css_computed_style *parent,
const css_computed_style *child,
css_computed_style *result)
{
- UNUSED(parent);
- UNUSED(child);
- UNUSED(result);
+ uint8_t type = get_break_after(child);
+
+ if (type == CSS_BREAK_AFTER_INHERIT) {
+ type = get_break_after(parent);
+ }
- return CSS_OK;
+ return set_break_after(result, type);
}
diff --git a/src/select/propget.h b/src/select/propget.h
index d4ec329..756a7b3 100644
--- a/src/select/propget.h
+++ b/src/select/propget.h
@@ -144,6 +144,28 @@ static inline uint8_t get_border_spacing(
#undef BORDER_SPACING_SHIFT
#undef BORDER_SPACING_INDEX
+#define BREAK_AFTER_INDEX 12
+#define BREAK_AFTER_SHIFT 0
+#define BREAK_AFTER_MASK 0xf
+static inline uint8_t get_break_after(
+ const css_computed_style *style)
+{
+ if (style->uncommon != NULL) {
+ uint8_t bits = style->uncommon->bits[BREAK_AFTER_INDEX];
+ bits &= BREAK_AFTER_MASK;
+ bits >>= BREAK_AFTER_SHIFT;
+
+ /* 4bits: type */
+ return bits;
+ }
+
+ /* Not inherited; initial value */
+ return CSS_BREAK_AFTER_AUTO;
+}
+#undef BREAK_AFTER_MASK
+#undef BREAK_AFTER_SHIFT
+#undef BREAK_AFTER_INDEX
+
#define WORD_SPACING_INDEX 3
#define WORD_SPACING_SHIFT 2
#define WORD_SPACING_MASK 0xfc
diff --git a/src/select/propset.h b/src/select/propset.h
index 08a083a..c202ce7 100644
--- a/src/select/propset.h
+++ b/src/select/propset.h
@@ -32,7 +32,9 @@ static const css_computed_uncommon default_uncommon = {
(CSS_COLUMN_RULE_STYLE_NONE << 0),
(CSS_COLUMN_GAP_NORMAL << 2) | (CSS_COLUMN_RULE_COLOR_CURRENT_COLOR),
(CSS_COLUMN_RULE_WIDTH_MEDIUM << 1),
- (CSS_COLUMN_SPAN_NONE << 6) | CSS_COLUMN_WIDTH_AUTO
+ (CSS_COLUMN_SPAN_NONE << 6) | CSS_COLUMN_WIDTH_AUTO,
+ (CSS_BREAK_BEFORE_AUTO << 4) | CSS_BREAK_AFTER_AUTO,
+ (CSS_BREAK_INSIDE_AUTO)
},
{ 0, 0 },
{ 0, 0, 0, 0 },
@@ -196,6 +198,28 @@ static inline css_error set_border_spacing(
#undef BORDER_SPACING_SHIFT
#undef BORDER_SPACING_INDEX
+#define BREAK_AFTER_INDEX 12
+#define BREAK_AFTER_SHIFT 0
+#define BREAK_AFTER_MASK 0xf
+static inline css_error set_break_after(
+ css_computed_style *style, uint8_t type)
+{
+ uint8_t *bits;
+
+ ENSURE_UNCOMMON;
+
+ bits = &style->uncommon->bits[BREAK_AFTER_INDEX];
+
+ /* 4bits: type */
+ *bits = (*bits & ~BREAK_AFTER_MASK) |
+ ((type & 0xf) << BREAK_AFTER_SHIFT);
+
+ return CSS_OK;
+}
+#undef BREAK_AFTER_MASK
+#undef BREAK_AFTER_SHIFT
+#undef BREAK_AFTER_INDEX
+
#define WORD_SPACING_INDEX 3
#define WORD_SPACING_SHIFT 2
#define WORD_SPACING_MASK 0xfc
commitdiff
http://git.netsurf-browser.org/libcss.git/commit/?id=8bce7365823f887113c7...
commit 8bce7365823f887113c73af46ecdfee6322653f9
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Add helpers for selecting break-* properties.
diff --git a/src/select/properties/helpers.c b/src/select/properties/helpers.c
index df076db..1091a10 100644
--- a/src/select/properties/helpers.c
+++ b/src/select/properties/helpers.c
@@ -395,6 +395,55 @@ css_error css__cascade_page_break_after_before_inside(uint32_t opv,
return CSS_OK;
}
+css_error css__cascade_break_after_before_inside(uint32_t opv,
+ css_style *style, css_select_state *state,
+ css_error (*fun)(css_computed_style *, uint8_t))
+{
+ uint16_t value = CSS_BREAK_AFTER_AUTO;
+
+ UNUSED(style);
+
+ if (isInherit(opv) == false) {
+ switch (getValue(opv)) {
+ case BREAK_AFTER_AUTO:
+ value = CSS_BREAK_AFTER_AUTO;
+ break;
+ case BREAK_AFTER_ALWAYS:
+ value = CSS_BREAK_AFTER_ALWAYS;
+ break;
+ case BREAK_AFTER_AVOID:
+ value = CSS_BREAK_AFTER_AVOID;
+ break;
+ case BREAK_AFTER_LEFT:
+ value = CSS_BREAK_AFTER_LEFT;
+ break;
+ case BREAK_AFTER_RIGHT:
+ value = CSS_BREAK_AFTER_RIGHT;
+ break;
+ case BREAK_AFTER_PAGE:
+ value = CSS_BREAK_AFTER_PAGE;
+ break;
+ case BREAK_AFTER_COLUMN:
+ value = CSS_BREAK_AFTER_COLUMN;
+ break;
+ case BREAK_AFTER_AVOID_PAGE:
+ value = CSS_BREAK_AFTER_AVOID_PAGE;
+ break;
+ case BREAK_AFTER_AVOID_COLUMN:
+ value = CSS_BREAK_AFTER_AVOID_COLUMN;
+ break;
+ }
+ }
+
+ /** \todo lose fun != NULL */
+ if (fun != NULL && css__outranks_existing(getOpcode(opv),
+ isImportant(opv), state, isInherit(opv))) {
+ return fun(state->computed, value);
+ }
+
+ return CSS_OK;
+}
+
css_error css__cascade_counter_increment_reset(uint32_t opv, css_style *style,
css_select_state *state,
css_error (*fun)(css_computed_style *, uint8_t,
diff --git a/src/select/properties/helpers.h b/src/select/properties/helpers.h
index 098fe1e..feed146 100644
--- a/src/select/properties/helpers.h
+++ b/src/select/properties/helpers.h
@@ -51,6 +51,9 @@ css_error css__cascade_number(uint32_t opv, css_style *style,
css_error css__cascade_page_break_after_before_inside(uint32_t opv,
css_style *style, css_select_state *state,
css_error (*fun)(css_computed_style *, uint8_t));
+css_error css__cascade_break_after_before_inside(uint32_t opv,
+ css_style *style, css_select_state *state,
+ css_error (*fun)(css_computed_style *, uint8_t));
css_error css__cascade_counter_increment_reset(uint32_t opv, css_style *style,
css_select_state *state,
css_error (*fun)(css_computed_style *, uint8_t,
commitdiff
http://git.netsurf-browser.org/libcss.git/commit/?id=5965aa66899dcd1b97d3...
commit 5965aa66899dcd1b97d35656c56d512815a6579d
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Add test case.
diff --git a/test/data/select/tests1.dat b/test/data/select/tests1.dat
index ca5b017..a2a5806 100644
--- a/test/data/select/tests1.dat
+++ b/test/data/select/tests1.dat
@@ -4,6 +4,106 @@
| p*
| class=green
#ua
+p { display: block; }
+#user
+#author
+#errors
+#expected
+background-attachment: scroll
+background-color: #00000000
+background-image: none
+background-position: 0% 0%
+background-repeat: repeat
+border-collapse: inherit
+border-spacing: inherit
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
+border-top-style: none
+border-right-style: none
+border-bottom-style: none
+border-left-style: none
+border-top-width: medium
+border-right-width: medium
+border-bottom-width: medium
+border-left-width: medium
+bottom: auto
+caption-side: inherit
+clear: none
+clip: auto
+color: inherit
+column-count: auto
+column-fill: balance
+column-gap: normal
+column-rule-color: inherit
+column-rule-style: none
+column-rule-width: medium
+column-span: none
+column-width: auto
+content: normal
+counter-increment: none
+counter-reset: none
+cursor: inherit
+direction: inherit
+display: block
+empty-cells: inherit
+float: none
+font-family: inherit
+font-size: inherit
+font-style: inherit
+font-variant: inherit
+font-weight: inherit
+height: auto
+left: auto
+letter-spacing: inherit
+line-height: inherit
+list-style-image: inherit
+list-style-position: inherit
+list-style-type: inherit
+margin-top: 0px
+margin-right: 0px
+margin-bottom: 0px
+margin-left: 0px
+max-height: none
+max-width: none
+min-height: 0px
+min-width: 0px
+opacity: 1.000
+outline-color: invert
+outline-style: none
+outline-width: medium
+overflow-x: visible
+overflow-y: visible
+padding-top: 0px
+padding-right: 0px
+padding-bottom: 0px
+padding-left: 0px
+position: static
+quotes: inherit
+right: auto
+table-layout: auto
+text-align: inherit
+text-decoration: none
+text-indent: inherit
+text-transform: inherit
+top: auto
+unicode-bidi: normal
+vertical-align: baseline
+visibility: inherit
+white-space: inherit
+width: auto
+word-spacing: inherit
+writing-mode: horizontal-tb
+z-index: auto
+#reset
+
+#tree
+| div
+| id=foo
+| p*
+| class=green
+#ua
div, p { display: block; }
#user
.green { color: #f00 !important; }
@@ -870,7 +970,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: medium
+outline-width: 2px
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -970,7 +1070,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
commitdiff
http://git.netsurf-browser.org/libcss.git/commit/?id=c8a369173ed4139471e5...
commit c8a369173ed4139471e531db8a52c3529417e3c4
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Update test data for uncommon property default value fixes.
diff --git a/test/data/select/tests1.dat b/test/data/select/tests1.dat
index c04f063..ca5b017 100644
--- a/test/data/select/tests1.dat
+++ b/test/data/select/tests1.dat
@@ -19,7 +19,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -40,7 +40,7 @@ color: #ffff0000
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -48,7 +48,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: block
empty-cells: inherit
@@ -60,7 +60,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -76,7 +76,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -97,7 +97,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -124,7 +124,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -145,7 +145,7 @@ color: #ffff0000
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -153,7 +153,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: table-cell
empty-cells: inherit
@@ -165,7 +165,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -181,7 +181,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -202,7 +202,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -229,7 +229,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -250,7 +250,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -258,7 +258,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: block
empty-cells: inherit
@@ -270,7 +270,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -286,7 +286,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -307,7 +307,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -334,7 +334,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -355,7 +355,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -363,7 +363,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: block
empty-cells: inherit
@@ -375,7 +375,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -391,7 +391,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -412,7 +412,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -431,7 +431,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: separate
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: #ff000000
border-right-color: #ff000000
border-bottom-color: #ff000000
@@ -452,7 +452,7 @@ color: #ff000000
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -460,7 +460,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: ltr
display: block
empty-cells: show
@@ -472,7 +472,7 @@ font-variant: normal
font-weight: normal
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: 0px
line-height: normal
list-style-image: none
list-style-position: outside
@@ -509,7 +509,7 @@ vertical-align: baseline
visibility: visible
white-space: normal
width: auto
-word-spacing: normal
+word-spacing: 0px
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -526,7 +526,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: separate
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: #ff000000
border-right-color: #ff000000
border-bottom-color: #ff000000
@@ -547,7 +547,7 @@ color: #ff000000
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -555,7 +555,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: ltr
display: inline
empty-cells: show
@@ -567,7 +567,7 @@ font-variant: normal
font-weight: normal
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: 0px
line-height: normal
list-style-image: none
list-style-position: outside
@@ -604,7 +604,7 @@ vertical-align: baseline
visibility: visible
white-space: normal
width: auto
-word-spacing: normal
+word-spacing: 0px
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -622,7 +622,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: separate
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: #ff000000
border-right-color: #ff000000
border-bottom-color: #ff000000
@@ -643,7 +643,7 @@ color: #ff000000
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -651,7 +651,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: ltr
display: inline
empty-cells: show
@@ -663,7 +663,7 @@ font-variant: normal
font-weight: normal
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: 0px
line-height: normal
list-style-image: none
list-style-position: outside
@@ -700,7 +700,7 @@ vertical-align: baseline
visibility: visible
white-space: normal
width: auto
-word-spacing: normal
+word-spacing: 0px
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -718,7 +718,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -739,7 +739,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -747,7 +747,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: inline
empty-cells: inherit
@@ -759,7 +759,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -775,7 +775,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -796,7 +796,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -813,7 +813,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: separate
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: #ff000000
border-right-color: #ff000000
border-bottom-color: #ff000000
@@ -834,7 +834,7 @@ color: #ff000000
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -842,7 +842,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: ltr
display: inline
empty-cells: show
@@ -854,7 +854,7 @@ font-variant: normal
font-weight: normal
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: 0px
line-height: normal
list-style-image: none
list-style-position: outside
@@ -870,7 +870,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -891,7 +891,7 @@ vertical-align: baseline
visibility: visible
white-space: normal
width: auto
-word-spacing: normal
+word-spacing: 0px
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -913,7 +913,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -934,7 +934,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -942,7 +942,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: block
empty-cells: inherit
@@ -954,7 +954,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -991,7 +991,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -1013,7 +1013,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -1034,7 +1034,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -1042,7 +1042,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: block
empty-cells: inherit
@@ -1054,7 +1054,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -1070,7 +1070,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -1091,7 +1091,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -1114,7 +1114,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -1135,7 +1135,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -1143,7 +1143,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: block
empty-cells: inherit
@@ -1155,7 +1155,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -1171,7 +1171,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -1192,7 +1192,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -1218,7 +1218,7 @@ background-image: url('Sonic_the_Hedgehog.png')
background-position: 100% 100%
background-repeat: repeat-y
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -1239,7 +1239,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -1247,7 +1247,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: block
empty-cells: inherit
@@ -1259,7 +1259,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -1275,7 +1275,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -1296,7 +1296,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -1321,7 +1321,7 @@ background-image: url('Sonic_the_Hedgehog.png')
background-position: 50% 20%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -1342,7 +1342,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -1350,7 +1350,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: block
empty-cells: inherit
@@ -1362,7 +1362,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -1378,7 +1378,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -1399,7 +1399,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -1430,7 +1430,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -1451,7 +1451,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -1459,7 +1459,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: table-row
empty-cells: inherit
@@ -1471,7 +1471,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -1487,7 +1487,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -1508,7 +1508,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -1539,7 +1539,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -1560,7 +1560,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -1568,7 +1568,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: table-cell
empty-cells: inherit
@@ -1580,7 +1580,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -1596,7 +1596,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -1617,7 +1617,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -1648,7 +1648,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -1669,7 +1669,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -1677,7 +1677,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: table-cell
empty-cells: inherit
@@ -1689,7 +1689,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -1705,7 +1705,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -1726,7 +1726,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -1761,7 +1761,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: #ffffffff
border-right-color: #ff8040ff
border-bottom-color: #ff000000
@@ -1782,7 +1782,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -1790,7 +1790,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: table-cell
empty-cells: inherit
@@ -1802,7 +1802,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -1818,7 +1818,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -1839,7 +1839,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -1873,7 +1873,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: #ff000000
border-right-color: #ff000000
border-bottom-color: #ff000000
@@ -1894,7 +1894,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -1902,7 +1902,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: table-cell
empty-cells: inherit
@@ -1914,7 +1914,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -1930,7 +1930,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -1951,7 +1951,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -1983,7 +1983,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -2004,7 +2004,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -2012,7 +2012,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: table-cell
empty-cells: inherit
@@ -2024,7 +2024,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -2040,7 +2040,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -2061,7 +2061,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -4265,7 +4265,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -4286,7 +4286,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -4294,7 +4294,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: inherit
empty-cells: inherit
@@ -4306,7 +4306,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -4322,7 +4322,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -4343,7 +4343,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
commitdiff
http://git.netsurf-browser.org/libcss.git/commit/?id=193640287aba0c574c1a...
commit 193640287aba0c574c1a4b2fd63133f29e1b42d6
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Add comment to explain choice of defaults in the default uncommon extension block.
diff --git a/src/select/propset.h b/src/select/propset.h
index 769d3b3..08a083a 100644
--- a/src/select/propset.h
+++ b/src/select/propset.h
@@ -16,6 +16,8 @@
/* Important: keep this file in sync with computed.h */
/** \todo Is there a better way to ensure this happens? */
+/** Default values are 'initial value', unless the property is inherited,
+ * in which case it is 'inherit'. */
static const css_computed_uncommon default_uncommon = {
{ (CSS_LETTER_SPACING_INHERIT << 2) | CSS_OUTLINE_COLOR_INVERT,
(CSS_OUTLINE_WIDTH_MEDIUM << 1) | CSS_BORDER_SPACING_INHERIT,
commitdiff
http://git.netsurf-browser.org/libcss.git/commit/?id=e66f4133ef6c036f2f8a...
commit e66f4133ef6c036f2f8a53b8df94fe80453c7983
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Fix many default values for "uncommon" properties.
diff --git a/src/select/propget.h b/src/select/propget.h
index 08ed0f4..d4ec329 100644
--- a/src/select/propget.h
+++ b/src/select/propget.h
@@ -36,7 +36,8 @@ static inline uint8_t get_letter_spacing(
return (bits & 3);
}
- return CSS_LETTER_SPACING_NORMAL;
+ /* Inherited */
+ return CSS_LETTER_SPACING_INHERIT;
}
#undef LETTER_SPACING_MASK
#undef LETTER_SPACING_SHIFT
@@ -62,6 +63,7 @@ static inline uint8_t get_outline_color(
return (bits & 3);
}
+ /* Not inherited; initial value */
return CSS_OUTLINE_COLOR_INVERT;
}
#undef OUTLINE_COLOR_MASK
@@ -90,10 +92,8 @@ static inline uint8_t get_outline_width(
return (bits & 7);
}
- *length = INTTOFIX(2);
- *unit = CSS_UNIT_PX;
-
- return CSS_OUTLINE_WIDTH_WIDTH;
+ /* Not inherited; initial value */
+ return CSS_OUTLINE_WIDTH_MEDIUM;
}
#undef OUTLINE_WIDTH_MASK
#undef OUTLINE_WIDTH_SHIFT
@@ -132,12 +132,10 @@ static inline uint8_t get_border_spacing(
}
return bits;
- } else {
- *hlength = *vlength = 0;
- *hunit = *vunit = CSS_UNIT_PX;
}
- return CSS_BORDER_SPACING_SET;
+ /* Inherited */
+ return CSS_BORDER_SPACING_INHERIT;
}
#undef BORDER_SPACING_MASK1
#undef BORDER_SPACING_SHIFT1
@@ -168,7 +166,8 @@ static inline uint8_t get_word_spacing(
return (bits & 3);
}
- return CSS_WORD_SPACING_NORMAL;
+ /* Inherited */
+ return CSS_WORD_SPACING_INHERIT;
}
#undef WORD_SPACING_MASK
#undef WORD_SPACING_SHIFT
@@ -189,7 +188,8 @@ static inline uint8_t get_writing_mode(
return bits;
}
- return CSS_WRITING_MODE_HORIZONTAL_TB;
+ /* Inherited */
+ return CSS_WRITING_MODE_INHERIT;
}
#undef WRITING_MODE_INDEX
#undef WRITING_MODE_MASK
@@ -213,6 +213,7 @@ static inline uint8_t get_counter_increment(
return bits;
}
+ /* Not inherited; initial value */
return CSS_COUNTER_INCREMENT_NONE;
}
#undef COUNTER_INCREMENT_MASK
@@ -237,6 +238,7 @@ static inline uint8_t get_counter_reset(
return bits;
}
+ /* Not inherited; initial value */
return CSS_COUNTER_RESET_NONE;
}
#undef COUNTER_RESET_MASK
@@ -261,7 +263,8 @@ static inline uint8_t get_cursor(
return bits;
}
- return CSS_CURSOR_AUTO;
+ /* Inherited */
+ return CSS_CURSOR_INHERIT;
}
#undef CURSOR_MASK
#undef CURSOR_SHIFT
@@ -330,6 +333,7 @@ static inline uint8_t get_clip(
return (bits & 0x3);
}
+ /* Not inherited; initial value */
return CSS_CLIP_AUTO;
}
#undef CLIP_MASK2
@@ -359,6 +363,7 @@ static inline uint8_t get_column_count(
return bits;
}
+ /* Not inherited; initial value */
return CSS_COLUMN_COUNT_AUTO;
}
#undef COLUMN_COUNT_MASK
@@ -380,6 +385,7 @@ static inline uint8_t get_column_fill(
return bits;
}
+ /* Not inherited; initial value */
return CSS_COLUMN_FILL_BALANCE;
}
#undef COLUMN_FILL_MASK
@@ -407,6 +413,7 @@ static inline uint8_t get_column_gap(
return (bits & 0x3);
}
+ /* Not inherited; initial value */
return CSS_COLUMN_GAP_NORMAL;
}
#undef COLUMN_GAP_MASK
@@ -431,6 +438,7 @@ static inline uint8_t get_column_rule_color(
return bits;
}
+ /* Not inherited; initial value */
*color = 0;
return CSS_COLUMN_RULE_COLOR_CURRENT_COLOR;
}
@@ -453,6 +461,7 @@ static inline uint8_t get_column_rule_style(
return bits;
}
+ /* Not inherited; initial value */
return CSS_COLUMN_RULE_STYLE_NONE;
}
#undef COLUMN_RULE_STYLE_MASK
@@ -480,6 +489,7 @@ static inline uint8_t get_column_rule_width(
return (bits & 0x7);
}
+ /* Not inherited; initial value */
return CSS_COLUMN_RULE_WIDTH_MEDIUM;
}
#undef COLUMN_RULE_WIDTH_MASK
@@ -501,6 +511,7 @@ static inline uint8_t get_column_span(
return bits;
}
+ /* Not inherited; initial value */
return CSS_COLUMN_SPAN_NONE;
}
#undef COLUMN_SPAN_MASK
@@ -528,6 +539,7 @@ static inline uint8_t get_column_width(
return (bits & 0x3);
}
+ /* Not inherited; initial value */
return CSS_COLUMN_WIDTH_AUTO;
}
#undef COLUMN_WIDTH_MASK
@@ -552,6 +564,7 @@ static inline uint8_t get_content(
return bits;
}
+ /* Not inherited; initial value */
return CSS_CONTENT_NORMAL;
}
#undef CONTENT_MASK
@@ -1988,6 +2001,7 @@ static inline uint8_t get_page_break_after(
return bits;
}
+ /* Not inherited; initial value */
return CSS_PAGE_BREAK_AFTER_AUTO;
}
#undef PAGE_BREAK_AFTER_MASK
@@ -2009,6 +2023,7 @@ static inline uint8_t get_page_break_before(
return bits;
}
+ /* Not inherited; initial value */
return CSS_PAGE_BREAK_BEFORE_AUTO;
}
#undef PAGE_BREAK_BEFORE_MASK
@@ -2030,6 +2045,7 @@ static inline uint8_t get_page_break_inside(
return bits;
}
+ /* Not inherited; initial value */
return CSS_PAGE_BREAK_INSIDE_AUTO;
}
#undef PAGE_BREAK_INSIDE_MASK
@@ -2054,8 +2070,8 @@ static inline uint8_t get_orphans(
return bits;
}
- *orphans = 2;
- return CSS_ORPHANS_SET;
+ /* Inherited */
+ return CSS_ORPHANS_INHERIT;
}
#undef ORPHANS_MASK
#undef ORPHANS_SHIFT
@@ -2079,8 +2095,8 @@ static inline uint8_t get_widows(
return bits;
}
- *widows = 2;
- return CSS_WIDOWS_SET;
+ /* Inherited */
+ return CSS_WIDOWS_INHERIT;
}
#undef WIDOWS_MASK
#undef WIDOWS_SHIFT
commitdiff
http://git.netsurf-browser.org/libcss.git/commit/?id=db3a3e164a45fe59d7df...
commit db3a3e164a45fe59d7df3c36495d97f4105b665d
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Fix broken absolute valuification of letter and word spacing properties.
diff --git a/src/select/computed.c b/src/select/computed.c
index 23701d7..ddaad6e 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -1667,16 +1667,18 @@ css_error compute_absolute_length_normal(css_computed_style
*style,
uint8_t type;
type = get(style, &length, &unit);
- if (type != CSS_LETTER_SPACING_NORMAL) {
+ if (type == CSS_LETTER_SPACING_SET) {
if (unit == CSS_UNIT_EX) {
length = FMUL(length, ex_size->value);
unit = ex_size->unit;
}
-
- return set(style, CSS_LETTER_SPACING_SET, length, unit);
+ } else {
+ /* NORMAL or INHERIT */
+ length = INTTOFIX(0);
+ unit = CSS_UNIT_PX;
}
- return set(style, CSS_LETTER_SPACING_NORMAL, 0, CSS_UNIT_PX);
+ return set(style, CSS_LETTER_SPACING_SET, length, unit);
}
/**
commitdiff
http://git.netsurf-browser.org/libcss.git/commit/?id=2fff3afe1a29825213a2...
commit 2fff3afe1a29825213a2eb134065834ae08b1140
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Tiny optimisation for computed style absolute valuification.
diff --git a/src/select/computed.c b/src/select/computed.c
index 8054b02..23701d7 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -1324,9 +1324,7 @@ css_error compute_absolute_border_side_width(css_computed_style
*style,
} else if (type == CSS_BORDER_WIDTH_THICK) {
length = INTTOFIX(4);
unit = CSS_UNIT_PX;
- }
-
- if (unit == CSS_UNIT_EX) {
+ } else if (unit == CSS_UNIT_EX) {
length = FMUL(length, ex_size->value);
unit = ex_size->unit;
}
commitdiff
http://git.netsurf-browser.org/libcss.git/commit/?id=3eb5209c42d45458c34e...
commit 3eb5209c42d45458c34e554cef6a626f0326b511
Merge: dee4462 78c9527
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Merge branch 'master' of
git://git.netsurf-browser.org/libcss
commitdiff
http://git.netsurf-browser.org/libcss.git/commit/?id=dee446280575217e81fd...
commit dee446280575217e81fdf2787e231ba92113c403
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Delete trailing whitespace.
diff --git a/include/libcss/properties.h b/include/libcss/properties.h
index 899a552..0840f6f 100644
--- a/include/libcss/properties.h
+++ b/include/libcss/properties.h
@@ -220,7 +220,7 @@ enum css_break_after_e {
CSS_BREAK_AFTER_COLUMN = 0x7,
CSS_BREAK_AFTER_AVOID_PAGE = 0x8,
CSS_BREAK_AFTER_AVOID_COLUMN = 0x9
-};
+};
enum css_break_before_e {
CSS_BREAK_BEFORE_INHERIT = CSS_BREAK_AFTER_INHERIT,
@@ -605,7 +605,7 @@ enum css_page_break_after_e {
CSS_PAGE_BREAK_AFTER_ALWAYS = CSS_BREAK_AFTER_ALWAYS,
CSS_PAGE_BREAK_AFTER_LEFT = CSS_BREAK_AFTER_LEFT,
CSS_PAGE_BREAK_AFTER_RIGHT = CSS_BREAK_AFTER_RIGHT
-};
+};
enum css_page_break_before_e {
CSS_PAGE_BREAK_BEFORE_INHERIT = CSS_BREAK_AFTER_INHERIT,
@@ -729,8 +729,8 @@ enum css_white_space_e {
enum css_widows_e {
CSS_WIDOWS_INHERIT = 0x0,
CSS_WIDOWS_SET = 0x1
-};
-
+};
+
enum css_width_e {
CSS_WIDTH_INHERIT = 0x0,
CSS_WIDTH_SET = 0x1,
-----------------------------------------------------------------------
Summary of changes:
include/libcss/computed.h | 9 +
include/libcss/properties.h | 8 +-
src/select/computed.c | 29 +-
src/select/computed.h | 15 +-
src/select/properties/break_after.c | 45 +-
src/select/properties/break_before.c | 45 +-
src/select/properties/break_inside.c | 31 +-
src/select/properties/helpers.c | 49 +++
src/select/properties/helpers.h | 3 +
src/select/propget.h | 114 ++++-
src/select/propset.h | 72 +++-
test/data/select/tests1.dat | 788 ++++++++++++++++++++++++++++------
test/dump_computed.h | 105 +++++
13 files changed, 1075 insertions(+), 238 deletions(-)
diff --git a/include/libcss/computed.h b/include/libcss/computed.h
index b384cba..233265c 100644
--- a/include/libcss/computed.h
+++ b/include/libcss/computed.h
@@ -332,6 +332,15 @@ uint8_t css_computed_background_position(
css_fixed *hlength, css_unit *hunit,
css_fixed *vlength, css_unit *vunit);
+uint8_t css_computed_break_after(
+ const css_computed_style *style);
+
+uint8_t css_computed_break_before(
+ const css_computed_style *style);
+
+uint8_t css_computed_break_inside(
+ const css_computed_style *style);
+
uint8_t css_computed_column_count(
const css_computed_style *style,
int32_t *column_count);
diff --git a/include/libcss/properties.h b/include/libcss/properties.h
index 899a552..0840f6f 100644
--- a/include/libcss/properties.h
+++ b/include/libcss/properties.h
@@ -220,7 +220,7 @@ enum css_break_after_e {
CSS_BREAK_AFTER_COLUMN = 0x7,
CSS_BREAK_AFTER_AVOID_PAGE = 0x8,
CSS_BREAK_AFTER_AVOID_COLUMN = 0x9
-};
+};
enum css_break_before_e {
CSS_BREAK_BEFORE_INHERIT = CSS_BREAK_AFTER_INHERIT,
@@ -605,7 +605,7 @@ enum css_page_break_after_e {
CSS_PAGE_BREAK_AFTER_ALWAYS = CSS_BREAK_AFTER_ALWAYS,
CSS_PAGE_BREAK_AFTER_LEFT = CSS_BREAK_AFTER_LEFT,
CSS_PAGE_BREAK_AFTER_RIGHT = CSS_BREAK_AFTER_RIGHT
-};
+};
enum css_page_break_before_e {
CSS_PAGE_BREAK_BEFORE_INHERIT = CSS_BREAK_AFTER_INHERIT,
@@ -729,8 +729,8 @@ enum css_white_space_e {
enum css_widows_e {
CSS_WIDOWS_INHERIT = 0x0,
CSS_WIDOWS_SET = 0x1
-};
-
+};
+
enum css_width_e {
CSS_WIDTH_INHERIT = 0x0,
CSS_WIDTH_SET = 0x1,
diff --git a/src/select/computed.c b/src/select/computed.c
index 8054b02..a33b6a2 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -787,6 +787,21 @@ uint8_t css_computed_background_position(const css_computed_style
*style,
return get_background_position(style, hlength, hunit, vlength, vunit);
}
+uint8_t css_computed_break_after(const css_computed_style *style)
+{
+ return get_break_after(style);
+}
+
+uint8_t css_computed_break_before(const css_computed_style *style)
+{
+ return get_break_before(style);
+}
+
+uint8_t css_computed_break_inside(const css_computed_style *style)
+{
+ return get_break_inside(style);
+}
+
uint8_t css_computed_column_count(const css_computed_style *style,
int32_t *column_count)
{
@@ -1324,9 +1339,7 @@ css_error compute_absolute_border_side_width(css_computed_style
*style,
} else if (type == CSS_BORDER_WIDTH_THICK) {
length = INTTOFIX(4);
unit = CSS_UNIT_PX;
- }
-
- if (unit == CSS_UNIT_EX) {
+ } else if (unit == CSS_UNIT_EX) {
length = FMUL(length, ex_size->value);
unit = ex_size->unit;
}
@@ -1669,16 +1682,18 @@ css_error compute_absolute_length_normal(css_computed_style
*style,
uint8_t type;
type = get(style, &length, &unit);
- if (type != CSS_LETTER_SPACING_NORMAL) {
+ if (type == CSS_LETTER_SPACING_SET) {
if (unit == CSS_UNIT_EX) {
length = FMUL(length, ex_size->value);
unit = ex_size->unit;
}
-
- return set(style, CSS_LETTER_SPACING_SET, length, unit);
+ } else {
+ /* NORMAL or INHERIT */
+ length = INTTOFIX(0);
+ unit = CSS_UNIT_PX;
}
- return set(style, CSS_LETTER_SPACING_NORMAL, 0, CSS_UNIT_PX);
+ return set(style, CSS_LETTER_SPACING_SET, length, unit);
}
/**
diff --git a/src/select/computed.h b/src/select/computed.h
index 574d36b..0ca01d9 100644
--- a/src/select/computed.h
+++ b/src/select/computed.h
@@ -16,6 +16,9 @@
typedef struct css_computed_uncommon {
/*
* border_spacing 1 + 2(4) 2(4)
+ * break_before 4 0
+ * break_after 4 0
+ * break_inside 4 0
* clip 2 + 4(4) + 4 4(4)
* column_count 2 4
* column_fill 2 0
@@ -30,7 +33,7 @@ typedef struct css_computed_uncommon {
* outline_width 3 + 4 4
* word_spacing 2 + 4 4
* --- ---
- * 83 bits 60 bytes
+ * 95 bits 60 bytes
*
* Encode counter_increment and _reset as an array of name, value pairs,
* terminated with a blank entry.
@@ -54,11 +57,11 @@ typedef struct css_computed_uncommon {
* 2 bits sizeof(ptr)
*
* ___ ___
- * 96 bits 62 + 4sizeof(ptr) bytes
+ * 108 bits 62 + 4sizeof(ptr) bytes
*
- * 12 bytes 62 + 4sizeof(ptr) bytes
+ * 14 bytes 62 + 4sizeof(ptr) bytes
* ===================
- * 72 + 4sizeof(ptr) bytes
+ * 74 + 4sizeof(ptr) bytes
*
* Bit allocations:
*
@@ -75,8 +78,10 @@ typedef struct css_computed_uncommon {
* 10 ggggggcc column-gap | column-rule-color
* 11 wwwwwww. column-rule-width | <unused>
* 12 sswwwwww column-span | column_width
+ * 13 bbbbaaaa break-before | break-after
+ * 14 iiii.... break-inside | <unused>
*/
- uint8_t bits[12];
+ uint8_t bits[14];
css_fixed border_spacing[2];
diff --git a/src/select/properties/break_after.c b/src/select/properties/break_after.c
index 8a2cffc..496a59b 100644
--- a/src/select/properties/break_after.c
+++ b/src/select/properties/break_after.c
@@ -17,56 +17,31 @@
css_error css__cascade_break_after(uint32_t opv, css_style *style,
css_select_state *state)
{
- UNUSED(style);
-
- if (isInherit(opv) == false) {
- switch (getValue(opv)) {
- case BREAK_AFTER_AUTO:
- case BREAK_AFTER_ALWAYS:
- case BREAK_AFTER_AVOID:
- case BREAK_AFTER_LEFT:
- case BREAK_AFTER_RIGHT:
- case BREAK_AFTER_PAGE:
- case BREAK_AFTER_COLUMN:
- case BREAK_AFTER_AVOID_PAGE:
- case BREAK_AFTER_AVOID_COLUMN:
- /** \todo convert to public values */
- break;
- }
- }
-
- if (css__outranks_existing(getOpcode(opv), isImportant(opv), state,
- isInherit(opv))) {
- /** \todo set computed elevation */
- }
-
- return CSS_OK;
+ return css__cascade_break_after_before_inside(opv, style, state,
+ set_break_after);
}
css_error css__set_break_after_from_hint(const css_hint *hint,
css_computed_style *style)
{
- UNUSED(hint);
- UNUSED(style);
-
- return CSS_OK;
+ return set_break_after(style, hint->status);
}
css_error css__initial_break_after(css_select_state *state)
{
- UNUSED(state);
-
- return CSS_OK;
+ return set_break_after(state->computed, CSS_BREAK_AFTER_AUTO);
}
css_error css__compose_break_after(const css_computed_style *parent,
const css_computed_style *child,
css_computed_style *result)
{
- UNUSED(parent);
- UNUSED(child);
- UNUSED(result);
+ uint8_t type = get_break_after(child);
+
+ if (type == CSS_BREAK_AFTER_INHERIT) {
+ type = get_break_after(parent);
+ }
- return CSS_OK;
+ return set_break_after(result, type);
}
diff --git a/src/select/properties/break_before.c b/src/select/properties/break_before.c
index 73137f4..b8a8d77 100644
--- a/src/select/properties/break_before.c
+++ b/src/select/properties/break_before.c
@@ -17,56 +17,31 @@
css_error css__cascade_break_before(uint32_t opv, css_style *style,
css_select_state *state)
{
- UNUSED(style);
-
- if (isInherit(opv) == false) {
- switch (getValue(opv)) {
- case BREAK_BEFORE_AUTO:
- case BREAK_BEFORE_ALWAYS:
- case BREAK_BEFORE_AVOID:
- case BREAK_BEFORE_LEFT:
- case BREAK_BEFORE_RIGHT:
- case BREAK_BEFORE_PAGE:
- case BREAK_BEFORE_COLUMN:
- case BREAK_BEFORE_AVOID_PAGE:
- case BREAK_BEFORE_AVOID_COLUMN:
- /** \todo convert to public values */
- break;
- }
- }
-
- if (css__outranks_existing(getOpcode(opv), isImportant(opv), state,
- isInherit(opv))) {
- /** \todo set computed elevation */
- }
-
- return CSS_OK;
+ return css__cascade_break_after_before_inside(opv, style, state,
+ set_break_before);
}
css_error css__set_break_before_from_hint(const css_hint *hint,
css_computed_style *style)
{
- UNUSED(hint);
- UNUSED(style);
-
- return CSS_OK;
+ return set_break_before(style, hint->status);
}
css_error css__initial_break_before(css_select_state *state)
{
- UNUSED(state);
-
- return CSS_OK;
+ return set_break_before(state->computed, CSS_BREAK_BEFORE_AUTO);
}
css_error css__compose_break_before(const css_computed_style *parent,
const css_computed_style *child,
css_computed_style *result)
{
- UNUSED(parent);
- UNUSED(child);
- UNUSED(result);
+ uint8_t type = get_break_before(child);
+
+ if (type == CSS_BREAK_BEFORE_INHERIT) {
+ type = get_break_before(parent);
+ }
- return CSS_OK;
+ return set_break_before(result, type);
}
diff --git a/src/select/properties/break_inside.c b/src/select/properties/break_inside.c
index 82cf09c..af0259f 100644
--- a/src/select/properties/break_inside.c
+++ b/src/select/properties/break_inside.c
@@ -17,22 +17,30 @@
css_error css__cascade_break_inside(uint32_t opv, css_style *style,
css_select_state *state)
{
+ uint16_t value = CSS_BREAK_AFTER_AUTO;
+
UNUSED(style);
if (isInherit(opv) == false) {
switch (getValue(opv)) {
case BREAK_INSIDE_AUTO:
+ value = CSS_BREAK_AFTER_AUTO;
+ break;
case BREAK_INSIDE_AVOID:
+ value = CSS_BREAK_AFTER_AVOID;
+ break;
case BREAK_INSIDE_AVOID_PAGE:
+ value = CSS_BREAK_AFTER_AVOID_PAGE;
+ break;
case BREAK_INSIDE_AVOID_COLUMN:
- /** \todo convert to public values */
+ value = CSS_BREAK_AFTER_AVOID_COLUMN;
break;
}
}
if (css__outranks_existing(getOpcode(opv), isImportant(opv), state,
isInherit(opv))) {
- /** \todo set computed elevation */
+ return set_break_inside(state->computed, value);
}
return CSS_OK;
@@ -41,27 +49,24 @@ css_error css__cascade_break_inside(uint32_t opv, css_style *style,
css_error css__set_break_inside_from_hint(const css_hint *hint,
css_computed_style *style)
{
- UNUSED(hint);
- UNUSED(style);
-
- return CSS_OK;
+ return set_break_inside(style, hint->status);
}
css_error css__initial_break_inside(css_select_state *state)
{
- UNUSED(state);
-
- return CSS_OK;
+ return set_break_inside(state->computed, CSS_BREAK_INSIDE_AUTO);
}
css_error css__compose_break_inside(const css_computed_style *parent,
const css_computed_style *child,
css_computed_style *result)
{
- UNUSED(parent);
- UNUSED(child);
- UNUSED(result);
+ uint8_t type = get_break_inside(child);
- return CSS_OK;
+ if (type == CSS_BREAK_INSIDE_INHERIT) {
+ type = get_break_inside(parent);
+ }
+
+ return set_break_inside(result, type);
}
diff --git a/src/select/properties/helpers.c b/src/select/properties/helpers.c
index df076db..1091a10 100644
--- a/src/select/properties/helpers.c
+++ b/src/select/properties/helpers.c
@@ -395,6 +395,55 @@ css_error css__cascade_page_break_after_before_inside(uint32_t opv,
return CSS_OK;
}
+css_error css__cascade_break_after_before_inside(uint32_t opv,
+ css_style *style, css_select_state *state,
+ css_error (*fun)(css_computed_style *, uint8_t))
+{
+ uint16_t value = CSS_BREAK_AFTER_AUTO;
+
+ UNUSED(style);
+
+ if (isInherit(opv) == false) {
+ switch (getValue(opv)) {
+ case BREAK_AFTER_AUTO:
+ value = CSS_BREAK_AFTER_AUTO;
+ break;
+ case BREAK_AFTER_ALWAYS:
+ value = CSS_BREAK_AFTER_ALWAYS;
+ break;
+ case BREAK_AFTER_AVOID:
+ value = CSS_BREAK_AFTER_AVOID;
+ break;
+ case BREAK_AFTER_LEFT:
+ value = CSS_BREAK_AFTER_LEFT;
+ break;
+ case BREAK_AFTER_RIGHT:
+ value = CSS_BREAK_AFTER_RIGHT;
+ break;
+ case BREAK_AFTER_PAGE:
+ value = CSS_BREAK_AFTER_PAGE;
+ break;
+ case BREAK_AFTER_COLUMN:
+ value = CSS_BREAK_AFTER_COLUMN;
+ break;
+ case BREAK_AFTER_AVOID_PAGE:
+ value = CSS_BREAK_AFTER_AVOID_PAGE;
+ break;
+ case BREAK_AFTER_AVOID_COLUMN:
+ value = CSS_BREAK_AFTER_AVOID_COLUMN;
+ break;
+ }
+ }
+
+ /** \todo lose fun != NULL */
+ if (fun != NULL && css__outranks_existing(getOpcode(opv),
+ isImportant(opv), state, isInherit(opv))) {
+ return fun(state->computed, value);
+ }
+
+ return CSS_OK;
+}
+
css_error css__cascade_counter_increment_reset(uint32_t opv, css_style *style,
css_select_state *state,
css_error (*fun)(css_computed_style *, uint8_t,
diff --git a/src/select/properties/helpers.h b/src/select/properties/helpers.h
index 098fe1e..feed146 100644
--- a/src/select/properties/helpers.h
+++ b/src/select/properties/helpers.h
@@ -51,6 +51,9 @@ css_error css__cascade_number(uint32_t opv, css_style *style,
css_error css__cascade_page_break_after_before_inside(uint32_t opv,
css_style *style, css_select_state *state,
css_error (*fun)(css_computed_style *, uint8_t));
+css_error css__cascade_break_after_before_inside(uint32_t opv,
+ css_style *style, css_select_state *state,
+ css_error (*fun)(css_computed_style *, uint8_t));
css_error css__cascade_counter_increment_reset(uint32_t opv, css_style *style,
css_select_state *state,
css_error (*fun)(css_computed_style *, uint8_t,
diff --git a/src/select/propget.h b/src/select/propget.h
index 08ed0f4..45c773f 100644
--- a/src/select/propget.h
+++ b/src/select/propget.h
@@ -36,7 +36,8 @@ static inline uint8_t get_letter_spacing(
return (bits & 3);
}
- return CSS_LETTER_SPACING_NORMAL;
+ /* Inherited */
+ return CSS_LETTER_SPACING_INHERIT;
}
#undef LETTER_SPACING_MASK
#undef LETTER_SPACING_SHIFT
@@ -62,6 +63,7 @@ static inline uint8_t get_outline_color(
return (bits & 3);
}
+ /* Not inherited; initial value */
return CSS_OUTLINE_COLOR_INVERT;
}
#undef OUTLINE_COLOR_MASK
@@ -90,10 +92,8 @@ static inline uint8_t get_outline_width(
return (bits & 7);
}
- *length = INTTOFIX(2);
- *unit = CSS_UNIT_PX;
-
- return CSS_OUTLINE_WIDTH_WIDTH;
+ /* Not inherited; initial value */
+ return CSS_OUTLINE_WIDTH_MEDIUM;
}
#undef OUTLINE_WIDTH_MASK
#undef OUTLINE_WIDTH_SHIFT
@@ -132,12 +132,10 @@ static inline uint8_t get_border_spacing(
}
return bits;
- } else {
- *hlength = *vlength = 0;
- *hunit = *vunit = CSS_UNIT_PX;
}
- return CSS_BORDER_SPACING_SET;
+ /* Inherited */
+ return CSS_BORDER_SPACING_INHERIT;
}
#undef BORDER_SPACING_MASK1
#undef BORDER_SPACING_SHIFT1
@@ -146,6 +144,72 @@ static inline uint8_t get_border_spacing(
#undef BORDER_SPACING_SHIFT
#undef BORDER_SPACING_INDEX
+#define BREAK_AFTER_INDEX 12
+#define BREAK_AFTER_SHIFT 0
+#define BREAK_AFTER_MASK 0xf
+static inline uint8_t get_break_after(
+ const css_computed_style *style)
+{
+ if (style->uncommon != NULL) {
+ uint8_t bits = style->uncommon->bits[BREAK_AFTER_INDEX];
+ bits &= BREAK_AFTER_MASK;
+ bits >>= BREAK_AFTER_SHIFT;
+
+ /* 4bits: type */
+ return bits;
+ }
+
+ /* Not inherited; initial value */
+ return CSS_BREAK_AFTER_AUTO;
+}
+#undef BREAK_AFTER_MASK
+#undef BREAK_AFTER_SHIFT
+#undef BREAK_AFTER_INDEX
+
+#define BREAK_BEFORE_INDEX 12
+#define BREAK_BEFORE_SHIFT 4
+#define BREAK_BEFORE_MASK (0xf << 4)
+static inline uint8_t get_break_before(
+ const css_computed_style *style)
+{
+ if (style->uncommon != NULL) {
+ uint8_t bits = style->uncommon->bits[BREAK_BEFORE_INDEX];
+ bits &= BREAK_BEFORE_MASK;
+ bits >>= BREAK_BEFORE_SHIFT;
+
+ /* 4bits: type */
+ return bits;
+ }
+
+ /* Not inherited; initial value */
+ return CSS_BREAK_BEFORE_AUTO;
+}
+#undef BREAK_BEFORE_MASK
+#undef BREAK_BEFORE_SHIFT
+#undef BREAK_BEFORE_INDEX
+
+#define BREAK_INSIDE_INDEX 13
+#define BREAK_INSIDE_SHIFT 4
+#define BREAK_INSIDE_MASK (0xf << 4)
+static inline uint8_t get_break_inside(
+ const css_computed_style *style)
+{
+ if (style->uncommon != NULL) {
+ uint8_t bits = style->uncommon->bits[BREAK_INSIDE_INDEX];
+ bits &= BREAK_INSIDE_MASK;
+ bits >>= BREAK_INSIDE_SHIFT;
+
+ /* 4bits: type */
+ return bits;
+ }
+
+ /* Not inherited; initial value */
+ return CSS_BREAK_INSIDE_AUTO;
+}
+#undef BREAK_INSIDE_MASK
+#undef BREAK_INSIDE_SHIFT
+#undef BREAK_INSIDE_INDEX
+
#define WORD_SPACING_INDEX 3
#define WORD_SPACING_SHIFT 2
#define WORD_SPACING_MASK 0xfc
@@ -168,7 +232,8 @@ static inline uint8_t get_word_spacing(
return (bits & 3);
}
- return CSS_WORD_SPACING_NORMAL;
+ /* Inherited */
+ return CSS_WORD_SPACING_INHERIT;
}
#undef WORD_SPACING_MASK
#undef WORD_SPACING_SHIFT
@@ -189,7 +254,8 @@ static inline uint8_t get_writing_mode(
return bits;
}
- return CSS_WRITING_MODE_HORIZONTAL_TB;
+ /* Inherited */
+ return CSS_WRITING_MODE_INHERIT;
}
#undef WRITING_MODE_INDEX
#undef WRITING_MODE_MASK
@@ -213,6 +279,7 @@ static inline uint8_t get_counter_increment(
return bits;
}
+ /* Not inherited; initial value */
return CSS_COUNTER_INCREMENT_NONE;
}
#undef COUNTER_INCREMENT_MASK
@@ -237,6 +304,7 @@ static inline uint8_t get_counter_reset(
return bits;
}
+ /* Not inherited; initial value */
return CSS_COUNTER_RESET_NONE;
}
#undef COUNTER_RESET_MASK
@@ -261,7 +329,8 @@ static inline uint8_t get_cursor(
return bits;
}
- return CSS_CURSOR_AUTO;
+ /* Inherited */
+ return CSS_CURSOR_INHERIT;
}
#undef CURSOR_MASK
#undef CURSOR_SHIFT
@@ -330,6 +399,7 @@ static inline uint8_t get_clip(
return (bits & 0x3);
}
+ /* Not inherited; initial value */
return CSS_CLIP_AUTO;
}
#undef CLIP_MASK2
@@ -359,6 +429,7 @@ static inline uint8_t get_column_count(
return bits;
}
+ /* Not inherited; initial value */
return CSS_COLUMN_COUNT_AUTO;
}
#undef COLUMN_COUNT_MASK
@@ -380,6 +451,7 @@ static inline uint8_t get_column_fill(
return bits;
}
+ /* Not inherited; initial value */
return CSS_COLUMN_FILL_BALANCE;
}
#undef COLUMN_FILL_MASK
@@ -407,6 +479,7 @@ static inline uint8_t get_column_gap(
return (bits & 0x3);
}
+ /* Not inherited; initial value */
return CSS_COLUMN_GAP_NORMAL;
}
#undef COLUMN_GAP_MASK
@@ -431,6 +504,7 @@ static inline uint8_t get_column_rule_color(
return bits;
}
+ /* Not inherited; initial value */
*color = 0;
return CSS_COLUMN_RULE_COLOR_CURRENT_COLOR;
}
@@ -453,6 +527,7 @@ static inline uint8_t get_column_rule_style(
return bits;
}
+ /* Not inherited; initial value */
return CSS_COLUMN_RULE_STYLE_NONE;
}
#undef COLUMN_RULE_STYLE_MASK
@@ -480,6 +555,7 @@ static inline uint8_t get_column_rule_width(
return (bits & 0x7);
}
+ /* Not inherited; initial value */
return CSS_COLUMN_RULE_WIDTH_MEDIUM;
}
#undef COLUMN_RULE_WIDTH_MASK
@@ -501,6 +577,7 @@ static inline uint8_t get_column_span(
return bits;
}
+ /* Not inherited; initial value */
return CSS_COLUMN_SPAN_NONE;
}
#undef COLUMN_SPAN_MASK
@@ -528,6 +605,7 @@ static inline uint8_t get_column_width(
return (bits & 0x3);
}
+ /* Not inherited; initial value */
return CSS_COLUMN_WIDTH_AUTO;
}
#undef COLUMN_WIDTH_MASK
@@ -552,6 +630,7 @@ static inline uint8_t get_content(
return bits;
}
+ /* Not inherited; initial value */
return CSS_CONTENT_NORMAL;
}
#undef CONTENT_MASK
@@ -1988,6 +2067,7 @@ static inline uint8_t get_page_break_after(
return bits;
}
+ /* Not inherited; initial value */
return CSS_PAGE_BREAK_AFTER_AUTO;
}
#undef PAGE_BREAK_AFTER_MASK
@@ -2009,6 +2089,7 @@ static inline uint8_t get_page_break_before(
return bits;
}
+ /* Not inherited; initial value */
return CSS_PAGE_BREAK_BEFORE_AUTO;
}
#undef PAGE_BREAK_BEFORE_MASK
@@ -2030,6 +2111,7 @@ static inline uint8_t get_page_break_inside(
return bits;
}
+ /* Not inherited; initial value */
return CSS_PAGE_BREAK_INSIDE_AUTO;
}
#undef PAGE_BREAK_INSIDE_MASK
@@ -2054,8 +2136,8 @@ static inline uint8_t get_orphans(
return bits;
}
- *orphans = 2;
- return CSS_ORPHANS_SET;
+ /* Inherited */
+ return CSS_ORPHANS_INHERIT;
}
#undef ORPHANS_MASK
#undef ORPHANS_SHIFT
@@ -2079,8 +2161,8 @@ static inline uint8_t get_widows(
return bits;
}
- *widows = 2;
- return CSS_WIDOWS_SET;
+ /* Inherited */
+ return CSS_WIDOWS_INHERIT;
}
#undef WIDOWS_MASK
#undef WIDOWS_SHIFT
diff --git a/src/select/propset.h b/src/select/propset.h
index 769d3b3..d3d6fb1 100644
--- a/src/select/propset.h
+++ b/src/select/propset.h
@@ -16,6 +16,8 @@
/* Important: keep this file in sync with computed.h */
/** \todo Is there a better way to ensure this happens? */
+/** Default values are 'initial value', unless the property is inherited,
+ * in which case it is 'inherit'. */
static const css_computed_uncommon default_uncommon = {
{ (CSS_LETTER_SPACING_INHERIT << 2) | CSS_OUTLINE_COLOR_INVERT,
(CSS_OUTLINE_WIDTH_MEDIUM << 1) | CSS_BORDER_SPACING_INHERIT,
@@ -30,7 +32,9 @@ static const css_computed_uncommon default_uncommon = {
(CSS_COLUMN_RULE_STYLE_NONE << 0),
(CSS_COLUMN_GAP_NORMAL << 2) | (CSS_COLUMN_RULE_COLOR_CURRENT_COLOR),
(CSS_COLUMN_RULE_WIDTH_MEDIUM << 1),
- (CSS_COLUMN_SPAN_NONE << 6) | CSS_COLUMN_WIDTH_AUTO
+ (CSS_COLUMN_SPAN_NONE << 6) | CSS_COLUMN_WIDTH_AUTO,
+ (CSS_BREAK_BEFORE_AUTO << 4) | CSS_BREAK_AFTER_AUTO,
+ (CSS_BREAK_INSIDE_AUTO)
},
{ 0, 0 },
{ 0, 0, 0, 0 },
@@ -194,6 +198,72 @@ static inline css_error set_border_spacing(
#undef BORDER_SPACING_SHIFT
#undef BORDER_SPACING_INDEX
+#define BREAK_AFTER_INDEX 12
+#define BREAK_AFTER_SHIFT 0
+#define BREAK_AFTER_MASK 0xf
+static inline css_error set_break_after(
+ css_computed_style *style, uint8_t type)
+{
+ uint8_t *bits;
+
+ ENSURE_UNCOMMON;
+
+ bits = &style->uncommon->bits[BREAK_AFTER_INDEX];
+
+ /* 4bits: type */
+ *bits = (*bits & ~BREAK_AFTER_MASK) |
+ ((type & 0xf) << BREAK_AFTER_SHIFT);
+
+ return CSS_OK;
+}
+#undef BREAK_AFTER_MASK
+#undef BREAK_AFTER_SHIFT
+#undef BREAK_AFTER_INDEX
+
+#define BREAK_BEFORE_INDEX 12
+#define BREAK_BEFORE_SHIFT 4
+#define BREAK_BEFORE_MASK (0xf << 4)
+static inline css_error set_break_before(
+ css_computed_style *style, uint8_t type)
+{
+ uint8_t *bits;
+
+ ENSURE_UNCOMMON;
+
+ bits = &style->uncommon->bits[BREAK_BEFORE_INDEX];
+
+ /* 4bits: type */
+ *bits = (*bits & ~BREAK_BEFORE_MASK) |
+ ((type & 0xf) << BREAK_BEFORE_SHIFT);
+
+ return CSS_OK;
+}
+#undef BREAK_BEFORE_MASK
+#undef BREAK_BEFORE_SHIFT
+#undef BREAK_BEFORE_INDEX
+
+#define BREAK_INSIDE_INDEX 13
+#define BREAK_INSIDE_SHIFT 4
+#define BREAK_INSIDE_MASK (0xf << 4)
+static inline css_error set_break_inside(
+ css_computed_style *style, uint8_t type)
+{
+ uint8_t *bits;
+
+ ENSURE_UNCOMMON;
+
+ bits = &style->uncommon->bits[BREAK_INSIDE_INDEX];
+
+ /* 4bits: type */
+ *bits = (*bits & ~BREAK_INSIDE_MASK) |
+ ((type & 0xf) << BREAK_INSIDE_SHIFT);
+
+ return CSS_OK;
+}
+#undef BREAK_INSIDE_MASK
+#undef BREAK_INSIDE_SHIFT
+#undef BREAK_INSIDE_INDEX
+
#define WORD_SPACING_INDEX 3
#define WORD_SPACING_SHIFT 2
#define WORD_SPACING_MASK 0xfc
diff --git a/test/data/select/tests1.dat b/test/data/select/tests1.dat
index c04f063..786e19a 100644
--- a/test/data/select/tests1.dat
+++ b/test/data/select/tests1.dat
@@ -4,6 +4,109 @@
| p*
| class=green
#ua
+p { display: block; }
+#user
+#author
+#errors
+#expected
+background-attachment: scroll
+background-color: #00000000
+background-image: none
+background-position: 0% 0%
+background-repeat: repeat
+border-collapse: inherit
+border-spacing: inherit
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
+border-top-style: none
+border-right-style: none
+border-bottom-style: none
+border-left-style: none
+border-top-width: medium
+border-right-width: medium
+border-bottom-width: medium
+border-left-width: medium
+bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
+caption-side: inherit
+clear: none
+clip: auto
+color: inherit
+column-count: auto
+column-fill: balance
+column-gap: normal
+column-rule-color: inherit
+column-rule-style: none
+column-rule-width: medium
+column-span: none
+column-width: auto
+content: normal
+counter-increment: none
+counter-reset: none
+cursor: inherit
+direction: inherit
+display: block
+empty-cells: inherit
+float: none
+font-family: inherit
+font-size: inherit
+font-style: inherit
+font-variant: inherit
+font-weight: inherit
+height: auto
+left: auto
+letter-spacing: inherit
+line-height: inherit
+list-style-image: inherit
+list-style-position: inherit
+list-style-type: inherit
+margin-top: 0px
+margin-right: 0px
+margin-bottom: 0px
+margin-left: 0px
+max-height: none
+max-width: none
+min-height: 0px
+min-width: 0px
+opacity: 1.000
+outline-color: invert
+outline-style: none
+outline-width: medium
+overflow-x: visible
+overflow-y: visible
+padding-top: 0px
+padding-right: 0px
+padding-bottom: 0px
+padding-left: 0px
+position: static
+quotes: inherit
+right: auto
+table-layout: auto
+text-align: inherit
+text-decoration: none
+text-indent: inherit
+text-transform: inherit
+top: auto
+unicode-bidi: normal
+vertical-align: baseline
+visibility: inherit
+white-space: inherit
+width: auto
+word-spacing: inherit
+writing-mode: horizontal-tb
+z-index: auto
+#reset
+
+#tree
+| div
+| id=foo
+| p*
+| class=green
+#ua
div, p { display: block; }
#user
.green { color: #f00 !important; }
@@ -19,7 +122,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -33,6 +136,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -40,7 +146,7 @@ color: #ffff0000
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -48,7 +154,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: block
empty-cells: inherit
@@ -60,7 +166,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -76,7 +182,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -97,7 +203,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -124,7 +230,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -138,6 +244,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -145,7 +254,7 @@ color: #ffff0000
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -153,7 +262,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: table-cell
empty-cells: inherit
@@ -165,7 +274,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -181,7 +290,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -202,7 +311,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -229,7 +338,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -243,6 +352,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -250,7 +362,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -258,7 +370,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: block
empty-cells: inherit
@@ -270,7 +382,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -286,7 +398,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -307,7 +419,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -334,7 +446,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -348,6 +460,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -355,7 +470,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -363,7 +478,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: block
empty-cells: inherit
@@ -375,7 +490,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -391,7 +506,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -412,7 +527,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -431,7 +546,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: separate
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: #ff000000
border-right-color: #ff000000
border-bottom-color: #ff000000
@@ -445,6 +560,9 @@ border-right-width: 2px
border-bottom-width: 2px
border-left-width: 2px
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: top
clear: none
clip: auto
@@ -452,7 +570,7 @@ color: #ff000000
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -460,7 +578,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: ltr
display: block
empty-cells: show
@@ -472,7 +590,7 @@ font-variant: normal
font-weight: normal
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: 0px
line-height: normal
list-style-image: none
list-style-position: outside
@@ -509,7 +627,7 @@ vertical-align: baseline
visibility: visible
white-space: normal
width: auto
-word-spacing: normal
+word-spacing: 0px
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -526,7 +644,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: separate
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: #ff000000
border-right-color: #ff000000
border-bottom-color: #ff000000
@@ -540,6 +658,9 @@ border-right-width: 2px
border-bottom-width: 2px
border-left-width: 2px
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: top
clear: none
clip: auto
@@ -547,7 +668,7 @@ color: #ff000000
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -555,7 +676,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: ltr
display: inline
empty-cells: show
@@ -567,7 +688,7 @@ font-variant: normal
font-weight: normal
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: 0px
line-height: normal
list-style-image: none
list-style-position: outside
@@ -604,7 +725,7 @@ vertical-align: baseline
visibility: visible
white-space: normal
width: auto
-word-spacing: normal
+word-spacing: 0px
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -622,7 +743,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: separate
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: #ff000000
border-right-color: #ff000000
border-bottom-color: #ff000000
@@ -636,6 +757,9 @@ border-right-width: 2px
border-bottom-width: 2px
border-left-width: 2px
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: top
clear: none
clip: auto
@@ -643,7 +767,7 @@ color: #ff000000
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -651,7 +775,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: ltr
display: inline
empty-cells: show
@@ -663,7 +787,7 @@ font-variant: normal
font-weight: normal
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: 0px
line-height: normal
list-style-image: none
list-style-position: outside
@@ -700,7 +824,7 @@ vertical-align: baseline
visibility: visible
white-space: normal
width: auto
-word-spacing: normal
+word-spacing: 0px
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -718,7 +842,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -732,6 +856,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -739,7 +866,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -747,7 +874,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: inline
empty-cells: inherit
@@ -759,7 +886,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -775,7 +902,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -796,7 +923,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -813,7 +940,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: separate
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: #ff000000
border-right-color: #ff000000
border-bottom-color: #ff000000
@@ -827,6 +954,9 @@ border-right-width: 2px
border-bottom-width: 2px
border-left-width: 2px
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: top
clear: none
clip: auto
@@ -834,7 +964,7 @@ color: #ff000000
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -842,7 +972,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: ltr
display: inline
empty-cells: show
@@ -854,7 +984,7 @@ font-variant: normal
font-weight: normal
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: 0px
line-height: normal
list-style-image: none
list-style-position: outside
@@ -891,7 +1021,7 @@ vertical-align: baseline
visibility: visible
white-space: normal
width: auto
-word-spacing: normal
+word-spacing: 0px
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -913,7 +1043,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -927,6 +1057,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -934,7 +1067,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -942,7 +1075,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: block
empty-cells: inherit
@@ -954,7 +1087,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -970,7 +1103,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -991,7 +1124,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -1013,7 +1146,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -1027,6 +1160,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -1034,7 +1170,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -1042,7 +1178,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: block
empty-cells: inherit
@@ -1054,7 +1190,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -1070,7 +1206,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -1091,7 +1227,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -1114,7 +1250,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -1128,6 +1264,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -1135,7 +1274,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -1143,7 +1282,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: block
empty-cells: inherit
@@ -1155,7 +1294,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -1171,7 +1310,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -1192,7 +1331,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -1218,7 +1357,7 @@ background-image: url('Sonic_the_Hedgehog.png')
background-position: 100% 100%
background-repeat: repeat-y
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -1232,6 +1371,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -1239,7 +1381,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -1247,7 +1389,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: block
empty-cells: inherit
@@ -1259,7 +1401,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -1275,7 +1417,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -1296,7 +1438,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -1321,7 +1463,7 @@ background-image: url('Sonic_the_Hedgehog.png')
background-position: 50% 20%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -1335,6 +1477,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -1342,7 +1487,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -1350,7 +1495,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: block
empty-cells: inherit
@@ -1362,7 +1507,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -1378,7 +1523,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -1399,7 +1544,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -1430,7 +1575,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -1444,6 +1589,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -1451,7 +1599,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -1459,7 +1607,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: table-row
empty-cells: inherit
@@ -1471,7 +1619,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -1487,7 +1635,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -1508,7 +1656,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -1539,7 +1687,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -1553,6 +1701,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -1560,7 +1711,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -1568,7 +1719,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: table-cell
empty-cells: inherit
@@ -1580,7 +1731,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -1596,7 +1747,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -1617,7 +1768,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -1648,7 +1799,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -1662,6 +1813,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -1669,7 +1823,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -1677,7 +1831,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: table-cell
empty-cells: inherit
@@ -1689,7 +1843,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -1705,7 +1859,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -1726,7 +1880,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -1761,7 +1915,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: #ffffffff
border-right-color: #ff8040ff
border-bottom-color: #ff000000
@@ -1775,6 +1929,9 @@ border-right-width: medium
border-bottom-width: thick
border-left-width: 2px
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -1782,7 +1939,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -1790,7 +1947,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: table-cell
empty-cells: inherit
@@ -1802,7 +1959,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -1818,7 +1975,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -1839,7 +1996,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -1873,7 +2030,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: #ff000000
border-right-color: #ff000000
border-bottom-color: #ff000000
@@ -1887,6 +2044,9 @@ border-right-width: 2em
border-bottom-width: thick
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -1894,7 +2054,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -1902,7 +2062,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: table-cell
empty-cells: inherit
@@ -1914,7 +2074,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -1930,7 +2090,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -1951,7 +2111,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -1983,7 +2143,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -1997,6 +2157,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -2004,7 +2167,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -2012,7 +2175,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: table-cell
empty-cells: inherit
@@ -2024,7 +2187,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -2040,7 +2203,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -2061,7 +2224,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -2106,6 +2269,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -2215,6 +2381,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -2324,6 +2493,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -2433,6 +2605,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -2542,6 +2717,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: inherit
clip: auto
@@ -2651,6 +2829,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: left
clip: auto
@@ -2760,6 +2941,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: both
clip: auto
@@ -2869,6 +3053,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -2978,6 +3165,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -3087,6 +3277,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -3196,6 +3389,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -3305,6 +3501,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -3414,6 +3613,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -3523,6 +3725,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -3632,6 +3837,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -3741,6 +3949,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -3850,6 +4061,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -3959,6 +4173,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -4068,6 +4285,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -4177,6 +4397,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: right
clip: auto
@@ -4265,7 +4488,7 @@ background-image: none
background-position: 0% 0%
background-repeat: repeat
border-collapse: inherit
-border-spacing: 0px 0px
+border-spacing: inherit
border-top-color: currentColor
border-right-color: currentColor
border-bottom-color: currentColor
@@ -4279,6 +4502,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -4286,7 +4512,7 @@ color: inherit
column-count: auto
column-fill: balance
column-gap: normal
-column-rule-color: currentColor
+column-rule-color: inherit
column-rule-style: none
column-rule-width: medium
column-span: none
@@ -4294,7 +4520,7 @@ column-width: auto
content: normal
counter-increment: none
counter-reset: none
-cursor: auto
+cursor: inherit
direction: inherit
display: inherit
empty-cells: inherit
@@ -4306,7 +4532,7 @@ font-variant: inherit
font-weight: inherit
height: auto
left: auto
-letter-spacing: normal
+letter-spacing: inherit
line-height: inherit
list-style-image: inherit
list-style-position: inherit
@@ -4322,7 +4548,7 @@ min-width: 0px
opacity: 1.000
outline-color: invert
outline-style: none
-outline-width: 2px
+outline-width: medium
overflow-x: visible
overflow-y: visible
padding-top: 0px
@@ -4343,7 +4569,7 @@ vertical-align: baseline
visibility: inherit
white-space: inherit
width: auto
-word-spacing: normal
+word-spacing: inherit
writing-mode: horizontal-tb
z-index: auto
#reset
@@ -4381,6 +4607,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -4483,6 +4712,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -4582,6 +4814,9 @@ border-right-width: medium
border-bottom-width: medium
border-left-width: medium
bottom: auto
+break-after: auto
+break-before: auto
+break-inside: auto
caption-side: inherit
clear: none
clip: auto
@@ -4651,3 +4886,312 @@ writing-mode: horizontal-tb
z-index: auto
#reset
+#tree
+| div
+| id=foo
+| p*
+| class=green
+#ua
+p { display: block; break-after: avoid; break-before: column; }
+#user
+#author
+#errors
+#expected
+background-attachment: scroll
+background-color: #00000000
+background-image: none
+background-position: 0% 0%
+background-repeat: repeat
+border-collapse: inherit
+border-spacing: inherit
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
+border-top-style: none
+border-right-style: none
+border-bottom-style: none
+border-left-style: none
+border-top-width: medium
+border-right-width: medium
+border-bottom-width: medium
+border-left-width: medium
+bottom: auto
+break-after: avoid
+break-before: column
+break-inside: auto
+caption-side: inherit
+clear: none
+clip: auto
+color: inherit
+column-count: auto
+column-fill: balance
+column-gap: normal
+column-rule-color: inherit
+column-rule-style: none
+column-rule-width: medium
+column-span: none
+column-width: auto
+content: normal
+counter-increment: none
+counter-reset: none
+cursor: inherit
+direction: inherit
+display: block
+empty-cells: inherit
+float: none
+font-family: inherit
+font-size: inherit
+font-style: inherit
+font-variant: inherit
+font-weight: inherit
+height: auto
+left: auto
+letter-spacing: inherit
+line-height: inherit
+list-style-image: inherit
+list-style-position: inherit
+list-style-type: inherit
+margin-top: 0px
+margin-right: 0px
+margin-bottom: 0px
+margin-left: 0px
+max-height: none
+max-width: none
+min-height: 0px
+min-width: 0px
+opacity: 1.000
+outline-color: invert
+outline-style: none
+outline-width: medium
+overflow-x: visible
+overflow-y: visible
+padding-top: 0px
+padding-right: 0px
+padding-bottom: 0px
+padding-left: 0px
+position: static
+quotes: inherit
+right: auto
+table-layout: auto
+text-align: inherit
+text-decoration: none
+text-indent: inherit
+text-transform: inherit
+top: auto
+unicode-bidi: normal
+vertical-align: baseline
+visibility: inherit
+white-space: inherit
+width: auto
+word-spacing: inherit
+writing-mode: horizontal-tb
+z-index: auto
+#reset
+
+#tree
+| div
+| id=foo
+| p*
+| class=green
+#ua
+p { display: block; break-after: avoid-page; break-before: always; }
+#user
+#author
+#errors
+#expected
+background-attachment: scroll
+background-color: #00000000
+background-image: none
+background-position: 0% 0%
+background-repeat: repeat
+border-collapse: inherit
+border-spacing: inherit
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
+border-top-style: none
+border-right-style: none
+border-bottom-style: none
+border-left-style: none
+border-top-width: medium
+border-right-width: medium
+border-bottom-width: medium
+border-left-width: medium
+bottom: auto
+break-after: avoid-page
+break-before: always
+break-inside: auto
+caption-side: inherit
+clear: none
+clip: auto
+color: inherit
+column-count: auto
+column-fill: balance
+column-gap: normal
+column-rule-color: inherit
+column-rule-style: none
+column-rule-width: medium
+column-span: none
+column-width: auto
+content: normal
+counter-increment: none
+counter-reset: none
+cursor: inherit
+direction: inherit
+display: block
+empty-cells: inherit
+float: none
+font-family: inherit
+font-size: inherit
+font-style: inherit
+font-variant: inherit
+font-weight: inherit
+height: auto
+left: auto
+letter-spacing: inherit
+line-height: inherit
+list-style-image: inherit
+list-style-position: inherit
+list-style-type: inherit
+margin-top: 0px
+margin-right: 0px
+margin-bottom: 0px
+margin-left: 0px
+max-height: none
+max-width: none
+min-height: 0px
+min-width: 0px
+opacity: 1.000
+outline-color: invert
+outline-style: none
+outline-width: medium
+overflow-x: visible
+overflow-y: visible
+padding-top: 0px
+padding-right: 0px
+padding-bottom: 0px
+padding-left: 0px
+position: static
+quotes: inherit
+right: auto
+table-layout: auto
+text-align: inherit
+text-decoration: none
+text-indent: inherit
+text-transform: inherit
+top: auto
+unicode-bidi: normal
+vertical-align: baseline
+visibility: inherit
+white-space: inherit
+width: auto
+word-spacing: inherit
+writing-mode: horizontal-tb
+z-index: auto
+#reset
+
+#tree
+| div
+| id=foo
+| p*
+| class=green
+#ua
+p { display: block; break-after: avoid-page; break-before: always; break-inside: avoid;
}
+#user
+#author
+#errors
+#expected
+background-attachment: scroll
+background-color: #00000000
+background-image: none
+background-position: 0% 0%
+background-repeat: repeat
+border-collapse: inherit
+border-spacing: inherit
+border-top-color: currentColor
+border-right-color: currentColor
+border-bottom-color: currentColor
+border-left-color: currentColor
+border-top-style: none
+border-right-style: none
+border-bottom-style: none
+border-left-style: none
+border-top-width: medium
+border-right-width: medium
+border-bottom-width: medium
+border-left-width: medium
+bottom: auto
+break-after: avoid-page
+break-before: always
+break-inside: avoid
+caption-side: inherit
+clear: none
+clip: auto
+color: inherit
+column-count: auto
+column-fill: balance
+column-gap: normal
+column-rule-color: inherit
+column-rule-style: none
+column-rule-width: medium
+column-span: none
+column-width: auto
+content: normal
+counter-increment: none
+counter-reset: none
+cursor: inherit
+direction: inherit
+display: block
+empty-cells: inherit
+float: none
+font-family: inherit
+font-size: inherit
+font-style: inherit
+font-variant: inherit
+font-weight: inherit
+height: auto
+left: auto
+letter-spacing: inherit
+line-height: inherit
+list-style-image: inherit
+list-style-position: inherit
+list-style-type: inherit
+margin-top: 0px
+margin-right: 0px
+margin-bottom: 0px
+margin-left: 0px
+max-height: none
+max-width: none
+min-height: 0px
+min-width: 0px
+opacity: 1.000
+outline-color: invert
+outline-style: none
+outline-width: medium
+overflow-x: visible
+overflow-y: visible
+padding-top: 0px
+padding-right: 0px
+padding-bottom: 0px
+padding-left: 0px
+position: static
+quotes: inherit
+right: auto
+table-layout: auto
+text-align: inherit
+text-decoration: none
+text-indent: inherit
+text-transform: inherit
+top: auto
+unicode-bidi: normal
+vertical-align: baseline
+visibility: inherit
+white-space: inherit
+width: auto
+word-spacing: inherit
+writing-mode: horizontal-tb
+z-index: auto
+#reset
+
diff --git a/test/dump_computed.h b/test/dump_computed.h
index a4c0b89..8efd2ca 100644
--- a/test/dump_computed.h
+++ b/test/dump_computed.h
@@ -715,6 +715,111 @@ static void dump_computed_style(const css_computed_style *style,
char *buf,
ptr += wrote;
*len -= wrote;
+ /* break-after */
+ val = css_computed_break_after(style);
+ switch (val) {
+ case CSS_BREAK_AFTER_INHERIT:
+ wrote = snprintf(ptr, *len, "break-after: inherit\n");
+ break;
+ case CSS_BREAK_AFTER_AUTO:
+ wrote = snprintf(ptr, *len, "break-after: auto\n");
+ break;
+ case CSS_BREAK_AFTER_ALWAYS:
+ wrote = snprintf(ptr, *len, "break-after: always\n");
+ break;
+ case CSS_BREAK_AFTER_AVOID:
+ wrote = snprintf(ptr, *len, "break-after: avoid\n");
+ break;
+ case CSS_BREAK_AFTER_LEFT:
+ wrote = snprintf(ptr, *len, "break-after: left\n");
+ break;
+ case CSS_BREAK_AFTER_RIGHT:
+ wrote = snprintf(ptr, *len, "break-after: right\n");
+ break;
+ case CSS_BREAK_AFTER_PAGE:
+ wrote = snprintf(ptr, *len, "break-after: page\n");
+ break;
+ case CSS_BREAK_AFTER_COLUMN:
+ wrote = snprintf(ptr, *len, "break-after: column\n");
+ break;
+ case CSS_BREAK_AFTER_AVOID_PAGE:
+ wrote = snprintf(ptr, *len, "break-after: avoid-page\n");
+ break;
+ case CSS_BREAK_AFTER_AVOID_COLUMN:
+ wrote = snprintf(ptr, *len, "break-after: avoid-column\n");
+ break;
+ default:
+ wrote = 0;
+ break;
+ }
+ ptr += wrote;
+ *len -= wrote;
+
+ /* break-before */
+ val = css_computed_break_before(style);
+ switch (val) {
+ case CSS_BREAK_BEFORE_INHERIT:
+ wrote = snprintf(ptr, *len, "break-before: inherit\n");
+ break;
+ case CSS_BREAK_BEFORE_AUTO:
+ wrote = snprintf(ptr, *len, "break-before: auto\n");
+ break;
+ case CSS_BREAK_BEFORE_ALWAYS:
+ wrote = snprintf(ptr, *len, "break-before: always\n");
+ break;
+ case CSS_BREAK_BEFORE_AVOID:
+ wrote = snprintf(ptr, *len, "break-before: avoid\n");
+ break;
+ case CSS_BREAK_BEFORE_LEFT:
+ wrote = snprintf(ptr, *len, "break-before: left\n");
+ break;
+ case CSS_BREAK_BEFORE_RIGHT:
+ wrote = snprintf(ptr, *len, "break-before: right\n");
+ break;
+ case CSS_BREAK_BEFORE_PAGE:
+ wrote = snprintf(ptr, *len, "break-before: page\n");
+ break;
+ case CSS_BREAK_BEFORE_COLUMN:
+ wrote = snprintf(ptr, *len, "break-before: column\n");
+ break;
+ case CSS_BREAK_BEFORE_AVOID_PAGE:
+ wrote = snprintf(ptr, *len, "break-before: avoid-page\n");
+ break;
+ case CSS_BREAK_BEFORE_AVOID_COLUMN:
+ wrote = snprintf(ptr, *len, "break-before: avoid-column\n");
+ break;
+ default:
+ wrote = 0;
+ break;
+ }
+ ptr += wrote;
+ *len -= wrote;
+
+ /* break-inside */
+ val = css_computed_break_inside(style);
+ switch (val) {
+ case CSS_BREAK_INSIDE_INHERIT:
+ wrote = snprintf(ptr, *len, "break-inside: inherit\n");
+ break;
+ case CSS_BREAK_INSIDE_AUTO:
+ wrote = snprintf(ptr, *len, "break-inside: auto\n");
+ break;
+ case CSS_BREAK_INSIDE_AVOID:
+ wrote = snprintf(ptr, *len, "break-inside: avoid\n");
+ break;
+ case CSS_BREAK_INSIDE_AVOID_PAGE:
+ wrote = snprintf(ptr, *len, "break-inside: avoid-page\n");
+ break;
+ case CSS_BREAK_INSIDE_AVOID_COLUMN:
+ wrote = snprintf(ptr, *len, "break-inside: avoid-column\n");
+ break;
+ default:
+ wrote = 0;
+ break;
+ }
+ ptr += wrote;
+ *len -= wrote;
+
/* caption-side */
val = css_computed_caption_side(style);
switch (val) {
--
Cascading Style Sheets library