Skip to content

[ImgBot] Optimize images - #1

Open
imgbot[bot] wants to merge 1016 commits into
masterfrom
imgbot
Open

[ImgBot] Optimize images#1
imgbot[bot] wants to merge 1016 commits into
masterfrom
imgbot

Conversation

@imgbot

@imgbot imgbot Bot commented Oct 11, 2025

Copy link
Copy Markdown

Beep boop. Your images are optimized!

Your image file size has been reduced by 14% 🎉

Details
File Before After Percent reduction
/Tests/LibWeb/Ref/input/wpt-import/css/css-grid/grid-items/support/200x200-green.png 117.63kb 0.29kb 99.76%
/Tests/LibWeb/Ref/input/wpt-import/png/support/cICP-and-iCCP.png 2.68kb 0.28kb 89.69%
/Tests/LibWeb/Screenshot/images/svg-non-local-clip-path-ref.png 3.18kb 0.36kb 88.71%
/Tests/LibWeb/Screenshot/images/canvas-fillstyle-opacity.png 3.18kb 0.37kb 88.33%
/Tests/LibWeb/Screenshot/images/canvas-unpremultiplied-image-ref.png 2.30kb 0.48kb 79.02%
/Tests/LibWeb/Screenshot/images/css-background-blob-url-ref.png 3.78kb 1.08kb 71.56%
/Tests/LibWeb/Screenshot/images/meter-ref.png 2.52kb 0.73kb 71.09%
/Tests/LibWeb/Ref/expected/wpt-import/css/filter-effects/support/color-palette.png 3.37kb 0.99kb 70.60%
/Tests/LibWeb/Ref/input/wpt-import/css/filter-effects/support/color-palette.png 3.37kb 0.99kb 70.60%
/Tests/LibWeb/Screenshot/images/svg-gradient-userSpaceOnUse-ref.png 3.20kb 1.03kb 67.86%
/Tests/LibWeb/Screenshot/images/svg-simple-clipPath-ref.png 4.97kb 1.80kb 63.68%
/Tests/LibWeb/Screenshot/images/css-background-position-ref.png 77.06kb 28.01kb 63.65%
/Tests/LibWeb/Layout/input/svg/standalone-w.svg 0.63kb 0.23kb 63.14%
/Tests/LibWeb/Screenshot/images/clip-path-transformed-ref.png 62.98kb 24.28kb 61.45%
/Tests/LibWeb/Screenshot/images/css-background-repeat-ref.png 31.10kb 12.82kb 58.79%
/Tests/LibWeb/Screenshot/images/svg-foreign-object-mask-ref.png 3.95kb 1.63kb 58.56%
/Tests/LibWeb/Screenshot/images/canvas-arcs-and-ellipses-ref.png 13.23kb 5.48kb 58.56%
/Tests/LibWeb/Screenshot/images/svg-clip-rule-ref.png 5.12kb 2.12kb 58.54%
/Tests/LibWeb/Ref/input/wpt-import/css/compositing/background-blending/support/red.png 2.64kb 1.10kb 58.40%
/Tests/LibWeb/Screenshot/images/canvas-stroke-styles-ref.png 32.04kb 13.43kb 58.07%
/Tests/LibWeb/Screenshot/images/svg-path-offset-rounding-ref.png 3.23kb 1.41kb 56.34%
/Tests/LibWeb/Screenshot/images/svg-axis-aligned-lines-ref.png 3.29kb 1.45kb 55.98%
/Tests/LibWeb/Screenshot/images/clip-path-polygon-ref.png 3.27kb 1.45kb 55.71%
/Tests/LibWeb/Text/input/wpt-import/css/css-flexbox/support/test-outer.png 2.36kb 1.05kb 55.39%
/Tests/LibWeb/Screenshot/images/svg-stroke-paintstyle-with-opacity-ref.png 3.27kb 1.52kb 53.61%
/Tests/LibWeb/Screenshot/images/canvas-shadow-ref.png 5.30kb 2.48kb 53.21%
/Tests/LibGfx/test-inputs/gif/download-animation.gif 4.44kb 2.09kb 52.80%
/Tests/LibWeb/Text/input/wpt-import/css/css-flexbox/support/cat.png 1.84kb 0.91kb 50.77%
/Tests/LibWeb/Text/input/wpt-import/css/support/cat.png 1.84kb 0.91kb 50.77%
/Tests/LibWeb/Screenshot/images/image-unpremultiplied-data-ref.png 3.01kb 1.58kb 47.43%
/Tests/LibWeb/Layout/data/svg-with-id.svg 0.08kb 0.04kb 46.75%
/Tests/LibWeb/Screenshot/images/svg-background-no-natural-size-ref.png 2.48kb 1.34kb 45.92%
/Tests/LibWeb/Screenshot/images/css-transform-box-ref.png 6.27kb 3.43kb 45.29%
/Base/res/icons/16x16/trash-can.png 3.11kb 1.77kb 43.03%
/Base/res/icons/browser/clear-cache.png 3.21kb 1.84kb 42.78%
/Tests/LibGfx/test-inputs/jpg/grayscale_app14.jpg 0.67kb 0.39kb 42.27%
/Base/res/icons/browser/local-storage.png 3.02kb 1.76kb 41.89%
/Base/res/icons/16x16/history.png 3.25kb 1.90kb 41.40%
/Base/res/icons/16x16/zoom-reset.png 2.91kb 1.71kb 41.17%
/Base/res/icons/16x16/layers.png 2.97kb 1.75kb 41.06%
/Base/res/icons/16x16/spoof.png 2.99kb 1.77kb 40.98%
/Base/res/icons/16x16/close-tab.png 2.93kb 1.76kb 39.72%
/Documentation/Images/devtools_dom_tree.png 246.96kb 148.90kb 39.71%
/Base/res/icons/browser/cookie.png 2.84kb 1.72kb 39.46%
/Documentation/Images/devtools_setup.png 57.51kb 34.90kb 39.32%
/Base/res/icons/16x16/new-tab.png 2.84kb 1.72kb 39.30%
/Base/res/icons/browser/dom-tree.png 2.84kb 1.73kb 39.20%
/Documentation/Images/devtools_tab_list.png 193.92kb 118.39kb 38.95%
/Tests/LibWeb/Ref/expected/svg/custom-namespaced-attributes-ref.svg 0.21kb 0.13kb 37.74%
/Tests/LibGfx/test-inputs/gif/corrupted.gif 1.65kb 1.04kb 37.25%
/Tests/LibGfx/test-inputs/jpg/odd-restart.jpg 1.09kb 0.69kb 36.57%
/Tests/LibGfx/test-inputs/jpg/rgb_components.jpg 31.53kb 20.15kb 36.09%
/Tests/LibGfx/test-inputs/jpg/several_scans.jpg 14.30kb 9.33kb 34.75%
/Tests/LibWeb/Text/input/wpt-import/css/css-flexbox/support/ruler-v-100px.png 0.74kb 0.49kb 34.47%
/Tests/LibWeb/Ref/input/wpt-import/css/css-color/support/009900-sRGB.png 0.43kb 0.29kb 34.01%
/Tests/LibWeb/Text/input/wpt-import/css/css-flexbox/support/ruler-v-50px.png 0.74kb 0.50kb 32.89%
/Tests/LibWeb/Ref/expected/wpt-import/css/css-color/support/009900.png 0.42kb 0.29kb 31.54%
/Tests/LibWeb/Ref/input/wpt-import/css/css-color/support/009900.png 0.42kb 0.29kb 31.54%
/Tests/LibWeb/Screenshot/images/svg-gradient-paint-transformation-ref.png 6.32kb 4.53kb 28.28%
/Base/res/icons/16x16/filetype-css.png 4.39kb 3.15kb 28.24%
/Tests/LibGfx/test-inputs/jpg/several_scans_odd_number_mcu.jpg 12.27kb 8.90kb 27.44%
/Tests/LibWeb/Ref/data/vertical-rect.svg 0.27kb 0.20kb 26.10%
/Tests/LibWeb/Screenshot/data/vertical-rect.svg 0.27kb 0.20kb 26.10%
/Tests/LibWeb/Text/input/wpt-import/css/css-flexbox/support/ruler-h-50px.png 0.66kb 0.48kb 26.08%
/Tests/LibWeb/Ref/input/svg/custom-namespaced-attributes.svg 0.38kb 0.29kb 24.30%
/Tests/LibWeb/Crash/SVG/foreignObject-with-html-root-element.svg 0.15kb 0.12kb 23.42%
/Tests/LibGfx/test-inputs/jpg/gradient_empty_icc.jpg 1.11kb 0.87kb 22.35%
/Tests/LibWeb/Screenshot/images/opacity-stacking-ref.png 12.70kb 9.89kb 22.08%
/Tests/LibWeb/Screenshot/images/text-decorations.png 32.18kb 25.12kb 21.93%
/Tests/LibWeb/Ref/input/wpt-import/svg/pservers/reftests/fill-fallback-none-2.svg 0.40kb 0.31kb 21.76%
/Tests/LibGfx/test-inputs/png/wide-gamut-only.png 4.03kb 3.16kb 21.63%
/Tests/LibWeb/Screenshot/images/svg-textPath-ref.png 37.78kb 29.79kb 21.13%
/Tests/LibWeb/Screenshot/images/svg-clip-path-transform-ref.png 5.04kb 3.98kb 21.05%
/Tests/LibWeb/Screenshot/images/svg-stroke-styles-ref.png 17.69kb 13.99kb 20.93%
/Tests/LibWeb/Ref/expected/wpt-import/svg/pservers/reftests/reference/gradient-color-interpolation-ref.svg 0.74kb 0.59kb 20.63%
/Tests/LibWeb/Screenshot/images/text-shadow-ref.png 57.28kb 45.60kb 20.39%
/Tests/LibWeb/Screenshot/images/gradient-interpolation-method-ref.png 4.80kb 3.87kb 19.30%
/Tests/LibWeb/Screenshot/images/svg-filters-lb-website-ref.png 129.06kb 104.42kb 19.09%
/Base/res/icons/48x48/app-browser.png 7.69kb 6.40kb 16.78%
/Tests/LibGfx/test-inputs/jpg/rgb24.jpg 2.26kb 1.88kb 16.77%
/Tests/LibWeb/Ref/input/svg-file-matches-html-file.svg 0.28kb 0.24kb 15.97%
/Tests/LibWeb/Screenshot/images/css-filter-drop-shadow-ref.png 6.51kb 5.47kb 15.97%
/Tests/LibWeb/Text/input/wpt-import/dom/nodes/Element-firstElementChild-entity.svg 1.00kb 0.84kb 15.71%
/Tests/LibWeb/Screenshot/images/canvas-text-ref.png 34.89kb 29.48kb 15.50%
/Tests/LibWeb/Screenshot/images/canvas-fillstyle-gradients-ref.png 14.48kb 12.30kb 15.10%
/Tests/LibGfx/test-inputs/jpg/grayscale_mcu.jpg 3.41kb 2.91kb 14.66%
/Tests/LibWeb/Screenshot/images/css-background-repeat-x-and-zoomed-ref.png 0.58kb 0.50kb 13.95%
/Base/res/icons/128x128/app-browser-dark.png 12.01kb 10.39kb 13.51%
/Tests/LibWeb/Text/input/wpt-import/svg/geometry/parsing/ry-invalid.svg 0.80kb 0.70kb 13.14%
/Tests/LibWeb/Text/input/wpt-import/svg/painting/parsing/color-interpolation-invalid.svg 0.81kb 0.70kb 13.06%
/Tests/LibWeb/Screenshot/images/border-radius-ref.png 382.22kb 333.11kb 12.85%
/Tests/LibWeb/Text/input/wpt-import/svg/geometry/parsing/r-invalid.svg 0.82kb 0.72kb 12.84%
/Tests/LibWeb/Ref/input/wpt-import/svg/embedded/image-embedding-svg-viewref-with-viewbox.svg 0.98kb 0.86kb 12.75%
/Tests/LibWeb/Layout/input/svg/standalone-vb-wh.svg 0.25kb 0.22kb 12.69%
/Tests/LibWeb/Text/input/wpt-import/svg/painting/parsing/text-rendering-invalid.svg 0.84kb 0.73kb 12.62%
/Tests/LibWeb/Layout/input/svg/standalone-vb-h.svg 0.26kb 0.22kb 12.60%
/Tests/LibWeb/Layout/input/svg/standalone-vb-w.svg 0.26kb 0.22kb 12.60%
/Tests/LibWeb/Text/input/wpt-import/svg/painting/parsing/shape-rendering-invalid.svg 0.84kb 0.74kb 12.54%
/Tests/LibWeb/Layout/input/svg/standalone-vb.svg 0.26kb 0.23kb 12.50%
/Tests/LibWeb/Text/input/wpt-import/svg/painting/parsing/color-interpolation-valid.svg 0.85kb 0.74kb 12.41%
/Tests/LibWeb/Layout/input/svg/standalone-wh.svg 0.26kb 0.23kb 12.27%
/Tests/LibWeb/Layout/input/svg/standalone.svg 0.27kb 0.23kb 12.13%
/Tests/LibWeb/Screenshot/images/css-background-clip-text.png 271.87kb 239.11kb 12.05%
/Tests/LibWeb/Text/input/wpt-import/svg/painting/parsing/paint-order-invalid.svg 0.92kb 0.81kb 11.93%
/Tests/LibWeb/Text/input/wpt-import/dom/nodes/Element-childElementCount-dynamic-remove-svg.svg 0.90kb 0.79kb 11.56%
/Tests/LibWeb/Text/input/wpt-import/svg/painting/parsing/shape-rendering-valid.svg 0.92kb 0.82kb 11.42%
/Tests/LibWeb/Text/input/wpt-import/svg/painting/parsing/text-rendering-valid.svg 0.93kb 0.83kb 11.31%
/Tests/LibWeb/Screenshot/images/css-filter-ref.png 108.98kb 96.80kb 11.17%
/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/resources/prefers-color-scheme-light.svg 0.19kb 0.17kb 10.47%
/Tests/LibWeb/Text/input/wpt-import/css/filter-effects/parsing/flood-opacity-valid.svg 1.02kb 0.91kb 10.38%
/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/resources/prefers-color-scheme-dark.svg 0.19kb 0.17kb 10.36%
/Base/res/icons/16x16/audio-volume-high.png 5.41kb 4.86kb 10.32%
/Tests/LibWeb/Ref/input/wpt-import/svg/pservers/reftests/gradient-color-interpolation.svg 0.93kb 0.84kb 10.18%
/Tests/LibWeb/Layout/input/svg/svg-with-zero-intrinsic-size-and-no-viewbox.svg 0.08kb 0.07kb 10.00%
/Tests/LibWeb/Text/input/wpt-import/svg/painting/parsing/stroke-dasharray-invalid.svg 1.07kb 0.96kb 9.90%
/Tests/LibWeb/Text/input/wpt-import/images/pattern.svg 0.31kb 0.28kb 9.72%
/Tests/LibWeb/Text/input/wpt-import/css/filter-effects/parsing/flood-opacity-computed.svg 1.12kb 1.02kb 9.38%
/Tests/LibWeb/Screenshot/images/css-gradients-ref.png 345.46kb 313.88kb 9.14%
/Tests/LibWeb/Text/input/wpt-import/dom/nodes/Element-childElementCount-nochild-svg.svg 0.73kb 0.66kb 8.86%
/Tests/LibWeb/Screenshot/images/outer-box-shadow-ref.png 107.04kb 97.59kb 8.83%
/Tests/LibGfx/test-inputs/jpg/big_image.jpg 5,850.66kb 5,340.12kb 8.73%
/Tests/LibGfx/test-inputs/jpg/successive_approximation.jpg 11.46kb 10.47kb 8.65%
/Tests/LibWeb/Screenshot/images/svg-maskContentUnits-ref.png 3.36kb 3.08kb 8.56%
/Tests/LibGfx/test-inputs/jpg/ycck-1111.jpg 35.35kb 32.34kb 8.50%
/Tests/LibWeb/Text/input/wpt-import/dom/nodes/Element-childElement-null-svg.svg 0.78kb 0.71kb 8.28%
/Tests/LibWeb/Text/input/wpt-import/svg/shapes/line-pathLength.svg 0.93kb 0.86kb 8.25%
/Tests/LibWeb/Text/input/wpt-import/dom/nodes/Element-firstElementChild-namespace-svg.svg 0.88kb 0.80kb 8.24%
/Tests/LibWeb/Text/input/wpt-import/svg/painting/inheritance.svg 1.87kb 1.72kb 7.59%
/Tests/LibWeb/Text/input/wpt-import/dom/nodes/Element-siblingElement-null-svg.svg 0.86kb 0.79kb 7.51%
/Base/res/icons/128x128/app-browser.png 17.11kb 15.84kb 7.41%
/Tests/LibWeb/Text/input/wpt-import/dom/nodes/Element-firstElementChild-svg.svg 0.88kb 0.81kb 7.34%
/Tests/LibWeb/Text/input/wpt-import/dom/nodes/Element-childElementCount-svg.svg 0.95kb 0.88kb 7.27%
/Tests/LibWeb/Text/input/wpt-import/dom/nodes/Element-childElementCount-dynamic-add-svg.svg 0.90kb 0.84kb 7.15%
/Tests/LibWeb/Text/input/wpt-import/dom/nodes/Element-lastElementChild-svg.svg 0.91kb 0.85kb 7.05%
/Tests/LibWeb/Text/input/wpt-import/dom/nodes/Element-nextElementSibling-svg.svg 0.97kb 0.91kb 6.63%
/Tests/LibWeb/Text/input/wpt-import/svg/painting/parsing/paint-order-valid.svg 1.67kb 1.56kb 6.62%
/Tests/LibWeb/Text/input/wpt-import/dom/nodes/Element-previousElementSibling-svg.svg 1.05kb 0.98kb 6.52%
/Tests/LibWeb/Ref/data/50x50-red.svg 0.11kb 0.10kb 6.14%
/Tests/LibWeb/Ref/data/50x50-green.svg 0.11kb 0.11kb 6.03%
/Tests/LibWeb/Layout/data/rectangle.svg 0.13kb 0.12kb 6.02%
/Tests/LibWeb/Ref/data/nested-svg.svg 0.23kb 0.22kb 5.91%
/Documentation/Images/devtools_connect.png 14.30kb 13.46kb 5.89%
/Tests/LibGfx/test-inputs/jpg/ycck-2112.jpg 25.69kb 24.27kb 5.55%
/Tests/LibGfx/test-inputs/jpg/ycck-2111.jpg 20.64kb 19.53kb 5.40%
/Tests/LibWeb/Ref/expected/wpt-import/svg/pservers/reftests/reference/green-100x100.svg 0.09kb 0.09kb 5.21%
/Tests/LibWeb/Ref/input/wpt-import/svg/embedded/image-embedding-svg-with-auto-height.svg 0.51kb 0.49kb 4.96%
/Tests/LibWeb/Ref/input/wpt-import/svg/pservers/reftests/fill-fallback-none-3.svg 0.43kb 0.41kb 4.94%
/Tests/LibWeb/Ref/input/wpt-import/svg/coordinate-systems/support/views.svg 0.22kb 0.21kb 4.80%
/Tests/LibWeb/Text/input/wpt-import/images/red-zerowidth.svg 0.11kb 0.11kb 4.27%
/Tests/LibWeb/Text/input/wpt-import/images/red-zeroheight.svg 0.11kb 0.11kb 4.27%
/Base/res/icons/16x16/audio-volume-muted.png 5.64kb 5.42kb 3.98%
/Base/res/icons/16x16/box.png 1.45kb 1.40kb 3.49%
/Tests/LibWeb/Ref/input/wpt-import/svg/painting/reftests/fallback-001.svg 0.40kb 0.38kb 3.46%
/Tests/LibWeb/Ref/input/wpt-import/svg/pservers/reftests/fill-fallback-invalid-uri.svg 0.31kb 0.30kb 3.42%
/Meta/CMake/freedesktop/org.ladybird.Ladybird.svg 2.56kb 2.47kb 3.36%
/Tests/LibWeb/Ref/input/wpt-import/svg/pservers/reftests/stroke-fallback-invalid-uri.svg 0.38kb 0.37kb 2.79%
/Base/res/icons/32x32/app-system-monitor.png 0.46kb 0.45kb 2.74%
/Tests/LibWeb/Screenshot/images/canvas-implict-moves-and-lines-ref.png 4.10kb 3.99kb 2.53%
/Tests/LibGfx/test-inputs/icc/icc-v4.jpg 30.67kb 29.92kb 2.44%
/Tests/LibWeb/Text/input/wpt-import/svg/painting/scripted/paint-order-computed-value-01.svg 2.07kb 2.03kb 2.03%
/Tests/LibWeb/Crash/SVG/svg-with-cdata.svg 0.12kb 0.12kb 0.79%
/Tests/LibWeb/Layout/data/svg-without-viewbox.svg 0.13kb 0.12kb 0.78%
/Tests/LibGfx/test-inputs/jpg/buggie-cmyk.jpg 576.81kb 575.48kb 0.23%
/Tests/LibWeb/Text/input/wpt-import/html/semantics/embedded-content/the-img-element/resources/cat.jpg 20.97kb 20.96kb 0.03%
Total : 9,290.89kb 8,018.66kb 13.69%

