diff options
Diffstat (limited to 'WebKit/win/WebCoreSupport/WebDragClient.cpp')
-rw-r--r-- | WebKit/win/WebCoreSupport/WebDragClient.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/WebKit/win/WebCoreSupport/WebDragClient.cpp b/WebKit/win/WebCoreSupport/WebDragClient.cpp index c35991f..d42f7b5 100644 --- a/WebKit/win/WebCoreSupport/WebDragClient.cpp +++ b/WebKit/win/WebCoreSupport/WebDragClient.cpp @@ -30,7 +30,6 @@ #include "WebView.h" #include <shlobj.h> -#include <CoreGraphics/CoreGraphics.h> #pragma warning(push, 0) #include <WebCore/ClipboardWin.h> @@ -46,7 +45,8 @@ #pragma warning(pop) namespace WebCore { - HBITMAP allocImage(HDC dc, IntSize size, CGContextRef *targetRef); + HBITMAP allocImage(HDC dc, IntSize size, PlatformGraphicsContext** targetRef); + void deallocContext(PlatformGraphicsContext* target); } @@ -223,7 +223,7 @@ DragImageRef WebDragClient::createDragImageForLink(KURL& url, const String& inLa return 0; } - CGContextRef contextRef; + PlatformGraphicsContext* contextRef; image = allocImage(workingDC, imageSize, &contextRef); if (!image) { DeleteDC(workingDC); @@ -237,7 +237,6 @@ DragImageRef WebDragClient::createDragImageForLink(KURL& url, const String& inLa // for drag images on win, so we use 1 static const Color backgroundColor(140, 140, 140); static const IntSize radii(DRAG_LABEL_RADIUS, DRAG_LABEL_RADIUS); - context.setFont(labelFont); IntRect rect(0, 0, imageSize.width(), imageSize.height()); context.fillRoundedRect(rect, radii, radii, radii, radii, backgroundColor); @@ -257,7 +256,7 @@ DragImageRef WebDragClient::createDragImageForLink(KURL& url, const String& inLa IntPoint textPos(DRAG_LABEL_BORDER_X, DRAG_LABEL_BORDER_Y + labelFont.pixelSize()); WebCoreDrawDoubledTextAtPoint(context, label, textPos, labelFont, topColor, bottomColor); - CGContextRelease(contextRef); + deallocContext(contextRef); DeleteDC(workingDC); ReleaseDC(0, dc); return image; |