mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 16:16:43 +00:00
LibWeb/HTML: Only update the image data on fully loaded document
Documents created by DOMParser and fragment documents do not have an origin set on the document by the spec. These documents also happen to never become fully active. By properly implementing the steps for the <img> element to only update the image data for documents which are fully active, this fixes a crash for img elements in these types of documents. Unfortunately, this is not a full fix for the microtask queue case. This is because it seems possible for node document for an <img> element to be changed during the microtask queue for that document. It is not clear to me how this can be fixed in a nice way.
This commit is contained in:
parent
bc85a9bace
commit
0bdcaf02d3
Notes:
github-actions[bot]
2025-06-24 07:57:31 +00:00
Author: https://github.com/shannonbooth
Commit: 0bdcaf02d3
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5153
Reviewed-by: https://github.com/gmta ✅
7 changed files with 684 additions and 5 deletions
|
@ -0,0 +1,19 @@
|
|||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (0,0) content-size 800x166 [BFC] children: not-inline
|
||||
BlockContainer <body> at (8,8) content-size 784x150 children: not-inline
|
||||
BlockContainer <(anonymous)> at (8,8) content-size 784x0 children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <div#image-container> at (8,8) content-size 784x150 children: inline
|
||||
frag 0 from ImageBox start: 0, length: 0, rect: [8,8 150x150] baseline: 150
|
||||
ImageBox <img> at (8,8) content-size 150x150 children: not-inline
|
||||
BlockContainer <(anonymous)> at (8,158) content-size 784x0 children: inline
|
||||
TextNode <#text>
|
||||
TextNode <#text>
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x166]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x150]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,8 784x0]
|
||||
PaintableWithLines (BlockContainer<DIV>#image-container) [8,8 784x150]
|
||||
ImagePaintable (ImageBox<IMG>) [8,8 150x150]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,158 784x0]
|
Loading…
Add table
Add a link
Reference in a new issue