summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp
AgeCommit message (Collapse)Author
2021-10-01LibWeb: Implement CSSRule and CSSStyleDeclaration serializationAndreas Kling
There are a handful of FIXME's here, but this seems generally good. Note that CSS *values* don't get serialized in a spec-compliant way since we currently rely on StyleValue::to_string() which is ad-hoc.
2021-09-26LibWeb: Support simplest form of CSSStyleDeclaration.setProperty()Andreas Kling
This patch adds the setProperty(name, value) API to CSSStyleDeclaration. Setting an invalid or empty value will cause the property to be removed from the declaration. Note that this only works on mutable declarations (i.e element.style) and not on resolved declarations (i.e window.getComputedStyle(element)).
2021-09-12LibWeb: Implement CSSStyleDeclaration.getPropertyValue(property)Andreas Kling
2021-09-12LibWeb: Make CSSStyleDeclaration an abstract classAndreas Kling
This patch moves the CSS property+value storage down to a new subclass of CSSStyleDeclaration called PropertyOwningCSSStyleDeclaration. The JavaScript wrapper for CSSStyleDeclaration now calls virtual functions on the C++ object. This is preparation for supporting computed style CSSStyleDeclaration objects which won't have internal property storage, but rather an internal element pointer. :^)
2021-08-15LibWeb: Ensure inline CSS loaded from HTML is ElementInlineDoubleNegation
This commit changes inline CSS loaded from style attributes of HTML elements to be loaded as CSS::ElementInlineCSSStyleDeclaration instead of CSS::CSSStyleDeclaration, fixing a crash when the style of that element is changed from JavaScript.
2021-05-28LibWeb: Store custom properties in CSSStyleDeclarationTobias Christiansen
Keep them around when parsing and store them in the CSSStyleDeclaration when done.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-03-16LibWeb: Invalidate element style after setting Element.style.fooAndreas Kling
This makes us recompute style for the element so the change actually takes effect. :^)
2021-03-13LibWeb: Expose barebones CSSStyleDeclaration to JavaScriptAndreas Kling
You can now access an element's inline style via Element.style. The interface is not very capable yet though. :^)
2021-03-13LibWeb: Rename StyleDeclaration => CSSStyleDeclaration to match CSSOMAndreas Kling