Commit Graph
9542 Commits
Author SHA1 Message Date
Karl Seguin 4f6868728d Detach attached nodes on appendBeforeSibling callback
html5ever generally makes guarantees about nodes being parentless when
appending, but we've already seen 1 case where appendCallback receives a
connected node.

We're now seeing something in appendBeforeSiblingCallback, but we have a clearer
picture of how this is happening. In this case, it's via custom element
upgrading and the custom element constructor has already placed the node in
the document.

It's worth pointing, html5ever just has an opaque reference to our node. While
it guarantees that it will give us parent-less nodes, it doesn't actually know
anything about our nodes, or our node._parent. The guarantee is only from its
own point of view. There's nothing stopping us from giving a node a default
parent as soon as html5ever asks us to create a new node, in which case, the
node _will_ have a parent.
2026-02-18 10:52:51 +08:00
Adrià Arrufat 0ec4522f9e Update test with new --dump flag 2026-02-18 11:39:14 +09:00
Adrià Arrufat c6e0c6d096 Simplify tests in markdown 2026-02-18 11:20:22 +09:00
Adrià Arrufat dc0fb9ed8a Remove unused import in markdown 2026-02-18 11:04:12 +09:00
Adrià Arrufat 66d9eaee78 Simplify block element rendering in Markdown 2026-02-18 11:01:00 +09:00
Karl Seguin 3797272faf Merge pull request #1576 from lightpanda-io/navigation-is-event-target
Navigation is the EventTarget
2026-02-18 07:33:48 +08:00
Karl Seguin 682b302d04 Merge pull request #1573 from egrs/response-statustext
Populate Response.statusText for network responses
2026-02-18 07:28:55 +08:00
Karl Seguin 1de10f9b05 Merge pull request #1572 from egrs/intersection-observer-timestamp
Use performance.now() for IntersectionObserverEntry.time
2026-02-18 07:21:57 +08:00
Muki Kiboigo c4391ff058 refactor modifyBy implementations 2026-02-17 12:11:29 -08:00
Muki Kiboigo 3822e3f8d9 pass selection/modify-extend-word-trailing-inline-block.tentative.html 2026-02-17 12:02:34 -08:00
Muki Kiboigo f8f99f3878 pass selection/modify.tentative.html 2026-02-17 11:58:13 -08:00
Muki Kiboigo e77e4acea9 add tests for Selection.modify 2026-02-17 11:50:38 -08:00
Muki Kiboigo c6de444d0b add support for Selection.modify 2026-02-17 11:50:30 -08:00
Muki Kiboigo 89e38c34b8 remove NavigationEventTarget 2026-02-17 11:13:39 -08:00
Muki Kiboigo 246d17972c add standaloneEventTarget to the Factory 2026-02-17 11:13:27 -08:00
Pierre Tachoire 55a8b37ef8 Merge pull request #1575 from lightpanda-io/remove-merge-marker
remove merge marker from test file
2026-02-17 18:29:12 +01:00
Pierre Tachoire 445183001b remove merge marker from test file 2026-02-17 18:27:54 +01:00
egrs ca9e2200da use async delivery for buffered performance observer entries
Per spec, buffered entries should be delivered via a queued task,
not synchronously. Extract scheduling logic into
schedulePerformanceObserverDelivery() and use it from both
notifyPerformanceObservers and the buffered observe path.
2026-02-17 18:16:42 +01:00
Pierre Tachoire eba3f84c04 Merge pull request #1569 from egrs/cdp-cookie-size
add cookie size to CDP response
2026-02-17 17:57:47 +01:00
Pierre Tachoire 867e6a8f4b Merge pull request #1566 from egrs/mouseevent-buttons-property
implement MouseEvent.buttons property
2026-02-17 17:57:30 +01:00
egrs df9779ec59 restrict buffered option to type-based observation per spec
The buffered option is only valid with the type option, not entryTypes,
per the Performance Observer specification.
2026-02-17 16:12:20 +01:00
egrs 1b71d1e46d fix playing event: only dispatch on paused-to-playing transition
Per MDN, playing fires "after playback is first started, and whenever
it is restarted." A second play() while already playing should be a
no-op. Both play and playing now only fire on the paused -> playing
transition.
2026-02-17 16:10:49 +01:00
egrs 0a58918f47 address review: conditional event dispatch and explicit options
- play event only fires when transitioning from paused to playing
- pause event only fires when transitioning from playing to paused
- playing event always fires on play() per spec
- explicitly set bubbles: false, cancelable: false on events
- updated tests to verify no duplicate events on repeated calls
2026-02-17 16:03:00 +01:00
egrs afbd927fc0 support buffered option in PerformanceObserver.observe()
When buffered is true, deliver existing performance entries that match
the observer's interest immediately, per the Performance Observer spec.
2026-02-17 15:58:38 +01:00
egrs 2aa09ae18d populate Response.statusText for network responses
Fetch responses from the network now have their statusText set using
the HTTP status phrase (e.g. "OK", "Not Found"), matching the Fetch
spec and the existing XMLHttpRequest behavior.
2026-02-17 15:49:20 +01:00
egrs 09789b0b72 use performance.now() for IntersectionObserverEntry.time
The time field was hardcoded to 0.0. Now uses the Performance API
to provide a real DOMHighResTimeStamp, matching the spec.
2026-02-17 15:38:02 +01:00
Halil Durak 2426abd17a introduce persisted typed arrays 2026-02-17 16:35:42 +03:00
Pierre Tachoire db4a97743f Merge pull request #1562 from lightpanda-io/robots-cdp-failure
dispatch .page_navigated event on page error callback and create HTML page
2026-02-17 14:17:44 +01:00
Pierre Tachoire 7ca98ed344 Merge pull request #1568 from lightpanda-io/invalid_cookie_samesite
protect against long invalid samesite cookie values
2026-02-17 14:10:24 +01:00
egrs c9d3d17999 dispatch play, playing, pause, and emptied events from HTMLMediaElement
play(), pause(), and load() now fire the corresponding DOM events,
matching the HTMLMediaElement spec behavior.
2026-02-17 13:22:32 +01:00
egrs 628049cfd7 add cookie size to CDP response
Compute and include the cookie size field (name.len + value.len)
in Storage.getCookies and Network.getCookies CDP responses,
matching Chrome's behavior.
2026-02-17 13:08:02 +01:00
egrs ae9a11da53 implement MouseEvent.buttons property
Add the `buttons` read-only property to MouseEvent as specified by
the W3C UI Events spec (unsigned short bitmask of currently pressed
buttons). Propagate the field through PointerEvent and WheelEvent
constructors which inherit from MouseEvent.
2026-02-17 12:52:44 +01:00
Karl Seguin 7e097482bc protect against long invalid samesite cookie values 2026-02-17 19:09:29 +08:00
Pierre Tachoire df1b151587 Merge pull request #1567 from lightpanda-io/http_linefeed_only_ending
Support HTTP headers which are \n terminated (as opposed to \r\n).
2026-02-17 12:09:05 +01:00
Karl Seguin 45eb59a5aa Support HTTP headers which are \n terminated (as opposed to \r\n).
Looks like curl will accept these as valid headers, and won't normalize the
header, so we have to deal with either a 2-byte or 1-byte terminated header
2026-02-17 18:55:50 +08:00
Karl Seguin 687c17bbe2 Merge pull request #1557 from lightpanda-io/internal_field_caching
Add internal field caching (for window.document and window.console)
2026-02-17 18:25:51 +08:00
Pierre Tachoire 7505aec706 generate always an HTML on pageDoneCallback
Add also image support
2026-02-17 10:31:47 +01:00
Pierre Tachoire c7b414492d add image content type detection into Mime 2026-02-17 10:30:47 +01:00
Pierre Tachoire 14b0095822 move page error HTML creation into pageDoneCallback
Now pageErrCllaback call pageDoneCallback to finalize the page.
2026-02-17 09:47:45 +01:00
Karl Seguin a1256b46c8 Merge pull request #1553 from lightpanda-io/nikneym/image-data
Basic support for `ImageData`
2026-02-17 08:57:31 +08:00
Halil Durak 094270dff7 prefer snake case in enums 2026-02-17 02:48:30 +03:00
Halil Durak d4e24dabc2 internal -> handle 2026-02-17 02:47:51 +03:00
Halil Durak 842df0d112 extern struct -> struct 2026-02-17 02:46:36 +03:00
Halil Durak cfa9427d7c ImageData: make sure that width and height are not 0 2026-02-17 02:18:43 +03:00
Halil Durak 3c01e24f02 ImageData: remove unnecessary comments 2026-02-17 02:18:13 +03:00
Karl Seguin 22dbf63ff9 Merge pull request #1563 from lightpanda-io/wp/mrdimidium/fix-sighandler-rc
Fix race condition in sighandler
2026-02-17 07:08:39 +08:00
Karl Seguin 814f7394a0 Merge pull request #1556 from lightpanda-io/robots-perf
`robots.txt` performance improvements
2026-02-17 06:58:28 +08:00
Halil Durak 9a4cebaa1b ImageData: prefer new typed array type 2026-02-17 01:45:40 +03:00
Halil Durak c30207ac63 introduce js.createTypedArray
A new way to create typed arrays that allows using the same memory.
2026-02-17 01:45:19 +03:00
Nikolay Govorov 77afbddb91 Fix race condition in sighandler 2026-02-16 21:28:29 +00:00