Title: [158712] trunk/Source/WebCore
Revision
158712
Author
[email protected]
Date
2013-11-05 19:36:32 -0800 (Tue, 05 Nov 2013)

Log Message

Move some plugin-specific code from RenderWidget to RenderEmbeddedObject.
<https://webkit.org/b/123845>

All RenderWidgets representing plugins will be RenderEmbeddedObjects.
Move some of the plugin-specific logic to RenderEmbeddedObject since it
doesn't make sense for all RenderWidgets (frames, embedded documents)
to care about this.

Reviewed by Anders Carlsson.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (158711 => 158712)


--- trunk/Source/WebCore/ChangeLog	2013-11-06 02:48:49 UTC (rev 158711)
+++ trunk/Source/WebCore/ChangeLog	2013-11-06 03:36:32 UTC (rev 158712)
@@ -1,3 +1,15 @@
+2013-11-05  Andreas Kling  <[email protected]>
+
+        Move some plugin-specific code from RenderWidget to RenderEmbeddedObject.
+        <https://webkit.org/b/123845>
+
+        All RenderWidgets representing plugins will be RenderEmbeddedObjects.
+        Move some of the plugin-specific logic to RenderEmbeddedObject since it
+        doesn't make sense for all RenderWidgets (frames, embedded documents)
+        to care about this.
+
+        Reviewed by Anders Carlsson.
+
 2013-11-05  Tim Horton  <[email protected]>
 
         Fix the 32-bit build.

Modified: trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp (158711 => 158712)


--- trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp	2013-11-06 02:48:49 UTC (rev 158711)
+++ trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp	2013-11-06 03:36:32 UTC (rev 158712)
@@ -630,6 +630,10 @@
         cursor = handCursor();
         return SetCursor;
     }
+    if (widget() && widget()->isPluginViewBase()) {
+        // A plug-in is responsible for setting the cursor when the pointer is over it.
+        return DoNotSetCursor;
+    }
     return RenderWidget::getCursor(point, cursor);
 }
 

Modified: trunk/Source/WebCore/rendering/RenderWidget.cpp (158711 => 158712)


--- trunk/Source/WebCore/rendering/RenderWidget.cpp	2013-11-06 02:48:49 UTC (rev 158711)
+++ trunk/Source/WebCore/rendering/RenderWidget.cpp	2013-11-06 03:36:32 UTC (rev 158712)
@@ -24,13 +24,9 @@
 #include "RenderWidget.h"
 
 #include "AXObjectCache.h"
-#include "AnimationController.h"
 #include "Frame.h"
-#include "GraphicsContext.h"
 #include "HTMLFrameOwnerElement.h"
 #include "HitTestResult.h"
-#include "PluginViewBase.h"
-#include "RenderCounter.h"
 #include "RenderLayer.h"
 #include "RenderView.h"
 #include <wtf/StackStats.h>
@@ -387,16 +383,6 @@
     return inside;
 }
 
-CursorDirective RenderWidget::getCursor(const LayoutPoint& point, Cursor& cursor) const
-{
-    if (widget() && widget()->isPluginViewBase()) {
-        // A plug-in is responsible for setting the cursor when the pointer is over it.
-        return DoNotSetCursor;
-    }
-    return RenderReplaced::getCursor(point, cursor);
-}
-
-
 #if USE(ACCELERATED_COMPOSITING)
 bool RenderWidget::requiresLayer() const
 {
@@ -405,13 +391,7 @@
 
 bool RenderWidget::requiresAcceleratedCompositing() const
 {
-    // There are two general cases in which we can return true. First, if this is a plugin 
-    // renderer and the plugin has a layer, then we need a layer. Second, if this is 
-    // a renderer with a contentDocument and that document needs a layer, then we need
-    // a layer.
-    if (widget() && widget()->isPluginViewBase() && toPluginViewBase(widget())->platformLayer())
-        return true;
-
+    // If this is a renderer with a contentDocument and that document needs a layer, then we need a layer.
     if (Document* contentDocument = frameOwnerElement().contentDocument()) {
         if (RenderView* view = contentDocument->renderView())
             return view->usesCompositing();

Modified: trunk/Source/WebCore/rendering/RenderWidget.h (158711 => 158712)


--- trunk/Source/WebCore/rendering/RenderWidget.h	2013-11-06 02:48:49 UTC (rev 158711)
+++ trunk/Source/WebCore/rendering/RenderWidget.h	2013-11-06 03:36:32 UTC (rev 158712)
@@ -82,7 +82,6 @@
     virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OVERRIDE FINAL;
     virtual void layout() OVERRIDE;
     virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE;
-    virtual CursorDirective getCursor(const LayoutPoint&, Cursor&) const OVERRIDE;
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) OVERRIDE;
     virtual void paintContents(PaintInfo&, const LayoutPoint&);
 #if USE(ACCELERATED_COMPOSITING)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to