summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/HTMLStyleElement.cpp
AgeCommit message (Collapse)Author
2023-02-19LibWeb: Use is_ascii_case_insensitive_match() where the spec says toSam Atkins
2023-01-29LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errorsTimothy Flynn
Note that as of this commit, there aren't any such throwers, and the call site in Heap::allocate will drop exceptions on the floor. This commit only serves to change the declaration of the overrides, make sure they return an empty value, and to propagate OOM errors frm their base initialize invocations.
2023-01-10LibWeb: Move setting of Web object prototypes to initialize()Timothy Flynn
This needs to happen before prototype/constructor intitialization can be made lazy. Otherwise, GC could run during the C++ constructor and try to collect the object currently being created.
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-10-01LibWeb: Remove unecessary dependence on Window from HTML classesAndrew Kaster
These classes only needed Window to get at its realm. Pass a realm directly to construct HTML classes.
2022-09-06LibWeb: Use cached_web_prototype() as much as possibleAndreas Kling
Unlike ensure_web_prototype<T>(), the cached version doesn't require the prototype type to be fully formed, so we can use it without including the FooPrototype.h header. It's also a bit less verbose. :^)
2022-09-06LibWeb+LibJS: Make the EventTarget hierarchy (incl. DOM) GC-allocatedAndreas Kling
This is a monster patch that turns all EventTargets into GC-allocated PlatformObjects. Their C++ wrapper classes are removed, and the LibJS garbage collector is now responsible for their lifetimes. There's a fair amount of hacks and band-aids in this patch, and we'll have a lot of cleanup to do after this.
2022-09-06LibWeb: Make StyleSheet and CSSStyleSheet GC-allocatedAndreas Kling
2022-04-12LibWeb: Move CSS Parser into new Web::CSS::Parser namespaceSam Atkins
The goal here is to move the parser-internal classes into this namespace so they can have more convenient names without causing collisions. The Parser itself won't collide, and would be more convenient to just remain `CSS::Parser`, but having a namespace and a class with the same name makes C++ unhappy.
2022-03-30LibWeb: Rename `parse_css()` -> `parse_css_stylesheet()`Sam Atkins
2022-03-17Libraries: Use default constructors/destructors in LibWebLenny Maiorani
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules "The compiler is more likely to get the default semantics right and you cannot implement these functions better than the compiler."
2022-03-09LibWeb: Add the StyleSheet.href attributeAndreas Kling
This is only ever null at the moment, as we only set it on <style> elements to begin with.
2022-02-25LibWeb: Parse <style> element text content when inserted into documentAndreas Kling
1% progression on ACID3. :^)
2022-02-19LibWeb: Move QualifiedName into the Web::DOM namespaceAndreas Kling
2021-10-15LibWeb: Use W3C urls for CSSOM spec linksSam Atkins
https://www.w3.org/TR/cssom/ is the more permanent home of the CSSOM specification's latest version, and is up to date with the draft spec. Also, https://drafts.csswg.org/ has been down multiple times recently which made looking things up a pain.
2021-10-01LibWeb: Implement HTMLStyleElement.sheetLuke Wilde
2021-09-30LibWeb: Reimplement the <style> element following the specAndreas Kling
We now follow the "update a style block" algorithm from the HTML spec instead of using the ad-hoc CSSLoader mechanism. This necessitated improving our StyleSheet and CSSStyleSheet classes as well, so that's baked into this commit.
2021-06-24AK: Rename downcast<T> => verify_cast<T>Andreas Kling
This makes it much clearer what this cast actually does: it will VERIFY that the thing we're casting is a T (using is<T>()).
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-04-06LibWeb: Make the node mutation event functions spec compliantLuke
This particularly affects the insertion steps and the removed steps. The insertion steps no longer take into the parent that the node was inserted to, as per the spec. Due to this, I have renamed the function from "inserted_into" to simply "inserted". None of the users of the insertion steps was using it anyway. The removed steps now take a pointer to the old parent instead of a reference. This is because it is optional according to the spec and old parent is null when running the removal steps for the descendants of a node that just got removed. This commit does not affect HTMLScriptElement as there is a bit more to that, which is better suited for a separate commit. Also adds in the adopted steps as they will be used later.
2021-03-08LibWeb: Give CSSLoader a backpointer to its owner elementAndreas Kling
This allows CSSLoader to set up the style sheet owner node internally, and avoids an awkward weak link between CSSLoader and Document.
2021-03-08LibWeb: Implement StyleSheet.ownerNode :^)Andreas Kling
2021-02-28LibWeb: Add actual document loading for the CSS (at)import ruleSviatoslav Peleshko
2021-02-07LibWeb: Use move semantics for QualifiedName more oftenAndreas Kling
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling