mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-21 20:24:42 +00:00
clarify comment: images are in broken state, not fully fetched
This commit is contained in:
@@ -113,8 +113,10 @@ pub fn getNaturalHeight(_: *const Image) u32 {
|
||||
}
|
||||
|
||||
pub fn getComplete(_: *const Image) bool {
|
||||
// Per spec, complete is true when: no src/srcset, image fully fetched,
|
||||
// or image is broken. Since we don't fetch images, they are always complete.
|
||||
// Per spec, complete is true when: no src/srcset, src is empty,
|
||||
// image is fully available, or image is broken (with no pending request).
|
||||
// Since we never fetch images, they are in the "broken" state, which has
|
||||
// complete=true. This is consistent with naturalWidth/naturalHeight=0.
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user