mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:47:34 +00:00
LibWeb: Annotate which CSS properties may affect layout
This patch adds CSS::property_affects_layout(PropertyID) which tells us whether a CSS property would affect layout if it were changed. This will be used to avoid unnecessary relayout work when something changes that really only requires us to repaint the page. To mark a property as not affecting layout, set "affects-layout" to false in the corresponding Properties.json entry. Note that all properties affect layout by default.
This commit is contained in:
parent
df5c123d8c
commit
275db39c94
3 changed files with 34 additions and 0 deletions
|
@ -43,6 +43,7 @@
|
|||
]
|
||||
},
|
||||
"background-color": {
|
||||
"affects-layout": false,
|
||||
"inherited": false,
|
||||
"initial": "transparent",
|
||||
"valid-types": [
|
||||
|
@ -501,6 +502,7 @@
|
|||
]
|
||||
},
|
||||
"color": {
|
||||
"affects-layout": false,
|
||||
"inherited": true,
|
||||
"initial": "-libweb-palette-base-text",
|
||||
"valid-types": [
|
||||
|
@ -1049,6 +1051,7 @@
|
|||
]
|
||||
},
|
||||
"outline-width": {
|
||||
"affects-layout": false,
|
||||
"inherited": false,
|
||||
"initial": "medium",
|
||||
"valid-types": [
|
||||
|
@ -1243,6 +1246,7 @@
|
|||
},
|
||||
"text-decoration-line": {
|
||||
"__comment": "FIXME: This property is not supposed to be inherited, but we currently rely on inheritance to propagate decorations into line boxes.",
|
||||
"affects-layout": false,
|
||||
"inherited": true,
|
||||
"initial": "none",
|
||||
"valid-identifiers": [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue