mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Reimplement scrolling to fragments
This reimplemntation of the feature uses ScrollRootIds to scroll particular scrollable areas of the page. Fixes #13736. Fixes #10753.
This commit is contained in:
parent
39845faf26
commit
0b56bb2237
18 changed files with 154 additions and 45 deletions
|
@ -87,6 +87,7 @@ use dom::window::{ReflowReason, Window};
|
|||
use encoding::EncodingRef;
|
||||
use encoding::all::UTF_8;
|
||||
use euclid::point::Point2D;
|
||||
use gfx_traits::ScrollRootId;
|
||||
use html5ever::tree_builder::{LimitedQuirks, NoQuirks, Quirks, QuirksMode};
|
||||
use html5ever_atoms::{LocalName, QualName};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
|
@ -622,7 +623,10 @@ impl Document {
|
|||
|
||||
if let Some((x, y)) = point {
|
||||
// Step 3
|
||||
self.window.perform_a_scroll(x, y, ScrollBehavior::Instant,
|
||||
self.window.perform_a_scroll(x,
|
||||
y,
|
||||
ScrollRootId::root(),
|
||||
ScrollBehavior::Instant,
|
||||
target.r());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue