Skip to content
Permalink
Browse files
Source/WebKit2: WebKit2: didNewFirstVisuallyNonEmptyLayout should be …
…sent to injected bundle

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

Tell the injected bundle about didNewFirstVisuallyNonEmptyLayout (we currently
just tell the UI process).

Reviewed by Beth Dakin.

* WebProcess/InjectedBundle/API/c/WKBundlePage.h: Add didNewFirstVisuallyNonEmptyLayout to version 1.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::didNewFirstVisuallyNonEmptyLayout): Call through to the
    client.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
(InjectedBundlePageLoaderClient):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidNewFirstVisuallyNonEmptyLayout): Tell the injected
    bundle.

Tools: WebKit2: didNewFirstVisuallyNonEmptyLayout should be sent to injected bundle
https://bugs.webkit.org/show_bug.cgi?id=79849

Reviewed by Beth Dakin.

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::InjectedBundlePage): Add an entry to the struct.

Canonical link: https://commits.webkit.org/97030@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Brian Weinstein committed Feb 29, 2012
1 parent 4efd1ba commit b5588cd75eaa0a749ab5a6293971f02032b68ca6
@@ -1,3 +1,23 @@
2012-02-28 Brian Weinstein <bweinstein@apple.com>

WebKit2: didNewFirstVisuallyNonEmptyLayout should be sent to injected bundle
https://bugs.webkit.org/show_bug.cgi?id=79849

Tell the injected bundle about didNewFirstVisuallyNonEmptyLayout (we currently
just tell the UI process).

Reviewed by Beth Dakin.

* WebProcess/InjectedBundle/API/c/WKBundlePage.h: Add didNewFirstVisuallyNonEmptyLayout to version 1.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::didNewFirstVisuallyNonEmptyLayout): Call through to the
client.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
(InjectedBundlePageLoaderClient):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidNewFirstVisuallyNonEmptyLayout): Tell the injected
bundle.

2012-02-29 Tim Horton <timothy_horton@apple.com>

Make use of CG rounded-rect primitives
@@ -95,6 +95,7 @@ typedef void (*WKBundlePageDidRunInsecureContentForFrameCallback)(WKBundlePageRe
typedef void (*WKBundlePageDidDetectXSSForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
typedef void (*WKBundlePageDidFirstLayoutForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
typedef void (*WKBundlePageDidFirstVisuallyNonEmptyLayoutForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
typedef void (*WKBundlePageDidNewFirstVisuallyNonEmptyLayoutCallback)(WKBundlePageRef page, WKTypeRef* userData, const void *clientInfo);
typedef void (*WKBundlePageDidLayoutForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void* clientInfo);
typedef void (*WKBundlePageDidClearWindowObjectForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKBundleScriptWorldRef world, const void *clientInfo);
typedef void (*WKBundlePageDidCancelClientRedirectForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);
@@ -127,6 +128,7 @@ struct WKBundlePageLoaderClient {

// Version 1.
WKBundlePageDidLayoutForFrameCallback didLayoutForFrame;
WKBundlePageDidNewFirstVisuallyNonEmptyLayoutCallback didNewFirstVisuallyNonEmptyLayout;
WKBundlePageDidDetectXSSForFrameCallback didDetectXSSForFrame;
};
typedef struct WKBundlePageLoaderClient WKBundlePageLoaderClient;
@@ -186,7 +186,6 @@ void InjectedBundlePageLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame(WebP
userData = adoptRef(toImpl(userDataToPass));
}


void InjectedBundlePageLoaderClient::didLayoutForFrame(WebPage* page, WebFrame* frame)
{
if (!m_client.didLayoutForFrame)
@@ -195,6 +194,16 @@ void InjectedBundlePageLoaderClient::didLayoutForFrame(WebPage* page, WebFrame*
m_client.didLayoutForFrame(toAPI(page), toAPI(frame), m_client.clientInfo);
}

void InjectedBundlePageLoaderClient::didNewFirstVisuallyNonEmptyLayout(WebPage* page, RefPtr<APIObject>& userData)
{
if (!m_client.didNewFirstVisuallyNonEmptyLayout)
return;

WKTypeRef userDataToPass = 0;
m_client.didNewFirstVisuallyNonEmptyLayout(toAPI(page), &userDataToPass, m_client.clientInfo);
userData = adoptRef(toImpl(userDataToPass));
}

void InjectedBundlePageLoaderClient::didClearWindowObjectForFrame(WebPage* page, WebFrame* frame, DOMWrapperWorld* world)
{
if (!m_client.didClearWindowObjectForFrame)
@@ -64,6 +64,7 @@ class InjectedBundlePageLoaderClient : public APIClient<WKBundlePageLoaderClient
void didFirstLayoutForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
void didFirstVisuallyNonEmptyLayoutForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
void didLayoutForFrame(WebPage*, WebFrame*);
void didNewFirstVisuallyNonEmptyLayout(WebPage*, WTF::RefPtr<APIObject>& userData);

void didClearWindowObjectForFrame(WebPage*, WebFrame*, WebCore::DOMWrapperWorld*);
void didCancelClientRedirectForFrame(WebPage*, WebFrame*);
@@ -564,6 +564,9 @@ void WebFrameLoaderClient::dispatchDidNewFirstVisuallyNonEmptyLayout()

RefPtr<APIObject> userData;

// Notify the bundle client.
webPage->injectedBundleLoaderClient().didNewFirstVisuallyNonEmptyLayout(webPage, userData);

// Notify the UIProcess.
webPage->send(Messages::WebPageProxy::DidNewFirstVisuallyNonEmptyLayout(InjectedBundleUserMessageEncoder(userData.get())));
}
@@ -1,3 +1,13 @@
2012-02-28 Brian Weinstein <bweinstein@apple.com>

WebKit2: didNewFirstVisuallyNonEmptyLayout should be sent to injected bundle
https://bugs.webkit.org/show_bug.cgi?id=79849

Reviewed by Beth Dakin.

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::InjectedBundlePage): Add an entry to the struct.

2012-02-29 Lucas Forschler <lforschler@apple.com>

Removed unused Apple buildslaves from the master configuration
@@ -215,6 +215,7 @@ InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
willPerformClientRedirectForFrame,
didHandleOnloadEventsForFrame,
0, // didLayoutForFrame
0, // didNewFirstVisuallyNonEmptyLayoutForFrame
didDetectXSSForFrame,
};
WKBundlePageSetPageLoaderClient(m_page, &loaderClient);

0 comments on commit b5588cd

Please sign in to comment.