[Webkit-unassigned] [Bug 124326] Web Inspector: implement Page.captureScreenshot in the backend

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 14 10:41:05 PST 2013


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





--- Comment #4 from Timothy Hatcher <timothy at apple.com>  2013-11-14 10:39:44 PST ---
(From update of attachment 216946)
View in context: https://bugs.webkit.org/attachment.cgi?id=216946&action=review

> Source/WebCore/inspector/InspectorClient.h:91
> +    virtual bool captureScreenshot(int /*x*/, int /*y*/, int /*width*/, int /*height*/, bool /*usePageCoordinates*/, String* /*outData*/)

We usually just drop the names if they are not used.

> Source/WebCore/inspector/protocol/Page.json:348
>              "name": "captureScreenshot",
>              "description": "Capture page screenshot.",

I wonder if we should rename this to something better? We don't aren't compatible with Chrome's now that we have parameters.

> Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm:202
> +bool WebInspectorClient::captureScreenshot(int x, int y, int width, int height, bool usePageCoordinates, String* outData)

We will need to add this to Windows as well. Can you look at that or file a bug?

> Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm:208
> +    DEFINE_STATIC_LOCAL(String, pngMimeType, (ASCIILiteral("image/png")));

I don't think using a static local for this helps much. Just pass the ASCIILiteral to toDataURL.

> Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp:97
> +    DEFINE_STATIC_LOCAL(String, pngMimeType, (ASCIILiteral("image/png")));

Ditto.

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