Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upoverscroll code doesn't work properly anymore #19718
Comments
|
STR: Change this in /ports/: diff --git a/ports/glutin/window.rs b/ports/glutin/window.rs
index f2f16b0600..e2dbe533c3 100644
--- a/ports/glutin/window.rs
+++ b/ports/glutin/window.rs
@@ -996,8 +996,10 @@ impl WindowMethods for Window {
}
fn window_rect(&self) -> DeviceUintRect {
- let size = self.framebuffer_size();
- let origin = TypedPoint2D::zero();
+ let mut size = self.framebuffer_size();
+ size.height -= 50;
+
+ let origin = TypedPoint2D::new(0, 50);
DeviceUintRect::new(origin, size)
}Load this page:
Good: Bad: |
|
Bisecting tells me the cdc1635 is the issue. |
|
@mrobinson / @glennw does that help or do you also need me to bisect the webrender changes? |
|
Let me describe a bit more what the expected behavior is. I'm not sure why we call that The HTML page is usually clipped by the DOM window dimension (x:0;y:0 is the CSS top left corner of the page, but also where the page is clipped). But we might want to draw the HTML content outside of the DOM window. A typical example is the ability to see the background of the page below a toolbar. Here is Gif that shows the effect: https://cloud.githubusercontent.com/assets/373579/23516132/9f437e2c-ff6c-11e6-8340-97c7de94b411.gif (the page is painted below the toolbar as weel) So we want to be able to clip an area that is larger than the DOM window. To do so, in servo/webrender#951, we introduced the notion of What is important is to not mess up the layout. In the case of the toolbar example, we want a I hope this clarify the behavior. Do not hesitate to ask for clarifications. |
|
@paulrouget I'm pretty sure I have tracked down the PR that caused this (servo/webrender#2043). Is this issue still relevant now that work on BrowserHTML is ceasing? If it is, I can try to fix it in the upcoming weeks. |
Yes. BrowserHTML doesn't use this feature. This is used by regular embedders.
It is not a high priority, but that would be great to get that fixed soon. Thank you! |


/cc @glennw
If window::window_rect() returns
TypedRect::new(TypedPoint2D::new(0, 50), size), the page size is correct, but its position is wrong (not shifted down to 50px).Here is a screenshot:
The whole page should be shifted down.
Could this be the consequence of what @mrobinson was mentioning here: servo/webrender#2159 (comment)