mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
parent
485fe874e8
commit
bdd7cb9753
6 changed files with 11 additions and 8 deletions
|
@ -544,7 +544,7 @@ impl Activatable for HTMLAnchorElement {
|
|||
if let Some(element) = target.downcast::<Element>() {
|
||||
if target.is::<HTMLImageElement>() && element.has_attribute(&local_name!("ismap")) {
|
||||
let target_node = element.upcast::<Node>();
|
||||
let rect = target_node.bounding_content_box();
|
||||
let rect = target_node.bounding_content_box_or_zero();
|
||||
ismap_suffix = Some(
|
||||
format!("?{},{}", mouse_event.ClientX().to_f32().unwrap() - rect.origin.x.to_f32_px(),
|
||||
mouse_event.ClientY().to_f32().unwrap() - rect.origin.y.to_f32_px())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue