1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2026-01-16 20:41:00 +00:00
serenity/Tests/LibWeb/Text/input
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
..
canvas Tests/LibWeb: Test canvas fillStyle parsing of rgb strings 2023-11-24 08:42:18 +01:00
Crypto Tests/LibWeb: Add test for SubtleCrypto digest 2024-03-03 08:41:32 +01:00
css LibWeb: Add a test for changing animation-name 2024-03-02 19:58:12 +01:00
DOM LibWeb: Don't crash on live range offset update during node insertion 2024-03-12 16:30:39 +01:00
Editing LibWeb: Fix crashing after input into empty contenteditable 2024-02-24 08:09:01 +01:00
Encoding LibWeb: Add TextEncoder encodeInto 2023-10-29 21:44:53 +01:00
FileAPI Tests/LibWeb: Initialize Blob with string and read it from arrayBuffer() 2023-12-03 20:28:10 +01:00
geometry LibWeb: Ensure DOMRect top, bottom, left and right handle NaN correctly 2024-02-21 19:38:17 +01:00
hit_testing LibWeb: Always check paintable boxes children during hit-testing 2024-03-05 15:43:17 +01:00
HTML LibWeb: Fix bogus insertion logic in HTMLTableSectionElement.insertRow() 2024-03-12 16:30:39 +01:00
IntersectionObserver LibWeb: Implement IntersectionObserver "intersection roots" per spec 2024-02-24 19:56:08 +01:00
Messaging LibWeb: Ignore MessagePort.start() on already-closed port 2024-03-12 16:30:39 +01:00
MutationObserver LibWeb: Fix null pointer dereference in DOM::Node::remove() 2023-11-20 20:50:53 +01:00
navigation Tests/LibWeb: Move LibWeb test frames to their own directory 2024-02-19 22:11:59 -05:00
PerformanceObserver LibWeb: Return milliseconds from unsafe_shared_current_time() 2024-02-11 08:10:45 +01:00
ResizeObserver LibWeb: Null layout and paintable pointers of removed DOM::Node 2024-02-20 10:55:10 +01:00
Streams LibWeb: Implement ReadableStreamBYOBRequest.respondWithNewView 2024-01-29 17:10:56 -05:00
SVG LibWeb: Handle reference cycles in SVG gradient linking 2024-03-11 18:29:10 +01:00
UIEvents LibWeb: Add MouseEvent JavaScript constructor 2024-01-20 08:57:37 +01:00
URL AK: Properly implement steps for shortening a URLs path 2023-10-26 11:11:41 +02:00
Wasm LibWeb: Treat BufferSource as a DataView/ArrayBuffer/TA in IDL overloads 2023-12-30 18:50:29 +01:00
WebAnimations/animation-properties LibWeb: Add tests for the rest of the Animation properties 2024-03-10 15:13:47 +01:00
Worker Tests: Add test for loading module scripts in Workers 2024-03-06 07:19:10 +01:00
XHR Tests/LibWeb: Move existing XHR Text tests in under the XHR folder 2023-11-29 21:51:35 +01:00
XML LibWeb/XML: Avoid placing all elements missing an ns in the HTML ns 2023-10-07 20:02:10 +02:00
abortsignal-abort.html LibWeb: Implement AbortSignal.abort() 2024-02-21 10:34:44 +01:00
abortsignal-any.html LibWeb: Implement AbortSignal.any() 2024-03-12 09:31:41 +01:00
abortsignal-timeout.html LibWeb: Mark abort event as trusted before dispatching it 2024-03-12 09:31:41 +01:00
anchor-element-with-javascript-url-href.html LibWeb: Remove exit for javascript urls in anchor activation_behavior() 2023-11-25 16:33:54 +01:00
append-child-must-update-layout-tree.html LibWeb: Invalidate the layout tree on DOM node insertion 2023-06-06 09:06:27 +02:00
Attr-cloneNode.html LibWeb/Tests: Port two DOM cloneNode() test cases to text tests 2023-08-21 13:51:12 +02:00
background-position-xy.html LibWeb: Create EdgeStyleValue for BackgroundPositionXY with no offset 2023-07-17 14:53:52 +01:00
basic.html Tests/LibWeb: Use the include.js helper in "basic.html" 2023-05-28 22:03:57 +02:00
body-background-color-red.css LibWeb: Forward media attribute from link element to loaded style sheet 2023-06-11 06:05:03 +02:00
border-radius-div-containing-iframe-with-border-radius-svg.html LibWeb: Do not shrink the CPU painter's corner clipping vector 2024-03-10 00:39:49 +01:00
clipboard.html Revert "LibWeb: Allow bypassing transient activation checks for tests" 2024-02-25 12:35:49 -05:00
close-non-modal-dialog.html LibWeb: Implement HTMLDialogElement::close() for non-modal dialogs 2024-02-14 22:20:44 -05:00
cookie.html LibWeb: Convert the cookie test page to a text test 2024-01-10 23:26:40 +01:00
document-adopted-style-sheets.html LibWeb: Implement adoptedStyleSheets attribute for Document 2024-03-08 16:31:21 +01:00
document-scrollingElement-quirks-mode.html LibWeb: Implement document.scrollingElement 2024-02-15 22:51:15 -05:00
document-scrollingElement.html LibWeb: Implement document.scrollingElement 2024-02-15 22:51:15 -05:00
element-get-bounding-client-rect-css-transform.html LibWeb: Apply transform origin in Element::get_client_rects() 2024-03-07 00:28:29 +01:00
element-get-client-rects.html LibWeb: Follow the spec more precisely in Element::getClientRects() 2024-01-30 14:50:25 +01:00
Element-offsetParent-of-iframe.html LibWeb: Don't crash in offset_parent() if no ancestor element found 2024-02-29 21:54:53 -05:00
failed-img-should-not-delay-load-event-forever.html LibWeb: Fire the fail callback on SharedImageRequest when they fail 2023-08-28 10:19:46 +02:00
fieldset-elements.html LibWeb: Add fieldset elements property 2023-12-10 08:07:41 -05:00
focus-contenteditable.html LibWeb: Allow HTMLElement with contenteditable=true to be focusable 2024-02-24 00:19:55 +01:00
focus-events.html LibWeb: Emit "focusin" and "focusout" events 2024-02-25 10:17:25 +01:00
form-method-dialog.html Tests/LibWeb: Verify dialog return value is correct in dialog test 2024-02-16 17:21:48 -05:00
form-requestSubmit.html LibWeb: Implement HTMLFormElement.requestSubmit() 2024-02-16 17:21:48 -05:00
get-bounding-client-rect-display-none.html LibWeb: Add missing paintable null check in get_bounding_client_rect() 2023-12-16 16:11:15 +01:00
get-bounding-client-rect.html LibWeb: Prevent calling test() twice 2023-12-22 16:49:06 +01:00
global-performance-property.html LibWeb: Handle scenario when Window property setter is called on global 2024-02-25 12:55:30 +01:00
html-form-controls-collection.html LibWeb: Support RadioNodeList named items in HTMLFormControlsCollection 2023-12-23 20:53:11 +01:00
html-parser-text-in-table-hoisting.html LibWeb: Make HTML parser flush all pending tokens in "in table text" 2023-07-03 11:50:58 +02:00
idl-handling-of-null-attribute.html LibWeb: Support [Reflect] on IDL String attributes that may return null 2023-09-05 20:36:09 -04:00
include.js LibWeb: Test nested elements in InlinePaintable::hit_test() 2024-01-25 15:53:18 +01:00
input-blur.html LibWeb: Focus the document element when unfocusing an element 2023-12-04 01:33:57 +01:00
input-click-to-unfocus.html LibWeb: Run the unfocusing steps when a click does not focus anything 2023-12-04 01:33:57 +01:00
input-commit-on-unfocus.html LibWeb: Fire a change event on input elements in the focus update steps 2023-12-04 01:33:57 +01:00
input-commit.html LibWeb: Fire the change event synchronously when committing changes 2023-12-04 01:33:57 +01:00
input-date.html LibWeb: Add input element valueAsDate property 2024-01-06 09:59:30 -07:00
input-element-file-value.html LibWeb: Fix empty value attribute for 'file' input returning fakepath 2023-08-26 13:51:18 +02:00
input-file.html LibWeb+LibWebView+WebContent: Implement more <input type=file> behavior 2024-02-26 14:18:49 +01:00
input-image.html LibWeb: Begin implementing the HTMLInputElement 'image' type state 2024-02-19 11:07:30 +01:00
input-maxlength.html LibWeb: Add input and textarea minlength and maxlength support 2024-03-03 10:02:30 -05:00
input-number.html LibWeb: Add input stepUp and stepDown functions 2023-12-07 16:46:28 -05:00
input-readonly.html LibWeb: Add textarea readonly support 2024-02-27 18:03:20 -05:00
input-value.html LibWeb: Fully implement the HTMLInputElement value setter and getter 2024-02-18 18:44:45 +01:00
internals.html LibWeb: Add a simple internals objects only available during testing 2023-08-06 15:26:34 +02:00
interpolation-longhand-properties.html LibWeb: Begin adding a longhand properties test 2024-03-03 19:50:25 +01:00
invalid-transform-interpolation-does-not-crash.html LibWeb: Prevent transform interpolations from failing 2024-03-06 07:45:56 +01:00
link-element-media-attribute.html LibWeb+WebContent+headless-browser: Support async text tests 2023-09-15 08:52:25 +02:00
link-element-onload-attribute.html LibWeb+WebContent+headless-browser: Support async text tests 2023-09-15 08:52:25 +02:00
link-element-rel-preload-load-event.html LibWeb+WebContent+headless-browser: Support async text tests 2023-09-15 08:52:25 +02:00
link-element-search.html LibWeb+WebContent+headless-browser: Support async text tests 2023-09-15 08:52:25 +02:00
module-script-in-head.html LibWeb/Tests: Add test for a <script type=module> inside <head> 2023-10-31 18:09:14 +01:00
output-value.html LibWeb: Add output element value 2023-12-09 21:50:17 +01:00
ProcessingInstruction-cloneNode.html LibWeb/Tests: Port two DOM cloneNode() test cases to text tests 2023-08-21 13:51:12 +02:00
radio-node-list.html LibWeb: Implement value attribute of RadioNodeList 2023-08-26 13:51:18 +02:00
resize-scrollable-box.html LibWeb: Clamp scroll offset into valid range after relayout 2024-02-22 07:35:30 +01:00
resolve-css-overflow-effective-value.html LibWeb: Resolve effective overflow-x and overflow-y according to spec 2024-02-06 08:39:06 +01:00
sameobject-behavior-for-htmlcollection-properties.html LibWeb/Tests: Port HTMLCollection [[SameObject]] test to a text test 2023-08-21 13:51:12 +02:00
scripted-dom-insertion-during-html-parse.html LibWeb+WebContent+headless-browser: Support async text tests 2023-09-15 08:52:25 +02:00
scroll-into-view-end.html LibWeb: Fix not working Element::scroll_an_element_into_view() 2023-12-19 10:45:07 +01:00
scroll-into-view-start.html LibWeb: Fix not working Element::scroll_an_element_into_view() 2023-12-19 10:45:07 +01:00
scroll-left-and-top-on-colgroup.html LibWeb: Return a scroll offset of 0 for colgroup elements 2023-11-23 13:06:48 +01:00
scroll-to-fragment.html LibWeb: Scroll to the "start" in Document::scroll_to_fragment() 2023-12-19 20:59:52 +01:00
select.html Ladybird+LibWeb: Add basic select element support 2023-12-09 22:06:20 +01:00
selectionchange-event.html LibWeb: Emit "selectionchange" event on document 2024-02-25 10:17:25 +01:00
set-timeout-with-no-active-script.html LibWeb: Fix setTimeout() when there's no active script 2023-09-15 08:53:21 +02:00
setInterval.html Tests/LibWeb: Add basic tests for setTimeout and setInterval 2023-09-26 19:42:59 +02:00
setTimeout.html Tests/LibWeb: Add basic tests for setTimeout and setInterval 2023-09-26 19:42:59 +02:00
setting-display-none-should-nuke-subtree.html LibWeb: Detach stale layout nodes from DOM during layout tree build 2023-08-01 09:19:41 +02:00
shadow-root-adopted-style-sheets.html LibWeb: Apply shadow root style sheets in StyleComputer 2024-03-09 16:13:32 +01:00
shadow-root-style-sheets.html LibWeb: Add style sheets to the shadow root if applicable 2024-03-09 16:13:32 +01:00
show-non-modal-dialog.html LibWeb: Implement HTMLDialogElement::show() 2024-02-14 22:20:44 -05:00
table-cell-without-table-ancestor.html LibWeb: Don't assume HTMLTableCellElement always has table ancestor 2024-03-11 18:29:10 +01:00
textarea-maxlength.html LibWeb: Add input and textarea minlength and maxlength support 2024-03-03 10:02:30 -05:00
textarea-readonly.html LibWeb: Add textarea readonly support 2024-02-27 18:03:20 -05:00
textarea-value.html LibWeb: Update the stored textarea value upon change 2024-03-07 00:38:33 +01:00
title.html LibWeb/HTML: Implement text attribute in HTMLTitleElement 2023-12-02 10:35:43 +01:00
url-search-params-iterator-iterator.html LibWeb: Don't override prototype on generated iterator prototypes 2023-06-08 10:05:56 +02:00
valid.css LibWeb: Fire "load" and "error" events for rel=preload link loads 2023-06-06 09:06:27 +02:00
video-failed-load.html LibWeb: Correctly categorize Fetch responses as network errors 2024-01-18 23:10:56 +01:00
wheel-events-consumed-by-scrollable-should-not-be-propagated-to-body.html LibWeb: Skip page scrolling for wheel events consumed by scrollable box 2024-02-29 13:18:57 +01:00
window-event-property-setter.html LibWeb: Add special handling for WindowProxy in [Replaceable] setters 2024-02-24 08:05:55 +01:00
window-proxy-numeric-own-property.html LibWeb: Implement basic support for window[number] 2023-07-25 15:45:44 +02:00
window-proxy-property-inline-cache.html LibWeb: Don't cache property accesses on WindowProxy 2023-07-11 00:14:50 +02:00
window-scroll-while-parsing.html LibWeb: Update layout before looking at overflow in window.scroll() 2024-01-19 09:16:54 +01:00
window-scrollTo.html LibWeb: Limit scroll position by overflow area in Window::scroll() 2023-12-24 23:22:35 +01:00