-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
doc: Add doc for compositor/webview/embedder related to window/rect/inner_size/rendering_context #38110
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
fn winit_window(&self) -> Option<&winit::window::Window>; | ||
fn toolbar_height(&self) -> Length<f32, DeviceIndependentPixel>; | ||
fn set_toolbar_height(&self, height: Length<f32, DeviceIndependentPixel>); | ||
/// Viewport. |
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.
Is this intended? The description doesn't match the method either.
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.
Sorry for that. Just made it more concrete!
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.
hmm a rendering context is more that just a viewport I think. It should linkt to this trait.
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.
Yes. But everytime we call
fn size2d(&self) -> Size2D<u32, DevicePixel> { |
people seem to use it as viewport size.
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.
For example
servo/ports/servoshell/output_image.rs
Lines 27 to 28 in cbdf72b
let size = rendering_context.size2d().to_i32(); | |
let viewport_rect = DeviceIntRect::from_origin_and_size(Point2D::origin(), size); |
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.
How can we add better doc for fn rendering_context
? I think I understand your concern.
Right now I'm going with
/// This returns [
RenderingContext] matching the viewport.
Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
Can someone check this? It is very important for next step fix. I want to ensure correctness. |
…nner_size/rendering_context (servo#38110) Add docs before actually fixing servo#38089, servo#38090, servo#37978, servo#38093. Testing: Just adding docs. --------- Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
Add docs before actually fixing #38089, #38090, #37978, #38093.
Testing: Just adding docs.