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 }}
Repository navigation
Implement Window viewport, scrolling, and client properties #1718
A-content/domInteracting with the DOM from web contentC-assignedThere is someone working on resolving the issueE-more-complexVariable effort required; may require a mentor. Recommended solution is clearly described in the iss
I actually asked because I am not sure about the way how a call to Window.resizeTo(w, h) communicates the intend to resize a window to the Browser<Window> which could finally call the appropriate glfw function. There are channels back and forth but I don't see an obvious way. Does GlfwCompositorProxy need a receiver or something? Better I ask before I do something without an overview of the architecture.
Window in component/script/dom/window.rs has a window_size member which is updated on resizing. I believe that scrolling events are handled in Window::set_page_clip_rect_with_new_viewport, too, where the new viewport is the new rectangle of visible page (ie. scroll offsets).
I made these observations by searching for the words "resize" and "scroll" in script_task.rs, dom/window.rs, and compositor.rs. I suspect the client properties (clientX, clientY, outerWidth, outerHeight) will need to be forwarded from compositor.rs somehow.
Oof. The stuff in the spec about implementing the scrolling methods is definitely more complication and could use @mbrubeck's input. Why don't you submit a PR for the completed methods so far?
A-content/domInteracting with the DOM from web contentC-assignedThere is someone working on resolving the issueE-more-complexVariable effort required; may require a mentor. Recommended solution is clearly described in the iss
Activity
payload commentedon Dec 2, 2014
Is there already a way for the script task to communicate with the glfw_app? This is necessary, right?
jdm commentedon Dec 2, 2014
I think it would be better for the compositor to inform the script task of the viewport dimensions, which would also support things like iframes.
payload commentedon Dec 3, 2014
I actually asked because I am not sure about the way how a call to
Window.resizeTo(w, h)communicates the intend to resize a window to theBrowser<Window>which could finally call the appropriate glfw function. There are channels back and forth but I don't see an obvious way. Does GlfwCompositorProxy need a receiver or something? Better I ask before I do something without an overview of the architecture.jdm commentedon Dec 3, 2014
I was going to point to the ResizeEvent that ScriptTask handles, but http://mxr.mozilla.org/servo/search?string=resizeevent suggests that nobody actually sends it :(
jdm commentedon Dec 3, 2014
Oh, it's possible that there's currently no way to implement Window.resizeTo. I haven't looked at the script->compositor design much before.
jdm commentedon Dec 3, 2014
That probably would go through ScriptListener, and the compositor field of ScriptTask would need to be available to each Window somehow: http://mxr.mozilla.org/servo/source/components/msg/compositor_msg.rs#108
farodin91 commentedon Jul 30, 2015
Is some one working this?
jdm commentedon Jul 30, 2015
Nope!
farodin91 commentedon Jul 30, 2015
I'd like to work on it.
jdm commentedon Jul 30, 2015
You're welcome to it.
farodin91 commentedon Jul 30, 2015
I will start the next days. First i must finish my bachelor thesis.
Any tipps for interesting files, that can help?
jdm commentedon Jul 30, 2015
Window in component/script/dom/window.rs has a
window_sizemember which is updated on resizing. I believe that scrolling events are handled in Window::set_page_clip_rect_with_new_viewport, too, where the new viewport is the new rectangle of visible page (ie. scroll offsets).I made these observations by searching for the words "resize" and "scroll" in script_task.rs, dom/window.rs, and compositor.rs. I suspect the client properties (clientX, clientY, outerWidth, outerHeight) will need to be forwarded from compositor.rs somehow.
5 remaining items
jdm commentedon Jul 31, 2015
What do you mean?
farodin91 commentedon Jul 31, 2015
https://drafts.csswg.org/cssom-view/#overflow-directions
jdm commentedon Jul 31, 2015
Oof. The stuff in the spec about implementing the scrolling methods is definitely more complication and could use @mbrubeck's input. Why don't you submit a PR for the completed methods so far?
farodin91 commentedon Jul 31, 2015
No problem.
Wait!
[WIP] Implement viewport stuffs for window servo#1718
[WIP] Implement viewport stuffs for window servo#1718
[WIP] Implement viewport stuffs for window servo#1718
[WIP] Implement viewport stuffs for window servo#1718
Implement viewport functions for window servo#1718
Auto merge of #7500 - farodin91:viewport, r=jdm
Implement viewport functions for window servo#1718
Auto merge of #7500 - farodin91:viewport, r=jdm
Implement viewport functions for window servo#1718
Auto merge of #7500 - farodin91:viewport, r=jdm