Luke Wilde
34c130b336
LibWeb: Stub Range.getBoundingClientRect
...
This seems to be used by Discord around the chat message box, but
didn't explore very far.
2022-12-10 00:21:10 +00:00
Linus Groh
57dc179b1f
Everywhere: Rename to_{string => deprecated_string}() where applicable
...
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-06 08:54:33 +01: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
Andreas Kling
317ab7a04b
LibWeb: Make Range's boundary point comparison a public function
...
We'll need this in the Selection API implementation as well.
2022-10-11 21:49:48 +02:00
Andrew Kaster
8de7e49a56
LibWeb: Remove unecessary dependence on Window from DOM and WebIDL
...
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-10-01 21:05:32 +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
Linus Groh
4270ede7c4
LibWeb: Remove WRAPPER_HACK() macro
...
We no longer access Bindings::FooWrapper anywhere for a Foo platform
object, so these can be removed :^)
2022-09-21 21:12:24 +01:00
Andreas Kling
45425de849
LibWeb: Use the WRAPPER_HACK() macro instead of hand-coding wrap()
...
This macro will soon go away, but let's start by replacing all the
hand-coded versions of wrap() with this macro that expands to the same
exact thing.
2022-09-06 00:27:09 +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
Andreas Kling
bb547ce1c4
LibWeb: Make AbstractRange and subclasses GC-allocated
2022-09-06 00:27:09 +02:00
Andreas Kling
2fb9eb5257
LibWeb: Implement Range.deleteContents()
...
And here's another point on Acid3. :^)
2022-03-22 20:17:52 +01:00
Andreas Kling
e1c71b3f91
LibWeb: Implement Range.cloneContents()
2022-03-22 20:03:09 +01:00
Andreas Kling
8ab25f8d8c
LibWeb: Implement Range.surroundContents(newParent)
...
Here goes another Acid3 point :^)
2022-03-21 23:28:46 +01:00
Andreas Kling
1254758b00
LibWeb: Update live DOM ranges on Text and CharacterData mutations
...
Taking care of the FIXMEs I added in earlier patches. :^)
2022-03-21 20:06:59 +01:00
Andreas Kling
c74b1b6d65
LibWeb: Implement Range.insertNode(node)
2022-03-21 19:14:50 +01:00
Andreas Kling
16f4c76da6
LibWeb: Implement Range.extractContents()
...
Another point on Acid3 coming through! :^)
2022-03-21 18:06:28 +01:00
Andreas Kling
394cd77467
LibWeb: Implement stringifier for DOM Range :^)
2022-03-21 16:29:19 +01:00
Lenny Maiorani
c37820b898
Libraries: Use default constructors/destructors in LibWeb
...
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-17 17:23:49 +00:00
Linus Groh
1422bd45eb
LibWeb: Move Window from DOM directory & namespace to HTML
...
The Window object is part of the HTML spec. :^)
https://html.spec.whatwg.org/multipage/window-object.html
2022-03-08 00:30:30 +01:00
Luke Wilde
ad5fb1fd7e
LibWeb: Implement Range.comparePoint
2022-02-26 12:53:32 +01:00
Luke Wilde
62b76e0658
LibWeb: Implement Range.isPointInRange
2022-02-26 12:53:32 +01:00
Luke Wilde
386ee5ab17
LibWeb: Implement Range.intersectsNode
2022-02-26 12:53:32 +01:00
Luke Wilde
4c08757ff9
LibWeb: Add Range.detach
2022-02-26 12:53:32 +01:00
Luke Wilde
8a755726ad
LibWeb: Implement Range.selectNodeContents
2022-02-26 12:53:32 +01:00
Luke Wilde
2b2dbdc74f
LibWeb: Implement Range.collapse
2022-02-26 12:53:32 +01:00
Luke Wilde
dfdc2ddb9e
LibWeb: Implement Range.selectNode
2022-02-26 12:53:32 +01:00
Luke Wilde
a26f1b2ff9
LibWeb: Implement Range.compareBoundaryPoints
2022-02-26 12:53:32 +01:00
Luke Wilde
d73fb7e10f
LibWeb: Implement Range.set{Start,End}{Before,After}
2022-02-26 12:53:32 +01:00
Luke Wilde
46ce50f74e
LibWeb: Make Range.setStart and Range.setEnd spec compliant
...
These functions are way more involved than simply setting their
respective boundary points :^)
2022-02-26 12:53:32 +01:00
Luke Wilde
a2acda5669
LibWeb: Abstract Range's members into AbstractRange
...
Range's member variables are stored in AbstractRange as per the spec,
as they are also shared with StaticRange.
2022-02-26 12:53:32 +01:00
Andreas Kling
c25d653c31
LibWeb: Implement Range.commonAncestorContainer
2022-02-25 20:45:03 +01:00
Brian Gianforcaro
1682f0b760
Everything: Move to SPDX license identifiers in all files.
...
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-22 11:22:27 +02:00
Andreas Kling
9194a97cbe
LibWeb: Add Document.createRange()
...
Also tidy up DOM::Range a little bit while we're here, and unify the
way we create them to use a delegating constructors.
2021-02-21 23:48:01 +01:00
Linus Groh
8f8f7bfd0f
LibWeb: Add constructor to Range IDL interface
2021-02-17 23:45:07 +01:00
Andreas Kling
13d7c09125
Libraries: Move to Userland/Libraries/
2021-01-12 12:17:46 +01:00