summaryrefslogtreecommitdiffstats
path: root/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-18 13:36:51 +0100
committerSteve Block <steveblock@google.com>2011-05-24 15:38:28 +0100
commit2fc2651226baac27029e38c9d6ef883fa32084db (patch)
treee396d4bf89dcce6ed02071be66212495b1df1dec /Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp
parentb3725cedeb43722b3b175aaeff70552e562d2c94 (diff)
downloadexternal_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.zip
external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.gz
external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.bz2
Merge WebKit at r78450: Initial merge by git.
Change-Id: I6d3e5f1f868ec266a0aafdef66182ddc3f265dc1
Diffstat (limited to 'Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp')
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp21
1 files changed, 19 insertions, 2 deletions
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 <wtf/text/WTFString.h>
@@ -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<WebGraphicsContext> context = WebGraphicsContext::create(graphicsContext);
+ m_client.paintCustomOverhangArea(toAPI(page), toAPI(context.get()), toAPI(horizontalOverhangArea), toAPI(verticalOverhangArea), toAPI(dirtyRect), m_client.clientInfo);
}
} // namespace WebKit