aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/node.rs
diff options
context:
space:
mode:
authorchickenleaf <lashwinib@gmail.com>2024-10-21 17:58:56 +0530
committerGitHub <noreply@github.com>2024-10-21 12:28:56 +0000
commit9acb25521e433bdea49866e4ecb6a9f4e90b0663 (patch)
tree96c99cdf3e5f4c157dbfb08eff8240d9dff55bfc /components/script/dom/node.rs
parent66695d2f7ee25782d3edfca32b74ff14bc9faa84 (diff)
downloadservo-9acb25521e433bdea49866e4ecb6a9f4e90b0663.tar.gz
servo-9acb25521e433bdea49866e4ecb6a9f4e90b0663.zip
CanGc changes from fontfaceset.rs (#33920)
* CanGc changes from fontfaceset.rs Signed-off-by: L Ashwin B <lashwinib@gmail.com> * Update components/script/dom/bindings/codegen/Bindings.conf Co-authored-by: Josh Matthews <josh@joshmatthews.net> Signed-off-by: chickenleaf <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com> Signed-off-by: chickenleaf <lashwinib@gmail.com> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r--components/script/dom/node.rs26
1 files changed, 13 insertions, 13 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index 89876e8b3d9..4851728803e 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -793,25 +793,25 @@ impl Node {
/// Returns the rendered bounding content box if the element is rendered,
/// and none otherwise.
- pub fn bounding_content_box(&self) -> Option<Rect<Au>> {
- window_from_node(self).content_box_query(self)
+ pub fn bounding_content_box(&self, can_gc: CanGc) -> Option<Rect<Au>> {
+ window_from_node(self).content_box_query(self, can_gc)
}
- pub fn bounding_content_box_or_zero(&self) -> Rect<Au> {
- self.bounding_content_box().unwrap_or_else(Rect::zero)
+ pub fn bounding_content_box_or_zero(&self, can_gc: CanGc) -> Rect<Au> {
+ self.bounding_content_box(can_gc).unwrap_or_else(Rect::zero)
}
- pub fn content_boxes(&self) -> Vec<Rect<Au>> {
- window_from_node(self).content_boxes_query(self)
+ pub fn content_boxes(&self, can_gc: CanGc) -> Vec<Rect<Au>> {
+ window_from_node(self).content_boxes_query(self, can_gc)
}
- pub fn client_rect(&self) -> Rect<i32> {
- window_from_node(self).client_rect_query(self)
+ pub fn client_rect(&self, can_gc: CanGc) -> Rect<i32> {
+ window_from_node(self).client_rect_query(self, can_gc)
}
/// <https://drafts.csswg.org/cssom-view/#dom-element-scrollwidth>
/// <https://drafts.csswg.org/cssom-view/#dom-element-scrollheight>
- pub fn scroll_area(&self) -> Rect<i32> {
+ pub fn scroll_area(&self, can_gc: CanGc) -> Rect<i32> {
// "1. Let document be the element’s node document.""
let document = self.owner_doc();
@@ -837,7 +837,7 @@ impl Node {
// element is not potentially scrollable, return max(viewport scrolling area
// width, viewport width)."
if (is_root && !in_quirks_mode) || (is_body_element && in_quirks_mode) {
- let viewport_scrolling_area = window.scrolling_area_query(None);
+ let viewport_scrolling_area = window.scrolling_area_query(None, can_gc);
return Rect::new(
viewport_scrolling_area.origin,
viewport_scrolling_area.size.max(viewport),
@@ -847,7 +847,7 @@ impl Node {
// "6. If the element does not have any associated box return zero and terminate
// these steps."
// "7. Return the width of the element’s scrolling area."
- window.scrolling_area_query(Some(self))
+ window.scrolling_area_query(Some(self), can_gc)
}
pub fn scroll_offset(&self) -> Vector2D<f32> {
@@ -1270,8 +1270,8 @@ impl Node {
})
}
- pub fn style(&self) -> Option<Arc<ComputedValues>> {
- if !window_from_node(self).layout_reflow(QueryMsg::StyleQuery) {
+ pub fn style(&self, can_gc: CanGc) -> Option<Arc<ComputedValues>> {
+ if !window_from_node(self).layout_reflow(QueryMsg::StyleQuery, can_gc) {
return None;
}
self.style_data