summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/src/WebContentLayerImpl.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-08-21 10:57:44 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-08-21 10:57:44 +0200
commit5ef7c8a6a70875d4430752d146bdcb069605d71d (patch)
treef6256640b6c46d7da221435803cae65326817ba2 /Source/WebKit/chromium/src/WebContentLayerImpl.cpp
parentdecad929f578d8db641febc8740649ca6c574638 (diff)
downloadqtwebkit-5ef7c8a6a70875d4430752d146bdcb069605d71d.tar.gz
Imported WebKit commit 356d83016b090995d08ad568f2d2c243aa55e831 (http://svn.webkit.org/repository/webkit/trunk@126147)
New snapshot including various build fixes for newer Qt 5
Diffstat (limited to 'Source/WebKit/chromium/src/WebContentLayerImpl.cpp')
-rw-r--r--Source/WebKit/chromium/src/WebContentLayerImpl.cpp47
1 files changed, 38 insertions, 9 deletions
diff --git a/Source/WebKit/chromium/src/WebContentLayerImpl.cpp b/Source/WebKit/chromium/src/WebContentLayerImpl.cpp
index 69da1ea3f..fa21e8974 100644
--- a/Source/WebKit/chromium/src/WebContentLayerImpl.cpp
+++ b/Source/WebKit/chromium/src/WebContentLayerImpl.cpp
@@ -26,37 +26,66 @@
#include "config.h"
#include "WebContentLayerImpl.h"
+#include "SkMatrix44.h"
#include <public/WebContentLayerClient.h>
+#include <public/WebFloatPoint.h>
#include <public/WebFloatRect.h>
#include <public/WebRect.h>
+#include <public/WebSize.h>
using namespace WebCore;
namespace WebKit {
-PassRefPtr<WebContentLayerImpl> WebContentLayerImpl::create(WebContentLayerClient* contentClient)
+WebContentLayer* WebContentLayer::create(WebContentLayerClient* client)
{
- return adoptRef(new WebContentLayerImpl(contentClient));
+ return new WebContentLayerImpl(client);
}
-WebContentLayerImpl::WebContentLayerImpl(WebContentLayerClient* contentClient)
- : ContentLayerChromium(this)
- , m_contentClient(contentClient)
+WebContentLayerImpl::WebContentLayerImpl(WebContentLayerClient* client)
+ : m_webLayerImpl(adoptPtr(new WebLayerImpl(ContentLayerChromium::create(this))))
+ , m_client(client)
{
- setIsDrawable(true);
+ m_webLayerImpl->layer()->setIsDrawable(true);
}
WebContentLayerImpl::~WebContentLayerImpl()
{
- clearDelegate();
+ static_cast<ContentLayerChromium*>(m_webLayerImpl->layer())->clearDelegate();
}
+WebLayer* WebContentLayerImpl::layer()
+{
+ return m_webLayerImpl.get();
+}
+
+void WebContentLayerImpl::setDoubleSided(bool doubleSided)
+{
+ m_webLayerImpl->layer()->setDoubleSided(doubleSided);
+}
+
+void WebContentLayerImpl::setContentsScale(float scale)
+{
+ m_webLayerImpl->layer()->setContentsScale(scale);
+}
+
+void WebContentLayerImpl::setUseLCDText(bool enable)
+{
+ m_webLayerImpl->layer()->setUseLCDText(enable);
+}
+
+void WebContentLayerImpl::setDrawCheckerboardForMissingTiles(bool enable)
+{
+ m_webLayerImpl->layer()->setDrawCheckerboardForMissingTiles(enable);
+}
+
+
void WebContentLayerImpl::paintContents(SkCanvas* canvas, const IntRect& clip, FloatRect& opaque)
{
- if (!m_contentClient)
+ if (!m_client)
return;
WebFloatRect webOpaque;
- m_contentClient->paintContents(canvas, WebRect(clip), webOpaque);
+ m_client->paintContents(canvas, WebRect(clip), webOpaque);
opaque = webOpaque;
}