mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-24 18:28:57 +00:00
LibWeb: Split PaintContext::viewport_rect() into device/css variants
For now, everyone uses `device_viewport_rect()`, until I convert them.
This commit is contained in:
parent
0be479dcfb
commit
4440af0870
Notes:
sideshowbarker
2024-07-18 02:47:59 +09:00
Author: https://github.com/AtkinsSJ
Commit: 4440af0870
Pull-request: https://github.com/SerenityOS/serenity/pull/16448
Reviewed-by: https://github.com/awesomekling ✅
8 changed files with 24 additions and 13 deletions
|
@ -249,7 +249,7 @@ void PaintableBox::paint_background(PaintContext& context) const
|
|||
|
||||
if (layout_box().is_root_element()) {
|
||||
// CSS 2.1 Appendix E.2: If the element is a root element, paint the background over the entire canvas.
|
||||
background_rect = context.viewport_rect().to_type<float>();
|
||||
background_rect = context.device_viewport_rect().to_type<int>().to_type<float>();
|
||||
|
||||
// Section 2.11.2: If the computed value of background-image on the root element is none and its background-color is transparent,
|
||||
// user agents must instead propagate the computed values of the background properties from that element’s first HTML BODY child element.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue