summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/DOMParsing
AgeCommit message (Collapse)Author
2023-05-08LibWeb: Don't include DOM/NamedNodeMap.h from DOM/Element.hAndreas Kling
2023-05-08LibWeb: Don't include DOM/Attr.h from DOM/Element.hAndreas Kling
This required moving Element::for_each_attribute() out of line, but that seems harmless enough.
2023-03-06LibWeb: Fix a few const-ness issuesMatthew Olsson
2023-02-22LibWeb: Make factory method of DOMParsing::XMLSerializer fallibleKenneth Myhra
2023-02-19LibWeb: Use is_ascii_case_insensitive_match() where the spec says toSam Atkins
2023-01-29LibJS+Everywhere: Propagate Cell::initialize errors from Heap::allocateTimothy Flynn
Callers that are already in a fallible context will now TRY to allocate cells. Callers in infallible contexts get a FIXME.
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.
2023-01-09AK+Everywhere: Rename FlyString to DeprecatedFlyStringTimothy Flynn
DeprecatedFlyString relies heavily on DeprecatedString's StringImpl, so let's rename it to A) match the name of DeprecatedString, B) write a new FlyString class that is tied to String.
2022-12-15LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtrLinus Groh
2022-12-06Everywhere: Rename to_{string => deprecated_string}() where applicableLinus Groh
This will make it easier to support both string types at the same time while we convert code, and tracking down remaining uses. One big exception is Value::to_string() in LibJS, where the name is dictated by the ToString AO.
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-29LibWeb: Use StringView literals for all `WebIDL::SimpleException`sLinus Groh
2022-10-29LibWeb: Don't invalidate layout when setting .innerHTML on <template>Andreas Kling
HTML template elements don't affect rendering, so invalidating the entire document's layout after poking into a <template> was a huge waste of work on template-heavy pages.
2022-10-01LibWeb: Remove unecessary dependence on Window from DOM and WebIDLAndrew Kaster
These classes only needed Window to get at its realm. Pass a realm directly to construct DOM and WebIDL classes. This change importantly removes the guarantee that a Document will always have a non-null Window object. Only Documents created by a BrowsingContext will have a non-null Window object. Documents created by for example, DocumentFragment, will not have a Window (soon). This incremental commit leaves some workarounds in place to keep other parts of the code building.
2022-09-25LibWeb: Move DOMException from DOM/ to WebIDL/Linus Groh
2022-09-25LibWeb: Move ExceptionOr from DOM/ to WebIDL/Linus Groh
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-21LibWeb: Remove WRAPPER_HACK() macroLinus Groh
We no longer access Bindings::FooWrapper anywhere for a Foo platform object, so these can be removed :^)
2022-09-20LibWeb: Implement Element.insertAdjacentHTML() from DOM ParsingAndreas Kling
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-18LibWeb: Rename Attribute to AttrAndreas Kling
This name is not very good, but it's what the specification calls it.
2022-09-14Everywhere: Fix a variety of typosBrian Gianforcaro
Spelling fixes found by `codespell`.
2022-09-06LibWeb: Make DOMException GC-allocatedAndreas Kling
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: Make XMLSerializer GC-allocatedAndreas Kling
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-07-06AK: Use an enum instead of a bool for String::replace(all_occurences)DexesTTP
This commit has no behavior changes. In particular, this does not fix any of the wrong uses of the previous default parameter (which used to be 'false', meaning "only replace the first occurence in the string"). It simply replaces the default uses by String::replace(..., ReplaceMode::FirstOnly), leaving them incorrect.
2022-07-05LibWeb: Implement XMLSerializerLuke Wilde
The main thing that is missing is validating certain pieces of data against XML productions in well-formed mode, but nothing uses well-formed mode right now. Required by Closure Library for sanitising HTML. https://github.com/google/closure-library/blob/e687b3d8ab014787b9f10b08b3f597b637392480/closure/goog/html/sanitizer/safedomtreeprocessor.js#L117
2022-03-22LibWeb: Convert InnerHTML to use TRY for error propagationLinus Groh
2021-10-06LibWeb: Clean up static function in headerBen Wiederhake
'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-09-25LibWeb: Rename HTMLDocumentParser => HTMLParserAndreas Kling
2021-09-14LibWeb: Make the innerHTML setter spec compliantLuke Wilde
This adds innerHTML to ShadowRoot in the process.