Bug 84913 - WebKit 1: Initialize deviceScaleFactor on creation of the WebView
Summary: WebKit 1: Initialize deviceScaleFactor on creation of the WebView
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Beth Dakin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-04-25 17:33 PDT by Beth Dakin
Modified: 2012-04-25 18:11 PDT (History)
2 users (show)

See Also:


Attachments
Patch (1.37 KB, patch)
2012-04-25 17:37 PDT, Beth Dakin
darin: review+
Details | Formatted Diff | Diff
Patch that uses hostWindow instead (2.18 KB, patch)
2012-04-25 18:00 PDT, Beth Dakin
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Beth Dakin 2012-04-25 17:33:57 PDT
The change should be adopted for WebKit 1 as well: http://trac.webkit.org/changeset/107017

Without this, deviceScaleFactor will not be initialized until viewDidMoveToWindow, which is quite late for a background tab.

<rdar://problem/11322716>

Patch forthcoming.
Comment 1 Beth Dakin 2012-04-25 17:37:19 PDT
Created attachment 138907 [details]
Patch
Comment 2 Darin Adler 2012-04-25 17:43:02 PDT
Comment on attachment 138907 [details]
Patch

OK
Comment 3 Darin Adler 2012-04-25 17:43:44 PDT
One difference with WebKit1 is that we have the “host window” concept. The host window should be set quite early for a background tab. I’d think we could change things so that a WebView that gets a host window could set its scale factor appropriately based on the host window.
Comment 4 Beth Dakin 2012-04-25 18:00:51 PDT
Created attachment 138913 [details]
Patch that uses hostWindow instead
Comment 5 Darin Adler 2012-04-25 18:05:22 PDT
Comment on attachment 138913 [details]
Patch that uses hostWindow instead

This looks good. But for applications that don’t use a host window, I think we want the union of your previous patch and this one. I think we need both!
Comment 6 Beth Dakin 2012-04-25 18:11:06 PDT
Committed both: http://trac.webkit.org/changeset/115271