From ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Mon, 16 May 2011 16:25:10 +0100 Subject: Merge WebKit at r76408: Initial merge by git. Change-Id: I5b91decbd693ccbf5c1b8354b37cd68cc9a1ea53 --- Source/WebKit2/UIProcess/WebUIClient.cpp | 55 +++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) (limited to 'Source/WebKit2/UIProcess/WebUIClient.cpp') diff --git a/Source/WebKit2/UIProcess/WebUIClient.cpp b/Source/WebKit2/UIProcess/WebUIClient.cpp index e95af34..9f2c7ab 100644 --- a/Source/WebKit2/UIProcess/WebUIClient.cpp +++ b/Source/WebKit2/UIProcess/WebUIClient.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Apple Inc. All rights reserved. + * Copyright (C) 2010, 2011 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -273,4 +273,57 @@ bool WebUIClient::decidePolicyForGeolocationPermissionRequest(WebPageProxy* page return true; } +float WebUIClient::headerHeight(WebPageProxy* page, WebFrameProxy* frame) +{ + if (!m_client.headerHeight) + return 0; + + return m_client.headerHeight(toAPI(page), toAPI(frame), m_client.clientInfo); +} + +float WebUIClient::footerHeight(WebPageProxy* page, WebFrameProxy* frame) +{ + if (!m_client.footerHeight) + return 0; + + return m_client.footerHeight(toAPI(page), toAPI(frame), m_client.clientInfo); +} + +void WebUIClient::drawHeader(WebPageProxy* page, WebFrameProxy* frame, const WebCore::FloatRect& rect) +{ + if (!m_client.drawHeader) + return; + + m_client.drawHeader(toAPI(page), toAPI(frame), toAPI(rect), m_client.clientInfo); +} + +void WebUIClient::drawFooter(WebPageProxy* page, WebFrameProxy* frame, const WebCore::FloatRect& rect) +{ + if (!m_client.drawFooter) + return; + + m_client.drawFooter(toAPI(page), toAPI(frame), toAPI(rect), m_client.clientInfo); +} + +void WebUIClient::printFrame(WebPageProxy* page, WebFrameProxy* frame) +{ + if (!m_client.printFrame) + return; + + m_client.printFrame(toAPI(page), toAPI(frame), m_client.clientInfo); +} + +bool WebUIClient::canRunModal() const +{ + return m_client.runModal; +} + +void WebUIClient::runModal(WebPageProxy* page) +{ + if (!m_client.runModal) + return; + + m_client.runModal(toAPI(page), m_client.clientInfo); +} + } // namespace WebKit -- cgit v1.1