Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement viewport stuffs for window #1718 #6875

Closed
wants to merge 25 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
40ff6cf
viewport
farodin91 Jul 31, 2015
a33ad54
Merge remote-tracking branch 'upstream/master' into window
farodin91 Jul 31, 2015
a9df5f2
[WIP] Implement viewport stuffs for window #1718
farodin91 Jul 31, 2015
43d6d5e
[WIP] Implement viewport stuffs for window #1718
farodin91 Jul 31, 2015
cbaf83b
Merge branch 'window' of github.com:farodin91/servo into window
farodin91 Aug 4, 2015
bb393cd
Merging conflict
farodin91 Aug 4, 2015
4557a5d
Merging conflict 2
farodin91 Aug 4, 2015
d289878
Merge remote-tracking branch 'upstream/master' into window
farodin91 Aug 4, 2015
a5944c7
last Conflict
farodin91 Aug 4, 2015
8d2008e
Merge remote-tracking branch 'upstream/master' into window
farodin91 Aug 5, 2015
6dabb5d
review changes
farodin91 Aug 7, 2015
a800294
Merge remote-tracking branch 'upstream/master' into window
farodin91 Aug 7, 2015
225d2ee
current state
farodin91 Aug 7, 2015
cc7fc18
most changes to the last review
farodin91 Aug 9, 2015
96ae3d4
Merge remote-tracking branch 'upstream/master' into window
farodin91 Aug 9, 2015
9a80339
init support of smooth
farodin91 Aug 9, 2015
c4213b4
Merge remote-tracking branch 'upstream/master' into window
farodin91 Aug 14, 2015
c0e028e
review changes
farodin91 Aug 14, 2015
36d318b
Merging and fix review
farodin91 Aug 16, 2015
10597e2
fix tidy
farodin91 Aug 16, 2015
38f318a
Merge remote-tracking branch 'upstream/master' into window
farodin91 Aug 19, 2015
a9d703a
fixing borrow_mut
farodin91 Aug 19, 2015
3f3b176
Merge remote-tracking branch 'upstream/master' into window
farodin91 Aug 20, 2015
5274eab
Merge remote-tracking branch 'upstream/master' into window
farodin91 Aug 27, 2015
f655800
Merge remote-tracking branch 'upstream/master' into window
farodin91 Sep 1, 2015
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

init support of smooth

  • Loading branch information
farodin91 committed Aug 9, 2015
commit 9a803396f92cfb2de6853f976fcf27bcbb427281
@@ -139,7 +139,8 @@ impl ScriptListener {
pub fn scroll_fragment_point(&mut self,
pipeline_id: PipelineId,
layer_id: LayerId,
point: Point2D<f32>) {
point: Point2D<f32>,
_: bool) {
self.0
.send(ScriptToCompositorMsg::ScrollFragmentPoint(pipeline_id, layer_id, point))
.unwrap()
@@ -901,10 +901,15 @@ impl<'a> WindowHelpers for &'a Window {
}

/// https://drafts.csswg.org/cssom-view/#perform-a-scroll
fn perform_a_scroll(self, x: f32, y: f32, _: ScrollBehavior) {
fn perform_a_scroll(self, x: f32, y: f32, behavior: ScrollBehavior) {
//TODO Step 1
let point = Point2D::new(x, y);
self.compositor.borrow_mut().scroll_fragment_point(self.pipeline(), LayerId::null(), point)
let smooth = match behavior {
ScrollBehavior::Auto => false,
ScrollBehavior::Instant => false,
ScrollBehavior::Smooth => true
};
self.compositor.borrow_mut().scroll_fragment_point(self.pipeline(), LayerId::null(), point, smooth)
}

/// Reflows the page unconditionally. This method will wait for the layout thread to complete
@@ -1559,7 +1559,7 @@ impl ScriptTask {
// Really what needs to happen is that this needs to go through layout to ask which
// layer the element belongs to, and have it send the scroll message to the
// compositor.
self.compositor.borrow_mut().scroll_fragment_point(pipeline_id, LayerId::null(), point);
self.compositor.borrow_mut().scroll_fragment_point(pipeline_id, LayerId::null(), point, false);
}

/// Reflows non-incrementally, rebuilding the entire layout tree in the process.
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.