[Webkit-unassigned] [Bug 47202] New: Adding C API for dealing with viewport meta info
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Oct 5 12:47:44 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=47202
Summary: Adding C API for dealing with viewport meta info
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: All
Status: NEW
Severity: Normal
Priority: P3
Component: WebKit2
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: kenneth at webkit.org
CC: andersca at apple.com, sam at webkit.org, aroben at apple.com,
luiz at webkit.org
I'm looking into exposing the viewport meta tag info to WebKit2 and we need to discuss now such an API should look like
How does it work:
1. The user should be notified when the current viewport data gets invalidated so that it can be recomputed.
Currently we have a ChromeClient::dispatchDidChangeViewportData which can be used for that, which is called when the meta info changes (if check for change when new meta data is received and when the body is inserted into the document in case no viewport meta tag was encountered).
2. page->viewportArguments() can be used to get the current web author provided arguments.
The things is that the raw data provided by the web author needs to be treated to be useful for a browser. There is now a method in webcore for that which needs data such as the actual visible view (think the iphone minus ui components), plus the global device specifics such as device height.
An idea for a C API:
1. add a callback to the UI client, much like ViewportAttributesInvalidated or so.
2. add something like the below for calculating the viewport (maximum scale, minimum-scale, viewport layout width, etc)
WK_EXPORT ... WKPageComputeViewportAttributes(WKPageRef page, int visibleWidth, int visibleHeight, int desktopWidth, int deviceWidth, int deviceHeight, int deviceDPI);
I wonder if it makes sense returning just a struct or make a new C type, WKViewportAttributesRef with methods such as WKViewportAttributesGetMaximumScale() etc.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list