[Webkit-unassigned] [Bug 47202] Adding C API for dealing with viewport meta info

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 5 14:59:33 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=47202





--- Comment #4 from Adam Roben (aroben) <aroben at apple.com>  2010-10-05 14:59:32 PST ---
(In reply to comment #1)
> Example API:
> 
> // Call to set the initial viewport (before first load) and every time the visible area changes in your app - ie. when you rotate your phone.
> 
> WK_EXPORT ViewportAttributesRef WKPageComputeViewportAttributes(WKPageRef page, int visibleWidth, int visibleHeight, int desktopWidth, int deviceWidth, int deviceHeight, int deviceDPI);

ViewportAttributesRef should be prefixed with "WK": WKViewportAttributesRef.

The WebKit2 C API currently follows CoreFoundation's conventions regarding ref-counted types:
1) Types ending in "Ref" are assumed to be ref-counted using WKRetain/WKRelease
2) Functions that return ref-counted types should either have "Get", "Create", or "Copy" in their name

(2) is important so that the caller knows whether they need to call WKRelease on the returned pointer. You have to call WKRelease for Create- or Copy-style functions, but not for Get-style functions.

I'll leave the other issues to Sam and Anders.

-- 
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