📝 docs | :octocat: repo | 🙋🏾 issues | 🏪 marketplace

~Imgbot - Part of Optimole family

Lubrsi and others added 28 commits February 24, 2026 17:08
CacheStorage is currently a stub that breaks anything that uses it.
An `InvalidStateError` is now thrown when an attempt is made to
interact with an index or object store that has been deleted.
Cache failed arrow function attempts by token offset. Once we
determine that '(' at offset N is not the start of an arrow
function, skip re-attempting at the same offset.

Without memoization, nested expressions like (a=(b=(c=(d=0))))
cause exponential work: each failed arrow attempt at an outer '('
re-parses all inner '(' positions during grouping expression
re-parse, and each inner position triggers its own arrow
attempts. With n nesting levels, the innermost position is
processed O(2^n) times.

The C++ parser already has this optimization (via the
try_parse_arrow_function_expression_failed_at_position()
memoization cache).
The flush() call at the end of execute_impl() was accidentally left
behind in 2d2af9c. That commit moved flushing into execute(), but
didn't remove the old call from execute_impl(). This caused every
nested display list to trigger a redundant GPU flush.

On an M4 MacBook, this improves Discord from ~65 FPS to 120 FPS.
This makes SVG-in-img appear sharp no matter the current
(pinch-to-)zoom level.
We switched to macOS since it was easier to install swift-format in CI.
With that removed, let's switch back to Linux, as macOS runners tend to
have higher contention.

To do so, this makes more use of the setup action. This way, the setup
action is the only place that needs to know how to install the apt repos
we need (LLVM in particular).
This is only transitively included through Page.h ->
HTMLMediaElement.h.
This reduces the number of rebuilt files when modifying
HTMLMediaElement.h and HTMLCanvasElement.h significantly.
HashTable<GC::Weak<T>> is unsafe because GC::Weak's hash depends on
ptr() which becomes nullptr when the object is collected. This corrupts
the hash table: entries shift to wrong buckets, probe chains break
during delete_bucket(), and rehash scatters dead entries incorrectly.

WeakHashSet wraps HashTable with private internal traits that own the
hash function, prunes dead entries before every mutation, and provides
an iterator that skips dead entries and yields T& directly.
Replace the unsafe HashTable<GC::Weak<Animation>> with
GC::WeakHashSet<Animation>, and update all callers to use reference
syntax instead of pointer syntax since the iterator now yields T&.
Replace the unsafe HashTable<GC::Weak<DOM::Node>> with
GC::WeakHashSet<DOM::Node>. The null check in the iteration loop is
no longer needed since WeakHashSet's iterator skips dead entries.
Make HashTable<GC::Weak<T>> a compile error to prevent future misuse.
All existing uses have been migrated to GC::WeakHashSet<T> which
provides its own internal hash traits.
Formatting the counter into a separate string is an unnecessary
allocation.
...and use it in the DecoderError formatter, as the category is often
more relevant than the error message.
libavcodec apparently holds onto any error that is not AVERROR_EOF when
a read fails. This means that reading until EOF after an aborted read
results in us receiving an AVERROR_EXIT in FFmpegDemuxer instead of
AVERROR_EOF, which causes the playback system to enter an error state
without decoding all frames in the file.

