mirror of
https://github.com/servo/servo.git
synced 2025-07-29 10:10:34 +01:00
Auto merge of #5877 - glennw:img-cache-tidy, r=pcwalton
<!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5877) <!-- Reviewable:end -->
This commit is contained in:
commit
ae99a17a1b
1 changed files with 0 additions and 14 deletions
|
@ -186,14 +186,7 @@ impl<'a> HTMLImageElementMethods for JSRef<'a, HTMLImageElement> {
|
|||
}
|
||||
|
||||
fn Width(self) -> u32 {
|
||||
// FIXME(pcwalton): This is a really nasty thing to do, but the interaction between the
|
||||
// image cache task, the reflow messages that it sends to us via layout, and the image
|
||||
// holders seem to just plain be racy, and this works around it by ensuring that we
|
||||
// recreate the flow (picking up image changes on the way). The image cache task needs a
|
||||
// rewrite to modern Rust.
|
||||
let node: JSRef<Node> = NodeCast::from_ref(self);
|
||||
node.dirty(NodeDamage::OtherNodeDamage);
|
||||
|
||||
let rect = node.get_bounding_content_box();
|
||||
to_px(rect.size.width) as u32
|
||||
}
|
||||
|
@ -204,14 +197,7 @@ impl<'a> HTMLImageElementMethods for JSRef<'a, HTMLImageElement> {
|
|||
}
|
||||
|
||||
fn Height(self) -> u32 {
|
||||
// FIXME(pcwalton): This is a really nasty thing to do, but the interaction between the
|
||||
// image cache task, the reflow messages that it sends to us via layout, and the image
|
||||
// holders seem to just plain be racy, and this works around it by ensuring that we
|
||||
// recreate the flow (picking up image changes on the way). The image cache task needs a
|
||||
// rewrite to modern Rust.
|
||||
let node: JSRef<Node> = NodeCast::from_ref(self);
|
||||
node.dirty(NodeDamage::OtherNodeDamage);
|
||||
|
||||
let rect = node.get_bounding_content_box();
|
||||
to_px(rect.size.height) as u32
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue