1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 20:28:11 +00:00
serenity/Userland/Libraries/LibWeb
Andreas Kling bbb96d65b1 LibWeb: Don't crash on live range offset update during node insertion
When inserting a node into a parent, any live DOM ranges that reference
the parent may need to be updated. The spec does this by increasing or
decreasing the start/end offsets of each live range *before* actually
performing the insertion.

This caused us to crash with a verification failure, since it was
possible to set the range offset to an invalid value (that would go on
to immediately become valid after the insertion was finished).

This patch fixes the issue by adding special badged helpers on Range for
Node to reach into it and increase/decrease the offsets during node
insertion. This skips the offset validity check and actually makes our
code read slightly more like the spec.

Found by Domato :^)
2024-03-12 16:30:39 +01:00
..
Animations LibWeb: Ignore window-forwarded document.body.onfoo in detached DOM 2024-03-11 18:29:10 +01:00
ARIA LibWeb: Return correct RoleType for composite ARIA role 2024-01-27 14:52:41 -05:00
Bindings LibWeb: Implement and use the fetch a module worker script graph AO 2024-03-06 07:19:10 +01:00
Clipboard LibWeb: Format all .idl files to use four space indentation 2024-01-18 14:00:06 +01:00
Cookie LibWeb: Fail to parse cookie date when date does not exist 2024-01-07 08:01:58 -05:00
Crypto LibWeb: Add and use a helper to reject a promise with an exception 2024-03-08 14:14:57 -05:00
CSS LibWeb: Ignore window-forwarded document.body.onfoo in detached DOM 2024-03-11 18:29:10 +01:00
DOM LibWeb: Don't crash on live range offset update during node insertion 2024-03-12 16:30:39 +01:00
DOMParsing LibWeb: Add ad-hoc method for serializing CDATASection nodes to string 2024-02-19 10:42:56 +01:00
DOMURL Everywhere: Use unqualified AK::URL 2024-02-25 08:54:31 +01:00
Encoding LibWeb: Use WebIDL types where possible instead of C types 2024-02-26 19:26:13 +00:00
Fetch LibWeb: Add and use a helper to reject a promise with an exception 2024-03-08 14:14:57 -05:00
FileAPI LibWeb: Add and use a helper to reject a promise with an exception 2024-03-08 14:14:57 -05:00
Geometry LibWeb: Ensure DOMRect top, bottom, left and right handle NaN correctly 2024-02-21 19:38:17 +01:00
HighResolutionTime LibWeb: Allow performance timestamps to have sub-millisecond precision 2024-02-26 16:12:20 -07:00
HTML LibWeb: Ignore MessagePort.start() on already-closed port 2024-03-12 16:30:39 +01:00
Infra LibWeb: Don't crash on FormData.append() with emoji in name 2023-12-04 00:04:04 +01:00
Internals Revert "LibWeb: Allow bypassing transient activation checks for tests" 2024-02-25 12:35:49 -05:00
IntersectionObserver LibWeb: Implement IntersectionObserver "intersection roots" per spec 2024-02-24 19:56:08 +01:00
Layout LibWeb: Special case SVG masks during layout 2024-03-12 08:51:50 +01:00
Loader Everywhere: Merge the WebSocket service into RequestServer 2024-03-06 10:07:27 +01:00
MathML LibWeb: Ignore window-forwarded document.body.onfoo in detached DOM 2024-03-11 18:29:10 +01:00
MimeSniff LibWeb/MimeSniff: Add non-standard text or binary context sniffing 2024-02-02 14:34:17 -05:00
NavigationTiming LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
Page LibWebView+WebContent: Use Web::InputEvent for WebContent input IPC 2024-03-06 07:46:18 +01:00
Painting LibWeb: Special case SVG masks during layout 2024-03-12 08:51:50 +01:00
PerformanceTimeline LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
PermissionsPolicy Everywhere: Use unqualified AK::URL 2024-02-25 08:54:31 +01:00
Platform Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
ReferrerPolicy LibWeb: Consistently use the EmptyString state of ReferrerPolicy 2024-03-06 07:19:10 +01:00
RequestIdleCallback LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
ResizeObserver LibWeb: Ignore window-forwarded document.body.onfoo in detached DOM 2024-03-11 18:29:10 +01:00
SecureContexts Everywhere: Use unqualified AK::URL 2024-02-25 08:54:31 +01:00
Selection LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SRI LibWeb: Implement integrity-metadata part of fetch algorithm 2023-04-21 20:44:47 +01:00
Streams LibWeb: Add and use a helper to reject a promise with an exception 2024-03-08 14:14:57 -05:00
SVG LibWeb: Special case SVG masks during layout 2024-03-12 08:51:50 +01:00
UIEvents LibWeb: Use WebIDL types where possible instead of C types 2024-02-26 19:26:13 +00:00
UserTiming LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
WebAssembly LibJS+LibWeb: Implement resizable ArrayBuffer support for TypedArray 2023-12-26 11:16:10 +01:00
WebAudio LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
WebDriver LibWeb: Ignore window-forwarded document.body.onfoo in detached DOM 2024-03-11 18:29:10 +01:00
WebGL Everywhere: Prefer {:#x} over 0x{:x} in format strings 2024-02-21 17:54:38 +01:00
WebIDL LibWeb: Add ObservableArray::for_each() 2024-03-09 16:13:32 +01:00
WebSockets Everywhere: Merge the WebSocket service into RequestServer 2024-03-06 10:07:27 +01:00
Worker LibWeb: Serialize and pass to the WebWorker the current ESO 2024-03-06 07:19:10 +01:00
XHR Everywhere: Use unqualified AK::URL 2024-02-25 08:54:31 +01:00
XLink LibWeb: Add Web::XLink::AttributeNames 2023-11-05 11:16:16 +00:00
XML LibWeb: Make the default XML namespace an empty Optional 2024-02-19 10:42:56 +01:00
CMakeLists.txt LibWeb: Special case SVG masks during layout 2024-03-12 08:51:50 +01:00
Dump.cpp Everywhere: Use unqualified AK::URL 2024-02-25 08:54:31 +01:00
Dump.h LibWeb+WebContent: Add option to dump session history of a traversable 2023-09-16 16:53:32 +02:00
Forward.h LibWeb+LibWebView+WebContent: Implement more <input type=file> behavior 2024-02-26 14:18:49 +01:00
idl_files.cmake LibWeb: Rename URL platform object to DOMURL 2024-02-25 08:54:31 +01:00
Namespace.cpp LibWeb: Make Web::Namespace::Foo strings be FlyString 2023-11-04 21:28:30 +01:00
Namespace.h LibWeb: Make Web::Namespace::Foo strings be FlyString 2023-11-04 21:28:30 +01:00
PixelUnits.cpp LibWeb: Refactor int types in WebContentServer to DevicePixels 2023-12-15 17:01:16 +01:00
PixelUnits.h LibWeb: Properly round CSSPixels values in device_to_css_rect 2024-02-21 20:08:25 +01:00
TreeNode.h LibWeb: Remove all the unused functions from TreeNode 2023-08-20 05:02:59 +02:00