script: Rename bounding_content_box to bounding_content_box_or_zero.

And make bounding_content_box preserve whether the element is rendered.
This commit is contained in:
Emilio Cobos Álvarez 2017-01-17 00:27:49 +01:00
parent 485fe874e8
commit bdd7cb9753
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
6 changed files with 11 additions and 8 deletions

View file

@ -970,7 +970,7 @@ impl Window {
let body = self.Document().GetBody();
let (x, y) = match body {
Some(e) => {
let content_size = e.upcast::<Node>().bounding_content_box();
let content_size = e.upcast::<Node>().bounding_content_box_or_zero();
let content_height = content_size.size.height.to_f64_px();
let content_width = content_size.size.width.to_f64_px();
(xfinite.max(0.0f64).min(content_width - width),