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:
Martin Robinson 2016-11-21 09:48:33 +01:00
parent 39845faf26
commit 0b56bb2237
18 changed files with 154 additions and 45 deletions

View file

@ -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());
}
}