Fix the Windows build after r189144
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 29 Aug 2015 06:32:50 +0000 (06:32 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 29 Aug 2015 06:32:50 +0000 (06:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=148561

Unreviewed.

* Plugins/PluginView.cpp:
(WebCore::PluginView::paintMissingPluginIcon):
* Plugins/PluginView.h:
* Plugins/PluginViewWin.cpp:
(WebCore::PluginView::paintWindowedPluginIntoContext):
(WebCore::PluginView::paint):

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

Source/WebKit/win/ChangeLog
Source/WebKit/win/Plugins/PluginView.cpp
Source/WebKit/win/Plugins/PluginView.h
Source/WebKit/win/Plugins/PluginViewWin.cpp

index ac22760..356be7a 100644 (file)
@@ -1,3 +1,17 @@
+2015-08-28  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Fix the Windows build after r189144
+        https://bugs.webkit.org/show_bug.cgi?id=148561
+
+        Unreviewed.
+
+        * Plugins/PluginView.cpp:
+        (WebCore::PluginView::paintMissingPluginIcon):
+        * Plugins/PluginView.h:
+        * Plugins/PluginViewWin.cpp:
+        (WebCore::PluginView::paintWindowedPluginIntoContext):
+        (WebCore::PluginView::paint):
+
 2015-08-27  Brian Burg  <bburg@apple.com>
 
         Web Inspector: FrontendChannel should know its own connection type
index bbab1fc..c8fa5c7 100644 (file)
@@ -1102,7 +1102,7 @@ void PluginView::invalidateWindowlessPluginRect(const IntRect& rect)
     renderer.repaintRectangle(dirtyRect);
 }
 
-void PluginView::paintMissingPluginIcon(GraphicsContext* context, const IntRect& rect)
+void PluginView::paintMissingPluginIcon(GraphicsContext& context, const IntRect& rect)
 {
     static RefPtr<Image> nullPluginImage;
     if (!nullPluginImage)
@@ -1118,10 +1118,10 @@ void PluginView::paintMissingPluginIcon(GraphicsContext* context, const IntRect&
     if (!rect.intersects(imageRect))
         return;
 
-    context->save();
-    context->clip(windowClipRect());
-    context->drawImage(nullPluginImage.get(), ColorSpaceDeviceRGB, imageRect.location());
-    context->restore();
+    context.save();
+    context.clip(windowClipRect());
+    context.drawImage(nullPluginImage.get(), ColorSpaceDeviceRGB, imageRect.location());
+    context.restore();
 }
 
 static const char* MozillaUserAgent = "Mozilla/5.0 ("
index d06173a..5f94c8e 100644 (file)
@@ -179,7 +179,7 @@ namespace WebCore {
         virtual void setFocus(bool);
         virtual void show();
         virtual void hide();
-        virtual void paint(GraphicsContext*, const IntRect&);
+        virtual void paint(GraphicsContext&, const IntRect&);
         virtual void clipRectChanged() override;
 
         // This method is used by plugins on all platforms to obtain a clip rect that includes clips set by WebCore,
@@ -250,7 +250,7 @@ namespace WebCore {
         virtual void mediaCanStart();
 
 #if ENABLE(NETSCAPE_PLUGIN_API)
-        void paintWindowedPluginIntoContext(GraphicsContext*, const IntRect&);
+        void paintWindowedPluginIntoContext(GraphicsContext&, const IntRect&);
         static HDC WINAPI hookedBeginPaint(HWND, PAINTSTRUCT*);
         static BOOL WINAPI hookedEndPaint(HWND, const PAINTSTRUCT*);
 #endif
@@ -286,7 +286,7 @@ namespace WebCore {
 #endif
 
         void updatePluginWidget();
-        void paintMissingPluginIcon(GraphicsContext*, const IntRect&);
+        void paintMissingPluginIcon(GraphicsContext&, const IntRect&);
 
         void handleKeyboardEvent(KeyboardEvent*);
         void handleMouseEvent(MouseEvent*);
index 010eaed..11701f0 100644 (file)
@@ -500,11 +500,11 @@ void PluginView::paintIntoTransformedContext(HDC hdc)
     dispatchNPEvent(npEvent);
 }
 
-void PluginView::paintWindowedPluginIntoContext(GraphicsContext* context, const IntRect& rect)
+void PluginView::paintWindowedPluginIntoContext(GraphicsContext& context, const IntRect& rect)
 {
 #if !USE(WINGDI)
     ASSERT(m_isWindowed);
-    ASSERT(context->shouldIncludeChildWindows());
+    ASSERT(context.shouldIncludeChildWindows());
 
     IntPoint locationInWindow = downcast<FrameView>(*parent()).convertToContainingWindow(frameRect().location());
 
@@ -514,7 +514,7 @@ void PluginView::paintWindowedPluginIntoContext(GraphicsContext* context, const
     // Must flush drawings up to this point to the backing metafile, otherwise the
     // plugin region will be overwritten with any clear regions specified in the
     // cairo-controlled portions of the rendering.
-    cairo_show_page(context->platformContext()->cr());
+    cairo_show_page(context.platformContext()->cr());
 #endif
 
     HDC hdc = windowsContext.hdc();
@@ -523,7 +523,7 @@ void PluginView::paintWindowedPluginIntoContext(GraphicsContext* context, const
 
     // The plugin expects the DC to be in client coordinates, so we translate
     // the DC to make that so.
-    AffineTransform ctm = context->getCTM();
+    AffineTransform ctm = context.getCTM();
     ctm.translate(locationInWindow.x(), locationInWindow.y());
     XFORM transform = static_cast<XFORM>(ctm.toTransformationMatrix());
 
@@ -535,7 +535,7 @@ void PluginView::paintWindowedPluginIntoContext(GraphicsContext* context, const
 #endif
 }
 
-void PluginView::paint(GraphicsContext* context, const IntRect& rect)
+void PluginView::paint(GraphicsContext& context, const IntRect& rect)
 {
     if (!m_isStarted) {
         // Draw the "missing plugin" image
@@ -543,7 +543,7 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
         return;
     }
 
-    if (context->paintingDisabled())
+    if (context.paintingDisabled())
         return;
 
     // Ensure that we have called SetWindow before we try to paint.
@@ -552,7 +552,7 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
 
     if (m_isWindowed) {
 #if !USE(WINGDI)
-        if (context->shouldIncludeChildWindows())
+        if (context.shouldIncludeChildWindows())
             paintWindowedPluginIntoContext(context, rect);
 #endif
         return;
@@ -563,7 +563,7 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
 
     // On Safari/Windows without transparency layers the GraphicsContext returns the HDC
     // of the window and the plugin expects that the passed in DC has window coordinates.
-    if (!context->isInTransparencyLayer()) {
+    if (!context.isInTransparencyLayer()) {
         XFORM transform;
         GetWorldTransform(windowsContext.hdc(), &transform);
         transform.eDx = 0;