[Qt] Remove unused code path in PluginView
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Aug 2013 14:23:02 +0000 (14:23 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Aug 2013 14:23:02 +0000 (14:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=113173

Patch by Jae Hyun Park <jae.park@company100.net> on 2013-08-21
Reviewed by Anders Carlsson.

m_platformLayer in PluginView has been removed in r121710, but there are
still some leftover code path related to m_platformLayer. This patch
removes unused code path.

No new tests, removing unused code paths.

* plugins/PluginView.h:
(PluginView):
* plugins/qt/PluginViewQt.cpp:
(WebCore::PluginView::updatePluginWidget):
(WebCore::PluginView::paint):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154385 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/plugins/PluginView.h
Source/WebCore/plugins/qt/PluginViewQt.cpp

index 1b950ec7f2c7a2b77362711935d7bd34e542a6ca..18fef6b4773f6894b40386dd188e7a6fc2ec64d0 100644 (file)
@@ -1,3 +1,22 @@
+2013-08-21  Jae Hyun Park  <jae.park@company100.net>
+
+        [Qt] Remove unused code path in PluginView
+        https://bugs.webkit.org/show_bug.cgi?id=113173
+
+        Reviewed by Anders Carlsson.
+
+        m_platformLayer in PluginView has been removed in r121710, but there are
+        still some leftover code path related to m_platformLayer. This patch
+        removes unused code path.
+
+        No new tests, removing unused code paths.
+
+        * plugins/PluginView.h:
+        (PluginView):
+        * plugins/qt/PluginViewQt.cpp:
+        (WebCore::PluginView::updatePluginWidget):
+        (WebCore::PluginView::paint):
+
 2013-08-21  Allan Sandfeld Jensen  <allan.jensen@digia.com>
 
         Font’s fast code path doesn’t handle partial runs correctly when kerning or ligatures are enabled 
index a81bd0ad49e200a0ce2418cb36c998480019797f..39c0aa2ff055e9db0aa68e4a7a2723782179db57 100644 (file)
@@ -63,11 +63,6 @@ QT_BEGIN_NAMESPACE
 class QPainter;
 QT_END_NAMESPACE
 #endif
-#if PLATFORM(QT) && USE(ACCELERATED_COMPOSITING) && ENABLE(NETSCAPE_PLUGIN_API) && defined(XP_UNIX)
-#ifndef WTF_USE_ACCELERATED_COMPOSITING_PLUGIN_LAYER
-#define WTF_USE_ACCELERATED_COMPOSITING_PLUGIN_LAYER 1
-#endif
-#endif
 #if PLATFORM(GTK)
 typedef struct _GtkSocket GtkSocket;
 #endif
@@ -249,15 +244,6 @@ namespace WebCore {
 #endif
         void keepAlive();
 
-#if USE(ACCELERATED_COMPOSITING)
-#if USE(ACCELERATED_COMPOSITING_PLUGIN_LAYER)
-        virtual PlatformLayer* platformLayer() const;
-        bool shouldUseAcceleratedCompositing() const;
-#else
-        virtual PlatformLayer* platformLayer() const { return 0; }
-#endif
-#endif
-
 #if PLATFORM(QT) && ENABLE(NETSCAPE_PLUGIN_API) && defined(XP_UNIX)
         // PluginViewQt (X11) needs a few workarounds when running under DRT
         static void setIsRunningUnderDRT(bool flag) { s_isRunningUnderDRT = flag; }
@@ -424,10 +410,6 @@ private:
         void paintUsingXPixmap(QPainter* painter, const QRect &exposedRect);
         QWebPageClient* platformPageClient() const;
 #endif
-#if USE(ACCELERATED_COMPOSITING_PLUGIN_LAYER)
-        OwnPtr<PlatformLayer> m_platformLayer;
-        friend class PluginGraphicsLayerQt;
-#endif // USE(ACCELERATED_COMPOSITING_PLUGIN_LAYER)
 #endif // PLATFORM(QT)
 
 #if PLATFORM(GTK)
index b2036cbd95e4f727c3b3179607e32ba4fe2cb9ab..35143564990cf4a8745d6f396bed2ef0fa89da33 100644 (file)
@@ -169,14 +169,7 @@ void PluginView::updatePluginWidget()
         || (s_isRunningUnderDRT && platformPluginWidget() && (m_windowRect != oldWindowRect || m_clipRect != oldClipRect)))
         setNPWindowIfNeeded();
 
-    if (!m_platformLayer) {
-        // Make sure we get repainted afterwards. This is necessary for downward
-        // scrolling to move the plugin widget properly.
-        // Note that we don't invalidate the frameRect() here. This is because QWebFrame::renderRelativeCoords()
-        // imitates ScrollView and adds the scroll offset back on to the rect we damage here (making the co-ordinates absolute
-        // to the frame again) before passing it to FrameView.
-        invalidate();
-    }
+    invalidate();
 }
 
 void PluginView::setFocus(bool focused)
@@ -241,11 +234,6 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
     if (m_isWindowed)
         return;
 
-#if USE(ACCELERATED_COMPOSITING)
-    if (m_platformLayer)
-        return;
-#endif
-
     if (!m_drawable)
         return;
 
@@ -808,11 +796,4 @@ void PluginView::platformDestroy()
         XFreeColormap(x11Display(), m_colormap);
 }
 
-#if USE(ACCELERATED_COMPOSITING)
-PlatformLayer* PluginView::platformLayer() const
-{
-    return m_platformLayer.get();
-}
-#endif
-
 } // namespace WebCore