mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
script: When using WebRender, keep the DOM-side scroll positions for
elements with `overflow: scroll` up to date, and take them into account when doing hit testing. Closes #11648.
This commit is contained in:
parent
ce88b8ed30
commit
041cfe6d0a
14 changed files with 259 additions and 47 deletions
|
@ -298,6 +298,10 @@ impl Node {
|
|||
self.owner_doc().content_and_heritage_changed(self, NodeDamage::OtherNodeDamage);
|
||||
child.owner_doc().content_and_heritage_changed(child, NodeDamage::OtherNodeDamage);
|
||||
}
|
||||
|
||||
pub fn to_untrusted_node_address(&self) -> UntrustedNodeAddress {
|
||||
UntrustedNodeAddress(self.reflector().get_jsobject().get() as *const c_void)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct QuerySelectorIterator {
|
||||
|
@ -622,7 +626,7 @@ impl Node {
|
|||
pub fn scroll_offset(&self) -> Point2D<f32> {
|
||||
let document = self.owner_doc();
|
||||
let window = document.window();
|
||||
window.scroll_offset_query(self.to_trusted_node_address())
|
||||
window.scroll_offset_query(self)
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-childnode-before
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue