Commit Graph

8 Commits

Author SHA1 Message Date
Shannon Booth
dbd46f240b LibWeb: Make DOMParsing::parse_fragment take a StringView
It calls HTMLParser::parse_html_fragment which already accepts a
StringView.
2023-09-25 15:39:29 +02:00
Shannon Booth
6789a2dd8e LibWeb: Port ShadowRoot interface from DeprecatedString to String 2023-09-06 11:44:45 -04:00
Linus Groh
6e19ab2bbc AK+Everywhere: Rename String to DeprecatedString
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-12-06 08:54:33 +01:00
Linus Groh
ad04d7ac9b LibWeb: Move ExceptionOr from DOM/ to WebIDL/
This is a concept fully defined in the Web IDL spec and doesn't belong
in the DOM directory/namespace - not even DOMException, despite the name
:^)
2022-09-25 19:13:31 +01:00
Andreas Kling
aa4dd6c1bc LibWeb: Implement Element.insertAdjacentHTML() from DOM Parsing
One edge case is left as a TODO() for now, since I'm not entirely sure
how to construct an element to those specifications.

With this patch, we can now run the Speedometer benchmark! :^)
2022-09-20 18:28:41 +02:00
Andreas Kling
6f433c8656 LibWeb+LibJS: Make the EventTarget hierarchy (incl. DOM) GC-allocated
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-06 00:27:09 +02:00
Ben Wiederhake
7619dbdbb4 LibWeb: Clean up static function in header
'static' for a function means that the symbol shall not be made public
for the result of the current compilation unit. This does not make sense
in a header, especially not if it's a large function that is used in
more than one place and not that performance-sensitive.
2021-10-06 23:52:40 +01:00
Luke Wilde
8e0f3436a2 LibWeb: Make the innerHTML setter spec compliant
This adds innerHTML to ShadowRoot in the process.
2021-09-14 02:09:18 +02:00