Instead, just always return AVERROR_EOF, and check if the read was
aborted in FFmpegDemuxer instead to return the correct error category
from there.
The Rust bytecode pipeline stores SharedFunctionInstanceData pointers
as raw void pointers invisible to the GC. If garbage collection runs
during compilation (triggered by heap allocation of a new SFD), it
can collect previously created SFDs, leaving stale pointers that
crash during the next GC marking phase.

Every other Rust compilation entry point (compile_script, compile_eval,
compile_shadow_realm_eval, compile_dynamic_function, compile_function)
already uses GC::DeferGC to prevent this. Add the missing DeferGC to
compile_module and compile_builtin_file.
The Rust FFI requires UTF-16 source data, so ASCII-stored source code
must be widened to UTF-16. Previously, this conversion was done into a
temporary buffer on every call to compile_function, meaning the entire
source file was converted for each lazily-compiled function. For large
modules with many functions, this caused heavy spinning.

Move the conversion into SourceCode::utf16_data() which lazily converts
and caches the result once per source file. Subsequent compilations of
functions from the same file reuse the cached data.
The test was outdated and needed to be updated before being merged. :^(
Bumps [actions/stale](https://github.com/actions/stale) from 10.1.1 to 10.2.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](actions/stale@9971854...b5d41d4)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: 10.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 14 to 15.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](dawidd6/action-download-artifact@v14...v15)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-version: '15'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
During SVG subtree relayout, position:fixed elements inside
<foreignObject> use the viewport as their containing block. Since the
viewport is outside the SVG subtree, it was not pre-populated in the
LayoutState, causing a VERIFY failure in ensure_used_values_for().

Fix this by unconditionally pre-populating the viewport node from its
paintable in relayout_svg_root().
bbad346 corrected a URL that broke several weeks ago. This problem
went unnoticed for a while partially because the workflow runs were all
still passing. A failure of a command in an &&-list is only considered
an error if it occurred in the last command of the list, even with `set
-e` being active (set automatically in GitHub actions).

From the Bash Reference Manual, 4.3.1 The Set Builtin:

> The shell does not exit if the command that fails is [...] part of any
> command executed in a && or || list except the command following the
> final && or ||.

Let's make download failures easier to disover by failing the workflow.
Every master-push getting marked with a red x-sign would probably have
been caught earlier.
In 1d03944 failures from pushing notes were ignored entirely due to
the command failing sporadically. Looking at the original commit message
this was almost certainly due to the fact that multiple runs of the
workflow could happend simulaneously if PRs were merged in quick
succession:

1. PR 1 gets merged.
2. Workflow run 1 gets triggered for newly pushed `master` commit from
   PR 1 and fetches notes ref at `aaaaaaa`.
3. PR 2 gets merged.
4. Workflow run 2 gets triggered for newly pushed `master` commit from
   PR 2 and fetches notes ref at `aaaaaaa` as well.
5. Workflow run 1 finishes its work and pushes `bbbbbbb` to the notes
   ref.
6. Workflow run 2 finishes as well, tries to push `ccccccc` to the notes
   ref, but gets rejected. This is because its changes are based on
   `aaaaaaa` and cannot be fast-forwarded due to workflow run 1 having
   pushed different notes in the meantime.

This sequence of events could also be observed after bbad346 got
merged, which caused the first couple workflow runs after to be very
slow as they were processing a large backlog of missing notes.

Instead of silencing the error when it happens and relying on the fact
that the next run will correct it, let's just prevent the conflict from
happening in the first place by disallowing parallel runs of the
workflow. This avoids unnecessary workflow runs and allows detection of
other, unexpected errors happening when pushing.
Shell scripts running in GitHub Actions workflows have `set -e` enabled
by default:
https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepsshell

To avoid confusion, remove the redundant calls present in some of the
workflow script steps.
Zaggy1024 and others added 29 commits March 2, 2026 17:06
We were holding a reference to ThreadData, which could be destroyed
earlier than the EventLoop itself, causing other threads to UAF trying
to signal a wake.
Using a Promise in BackgroundAction was not doing anything since the
change to use a weak reference to the event loop, so let's just drop
that.

The thread will now always move itself (and therefore its callbacks)
over to the originating thread before completing, regardless of the
presence of callbacks. This ensures that ref counting remains on the
main thread.

In addition, BackgroundAction's completion callback can no longer
return errors. This functionality wasn't actually used anywhere, it was
a holdover from the behavior of Core::Promise.
This was previously using a Core::Promise to notify the thread of the
event loop being destroyed. Instead, use WeakEventLoopReference to
condition all usages, then simply detach the thread and let it run
until an exit is requested.
Inheriting from AtomicRefCounted and Weakable is asking for misuse of
WeakPtr to result in TOCTOU-caused UAFs.

In order to ensure we're not misusing EventReceiver across threads, I
ran test-web and some sites with a temporary hack to verify that ref()s
and unref()s are always called from the same thread on the class.
If an error occurred during a previous test run, the file might be
lying around still. This should clear up CI failures happening on macOS
at the moment.
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 15 to 16.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](dawidd6/action-download-artifact@v15...v16)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-version: '16'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
The selector matching code bypassed the pseudo-element type check for
`::part()` selectors to support compound selectors like
`::part(foo)::before`. This caused bare ::part() declarations to leak
into unrelated pseudo-elements like ::selection.

Fix this by finding any additional pseudo-element beyond ::part() in the
selector and verifying it matches the target.
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
When img.src is changed rapidly (e.g., YouTube Music sets a GIF
placeholder then swaps to a real URL via IntersectionObserver), the
failure callback from the stale first request could corrupt the newer
request by calling abort_the_image_request on the now-reassigned
m_current_request.

Fix this by using the existing m_update_the_image_data_count generation
counter to detect stale fetch callbacks.

This fixes thumbnail loading on YouTube Music.
Contenteditable elements that would otherwise have zero height now get a
minimum height equal to their line-height.
This ensures they remain clickable and usable for text editing.

This fixes the WPT test:
contenteditable/synthetic-height.html
When an image has no intrinsic dimensions but has an intrinsic aspect
ratio, the CSS default sizing algorithm should resolve its size as a
contain constraint against the default object size. Previously, we
returned the default size directly, which caused such images to stretch
to fill the entire background positioning area. The SVG's default
`preserveAspectRatio` would then center the content within that
oversized viewport, making the image appear horizontally mispositioned.
This reverts commit fe9af7c.

We can use this for the GC stack pointer resolution.
This isn't useful in Ladybird, we don't want to worry about fallible
allocations.
Also, remove the default case so that we don't end up with missing
cases again.
- Document.h: Remove duplicate registered_property_set/get_registered_custom_property
  declarations (kept correct upstream version with registered_custom_properties()).
  Move m_python_dom_wrapper_cache to private section. Restore
  global_event_handlers_to_event_target to simple 'return *this' form.
  Restore JS::Object::fast_is<Web::DOM::Document>() footer from upstream.
- Document.cpp: Remove unnecessary #ifdef ENABLE_PYTHON guard around
  PythonDOMWrapperCache include (Python is always built).
- MainThreadVM.h/.cpp: Remove standalone initialize_python_engine() /
  shutdown_python_engine() free functions that duplicated OptionalPythonJSBridge.
  Remove commented-out PythonDOMAPI::initialize_module() call.

No Python code changed.
Conflicts resolved:
- Libraries/LibWeb/DOM/Document.h: kept Python accessors, dropped ViewportClient class (upstream removed it)
- Libraries/LibWeb/CMakeLists.txt: kept Python sources block, accepted upstream fontconfig + vcpkg additions
- Meta/CMake/common_options.cmake: dropped ENABLE_SWIFT, updated LADYBIRD_ENABLE_CPPTRACE default to ON, added LADYBIRD_GENERATE_DSYM, kept ENABLE_WINDOWS_CI
- .github/workflows/nightly-lagom.yml: dropped Swift toolchain matrix entries, kept upstream Windows CI entry
- Services/WebContent/main.cpp: merged PythonEngine include, removed stale initialize/shutdown_python_engine() calls (now inside initialize_main_thread_vm)
- Meta/lint-swift.sh: accepted upstream deletion
GitHub's CDN intermittently returns HTTP 500 during tap updates. The
failure doesn't actually prevent homebrew/core from updating (which
contains all our dependencies), so exit code 1 from brew update is
safe to ignore. Also add a simple 3-attempt retry loop for brew install
to handle transient download failures.
BuildVcpkg.py does a bare git clone with no retry. Pre-clone vcpkg
into Build/vcpkg before calling ladybird.py, with 5 attempts and 30s
between retries. BuildVcpkg.py skips the clone if the directory already
exists, so this is safe when the cache hits too.
Same fix as Linux: BuildVcpkg.py does a bare git clone with no retry.
Pre-clone Build/vcpkg with 5 attempts / 30s backoff so a transient
GitHub 500 doesn't fail the whole build.
Our earlier cleanup incorrectly replaced registered_property_set() /
get_registered_custom_property() with registered_custom_properties()
assuming upstream had already done this rename. CSS.cpp and Document.cpp
still use the old names and old return type (HashMap<FlyString,
CSS::CustomPropertyRegistration>). Restore the correct declarations.
*Total -- 7,323.53kb -> 6,614.57kb (9.68%)

