From 2fc2651226baac27029e38c9d6ef883fa32084db Mon Sep 17 00:00:00 2001 From: Steve Block Date: Wed, 18 May 2011 13:36:51 +0100 Subject: Merge WebKit at r78450: Initial merge by git. Change-Id: I6d3e5f1f868ec266a0aafdef66182ddc3f265dc1 --- .../InjectedBundle/InjectedBundlePageUIClient.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp') diff --git a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp index 56e4434..7bb4f89 100644 --- a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp +++ b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp @@ -23,10 +23,12 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ +#include "config.h" #include "InjectedBundlePageUIClient.h" #include "InjectedBundleHitTestResult.h" #include "WKAPICast.h" +#include "WebGraphicsContext.h" #include "WKBundleAPICast.h" #include @@ -78,8 +80,23 @@ void InjectedBundlePageUIClient::mouseDidMoveOverElement(WebPage* page, const Hi void InjectedBundlePageUIClient::pageDidScroll(WebPage* page) { - if (m_client.pageDidScroll) - m_client.pageDidScroll(toAPI(page), m_client.clientInfo); + if (!m_client.pageDidScroll) + return; + + m_client.pageDidScroll(toAPI(page), m_client.clientInfo); +} + +bool InjectedBundlePageUIClient::shouldPaintCustomOverhangArea() +{ + return m_client.paintCustomOverhangArea; +} + +void InjectedBundlePageUIClient::paintCustomOverhangArea(WebPage* page, GraphicsContext* graphicsContext, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect) +{ + ASSERT(shouldPaintCustomOverhangArea()); + + RefPtr context = WebGraphicsContext::create(graphicsContext); + m_client.paintCustomOverhangArea(toAPI(page), toAPI(context.get()), toAPI(horizontalOverhangArea), toAPI(verticalOverhangArea), toAPI(dirtyRect), m_client.clientInfo); } } // namespace WebKit -- cgit v1.1