-
Notifications
You must be signed in to change notification settings - Fork 204
Define the correct rect for Take Screenshot #1169
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
Conversation
Do I understand correctly that you want to get the rectangle of the top-level viewport? What you have is basically scrollX, scrollY, innerWidth, innerHeight, yes? Looking at https://w3c.github.io/webdriver/webdriver-spec.html#screen-capture it's not super-clear to me if the coordinate space it's expecting is the same as cssom-view uses for scrollX et al. Note "relative to the initial containing block origin" -- IIRC that is intended to match up with coordinate space for absolute positioning. This becomes interesting with Here's a test to play around with http://software.hixie.ch/utilities/js/live-dom-viewer/saved/5607 Also see https://lists.w3.org/Archives/Public/www-style/2014Apr/0438.html for information on interop problems to watch out for. So... what to do. Figure out what coordinate space the screenshotter is expecting, then figure out how to get that rectangle, and test with rtl/vertical. Hope that helps :) |
innerWidth/Height include the scrollbars, which we don't want to. |
Closing and reopening to trigger pr-preview. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there associated tests for this change? I can't see any for "screen_capture" in WPT, but maybe they're in a different directory.
<li><p>Let <var>root rect</var> be the <a>current top-level browsing context</a>’s | ||
<a>document element</a>’s <a>rectangle</a>. | ||
<li><p>Let <var>window</var> be the <a>associated window</a> | ||
of the <a>current browsing context</a>’s <a>active document</a>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original wording of this captured the visible contents of the OS window. Would current top level browser context
be more in keeping with the spirit of this?
Closing this in favour of just an issue (#1251), because I don't really know what the right thing here is, nor have the time to better understand it. |
@zcorpan is this the right way to do this with what we have defined in CSSOM View? (please wait for him or someone else who understands CSSOM View better to comment!)
Preview | Diff