mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-11 12:06:07 +00:00
LibWeb/CSS: Move property code from CSSStyleDeclaration to *Properties
CSSStyleDeclaration is a base class that's used by various collections of style properties or descriptors. This commit moves all style-property-related code into CSSStyleProperties, where it belongs. As noted in the previous commit, we also apply the CSSStyleProperties prototype now.
This commit is contained in:
parent
83bb92c4e0
commit
a28197669a
Notes:
github-actions[bot]
2025-03-19 13:54:14 +00:00
Author: https://github.com/AtkinsSJ
Commit: a28197669a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3983
12 changed files with 276 additions and 295 deletions
|
@ -1,3 +1,3 @@
|
|||
[object CSSStyleDeclaration]
|
||||
[object CSSStyleProperties]
|
||||
[object DOMRectList]
|
||||
PASS (didn't crash)
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
All supported properties and their default values exposed from CSSStyleDeclaration from getComputedStyle:
|
||||
'cssText': ''
|
||||
'length': '232'
|
||||
'parentRule': 'null'
|
||||
All supported properties and their default values exposed from CSSStyleProperties from getComputedStyle:
|
||||
'cssFloat': 'none'
|
||||
'WebkitAlignContent': 'normal'
|
||||
'webkitAlignContent': 'normal'
|
||||
|
@ -641,9 +638,4 @@ All supported properties and their default values exposed from CSSStyleDeclarati
|
|||
'y': '0px'
|
||||
'zIndex': 'auto'
|
||||
'z-index': 'auto'
|
||||
'getPropertyPriority': 'function getPropertyPriority() { [native code] }'
|
||||
'getPropertyValue': 'function getPropertyValue() { [native code] }'
|
||||
'removeProperty': 'function removeProperty() { [native code] }'
|
||||
'item': 'function item() { [native code] }'
|
||||
'setProperty': 'function setProperty() { [native code] }'
|
||||
'constructor': 'function CSSStyleDeclaration() { [native code] }'
|
||||
'constructor': 'function CSSStyleProperties() { [native code] }'
|
|
@ -1,4 +1,4 @@
|
|||
spanRule: [object CSSStyleRule] ~ span { color: purple; }
|
||||
spanRule.style: [object CSSStyleDeclaration] ~ span { color: purple; }
|
||||
spanRule.style: [object CSSStyleProperties] ~ span { color: purple; }
|
||||
spanRule.style.parentRule: [object CSSStyleRule] ~ span { color: purple; }
|
||||
spanRule.style.parentRule === spanRule: true
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
const stylePrototype = Object.getPrototypeOf(defaultStyle);
|
||||
const supportedProperties = Object.getOwnPropertyNames(stylePrototype);
|
||||
|
||||
println("All supported properties and their default values exposed from CSSStyleDeclaration from getComputedStyle:");
|
||||
println("All supported properties and their default values exposed from CSSStyleProperties from getComputedStyle:");
|
||||
for (const supportedProperty of supportedProperties) {
|
||||
println(`'${supportedProperty}': '${defaultStyle[supportedProperty]}'`);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue