mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +00:00
LibWeb+WebContent: Convert BrowsingContext to new pixel units
This fixes a few glitches. We no longer give the page double the width it should have, and we mark the correct area of the page as needing repainting.
This commit is contained in:
parent
8fb7c32ec3
commit
affc8a22ca
23 changed files with 68 additions and 70 deletions
|
@ -664,7 +664,7 @@ int Element::client_width() const
|
|||
// return the viewport width excluding the size of a rendered scroll bar (if any).
|
||||
if ((is<HTML::HTMLHtmlElement>(*this) && !document().in_quirks_mode())
|
||||
|| (is<HTML::HTMLBodyElement>(*this) && document().in_quirks_mode())) {
|
||||
return document().browsing_context()->viewport_rect().width();
|
||||
return document().browsing_context()->viewport_rect().width().value();
|
||||
}
|
||||
|
||||
// NOTE: Ensure that layout is up-to-date before looking at metrics.
|
||||
|
@ -689,7 +689,7 @@ int Element::client_height() const
|
|||
// return the viewport height excluding the size of a rendered scroll bar (if any).
|
||||
if ((is<HTML::HTMLHtmlElement>(*this) && !document().in_quirks_mode())
|
||||
|| (is<HTML::HTMLBodyElement>(*this) && document().in_quirks_mode())) {
|
||||
return document().browsing_context()->viewport_rect().height();
|
||||
return document().browsing_context()->viewport_rect().height().value();
|
||||
}
|
||||
|
||||
// NOTE: Ensure that layout is up-to-date before looking at metrics.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue