You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 27, 2018. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 27, 2018. It is now read-only.
We need a way to smoothly change the viewport without resizing the iframe from the parent process #355
Changing the viewport means changing the "visible" area of an iframe ("visible" in quotes because if the viewport doesn't match the size of the iframe, the extra content would still be visible). Afaik, the only way to do that is to combine scrolling the content and resizing the iframe.
Scrolling and resizing operations involve 3 things:
DOM events (onscroll & onresize)
restyle & reflow (triggered by resize)
composition operations
We want this to be fast and smooth. The important bit is to ensure that the content-related composition operations, and any other main-process animation (chrome UI), are part of a same transaction.
An example of what we could do: the parent process could animate a toolbar sliding from the top (part of the chrome interface), covering the iframe. If the toolbar is half transparent, we would see the content behind the toolbar, but also, any fixed positioned element in the content would smoothly be pushed down by the toolbar (so a portion of the content above the top:0 element would still be rendered and painted).
If I'm not mistaken, all of that could be doable only in the main process, as it's all compositor operations.
DOM events and restyle & reflows would happen later, once the animation is done.
Activity
paulrouget commentedon May 5, 2015
cc @andreasgal @Cwiiis
paulrouget commentedon May 5, 2015
A maybe more simple and short term approach would to be able to sync 2 scroll operations. Basically, parent process and child process should be able to call
scrollBy({behavior:smooth})and make both scroll operations part of the same transaction (see https://groups.google.com/forum/?fromgroups#!topic/mozilla.dev.platform/K_NhNWVKOPI).paulrouget commentedon Jun 17, 2015
Note to self:
setContentDocumentFixedPositionMarginsallows us to set the viewport size.Gozala commentedon Aug 7, 2015
servo/servo#7083
paulrouget commentedon Aug 7, 2015
This problem is not specific to Browser.html. Both Fennec and Gaia have related issues. Kartikaya has been working on a solution to this problem. See bug 1180295. Kats’ approach is fully described here: https://bug1180295.bmoattachments.org/attachment.cgi?id=8630517. We want to go for Model 3.
Gozala commentedon Jan 12, 2016
@paulrouget I assume that keeping this issue open here is not going to help & there for close it. Feel free to reopen if you disagree.