Skip to content

Implement viewport stuffs for window #1718 - #6875

Closed
farodin91 wants to merge 25 commits into
servo:masterfrom
farodin91:window
Closed

farodin91 wants to merge 25 commits into
servo:masterfrom
farodin91:window

Conversation

@farodin91

Copy link
Copy Markdown
Contributor

Review on Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jul 31, 2015
@highfive

Copy link
Copy Markdown

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @mbrubeck (or someone else) soon.

@farodin91

Copy link
Copy Markdown
Contributor Author

Current Problem i get

thread 'ScriptTask PipelineId(0)' has overflowed its stack
Servo exited with return value -4

if window.scroll(0,0) is excuted

@jdm

jdm commented Jul 31, 2015

Copy link
Copy Markdown
Member

It should become clear what the problem is if you run ./mach run --debugger tests/html/viewport.html and look at the backtrace when the crash occurs.

Comment thread tests/html/viewport.html Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, you're overwriting window.scroll with this new function :P

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ups

@farodin91
farodin91 force-pushed the window branch 2 times, most recently from f589e8c to a9df5f2 Compare August 2, 2015 12:06
@farodin91

Copy link
Copy Markdown
Contributor Author

Minimal support of Scroll working.
How do I get the height/width of the entire window/document?

@jdm

jdm commented Aug 2, 2015

Copy link
Copy Markdown
Member

We can use getBoundingClientRect on the document's root element for that, as mentioned on IRC.

Also, instead of merging changes from master into your branch, could you rebase your changes instead? It makes it much easier to follow your changes when reviewing the code.

@farodin91
farodin91 force-pushed the window branch 2 times, most recently from 11c09e6 to 160802d Compare August 2, 2015 16:44
@farodin91

Copy link
Copy Markdown
Contributor Author

getBoundingClientRect doesn't work correct for me. Return (0,0)
glutin

  • get_position() isn't updating, is my code correct !!!
  • get_outer_size() isn't updating and some as get_inner_size()
  • resize isn't implemented
  • set_position should be easy to implement

@farodin91

Copy link
Copy Markdown
Contributor Author

I'm working on Linux

@jdm

jdm commented Aug 2, 2015

Copy link
Copy Markdown
Member

What if you use getBoundingClientRect on the document's body element instead?

@farodin91 farodin91 changed the title [WIP] Implement viewport stuffs for window #1718 Implement viewport stuffs for window #1718 Aug 2, 2015
@farodin91

Copy link
Copy Markdown
Contributor Author

Current status the most work. if glutin implement this stuff

@jdm

jdm commented Aug 2, 2015

Copy link
Copy Markdown
Member

Thanks for doing this! I'll give it a proper review sometime in the next couple days.

@jdm jdm self-assigned this Aug 2, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #6784) made this pull request unmergeable. Please resolve the merge conflicts.

Conflicts:
	components/compositing/compositor.rs
	components/msg/compositor_msg.rs
	components/script/dom/webidls/Window.webidl
	components/script/dom/window.rs
	components/script/script_task.rs
	tests/html/viewport.html
@farodin91

Copy link
Copy Markdown
Contributor Author

Will Squash at the end

Conflicts:
	components/script/dom/window.rs
@highfive highfive added S-needs-rebase There are merge conflict errors. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Aug 20, 2015
Conflicts:
	components/compositing/compositor.rs
	components/msg/compositor_msg.rs
@jdm jdm removed the S-needs-rebase There are merge conflict errors. label Aug 24, 2015
@jdm

jdm commented Aug 24, 2015

Copy link
Copy Markdown
Member

-S-awaiting-review +S-needs-code-changes


Reviewed 1 of 9 files at r14, 11 of 11 files at r16.
Review status: all files reviewed at latest revision, 2 unresolved discussions, all commit checks successful.


components/compositing/compositor_task.rs, line 69 [r16] (raw file):
We should send the smooth value here too.


Comments from the review on Reviewable.io

@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Aug 24, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #7401) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added S-needs-rebase There are merge conflict errors. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Aug 27, 2015
Conflicts:
	components/script/dom/window.rs
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Aug 27, 2015
Comment thread components/script/dom/window.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will return the wrong DPR if we are running with an option specifiying DPR. (See device_pixels_per_screen_px in compositor.rs: http://mxr.mozilla.org/servo/source/components/compositing/compositor.rs#1139)
Not sure how much we care though.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aaah I'm having trouble reading. Ignore me and carry on.

@jdm

jdm commented Aug 27, 2015

Copy link
Copy Markdown
Member

Time to squash! Thanks!
-S-needs-rebase -S-needs-rebase +S-needs-squash


Reviewed 6 of 6 files at r17.
Review status: all files reviewed at latest revision, 2 unresolved discussions, all commit checks successful.


Comments from the review on Reviewable.io

@jdm jdm added S-needs-squash Some (or all) of the commits in the PR should be combined. and removed S-needs-rebase There are merge conflict errors. labels Aug 27, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #7417) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added S-needs-rebase There are merge conflict errors. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Aug 28, 2015
@jdm jdm removed the S-awaiting-review There is new code that needs to be reviewed. label Aug 28, 2015
Conflicts:
	components/compositing/headless.rs
	components/script/dom/window.rs
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Sep 1, 2015
@farodin91 farodin91 closed this Sep 1, 2015
@farodin91
farodin91 deleted the window branch September 1, 2015 20:16
bors-servo pushed a commit that referenced this pull request Sep 1, 2015
bors-servo pushed a commit that referenced this pull request Sep 1, 2015
bors-servo pushed a commit that referenced this pull request Sep 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed. S-needs-rebase There are merge conflict errors. S-needs-squash Some (or all) of the commits in the PR should be combined.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants