summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/src/WebPluginContainerImpl.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/WebPluginContainerImpl.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/WebPluginContainerImpl.cpp')
-rw-r--r--Source/WebKit/chromium/src/WebPluginContainerImpl.cpp41
1 files changed, 20 insertions, 21 deletions
diff --git a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
index 71361780b..75a97e0f6 100644
--- a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
+++ b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
@@ -366,11 +366,11 @@ void WebPluginContainerImpl::setBackingTextureId(unsigned textureId)
if (m_textureId == textureId)
return;
- ASSERT(m_ioSurfaceLayer.isNull());
+ ASSERT(!m_ioSurfaceLayer);
- if (m_textureLayer.isNull())
- m_textureLayer = WebExternalTextureLayer::create();
- m_textureLayer.setTextureId(textureId);
+ if (!m_textureLayer)
+ m_textureLayer = adoptPtr(WebExternalTextureLayer::create());
+ m_textureLayer->setTextureId(textureId);
// If anyone of the IDs is zero we need to switch between hardware
// and software compositing. This is done by triggering a style recalc
@@ -390,11 +390,11 @@ void WebPluginContainerImpl::setBackingIOSurfaceId(int width,
if (ioSurfaceId == m_ioSurfaceId)
return;
- ASSERT(m_textureLayer.isNull());
+ ASSERT(!m_textureLayer);
- if (m_ioSurfaceLayer.isNull())
- m_ioSurfaceLayer = WebIOSurfaceLayer::create();
- m_ioSurfaceLayer.setIOSurfaceProperties(ioSurfaceId, WebSize(width, height));
+ if (!m_ioSurfaceLayer)
+ m_ioSurfaceLayer = adoptPtr(WebIOSurfaceLayer::create());
+ m_ioSurfaceLayer->setIOSurfaceProperties(ioSurfaceId, WebSize(width, height));
// If anyone of the IDs is zero we need to switch between hardware
// and software compositing. This is done by triggering a style recalc
@@ -409,11 +409,11 @@ void WebPluginContainerImpl::setBackingIOSurfaceId(int width,
void WebPluginContainerImpl::commitBackingTexture()
{
#if USE(ACCELERATED_COMPOSITING)
- if (!m_textureLayer.isNull())
- m_textureLayer.invalidate();
+ if (m_textureLayer)
+ m_textureLayer->layer()->invalidate();
- if (!m_ioSurfaceLayer.isNull())
- m_ioSurfaceLayer.invalidate();
+ if (m_ioSurfaceLayer)
+ m_ioSurfaceLayer->layer()->invalidate();
#endif
}
@@ -480,11 +480,11 @@ void WebPluginContainerImpl::zoomLevelChanged(double zoomLevel)
void WebPluginContainerImpl::setOpaque(bool opaque)
{
#if USE(ACCELERATED_COMPOSITING)
- if (!m_textureLayer.isNull())
- m_textureLayer.setOpaque(opaque);
+ if (m_textureLayer)
+ m_textureLayer->layer()->setOpaque(opaque);
- if (!m_ioSurfaceLayer.isNull())
- m_ioSurfaceLayer.setOpaque(opaque);
+ if (m_ioSurfaceLayer)
+ m_ioSurfaceLayer->layer()->setOpaque(opaque);
#endif
}
@@ -512,10 +512,9 @@ void WebPluginContainerImpl::setIsAcceptingTouchEvents(bool acceptingTouchEvents
if (m_isAcceptingTouchEvents == acceptingTouchEvents)
return;
m_isAcceptingTouchEvents = acceptingTouchEvents;
- if (m_isAcceptingTouchEvents) {
+ if (m_isAcceptingTouchEvents)
m_element->document()->didAddTouchEventHandler();
- m_element->document()->addListenerType(Document::TOUCH_LISTENER);
- } else
+ else
m_element->document()->didRemoveTouchEventHandler();
}
@@ -576,9 +575,9 @@ void WebPluginContainerImpl::willDestroyPluginLoadObserver(WebPluginLoadObserver
WebLayer* WebPluginContainerImpl::platformLayer() const
{
if (m_textureId)
- return const_cast<WebExternalTextureLayer*>(&m_textureLayer);
+ return m_textureLayer->layer();
if (m_ioSurfaceId)
- return const_cast<WebIOSurfaceLayer*>(&m_ioSurfaceLayer);
+ return m_ioSurfaceLayer->layer();
return 0;
}
#endif