Bug 97215 - [Qt] Make sure that desktop pages honour the devicePixelRatio
Summary: [Qt] Make sure that desktop pages honour the devicePixelRatio
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jocelyn Turcotte
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-20 08:04 PDT by Jocelyn Turcotte
Modified: 2012-09-25 08:49 PDT (History)
2 users (show)

See Also:


Attachments
Patch (2.08 KB, patch)
2012-09-20 08:14 PDT, Jocelyn Turcotte
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jocelyn Turcotte 2012-09-20 08:04:13 PDT
[Qt] Make sure that desktop pages honour the devicePixelRatio
Comment 1 Jocelyn Turcotte 2012-09-20 08:14:29 PDT
Created attachment 164921 [details]
Patch
Comment 2 Kenneth Rohde Christiansen 2012-09-20 23:33:13 PDT
Comment on attachment 164921 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=164921&action=review

> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:943
> +    int minimumLayoutFallbackWidth = std::max(settings->layoutFallbackWidth(), int(m_viewportSize.width() / m_page->deviceScaleFactor()));

so maybe ceil or lrint would make more sense?
Comment 3 Jocelyn Turcotte 2012-09-21 03:43:06 PDT
(In reply to comment #2)
> (From update of attachment 164921 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=164921&action=review
> 
> > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:943
> > +    int minimumLayoutFallbackWidth = std::max(settings->layoutFallbackWidth(), int(m_viewportSize.width() / m_page->deviceScaleFactor()));
> 
> so maybe ceil or lrint would make more sense?

Humm can't say, overall this is the desktop equivalent of the conversion to int did in WebPage::sendViewportAttributesChanged:
setResizesToContentsUsingLayoutSize(IntSize(static_cast<int>(attr.layoutSize.width()), static_cast<int>(attr.layoutSize.height())));

So if we change one we should change the other. Overall this can mean a difference of 1 pixel to the layout size, which could give a 1.501 scale instead of 1.502, nothing noticeable by the user.
Comment 4 WebKit Review Bot 2012-09-25 08:49:56 PDT
Comment on attachment 164921 [details]
Patch

Clearing flags on attachment: 164921

Committed r129514: <http://trac.webkit.org/changeset/129514>
Comment 5 WebKit Review Bot 2012-09-25 08:49:59 PDT
All reviewed patches have been landed.  Closing bug.