mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Auto merge of #15053 - emilio:image-width, r=jdm
Return the intrinsic image dimension when the image is not rendered See individual commits for details. r? @jdm <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15053) <!-- Reviewable:end -->
This commit is contained in:
commit
ba59ee6627
11 changed files with 58 additions and 23 deletions
|
@ -625,7 +625,7 @@ impl Document {
|
|||
// Really what needs to happen is that this needs to go through layout to ask which
|
||||
// layer the element belongs to, and have it send the scroll message to the
|
||||
// compositor.
|
||||
let rect = element.upcast::<Node>().bounding_content_box();
|
||||
let rect = element.upcast::<Node>().bounding_content_box_or_zero();
|
||||
|
||||
// In order to align with element edges, we snap to unscaled pixel boundaries, since
|
||||
// the paint thread currently does the same for drawing elements. This is important
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue