Remove PluginView::renderer().
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 26 Apr 2015 23:41:21 +0000 (23:41 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 26 Apr 2015 23:41:21 +0000 (23:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=144216

Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-04-26
Reviewed by Darin Adler.

Nobody should have to know about the plug-in view's renderer except the plug-in view itself.

No new tests, no behavior change.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::convertFromScrollbarToContainingView):
(WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::renderer): Deleted.
* WebProcess/Plugins/PluginView.h:

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

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm
Source/WebKit2/WebProcess/Plugins/PluginView.cpp
Source/WebKit2/WebProcess/Plugins/PluginView.h

index 40e5a40..b012ab2 100644 (file)
@@ -1,3 +1,21 @@
+2015-04-26  Sungmann Cho  <sungmann.cho@navercorp.com>
+
+        Remove PluginView::renderer().
+        https://bugs.webkit.org/show_bug.cgi?id=144216
+
+        Reviewed by Darin Adler.
+
+        Nobody should have to know about the plug-in view's renderer except the plug-in view itself.
+
+        No new tests, no behavior change.
+
+        * WebProcess/Plugins/PDF/PDFPlugin.mm:
+        (WebKit::PDFPlugin::convertFromScrollbarToContainingView):
+        (WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
+        * WebProcess/Plugins/PluginView.cpp:
+        (WebKit::PluginView::renderer): Deleted.
+        * WebProcess/Plugins/PluginView.h:
+
 2015-04-26  Doug Russell  <d_russell@apple.com>
 
         AX: richer text change notifications (142719)
index 2c5489f..9ddfb83 100644 (file)
@@ -66,6 +66,7 @@
 #import <WebCore/GraphicsContext.h>
 #import <WebCore/HTMLElement.h>
 #import <WebCore/HTMLFormElement.h>
+#import <WebCore/HTMLPlugInElement.h>
 #import <WebCore/LocalizedStrings.h>
 #import <WebCore/MouseEvent.h>
 #import <WebCore/Page.h>
@@ -687,12 +688,12 @@ IntRect PDFPlugin::convertFromScrollbarToContainingView(const Scrollbar* scrollb
     IntRect rect = scrollbarRect;
     rect.move(scrollbar->location() - pluginView()->location());
 
-    return pluginView()->frame()->view()->convertFromRendererToContainingView(pluginView()->renderer(), rect);
+    return pluginView()->frame()->view()->convertFromRendererToContainingView(pluginView()->pluginElement()->renderer(), rect);
 }
 
 IntRect PDFPlugin::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntRect& parentRect) const
 {
-    IntRect rect = pluginView()->frame()->view()->convertFromContainingViewToRenderer(pluginView()->renderer(), parentRect);
+    IntRect rect = pluginView()->frame()->view()->convertFromContainingViewToRenderer(pluginView()->pluginElement()->renderer(), parentRect);
     rect.move(pluginView()->location() - scrollbar->location());
 
     return rect;
@@ -703,12 +704,12 @@ IntPoint PDFPlugin::convertFromScrollbarToContainingView(const Scrollbar* scroll
     IntPoint point = scrollbarPoint;
     point.move(scrollbar->location() - pluginView()->location());
 
-    return pluginView()->frame()->view()->convertFromRendererToContainingView(pluginView()->renderer(), point);
+    return pluginView()->frame()->view()->convertFromRendererToContainingView(pluginView()->pluginElement()->renderer(), point);
 }
 
 IntPoint PDFPlugin::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntPoint& parentPoint) const
 {
-    IntPoint point = pluginView()->frame()->view()->convertFromContainingViewToRenderer(pluginView()->renderer(), parentPoint);
+    IntPoint point = pluginView()->frame()->view()->convertFromContainingViewToRenderer(pluginView()->pluginElement()->renderer(), parentPoint);
     point.move(pluginView()->location() - scrollbar->location());
     
     return point;
index a6a520b..1876997 100644 (file)
@@ -465,11 +465,6 @@ void PluginView::manualLoadDidFail(const ResourceError& error)
     m_plugin->manualStreamDidFail(error.isCancellation());
 }
 
-RenderBoxModelObject* PluginView::renderer() const
-{
-    return downcast<RenderBoxModelObject>(m_pluginElement->renderer());
-}
-
 void PluginView::pageScaleFactorDidChange()
 {
     viewGeometryDidChange();
index fceb738..9626ab6 100644 (file)
@@ -58,7 +58,6 @@ class Frame;
 class HTMLPlugInElement;
 class MachSendRight;
 class MouseEvent;
-class RenderBoxModelObject;
 }
 
 namespace WebKit {
@@ -95,9 +94,6 @@ public:
     const Plugin::Parameters& initialParameters() const { return m_parameters; }
     Plugin* plugin() const { return m_plugin.get(); }
 
-    // FIXME: Remove this; nobody should have to know about the plug-in view's renderer except the plug-in view itself.
-    WebCore::RenderBoxModelObject* renderer() const;
-    
     void setPageScaleFactor(double scaleFactor, WebCore::IntPoint origin);
     double pageScaleFactor() const;
     bool handlesPageScaleFactor() const;