/Tests/LibWeb/Ref/input/wpt-import/css/css-grid/grid-items/support/200x200-green.png -- 117.63kb -> 0.29kb (99.76%)
/Tests/LibWeb/Ref/input/wpt-import/png/support/cICP-and-iCCP.png -- 2.68kb -> 0.28kb (89.69%)
/Tests/LibWeb/Ref/expected/wpt-import/css/filter-effects/support/color-palette.png -- 3.37kb -> 0.99kb (70.6%)
/Tests/LibWeb/Ref/input/wpt-import/css/filter-effects/support/color-palette.png -- 3.37kb -> 0.99kb (70.6%)
/Tests/LibWeb/Ref/input/wpt-import/css/compositing/background-blending/support/red.png -- 2.64kb -> 1.10kb (58.4%)
/Tests/LibWeb/Text/input/wpt-import/css/css-flexbox/support/test-outer.png -- 2.36kb -> 1.05kb (55.39%)
/Tests/LibWeb/Ref/expected/wpt-import/css/css-images/support/colors-16x8.svg -- 0.73kb -> 0.34kb (53.53%)
/Tests/LibGfx/test-inputs/gif/download-animation.gif -- 4.44kb -> 2.09kb (52.8%)
/Tests/LibWeb/Text/input/wpt-import/css/css-flexbox/support/cat.png -- 1.84kb -> 0.91kb (50.77%)
/Tests/LibWeb/Text/input/wpt-import/css/support/cat.png -- 1.84kb -> 0.91kb (50.77%)
/Tests/LibWeb/Layout/data/svg-with-id.svg -- 0.08kb -> 0.04kb (46.75%)
/Base/res/icons/16x16/trash-can.png -- 3.11kb -> 1.77kb (43.03%)
/Tests/LibGfx/test-inputs/jpg/grayscale_app14.jpg -- 0.67kb -> 0.39kb (42.27%)
/Base/res/icons/browser/local-storage.png -- 3.02kb -> 1.76kb (41.89%)
/Base/res/icons/16x16/history.png -- 3.25kb -> 1.90kb (41.4%)
/Base/res/icons/16x16/zoom-reset.png -- 2.91kb -> 1.71kb (41.17%)
/Base/res/icons/16x16/layers.png -- 2.97kb -> 1.75kb (41.06%)
/Base/res/icons/16x16/spoof.png -- 2.99kb -> 1.77kb (40.98%)
/Base/res/icons/16x16/close-tab.png -- 2.93kb -> 1.76kb (39.72%)
/Base/res/icons/browser/cookie.png -- 2.84kb -> 1.72kb (39.46%)
/Base/res/icons/16x16/new-tab.png -- 2.84kb -> 1.72kb (39.3%)
/Base/res/icons/browser/dom-tree.png -- 2.84kb -> 1.73kb (39.2%)
/Tests/LibWeb/Ref/expected/svg/custom-namespaced-attributes-ref.svg -- 0.21kb -> 0.13kb (37.74%)
/Tests/LibGfx/test-inputs/gif/corrupted.gif -- 1.65kb -> 1.04kb (37.25%)
/Tests/LibGfx/test-inputs/jpg/odd-restart.jpg -- 1.09kb -> 0.69kb (36.57%)
/Tests/LibGfx/test-inputs/jpg/rgb_components.jpg -- 31.53kb -> 20.15kb (36.09%)
/Tests/LibGfx/test-inputs/jpg/cmyk-no-adobe-marker.jpg -- 0.56kb -> 0.36kb (36.05%)
/Tests/LibGfx/test-inputs/jpg/cmyk-adobe-transform-0.jpg -- 0.58kb -> 0.38kb (35.08%)
/Tests/LibGfx/test-inputs/jpg/several_scans.jpg -- 14.30kb -> 9.33kb (34.75%)
/Tests/LibWeb/Text/input/wpt-import/css/css-flexbox/support/ruler-v-100px.png -- 0.74kb -> 0.49kb (34.47%)
/Tests/LibWeb/Ref/input/wpt-import/css/css-color/support/009900-sRGB.png -- 0.43kb -> 0.29kb (34.01%)
/Tests/LibWeb/Text/input/wpt-import/css/css-flexbox/support/ruler-v-50px.png -- 0.74kb -> 0.50kb (32.89%)
/Tests/LibWeb/Ref/expected/wpt-import/css/css-color/support/009900.png -- 0.42kb -> 0.29kb (31.54%)
/Tests/LibWeb/Ref/input/wpt-import/css/css-color/support/009900.png -- 0.42kb -> 0.29kb (31.54%)
/Tests/LibWeb/Screenshot/expected/meter.png -- 1.04kb -> 0.73kb (29.95%)
/Tests/LibWeb/Screenshot/expected/css-background-blob-url.png -- 1.50kb -> 1.08kb (28.3%)
/Base/res/icons/16x16/filetype-css.png -- 4.39kb -> 3.15kb (28.24%)
/Tests/LibGfx/test-inputs/jpg/several_scans_odd_number_mcu.jpg -- 12.27kb -> 8.90kb (27.44%)
/Tests/LibWeb/Ref/data/vertical-rect.svg -- 0.27kb -> 0.20kb (26.1%)
/Tests/LibWeb/Text/input/wpt-import/css/css-flexbox/support/ruler-h-50px.png -- 0.66kb -> 0.48kb (26.08%)
/Tests/LibWeb/Screenshot/expected/image-unpremultiplied-data.png -- 2.11kb -> 1.58kb (25.2%)
/Tests/LibWeb/Ref/input/svg/custom-namespaced-attributes.svg -- 0.38kb -> 0.29kb (24.3%)
/Tests/LibWeb/Screenshot/expected/svg-simple-clipPath.png -- 2.35kb -> 1.80kb (23.29%)
/Tests/LibGfx/test-inputs/jpg/gradient_empty_icc.jpg -- 1.11kb -> 0.87kb (22.35%)
/Tests/LibWeb/Screenshot/expected/svg-rotation-anti-aliasing.png -- 2.23kb -> 1.74kb (21.83%)
/Tests/LibWeb/Ref/input/wpt-import/svg/pservers/reftests/fill-fallback-none-2.svg -- 0.40kb -> 0.31kb (21.76%)
/Tests/LibWeb/Ref/expected/wpt-import/svg/pservers/reftests/reference/gradient-color-interpolation-ref.svg -- 0.74kb -> 0.59kb (20.63%)
/Tests/LibWeb/Screenshot/expected/svg-clip-rule.png -- 2.63kb -> 2.12kb (19.36%)
/Base/res/icons/48x48/app-browser.png -- 7.69kb -> 6.40kb (16.78%)
/Tests/LibGfx/test-inputs/jpg/rgb24.jpg -- 2.26kb -> 1.88kb (16.77%)
/Tests/LibWeb/Screenshot/expected/canvas-unpremultiplied-image.png -- 0.58kb -> 0.48kb (16.1%)
/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/resources/prefers-color-scheme.svg -- 0.26kb -> 0.22kb (15.99%)
/Tests/LibWeb/Ref/input/svg-file-matches-html-file.svg -- 0.28kb -> 0.24kb (15.97%)
/Tests/LibWeb/Text/input/wpt-import/dom/nodes/Element-firstElementChild-entity.svg -- 1.00kb -> 0.84kb (15.71%)
/Tests/LibGfx/test-inputs/jpg/grayscale_mcu.jpg -- 3.41kb -> 2.91kb (14.66%)
/Tests/LibWeb/Screenshot/expected/css-background-repeat-x-and-zoomed.png -- 0.58kb -> 0.50kb (13.95%)
/Tests/LibWeb/Layout/input/svg/standalone-vb-wh.svg -- 0.25kb -> 0.22kb (12.69%)
/Tests/LibWeb/Text/input/hit_testing/hit-testing-an-xml-svg-should-not-crash.svg -- 0.65kb -> 0.58kb (11.41%)
/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/resources/prefers-color-scheme-light.svg -- 0.19kb -> 0.17kb (10.47%)
/Tests/LibWeb/Text/input/wpt-import/css/filter-effects/parsing/flood-opacity-valid.svg -- 1.02kb -> 0.91kb (10.38%)
/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/resources/prefers-color-scheme-dark.svg -- 0.19kb -> 0.17kb (10.36%)
/Base/res/icons/16x16/audio-volume-high.png -- 5.41kb -> 4.86kb (10.32%)
/Tests/LibWeb/Ref/input/wpt-import/svg/pservers/reftests/gradient-color-interpolation.svg -- 0.93kb -> 0.84kb (10.18%)
/Tests/LibGfx/test-inputs/jpg/ycck-adobe-transform-2.jpg -- 0.58kb -> 0.53kb (9.72%)
/Tests/LibWeb/Text/input/wpt-import/css/filter-effects/parsing/flood-opacity-computed.svg -- 1.12kb -> 1.02kb (9.38%)
/Tests/LibGfx/test-inputs/jpg/big_image.jpg -- 5,850.66kb -> 5,340.12kb (8.73%)
/Tests/LibGfx/test-inputs/jpg/successive_approximation.jpg -- 11.46kb -> 10.47kb (8.65%)
/Tests/LibWeb/Screenshot/expected/svg-maskContentUnits.png -- 3.36kb -> 3.08kb (8.56%)
/Tests/LibGfx/test-inputs/jpg/ycck-1111.jpg -- 35.35kb -> 32.34kb (8.5%)
/Tests/LibWeb/Text/input/wpt-import/svg/painting/inheritance.svg -- 1.87kb -> 1.72kb (7.59%)
/Base/res/icons/128x128/app-browser.png -- 17.11kb -> 15.84kb (7.41%)
/Tests/LibWeb/Screenshot/expected/svg-background-no-natural-size.png -- 1.43kb -> 1.34kb (6.68%)
/Tests/LibWeb/Text/input/wpt-import/dom/nodes/Element-nextElementSibling-svg.svg -- 0.97kb -> 0.91kb (6.63%)
/Tests/LibWeb/Ref/data/50x50-red.svg -- 0.11kb -> 0.10kb (6.14%)
/Tests/LibWeb/Ref/data/50x50-green.svg -- 0.11kb -> 0.11kb (6.03%)
/Tests/LibWeb/Layout/data/rectangle.svg -- 0.13kb -> 0.12kb (6.02%)
/Tests/LibWeb/Ref/data/nested-svg.svg -- 0.23kb -> 0.22kb (5.91%)
/Tests/LibWeb/Screenshot/expected/svg-stroke-paintstyle-with-opacity.png -- 1.61kb -> 1.52kb (5.65%)
/Tests/LibGfx/test-inputs/jpg/ycck-2112.jpg -- 25.69kb -> 24.27kb (5.55%)
/Tests/LibGfx/test-inputs/jpg/ycck-2111.jpg -- 20.64kb -> 19.53kb (5.4%)
/Tests/LibWeb/Ref/expected/wpt-import/svg/pservers/reftests/reference/green-100x100.svg -- 0.09kb -> 0.09kb (5.21%)
/Tests/LibWeb/Ref/expected/wpt-import/svg/struct/reftests/reference/green-100x100.svg -- 0.09kb -> 0.09kb (5.21%)
/Tests/LibWeb/Ref/input/wpt-import/svg/coordinate-systems/support/views.svg -- 0.22kb -> 0.21kb (4.8%)
/Base/res/icons/16x16/audio-volume-muted.png -- 5.64kb -> 5.42kb (3.98%)
/Tests/LibWeb/Ref/input/wpt-import/svg/pservers/reftests/pattern-transform-03.svg -- 1.04kb -> 1.00kb (3.75%)
/Base/res/icons/16x16/box.png -- 1.45kb -> 1.40kb (3.49%)
/Tests/LibWeb/Ref/input/wpt-import/svg/painting/reftests/fallback-001.svg -- 0.40kb -> 0.38kb (3.46%)
/Meta/CMake/freedesktop/org.ladybird.Ladybird.svg -- 2.56kb -> 2.47kb (3.36%)
/Tests/LibWeb/Ref/data/svg-with-external-script.svg -- 0.23kb -> 0.23kb (3.35%)
/Tests/LibWeb/Ref/input/wpt-import/svg/painting/reftests/fallback-002.svg -- 0.33kb -> 0.32kb (3.22%)
/Tests/LibWeb/Text/input/wpt-import/html/semantics/embedded-content/the-img-element/image-1.jpg -- 380.12kb -> 368.74kb (3%)
/Tests/LibWeb/Ref/expected/wpt-import/css/css-masking/clip-path-svg-content/reference/clip-path-recursion-002-ref.svg -- 0.24kb -> 0.23kb (2.89%)
/Base/res/icons/32x32/app-system-monitor.png -- 0.46kb -> 0.45kb (2.74%)
/Tests/LibWeb/Screenshot/expected/css-background-position.png -- 28.77kb -> 28.01kb (2.64%)
/Tests/LibWeb/Screenshot/expected/canvas-implict-moves-and-lines.png -- 4.10kb -> 3.99kb (2.53%)
/Tests/LibWeb/Text/input/wpt-import/images/anim-gr.gif -- 0.24kb -> 0.23kb (2.49%)
/Tests/LibGfx/test-inputs/icc/icc-v4.jpg -- 30.67kb -> 29.92kb (2.44%)
/Tests/LibWeb/Screenshot/expected/canvas-shadow.png -- 2.51kb -> 2.48kb (1.05%)
/Tests/LibWeb/Layout/data/svg-without-viewbox.svg -- 0.13kb -> 0.12kb (0.78%)
/Tests/LibWeb/Screenshot/expected/css-background-repeat.png -- 13.22kb -> 13.18kb (0.26%)
/Tests/LibGfx/test-inputs/jpg/buggie-cmyk.jpg -- 576.81kb -> 575.48kb (0.23%)
/Tests/LibWeb/Text/input/wpt-import/html/semantics/embedded-content/the-img-element/resources/cat.jpg -- 20.97kb -> 20.96kb (0.03%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.