Bug 176889

Summary: Add WKUIDelegatePrivate equivalent of WKPageUIClient's drawHeader, drawFooter, headerHeight, and footerHeight
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, berto, buildbot, cgarcia, gustavo, mcatanzaro, ryanhaddad, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Alex Christensen 2017-09-13 23:06:41 PDT
Add WKUIDelegatePrivate equivalent of WKPageUIClient's drawHeader, drawFooter, headerHeight, and footerHeight
Comment 1 Alex Christensen 2017-09-13 23:13:25 PDT
Created attachment 320729 [details]
Patch
Comment 2 Alex Christensen 2017-09-14 00:01:43 PDT
Created attachment 320737 [details]
Patch
Comment 3 Build Bot 2017-09-14 00:03:34 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 4 Andy Estes 2017-09-14 10:43:05 PDT
Comment on attachment 320737 [details]
Patch

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

> Source/WebKit/UIProcess/WebFrameProxy.cpp:79
> +void WebFrameProxy::loadURL(const WebCore::URL& url)

There's a "using namespace WebCore" at the top of this file, so you don't need to specify "WebCore::" here.

> Source/WebKit/UIProcess/WebPageProxy.cpp:964
> +void WebPageProxy::loadAlternateHTMLString(const String& htmlString, const WebCore::URL& baseURL, const WebCore::URL& unreachableURL, API::Object* userData)

Ditto.

> Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp:2495
> +    getPage(webView).loadAlternateHTMLString(String::fromUTF8(content), WebCore::URL(WebCore::URL(), String::fromUTF8(baseURI)), WebCore::URL(WebCore::URL(), String::fromUTF8(contentURI)));

Ditto.
Comment 5 Alex Christensen 2017-09-14 10:53:47 PDT
Created attachment 320790 [details]
Patch
Comment 6 Alex Christensen 2017-09-14 10:55:34 PDT
http://trac.webkit.org/r222033
Comment 7 Ryan Haddad 2017-09-14 12:31:48 PDT
API test WebKit.PrintFrame is timing out after this change:
https://build.webkit.org/builders/Apple%20El%20Capitan%20Release%20WK2%20%28Tests%29/builds/4465
Comment 8 Ryan Haddad 2017-09-14 13:12:10 PDT
Reverted r222033 for reason:

This change caused API test WebKit.PrintFrame to time out.

Committed r222047: <http://trac.webkit.org/changeset/222047>
Comment 9 Alex Christensen 2017-09-14 16:36:00 PDT
Created attachment 320844 [details]
Patch
Comment 10 Alex Christensen 2017-09-14 16:38:54 PDT
So it turns out the exact call order and number to these delegate callbacks are not the same on all mac platforms.  I modified the test to verify that each delegate is called at least once, and I check the values as before.

http://trac.webkit.org/r222059
Comment 11 Radar WebKit Bug Importer 2017-09-27 12:59:38 PDT
<rdar://problem/34694441>