mirror of
https://github.com/servo/servo.git
synced 2025-08-02 04:00:32 +01:00
Implement ScrollTop and ScrollLeft getters:
Add new compositor message to get scroll_offset; Add new layout query for computed value of overflow-x/y; Implement layer_id method for ThreadSafeLayoutNode; Add new layout query for layer_id; Implement script interface for getting scrollTop and scrollLeft, as well as relavant helper functions.
This commit is contained in:
parent
f73c6143d5
commit
fefdaf76de
12 changed files with 243 additions and 9 deletions
|
@ -614,6 +614,12 @@ 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())
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-childnode-before
|
||||
pub fn before(&self, nodes: Vec<NodeOrString>) -> ErrorResult {
|
||||
// Step 1.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue