Title: [172977] trunk
Revision
172977
Author
bfulg...@apple.com
Date
2014-08-26 14:39:51 -0700 (Tue, 26 Aug 2014)

Log Message

[Win] WebKit IDL incorrectly passes HWND as OLE_HANDLE
https://bugs.webkit.org/show_bug.cgi?id=136258
<rdar://problem/18134138>

Reviewed by Tim Horton.

Avoid 32/64-bit truncation by preventing 64-bit HWND (and other)
values from passing through the 32-bit OLE_HANDLE data type.

Source/WebCore:

* platform/win/WindowMessageBroadcaster.cpp:
(WebCore::WindowMessageBroadcaster::addListener):
(WebCore::WindowMessageBroadcaster::removeListener):
(WebCore::WindowMessageBroadcaster::destroy):
(WebCore::WindowMessageBroadcaster::unsubclassWindow):
(WebCore::WindowMessageBroadcaster::SubclassedWndProc):

Source/WebKit/win:

* Interfaces/IWebDocument.idl:
* Interfaces/IWebEmbeddedView.idl:
* Interfaces/IWebErrorPrivate.idl:
* Interfaces/IWebFrameLoadDelegate.idl:
* Interfaces/IWebFramePrivate.idl:
* Interfaces/IWebHistoryItem.idl:
* Interfaces/IWebIconDatabase.idl:
* Interfaces/IWebMutableURLRequestPrivate.idl:
* Interfaces/IWebUIDelegate.idl:
* Interfaces/IWebUIDelegatePrivate.idl:
* Interfaces/IWebURLResponsePrivate.idl:
* Interfaces/IWebView.idl:
* Interfaces/IWebViewPrivate.idl:
* WebCoreSupport/EmbeddedWidget.cpp:
(EmbeddedWidget::createWindow):
* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::rootViewToScreen):
(WebChromeClient::screenToRootView):
(WebChromeClient::platformPageClient):
(WebChromeClient::runOpenPanel):
(WebChromeClient::setCursor):
* WebCoreSupport/WebContextMenuClient.cpp:
(WebContextMenuClient::customizeMenu):
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::createPlugin):
* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorClient::openInspectorFrontend):
(WebInspectorClient::highlight):
(WebInspectorFrontendClient::setAttachedWindowHeight):
(WebInspectorFrontendClient::closeWindowWithoutNotifications):
(WebInspectorFrontendClient::showWindowWithoutNotifications):
* WebCoreSupport/WebInspectorClient.h:
* WebCoreSupport/WebInspectorDelegate.cpp:
* WebCoreSupport/WebInspectorDelegate.h:
(WebInspectorDelegate::webViewFirstResponder):
(WebInspectorDelegate::makeFirstResponder):
(WebInspectorDelegate::contextMenuItemsForElement):
(WebInspectorDelegate::trackCustomPopupMenu):
(WebInspectorDelegate::addCustomMenuDrawingData):
(WebInspectorDelegate::cleanUpCustomMenuDrawingData):
(WebInspectorDelegate::drawHeaderInRect):
(WebInspectorDelegate::drawFooterInRect):
* WebDropSource.cpp:
(generateMouseEvent):
(WebDropSource::GiveFeedback):
* WebError.cpp:
(WebError::sslPeerCertificate):
* WebError.h:
* WebFrame.cpp:
(WebFrame::paintDocumentRectToContext):
(WebFrame::paintScrollViewRectToContextAtPoint):
(WebFrame::createSubframeWithOwnerElement):
(WebFrame::initWithWebView):
(WebFrame::drawHeader):
(WebFrame::drawFooter):
* WebFrame.h:
* WebHistoryItem.cpp:
(WebHistoryItem::icon):
* WebHistoryItem.h:
* WebIconDatabase.cpp:
(WebIconDatabase::iconForURL):
(WebIconDatabase::defaultIconWithSize):
* WebIconDatabase.h:
* WebMutableURLRequest.cpp:
(WebMutableURLRequest::setClientCertificate):
* WebMutableURLRequest.h:
* WebNodeHighlight.cpp:
(WebNodeHighlight::WebNodeHighlight):
* WebURLResponse.cpp:
(WebURLResponse::sslPeerCertificate):
* WebURLResponse.h:
* WebView.cpp:
(WebView::paintIntoBackingStore):
(WebView::handleContextMenuEvent):
(WebView::onInitMenuPopup):
(WebView::onUninitMenuPopup):
(WebView::WebViewWndProc):
(WebView::dispatchDidReceiveIconFromWebFrame):
(WebView::setHostWindow):
(WebView::hostWindow):
(WebView::generateSelectionImage):
(WebView::mainFrameIcon):
(WebView::viewWindow):
(WebView::paintDocumentRectToContext):
(WebView::paintScrollViewRectToContextAtPoint):
(WebView::backingStore):
(WebView::fullScreenClientSetParentWindow):
* WebView.h:

Tools:

* DumpRenderTree/win/AccessibilityControllerWin.cpp:
(AccessibilityController::rootElement):
* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebViewToConsistentStateBeforeTesting):
(runTest):
(createWebViewAndOffscreenWindow):
* DumpRenderTree/win/FrameLoadDelegate.h:
(FrameLoadDelegate::didReceiveIcon):
* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::setWindowIsKey):
* DumpRenderTree/win/UIDelegate.cpp:
(UIDelegate::trackCustomPopupMenu):
(UIDelegate::drawHeaderInRect):
(UIDelegate::drawFooterInRect):
(UIDelegate::webViewClose):
(UIDelegate::webViewFocus):
(UIDelegate::webViewSetCursor):
(UIDelegate::drawBackground):
* DumpRenderTree/win/UIDelegate.h:
(UIDelegate::webViewFirstResponder):
(UIDelegate::makeFirstResponder):
(UIDelegate::contextMenuItemsForElement):
(UIDelegate::addCustomMenuDrawingData):
(UIDelegate::cleanUpCustomMenuDrawingData):
(UIDelegate::webViewLostFocus):
* TestWebKitAPI/Tests/WebKit/win/WebViewDestruction.cpp:
(TestWebKitAPI::WebViewDestructionWithHostWindow::SetUp):
* WinLauncher/PrintWebUIDelegate.cpp:
(PrintWebUIDelegate::drawHeaderInRect):
(PrintWebUIDelegate::drawFooterInRect):
* WinLauncher/PrintWebUIDelegate.h:
(PrintWebUIDelegate::webViewFirstResponder):
(PrintWebUIDelegate::makeFirstResponder):
(PrintWebUIDelegate::contextMenuItemsForElement):
(PrintWebUIDelegate::trackCustomPopupMenu):
(PrintWebUIDelegate::addCustomMenuDrawingData):
(PrintWebUIDelegate::cleanUpCustomMenuDrawingData):
* WinLauncher/WinLauncher.cpp:
(WinLauncher::prepareViews):
* WinLauncher/WinLauncherWebHost.h:
(WinLauncherWebHost::didReceiveIcon):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (172976 => 172977)


--- trunk/Source/WebCore/ChangeLog	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebCore/ChangeLog	2014-08-26 21:39:51 UTC (rev 172977)
@@ -1,3 +1,21 @@
+2014-08-26  Brent Fulgham  <bfulg...@apple.com>
+
+        [Win] WebKit IDL incorrectly passes HWND as OLE_HANDLE
+        https://bugs.webkit.org/show_bug.cgi?id=136258
+        <rdar://problem/18134138>
+
+        Reviewed by Tim Horton.
+
+        Avoid 32/64-bit truncation by preventing 64-bit HWND (and other)
+        values from passing through the 32-bit OLE_HANDLE data type.
+
+        * platform/win/WindowMessageBroadcaster.cpp:
+        (WebCore::WindowMessageBroadcaster::addListener):
+        (WebCore::WindowMessageBroadcaster::removeListener):
+        (WebCore::WindowMessageBroadcaster::destroy):
+        (WebCore::WindowMessageBroadcaster::unsubclassWindow):
+        (WebCore::WindowMessageBroadcaster::SubclassedWndProc):
+
 2014-08-25  Maciej Stachowiak  <m...@apple.com>
 
         Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API

Modified: trunk/Source/WebCore/platform/win/WindowMessageBroadcaster.cpp (172976 => 172977)


--- trunk/Source/WebCore/platform/win/WindowMessageBroadcaster.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebCore/platform/win/WindowMessageBroadcaster.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2014 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -79,6 +79,7 @@
 #pragma warning(disable: 4244 4312)
         m_originalWndProc = reinterpret_cast<WNDPROC>(SetWindowLongPtr(m_subclassedWindow, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(SubclassedWndProc)));
     }
+    ASSERT(m_originalWndProc);
 
     m_listeners.add(listener);
 }
@@ -108,6 +109,8 @@
 {
     WindowMessageBroadcaster* broadcaster = instancesMap().get(hwnd);
     ASSERT(broadcaster);
+    if (!broadcaster)
+        return 0;
 
     ListenerSet::const_iterator end = broadcaster->listeners().end();
     for (ListenerSet::const_iterator it = broadcaster->listeners().begin(); it != end; ++it)

Modified: trunk/Source/WebKit/win/ChangeLog (172976 => 172977)


--- trunk/Source/WebKit/win/ChangeLog	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/ChangeLog	2014-08-26 21:39:51 UTC (rev 172977)
@@ -1,3 +1,103 @@
+2014-08-26  Brent Fulgham  <bfulg...@apple.com>
+
+        [Win] WebKit IDL incorrectly passes HWND as OLE_HANDLE
+        https://bugs.webkit.org/show_bug.cgi?id=136258
+        <rdar://problem/18134138>
+
+        Reviewed by Tim Horton.
+
+        Avoid 32/64-bit truncation by preventing 64-bit HWND (and other)
+        values from passing through the 32-bit OLE_HANDLE data type.
+
+        * Interfaces/IWebDocument.idl:
+        * Interfaces/IWebEmbeddedView.idl:
+        * Interfaces/IWebErrorPrivate.idl:
+        * Interfaces/IWebFrameLoadDelegate.idl:
+        * Interfaces/IWebFramePrivate.idl:
+        * Interfaces/IWebHistoryItem.idl:
+        * Interfaces/IWebIconDatabase.idl:
+        * Interfaces/IWebMutableURLRequestPrivate.idl:
+        * Interfaces/IWebUIDelegate.idl:
+        * Interfaces/IWebUIDelegatePrivate.idl:
+        * Interfaces/IWebURLResponsePrivate.idl:
+        * Interfaces/IWebView.idl:
+        * Interfaces/IWebViewPrivate.idl:
+        * WebCoreSupport/EmbeddedWidget.cpp:
+        (EmbeddedWidget::createWindow):
+        * WebCoreSupport/WebChromeClient.cpp:
+        (WebChromeClient::rootViewToScreen):
+        (WebChromeClient::screenToRootView):
+        (WebChromeClient::platformPageClient):
+        (WebChromeClient::runOpenPanel):
+        (WebChromeClient::setCursor):
+        * WebCoreSupport/WebContextMenuClient.cpp:
+        (WebContextMenuClient::customizeMenu):
+        * WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebFrameLoaderClient::createPlugin):
+        * WebCoreSupport/WebInspectorClient.cpp:
+        (WebInspectorClient::openInspectorFrontend):
+        (WebInspectorClient::highlight):
+        (WebInspectorFrontendClient::setAttachedWindowHeight):
+        (WebInspectorFrontendClient::closeWindowWithoutNotifications):
+        (WebInspectorFrontendClient::showWindowWithoutNotifications):
+        * WebCoreSupport/WebInspectorClient.h:
+        * WebCoreSupport/WebInspectorDelegate.cpp:
+        * WebCoreSupport/WebInspectorDelegate.h:
+        (WebInspectorDelegate::webViewFirstResponder):
+        (WebInspectorDelegate::makeFirstResponder):
+        (WebInspectorDelegate::contextMenuItemsForElement):
+        (WebInspectorDelegate::trackCustomPopupMenu):
+        (WebInspectorDelegate::addCustomMenuDrawingData):
+        (WebInspectorDelegate::cleanUpCustomMenuDrawingData):
+        (WebInspectorDelegate::drawHeaderInRect):
+        (WebInspectorDelegate::drawFooterInRect):
+        * WebDropSource.cpp:
+        (generateMouseEvent):
+        (WebDropSource::GiveFeedback):
+        * WebError.cpp:
+        (WebError::sslPeerCertificate):
+        * WebError.h:
+        * WebFrame.cpp:
+        (WebFrame::paintDocumentRectToContext):
+        (WebFrame::paintScrollViewRectToContextAtPoint):
+        (WebFrame::createSubframeWithOwnerElement):
+        (WebFrame::initWithWebView):
+        (WebFrame::drawHeader):
+        (WebFrame::drawFooter):
+        * WebFrame.h:
+        * WebHistoryItem.cpp:
+        (WebHistoryItem::icon):
+        * WebHistoryItem.h:
+        * WebIconDatabase.cpp:
+        (WebIconDatabase::iconForURL):
+        (WebIconDatabase::defaultIconWithSize):
+        * WebIconDatabase.h:
+        * WebMutableURLRequest.cpp:
+        (WebMutableURLRequest::setClientCertificate):
+        * WebMutableURLRequest.h:
+        * WebNodeHighlight.cpp:
+        (WebNodeHighlight::WebNodeHighlight):
+        * WebURLResponse.cpp:
+        (WebURLResponse::sslPeerCertificate):
+        * WebURLResponse.h:
+        * WebView.cpp:
+        (WebView::paintIntoBackingStore):
+        (WebView::handleContextMenuEvent):
+        (WebView::onInitMenuPopup):
+        (WebView::onUninitMenuPopup):
+        (WebView::WebViewWndProc):
+        (WebView::dispatchDidReceiveIconFromWebFrame):
+        (WebView::setHostWindow):
+        (WebView::hostWindow):
+        (WebView::generateSelectionImage):
+        (WebView::mainFrameIcon):
+        (WebView::viewWindow):
+        (WebView::paintDocumentRectToContext):
+        (WebView::paintScrollViewRectToContextAtPoint):
+        (WebView::backingStore):
+        (WebView::fullScreenClientSetParentWindow):
+        * WebView.h:
+
 2014-08-21  Alex Christensen  <achristen...@webkit.org>
 
         [Win] Unreviewed build fix after r172849.

Modified: trunk/Source/WebKit/win/Interfaces/IWebDocument.idl (172976 => 172977)


--- trunk/Source/WebKit/win/Interfaces/IWebDocument.idl	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/Interfaces/IWebDocument.idl	2014-08-26 21:39:51 UTC (rev 172977)
@@ -86,7 +86,7 @@
         @abstract Called before the host window is set on the parent web view.
         - (void)viewWillMoveToHostWindow:(NSWindow *)hostWindow;
     */
-    HRESULT viewWillMoveToHostWindow([in] OLE_HANDLE hwnd);
+    HRESULT viewWillMoveToHostWindow([in] HWND hwnd);
 
     /*!
         @method viewDidMoveToHostWindow

Modified: trunk/Source/WebKit/win/Interfaces/IWebEmbeddedView.idl (172976 => 172977)


--- trunk/Source/WebKit/win/Interfaces/IWebEmbeddedView.idl	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/Interfaces/IWebEmbeddedView.idl	2014-08-26 21:39:51 UTC (rev 172977)
@@ -37,7 +37,7 @@
 ]
 interface IWebEmbeddedView : IUnknown
 {
-    HRESULT createViewWindow([in] OLE_HANDLE parentWindow, [in] LPSIZE pluginSize, [out, retval] OLE_HANDLE* window);
+    HRESULT createViewWindow([in] HWND parentWindow, [in] LPSIZE pluginSize, [out, retval] HWND* window);
 
     HRESULT didReceiveResponse([in] IWebURLResponse* response);
     HRESULT didReceiveData([in] IStream* data);

Modified: trunk/Source/WebKit/win/Interfaces/IWebErrorPrivate.idl (172976 => 172977)


--- trunk/Source/WebKit/win/Interfaces/IWebErrorPrivate.idl	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/Interfaces/IWebErrorPrivate.idl	2014-08-26 21:39:51 UTC (rev 172977)
@@ -43,5 +43,5 @@
 
 interface IWebErrorPrivate : IUnknown
 {
-    HRESULT sslPeerCertificate([out, retval] OLE_HANDLE* result);
+    HRESULT sslPeerCertificate([out, retval] ULONG_PTR* result);
 }

Modified: trunk/Source/WebKit/win/Interfaces/IWebFrameLoadDelegate.idl (172976 => 172977)


--- trunk/Source/WebKit/win/Interfaces/IWebFrameLoadDelegate.idl	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/Interfaces/IWebFrameLoadDelegate.idl	2014-08-26 21:39:51 UTC (rev 172977)
@@ -121,7 +121,7 @@
         @param frame The frame for which a page icon has been received
         - (void)webView:(WebView *)sender didReceiveIcon:(NSImage *)image forFrame:(WebFrame *)frame;
     */
-    HRESULT didReceiveIcon([in] IWebView* webView, [in] OLE_HANDLE hBitmap, [in] IWebFrame* frame);
+    HRESULT didReceiveIcon([in] IWebView* webView, [in] HBITMAP hBitmap, [in] IWebFrame* frame);
 
     /*!
         @method webView:didFinishLoadForFrame:

Modified: trunk/Source/WebKit/win/Interfaces/IWebFramePrivate.idl (172976 => 172977)


--- trunk/Source/WebKit/win/Interfaces/IWebFramePrivate.idl	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/Interfaces/IWebFramePrivate.idl	2014-08-26 21:39:51 UTC (rev 172977)
@@ -80,7 +80,7 @@
 
     HRESULT unused3();
 
-    HRESULT paintDocumentRectToContext([in] RECT rect, [in] OLE_HANDLE deviceContext);
+    HRESULT paintDocumentRectToContext([in] RECT rect, [in] HDC deviceContext);
 
     HRESULT elementDoesAutoComplete([in] IDOMElement* element, [out, retval] BOOL* result);
 
@@ -106,7 +106,7 @@
 
     HRESULT layerTreeAsText([out, retval] BSTR* result);
 
-    HRESULT paintScrollViewRectToContextAtPoint([in] RECT rect, [in] POINT pt, [in] OLE_HANDLE deviceContext);
+    HRESULT paintScrollViewRectToContextAtPoint([in] RECT rect, [in] POINT pt, [in] HDC deviceContext);
 
     HRESULT renderTreeAsExternalRepresentation([in] BOOL forPrinting, [out, retval] BSTR* result);
 

Modified: trunk/Source/WebKit/win/Interfaces/IWebHistoryItem.idl (172976 => 172977)


--- trunk/Source/WebKit/win/Interfaces/IWebHistoryItem.idl	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/Interfaces/IWebHistoryItem.idl	2014-08-26 21:39:51 UTC (rev 172977)
@@ -121,5 +121,5 @@
         @result The icon associated with this item's URL.
         - (NSImage *)icon;
     */
-    HRESULT icon([out, retval] OLE_HANDLE* hBitmap);
+    HRESULT icon([out, retval] HBITMAP* hBitmap);
 }

Modified: trunk/Source/WebKit/win/Interfaces/IWebIconDatabase.idl (172976 => 172977)


--- trunk/Source/WebKit/win/Interfaces/IWebIconDatabase.idl	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/Interfaces/IWebIconDatabase.idl	2014-08-26 21:39:51 UTC (rev 172977)
@@ -91,14 +91,14 @@
         @param URL
         - (NSString *)iconURLForURL:(NSString *)URL;
     */
-    HRESULT iconForURL([in] BSTR url, [in] LPSIZE size, [in] BOOL cache, [out, retval] OLE_HANDLE* hBitmap);
+    HRESULT iconForURL([in] BSTR url, [in] LPSIZE size, [in] BOOL cache, [out, retval] HBITMAP* hBitmap);
 
     /*!
         @method defaultIconWithSize:
         @param size
         - (NSImage *)defaultIconWithSize:(NSSize)size;
     */
-    HRESULT defaultIconWithSize([in] LPSIZE size, [out, retval] OLE_HANDLE* hBitmap);
+    HRESULT defaultIconWithSize([in] LPSIZE size, [out, retval] HBITMAP* hBitmap);
 
     /*!
         @method retainIconForURL:

Modified: trunk/Source/WebKit/win/Interfaces/IWebMutableURLRequestPrivate.idl (172976 => 172977)


--- trunk/Source/WebKit/win/Interfaces/IWebMutableURLRequestPrivate.idl	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/Interfaces/IWebMutableURLRequestPrivate.idl	2014-08-26 21:39:51 UTC (rev 172977)
@@ -47,7 +47,7 @@
 ]
 interface IWebMutableURLRequestPrivate : IUnknown
 {
-    HRESULT setClientCertificate([in] OLE_HANDLE cert);
+    HRESULT setClientCertificate([in] ULONG_PTR cert);
 
     [local] CFURLRequestRef cfRequest();
 }

Modified: trunk/Source/WebKit/win/Interfaces/IWebUIDelegate.idl (172976 => 172977)


--- trunk/Source/WebKit/win/Interfaces/IWebUIDelegate.idl	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/Interfaces/IWebUIDelegate.idl	2014-08-26 21:39:51 UTC (rev 172977)
@@ -253,7 +253,7 @@
         real first responder if some control not in the window has focus.
         - (NSResponder *)webViewFirstResponder:(WebView *)sender;
     */
-    HRESULT webViewFirstResponder([in] IWebView* sender, [out, retval] OLE_HANDLE* responderHWnd);
+    HRESULT webViewFirstResponder([in] IWebView* sender, [out, retval] HWND* responderHWnd);
 
     /*!
         @method webView:makeFirstResponder:
@@ -267,7 +267,7 @@
         elsewhere, or possibly ignore this call.
         - (void)webView:(WebView *)sender makeFirstResponder:(NSResponder *)responder;
     */
-    HRESULT makeFirstResponder([in] IWebView* sender, [in] OLE_HANDLE responderHWnd);
+    HRESULT makeFirstResponder([in] IWebView* sender, [in] HWND responderHWnd);
 
     /*!
         @method webView:setStatusText:
@@ -481,7 +481,7 @@
         @result An array of NSMenuItems to include in the contextual menu.
         - (NSArray *)webView:(WebView *)sender contextMenuItemsForElement:(NSDictionary *)element defaultMenuItems:(NSArray *)defaultMenuItems;
     */
-    HRESULT contextMenuItemsForElement([in] IWebView* sender, [in] IPropertyBag* element, [in] OLE_HANDLE defaultItemsHMenu, [out, retval] OLE_HANDLE* resultHMenu);
+    HRESULT contextMenuItemsForElement([in] IWebView* sender, [in] IPropertyBag* element, [in] HMENU defaultItemsHMenu, [out, retval] HMENU* resultHMenu);
 
     /*!
         @method webView:validateUserInterfaceItem:defaultValidation:
@@ -581,7 +581,7 @@
         @param menu The menu that we want to pop up.
         @param point The point associated with the context menu event in the coordinates of the WebView
     */
-    HRESULT trackCustomPopupMenu([in] IWebView* sender, [in] OLE_HANDLE hMenu, [in] LPPOINT point);
+    HRESULT trackCustomPopupMenu([in] IWebView* sender, [in] HMENU hMenu, [in] LPPOINT point);
 
     /*
         @method webView:measureCustomMenuItem
@@ -606,7 +606,7 @@
         @param menu The cutsom menu to clean up.
         @discussion This method is called for submenus as well.
     */
-    HRESULT addCustomMenuDrawingData([in] IWebView* sender, [in] OLE_HANDLE hMenu);
+    HRESULT addCustomMenuDrawingData([in] IWebView* sender, [in] HMENU hMenu);
 
     /*
         @method webView:cleanUpCustomMenuDrawingData
@@ -614,7 +614,7 @@
         @param sender The WebView sending the delegate method.
         @param menu The cutsom menu to clean up.
     */
-    HRESULT cleanUpCustomMenuDrawingData([in] IWebView* sender, [in] OLE_HANDLE hMenu);
+    HRESULT cleanUpCustomMenuDrawingData([in] IWebView* sender, [in] HMENU hMenu);
 
     /*!
         @method webView:canTakeFocus:
@@ -732,7 +732,7 @@
 
     - (void)webView:(WebView *)sender drawHeaderInRect:(NSRect)rect;
 */
-    HRESULT drawHeaderInRect([in] IWebView* webView, [in] RECT* rect, [in] OLE_HANDLE drawingContext);
+    HRESULT drawHeaderInRect([in] IWebView* webView, [in] RECT* rect, [in] ULONG_PTR drawingContext);
 
 /*!
     @method webView:drawFooterInRect:
@@ -742,7 +742,7 @@
 
     - (void)webView:(WebView *)sender drawFooterInRect:(NSRect)rect;
 */
-    HRESULT drawFooterInRect([in] IWebView* webView, [in] RECT* rect, [in] OLE_HANDLE drawingContext, [in] UINT pageIndex, [in] UINT pageCount);
+    HRESULT drawFooterInRect([in] IWebView* webView, [in] RECT* rect, [in] ULONG_PTR drawingContext, [in] UINT pageIndex, [in] UINT pageCount);
 
     HRESULT webViewPrintingMarginRect([in] IWebView* webView, [out, retval] RECT* rect);
 

Modified: trunk/Source/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl (172976 => 172977)


--- trunk/Source/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl	2014-08-26 21:39:51 UTC (rev 172977)
@@ -56,7 +56,7 @@
     HRESULT webViewAddMessageToConsole([in] IWebView* sender, [in] BSTR message, [in] int lineNumber, [in] BSTR url, [in] BOOL isError);
     HRESULT webViewShouldInterruptJavaScript([in] IWebView* sender, [out, retval] BOOL* result);
     HRESULT webViewReceivedFocus([in] IWebView* sender);
-    HRESULT webViewLostFocus([in] IWebView* sender, [in] OLE_HANDLE loseFocusToHWnd);
+    HRESULT webViewLostFocus([in] IWebView* sender, [in] HWND loseFocusToHWnd);
     HRESULT doDragDrop([in] IWebView* sender, [in] IDataObject* dataObject, [in] IDropSource* dropSource, [in] DWORD okEffect, [out, retval] DWORD* performedEffect);
     HRESULT webViewGetDlgCode([in] IWebView* sender, [in] UINT keyCode, [out, retval] LONG_PTR* code);
     HRESULT webViewPainted([in] IWebView* sender);
@@ -64,7 +64,7 @@
     HRESULT embeddedViewWithArguments([in] IWebView* sender, [in] IWebFrame* frame, [in] IPropertyBag* arguments, [out, retval] IWebEmbeddedView** view);
     HRESULT unused3();
     HRESULT webViewClosing([in] IWebView* sender);
-    HRESULT webViewSetCursor([in] IWebView* sender, [in] OLE_HANDLE cursor);
+    HRESULT webViewSetCursor([in] IWebView* sender, [in] HCURSOR cursor);
     HRESULT webViewDidInvalidate([in] IWebView* sender);
 }
 
@@ -95,7 +95,7 @@
     // strings above.
     HRESULT createWebViewWithRequest([in] IWebView* sender, [in] IWebURLRequest* request, [in] IPropertyBag* windowFeatures, [out, retval] IWebView** newWebView);
 
-    HRESULT drawBackground([in] IWebView* sender, [in] OLE_HANDLE hdc, [in] const RECT* dirtyRect);
+    HRESULT drawBackground([in] IWebView* sender, [in] HDC hdc, [in] const RECT* dirtyRect);
 
     HRESULT decidePolicyForGeolocationRequest([in] IWebView* sender, [in] IWebFrame* frame, [in] IWebSecurityOrigin* origin, [in] IWebGeolocationPolicyListener* listener);
 }

Modified: trunk/Source/WebKit/win/Interfaces/IWebURLResponsePrivate.idl (172976 => 172977)


--- trunk/Source/WebKit/win/Interfaces/IWebURLResponsePrivate.idl	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/Interfaces/IWebURLResponsePrivate.idl	2014-08-26 21:39:51 UTC (rev 172977)
@@ -40,5 +40,5 @@
 
 interface IWebURLResponsePrivate : IUnknown
 {
-    HRESULT sslPeerCertificate([out, retval] OLE_HANDLE* result);
+    HRESULT sslPeerCertificate([out, retval] ULONG_PTR* result);
 }

Modified: trunk/Source/WebKit/win/Interfaces/IWebView.idl (172976 => 172977)


--- trunk/Source/WebKit/win/Interfaces/IWebView.idl	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/Interfaces/IWebView.idl	2014-08-26 21:39:51 UTC (rev 172977)
@@ -545,14 +545,14 @@
         not in an actual window.
         - (void)setHostWindow:(NSWindow *)hostWindow;
     */
-    HRESULT setHostWindow([in] OLE_HANDLE window);
+    HRESULT setHostWindow([in] HWND window);
 
     /*!
         @method hostWindow
         @result The host window for the web view.
         - (NSWindow *)hostWindow;
     */
-    HRESULT hostWindow([out, retval] OLE_HANDLE* window);
+    HRESULT hostWindow([out, retval] HWND* window);
 
     /*!
         @method searchFor:direction:caseSensitive:
@@ -735,7 +735,7 @@
         @result Returns the main frame's icon if any, otherwise nil.
         - (NSImage *)mainFrameIcon;
     */
-    HRESULT mainFrameIcon([out, retval] OLE_HANDLE* hBitmap);
+    HRESULT mainFrameIcon([out, retval] HBITMAP* hBitmap);
 
     /*!
         @method registerURLSchemeAsLocal

Modified: trunk/Source/WebKit/win/Interfaces/IWebViewPrivate.idl (172976 => 172977)


--- trunk/Source/WebKit/win/Interfaces/IWebViewPrivate.idl	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/Interfaces/IWebViewPrivate.idl	2014-08-26 21:39:51 UTC (rev 172977)
@@ -72,7 +72,7 @@
       */
     HRESULT inViewSourceMode([out, retval] BOOL* flag);
 
-    HRESULT viewWindow([out, retval] OLE_HANDLE* window);
+    HRESULT viewWindow([out, retval] HWND* window);
 
     // May well become public
     //- (void)_setFormDelegate:(id<WebFormDelegate>)delegate;
@@ -96,7 +96,7 @@
     HRESULT unmarkAllTextMatches();
     HRESULT rectsForTextMatches([out]IEnumTextMatches** pmatches);
     HRESULT selectionRect([in, out] RECT* rc);
-    HRESULT generateSelectionImage(BOOL forceWhiteText, [out, retval] OLE_HANDLE* hBitmap);
+    HRESULT generateSelectionImage(BOOL forceWhiteText, [out, retval] HBITMAP* hBitmap);
 
     HRESULT canHandleRequest([in] IWebURLRequest* request, [out, retval] BOOL* result);
 
@@ -137,7 +137,7 @@
 
     HRESULT windowAncestryDidChange();
 
-    HRESULT paintDocumentRectToContext([in] RECT rect, [in] OLE_HANDLE dc);
+    HRESULT paintDocumentRectToContext([in] RECT rect, [in] HDC dc);
 
     HRESULT setDefersCallbacks([in] BOOL defersCallbacks);
     HRESULT defersCallbacks([out, retval] BOOL* defersCallbacks);
@@ -147,7 +147,7 @@
     HRESULT setCustomHTMLTokenizerTimeDelay([in] double timeDelay);
     HRESULT setCustomHTMLTokenizerChunkSize([in] int chunkSize);
 
-    HRESULT backingStore([out, retval] OLE_HANDLE* hBitmap);
+    HRESULT backingStore([out, retval] HBITMAP* hBitmap);
 
     HRESULT setTransparent([in] BOOL transparent);
     HRESULT transparent([out, retval] BOOL* transparent);
@@ -233,7 +233,7 @@
 
     HRESULT nextDisplayIsSynchronous();
 
-    HRESULT paintScrollViewRectToContextAtPoint([in] RECT rect, [in] POINT pt, [in] OLE_HANDLE dc);
+    HRESULT paintScrollViewRectToContextAtPoint([in] RECT rect, [in] POINT pt, [in] HDC dc);
 
     [local] HRESULT reportException([in] JSContextRef context, [in] JSValueRef exception);
 

Modified: trunk/Source/WebKit/win/WebCoreSupport/EmbeddedWidget.cpp (172976 => 172977)


--- trunk/Source/WebKit/win/WebCoreSupport/EmbeddedWidget.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebCoreSupport/EmbeddedWidget.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -56,16 +56,15 @@
 {
     ASSERT(!m_window);
 
-    OLE_HANDLE window;
-
+    HWND window;
     SIZE pluginSize(size);
 
-    HRESULT hr = m_view->createViewWindow(reinterpret_cast<OLE_HANDLE>(parentWindow), &pluginSize, &window);
+    HRESULT hr = m_view->createViewWindow(parentWindow, &pluginSize, &window);
         
     if (FAILED(hr) || !window)
         return false;
 
-    m_window = reinterpret_cast<HWND>(window);
+    m_window = window;
     return true;
 }
 

Modified: trunk/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp (172976 => 172977)


--- trunk/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -489,7 +489,7 @@
 IntRect WebChromeClient::rootViewToScreen(const IntRect& rect) const
 {
     HWND viewWindow;
-    if (FAILED(m_webView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow))))
+    if (FAILED(m_webView->viewWindow(&viewWindow)))
         return rect;
 
     // Find the top left corner of the Widget's containing window in screen coords,
@@ -507,7 +507,7 @@
     POINT result = point;
 
     HWND viewWindow;
-    if (FAILED(m_webView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow))))
+    if (FAILED(m_webView->viewWindow(&viewWindow)))
         return point;
 
     ::ScreenToClient(viewWindow, &result);
@@ -518,7 +518,7 @@
 PlatformPageClient WebChromeClient::platformPageClient() const
 {
     HWND viewWindow;
-    if (FAILED(m_webView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow))))
+    if (FAILED(m_webView->viewWindow(&viewWindow)))
         return 0;
     return viewWindow;
 }
@@ -654,7 +654,7 @@
     RefPtr<FileChooser> fileChooser = prpFileChooser;
 
     HWND viewWindow;
-    if (FAILED(m_webView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow))))
+    if (FAILED(m_webView->viewWindow(&viewWindow)))
         return;
 
     bool multiFile = fileChooser->settings().allowsMultipleFiles;
@@ -726,7 +726,7 @@
     if (COMPtr<IWebUIDelegate> delegate = uiDelegate()) {
         COMPtr<IWebUIDelegatePrivate> delegatePrivate(Query, delegate);
         if (delegatePrivate) {
-            if (SUCCEEDED(delegatePrivate->webViewSetCursor(m_webView, reinterpret_cast<OLE_HANDLE>(platformCursor))))
+            if (SUCCEEDED(delegatePrivate->webViewSetCursor(m_webView, platformCursor)))
                 shouldSetCursor = false;
         }
     }

Modified: trunk/Source/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp (172976 => 172977)


--- trunk/Source/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -63,17 +63,17 @@
 
     ASSERT(uiDelegate);
 
-    OLE_HANDLE nativeMenu = reinterpret_cast<OLE_HANDLE>(menu->platformContextMenu());
+    HMENU nativeMenu = menu->platformContextMenu();
     COMPtr<WebElementPropertyBag> propertyBag;
     propertyBag.adoptRef(WebElementPropertyBag::createInstance(m_webView->page()->contextMenuController().hitTestResult()));
     // FIXME: We need to decide whether to do the default before calling this delegate method
     if (FAILED(uiDelegate->contextMenuItemsForElement(m_webView, propertyBag.get(), nativeMenu, &nativeMenu))) {
-        ::DestroyMenu(reinterpret_cast<HMENU>(nativeMenu));
+        ::DestroyMenu(nativeMenu);
         return menu.release();
     }
     
-    OwnPtr<ContextMenu> customizedMenu = adoptPtr(new ContextMenu(reinterpret_cast<HMENU>(nativeMenu)));
-    ::DestroyMenu(reinterpret_cast<HMENU>(nativeMenu));
+    OwnPtr<ContextMenu> customizedMenu = adoptPtr(new ContextMenu(nativeMenu));
+    ::DestroyMenu(nativeMenu);
 
     return customizedMenu.release();
 }

Modified: trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp (172976 => 172977)


--- trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -1167,11 +1167,11 @@
             COMPtr<IWebEmbeddedView> view;
             HRESULT result = uiPrivate->embeddedViewWithArguments(webView, m_webFrame, argumentsBag.get(), &view);
             if (SUCCEEDED(result)) {
-                OLE_HANDLE parentWindow;
+                HWND parentWindow;
                 HRESULT hr = webView->viewWindow(&parentWindow);
                 ASSERT(SUCCEEDED(hr));
 
-                return EmbeddedWidget::create(view.get(), element, reinterpret_cast<HWND>(parentWindow), pluginSize);
+                return EmbeddedWidget::create(view.get(), element, parentWindow, pluginSize);
             }
         }
     }

Modified: trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp (172976 => 172977)


--- trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc.  All rights reserved.
+ * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2014 Apple Inc.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -97,7 +97,7 @@
 
     COMPtr<WebView> frontendWebView(AdoptCOM, WebView::createInstance());
 
-    if (FAILED(frontendWebView->setHostWindow((OLE_HANDLE)(ULONG64)frontendHwnd)))
+    if (FAILED(frontendWebView->setHostWindow(frontendHwnd)))
         return 0;
 
     RECT rect;
@@ -154,7 +154,7 @@
     frontendWebView->setProhibitsMainFrameScrolling(TRUE);
 
     HWND frontendWebViewHwnd;
-    if (FAILED(frontendWebView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&frontendWebViewHwnd))))
+    if (FAILED(frontendWebView->viewWindow(&frontendWebViewHwnd)))
         return 0;
 
     COMPtr<WebMutableURLRequest> request(AdoptCOM, WebMutableURLRequest::createInstance());
@@ -171,10 +171,10 @@
         return 0;
 
     m_frontendPage = core(frontendWebView.get());
-    auto frontendClient = std::make_unique<WebInspectorFrontendClient>(m_inspectedWebView, reinterpret_cast<HWND>(m_inspectedWebViewHandle), frontendHwnd, frontendWebView, frontendWebViewHwnd, this, createFrontendSettings());
+    auto frontendClient = std::make_unique<WebInspectorFrontendClient>(m_inspectedWebView, m_inspectedWebViewHandle, frontendHwnd, frontendWebView, frontendWebViewHwnd, this, createFrontendSettings());
     m_frontendClient = frontendClient.get();
     m_frontendPage->inspectorController().setInspectorFrontendClient(WTF::move(frontendClient));
-    m_frontendHandle = reinterpret_cast<OLE_HANDLE>(frontendHwnd);
+    m_frontendHandle = frontendHwnd;
     return this;
 }
 
@@ -201,8 +201,8 @@
     else
         m_highlight->setShowsWhileWebViewIsVisible(true);
 
-    if (creatingHighlight && IsWindowVisible((HWND)m_frontendHandle))
-        m_highlight->placeBehindWindow(reinterpret_cast<HWND>(m_frontendHandle));
+    if (creatingHighlight && IsWindowVisible(m_frontendHandle))
+        m_highlight->placeBehindWindow(m_frontendHandle);
 }
 
 void WebInspectorClient::hideHighlight()
@@ -313,12 +313,12 @@
     if (!m_attached)
         return;
 
-    OLE_HANDLE hostWindow;
+    HWND hostWindow;
     if (!SUCCEEDED(m_inspectedWebView->hostWindow(&hostWindow)))
         return;
 
     RECT hostWindowRect;
-    GetClientRect(reinterpret_cast<HWND>(hostWindow), &hostWindowRect);
+    GetClientRect(hostWindow, &hostWindowRect);
 
     RECT inspectedRect;
     GetClientRect(m_inspectedWebViewHwnd, &inspectedRect);
@@ -371,12 +371,12 @@
 
     m_attached = false;
 
-    m_frontendWebView->setHostWindow(reinterpret_cast<OLE_HANDLE>(m_frontendHwnd));
+    m_frontendWebView->setHostWindow(m_frontendHwnd);
 
     // Make sure everything has the right size/position.
-    OLE_HANDLE hostWindow;
+    HWND hostWindow;
     if (SUCCEEDED(m_inspectedWebView->hostWindow(&hostWindow)))
-        SendMessage(reinterpret_cast<HWND>(hostWindow), WM_SIZE, 0, 0);
+        SendMessage(hostWindow, WM_SIZE, 0, 0);
 }
 
 void WebInspectorFrontendClient::showWindowWithoutNotifications()
@@ -401,7 +401,7 @@
 
     if (!shouldAttach) {
         // Put the Inspector's WebView inside our window and show it.
-        m_frontendWebView->setHostWindow(reinterpret_cast<OLE_HANDLE>(m_frontendHwnd));
+        m_frontendWebView->setHostWindow(m_frontendHwnd);
         SendMessage(m_frontendHwnd, WM_SIZE, 0, 0);
         updateWindowTitle();
 
@@ -413,10 +413,10 @@
     WindowMessageBroadcaster::addListener(m_inspectedWebViewHwnd, this);
 
     HWND hostWindow;
-    if (FAILED(m_inspectedWebView->hostWindow(reinterpret_cast<OLE_HANDLE*>(&hostWindow))))
+    if (FAILED(m_inspectedWebView->hostWindow(&hostWindow)))
         return;
 
-    m_frontendWebView->setHostWindow(reinterpret_cast<OLE_HANDLE>(hostWindow));
+    m_frontendWebView->setHostWindow(hostWindow);
 
     // Then hide our own window.
     ShowWindow(m_frontendHwnd, SW_HIDE);

Modified: trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.h (172976 => 172977)


--- trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.h	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebInspectorClient.h	2014-08-26 21:39:51 UTC (rev 172977)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006, 2007 Apple Inc.  All rights reserved.
+ * Copyright (C) 2006, 2007, 2014 Apple Inc.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -86,8 +86,8 @@
     WebView* m_inspectedWebView;
     WebCore::Page* m_frontendPage;
     WebInspectorFrontendClient* m_frontendClient;
-    OLE_HANDLE m_inspectedWebViewHandle;
-    OLE_HANDLE m_frontendHandle;
+    HWND m_inspectedWebViewHandle;
+    HWND m_frontendHandle;
 
     OwnPtr<WebNodeHighlight> m_highlight;
 };

Modified: trunk/Source/WebKit/win/WebCoreSupport/WebInspectorDelegate.cpp (172976 => 172977)


--- trunk/Source/WebKit/win/WebCoreSupport/WebInspectorDelegate.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebInspectorDelegate.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2008 Matt Lilek <web...@mattlilek.com>
+ * Copyright (C) 2014 Apple Inc.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: trunk/Source/WebKit/win/WebCoreSupport/WebInspectorDelegate.h (172976 => 172977)


--- trunk/Source/WebKit/win/WebCoreSupport/WebInspectorDelegate.h	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebInspectorDelegate.h	2014-08-26 21:39:51 UTC (rev 172977)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2008 Matt Lilek <web...@mattlilek.com>
+ * Copyright (C) 2014 Apple Inc.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -64,13 +65,9 @@
     virtual HRESULT STDMETHODCALLTYPE webViewUnfocus( 
         /* [in] */ IWebView*) { return E_NOTIMPL; }
 
-    virtual HRESULT STDMETHODCALLTYPE webViewFirstResponder( 
-        /* [in] */ IWebView*,
-        /* [retval][out] */ OLE_HANDLE*) { return E_NOTIMPL; }
+    virtual HRESULT STDMETHODCALLTYPE webViewFirstResponder(IWebView*, HWND*) { return E_NOTIMPL; }
 
-    virtual HRESULT STDMETHODCALLTYPE makeFirstResponder( 
-        /* [in] */ IWebView*,
-        /* [in] */ OLE_HANDLE) { return E_NOTIMPL; }
+    virtual HRESULT STDMETHODCALLTYPE makeFirstResponder(IWebView*, HWND) { return E_NOTIMPL; }
 
     virtual HRESULT STDMETHODCALLTYPE setStatusText( 
         /* [in] */ IWebView*,
@@ -150,11 +147,7 @@
         /* [in] */ IPropertyBag*,
         /* [in] */ UINT /*modifierFlags*/) { return E_NOTIMPL; }
 
-    virtual HRESULT STDMETHODCALLTYPE contextMenuItemsForElement( 
-        /* [in] */ IWebView*,
-        /* [in] */ IPropertyBag*,
-        /* [in] */ OLE_HANDLE,
-        /* [retval][out] */ OLE_HANDLE*) { return E_NOTIMPL; }
+    virtual HRESULT STDMETHODCALLTYPE contextMenuItemsForElement(IWebView*, IPropertyBag*, HMENU, HMENU*) { return E_NOTIMPL; }
 
     virtual HRESULT STDMETHODCALLTYPE validateUserInterfaceItem( 
         /* [in] */ IWebView*,
@@ -192,10 +185,7 @@
     virtual HRESULT STDMETHODCALLTYPE hasCustomMenuImplementation( 
         /* [retval][out] */ BOOL*) { return E_NOTIMPL; }
 
-    virtual HRESULT STDMETHODCALLTYPE trackCustomPopupMenu( 
-        /* [in] */ IWebView*,
-        /* [in] */ OLE_HANDLE,
-        /* [in] */ LPPOINT) { return E_NOTIMPL; }
+    virtual HRESULT STDMETHODCALLTYPE trackCustomPopupMenu(/* [in] */ IWebView*, /* [in] */ HMENU, /* [in] */ LPPOINT) { return E_NOTIMPL; }
 
     virtual HRESULT STDMETHODCALLTYPE measureCustomMenuItem( 
         /* [in] */ IWebView*,
@@ -205,13 +195,9 @@
         /* [in] */ IWebView*,
         /* [in] */ void*  /*drawItem*/) { return E_NOTIMPL; }
 
-    virtual HRESULT STDMETHODCALLTYPE addCustomMenuDrawingData( 
-        /* [in] */ IWebView*,
-        /* [in] */ OLE_HANDLE) { return E_NOTIMPL; }
+    virtual HRESULT STDMETHODCALLTYPE addCustomMenuDrawingData(/* [in] */ IWebView*, /* [in] */ HMENU) { return E_NOTIMPL; }
 
-    virtual HRESULT STDMETHODCALLTYPE cleanUpCustomMenuDrawingData( 
-        /* [in] */ IWebView*,
-        /* [in] */ OLE_HANDLE) { return E_NOTIMPL; }
+    virtual HRESULT STDMETHODCALLTYPE cleanUpCustomMenuDrawingData(/* [in] */ IWebView*, /* [in] */ HMENU) { return E_NOTIMPL; }
 
     virtual HRESULT STDMETHODCALLTYPE canTakeFocus( 
         /* [in] */ IWebView*,
@@ -259,17 +245,9 @@
         /* [in] */ IWebView *webView,
         /* [retval][out] */ float *result) { return E_NOTIMPL; }
     
-    virtual HRESULT STDMETHODCALLTYPE drawHeaderInRect( 
-        /* [in] */ IWebView *webView,
-        /* [in] */ RECT *rect,
-        /* [in] */ OLE_HANDLE drawingContext) { return E_NOTIMPL; }
+    virtual HRESULT STDMETHODCALLTYPE drawHeaderInRect(IWebView*, RECT*, ULONG_PTR) { return E_NOTIMPL; }
     
-    virtual HRESULT STDMETHODCALLTYPE drawFooterInRect( 
-        /* [in] */ IWebView *webView,
-        /* [in] */ RECT *rect,
-        /* [in] */ OLE_HANDLE drawingContext,
-        /* [in] */ UINT pageIndex,
-        /* [in] */ UINT pageCount) { return E_NOTIMPL; }
+    virtual HRESULT STDMETHODCALLTYPE drawFooterInRect(IWebView*, RECT*, ULONG_PTR, UINT, UINT) { return E_NOTIMPL; }
     
     virtual HRESULT STDMETHODCALLTYPE webViewPrintingMarginRect( 
         /* [in] */ IWebView *webView,

Modified: trunk/Source/WebKit/win/WebDropSource.cpp (172976 => 172977)


--- trunk/Source/WebKit/win/WebDropSource.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebDropSource.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -98,9 +98,9 @@
     POINTL pt;
     ::GetCursorPos((LPPOINT)&pt);
     POINTL localpt = pt;
-    OLE_HANDLE viewWindow;
+    HWND viewWindow;
     if (SUCCEEDED(webView->viewWindow(&viewWindow)))
-        ::ScreenToClient(reinterpret_cast<HWND>(viewWindow), reinterpret_cast<LPPOINT>(&localpt));
+        ::ScreenToClient(viewWindow, reinterpret_cast<LPPOINT>(&localpt));
     return PlatformMouseEvent(IntPoint(localpt.x, localpt.y), IntPoint(pt.x, pt.y),
         isDrag ? LeftButton : NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime());
 }
@@ -131,7 +131,7 @@
         return DRAGDROP_S_USEDEFAULTCURSORS;
     
     HWND viewWindow;
-    if (FAILED(m_webView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow))))
+    if (FAILED(m_webView->viewWindow(&viewWindow)))
         return DRAGDROP_S_USEDEFAULTCURSORS;
 
     RECT webViewRect;

Modified: trunk/Source/WebKit/win/WebError.cpp (172976 => 172977)


--- trunk/Source/WebKit/win/WebError.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebError.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -208,8 +208,7 @@
     return S_OK;
 }
 
-HRESULT STDMETHODCALLTYPE WebError::sslPeerCertificate( 
-    /* [retval][out] */ OLE_HANDLE* result)
+HRESULT WebError::sslPeerCertificate(/* [retval][out] */ ULONG_PTR* result)
 {
     if (!result)
         return E_POINTER;
@@ -228,7 +227,7 @@
     void* data = ""
     if (!data)
         return E_FAIL;
-    *result = (OLE_HANDLE)(ULONG64)data;
+    *result = reinterpret_cast<ULONG_PTR>(data);
 #endif
     return *result ? S_OK : E_FAIL;
 }

Modified: trunk/Source/WebKit/win/WebError.h (172976 => 172977)


--- trunk/Source/WebKit/win/WebError.h	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebError.h	2014-08-26 21:39:51 UTC (rev 172977)
@@ -82,8 +82,7 @@
         /* [retval][out] */ BOOL *result);
 
     // IWebErrorPrivate
-    virtual HRESULT STDMETHODCALLTYPE sslPeerCertificate( 
-        /* [retval][out] */ OLE_HANDLE *result);
+    virtual HRESULT STDMETHODCALLTYPE sslPeerCertificate(/* [retval][out] */ ULONG_PTR* result);
 
     const WebCore::ResourceError& resourceError() const;
 

Modified: trunk/Source/WebKit/win/WebFrame.cpp (172976 => 172977)


--- trunk/Source/WebKit/win/WebFrame.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebFrame.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -314,9 +314,7 @@
     return S_OK;
 }
 
-HRESULT STDMETHODCALLTYPE WebFrame::paintDocumentRectToContext(
-    /* [in] */ RECT rect,
-    /* [in] */ OLE_HANDLE deviceContext)
+HRESULT WebFrame::paintDocumentRectToContext(RECT rect, HDC deviceContext)
 {
     Frame* coreFrame = core(this);
     if (!coreFrame)
@@ -329,8 +327,7 @@
     // We can't paint with a layout still pending.
     view->updateLayoutAndStyleIfNeededRecursive();
 
-    HDC dc = reinterpret_cast<HDC>(static_cast<ULONG64>(deviceContext));
-    GraphicsContext gc(dc);
+    GraphicsContext gc(deviceContext);
     gc.setShouldIncludeChildWindows(true);
     gc.save();
     LONG width = rect.right - rect.left;
@@ -346,10 +343,7 @@
     return S_OK;
 }
 
-HRESULT STDMETHODCALLTYPE WebFrame::paintScrollViewRectToContextAtPoint(
-    /* [in] */ RECT rect,
-    /* [in] */ POINT pt,
-    /* [in] */ OLE_HANDLE deviceContext)
+HRESULT WebFrame::paintScrollViewRectToContextAtPoint(RECT rect, POINT pt, HDC deviceContext)
 {
     Frame* coreFrame = core(this);
     if (!coreFrame)
@@ -362,8 +356,7 @@
     // We can't paint with a layout still pending.
     view->updateLayoutAndStyleIfNeededRecursive();
 
-    HDC dc = reinterpret_cast<HDC>(static_cast<ULONG64>(deviceContext));
-    GraphicsContext gc(dc);
+    GraphicsContext gc(deviceContext);
     gc.setShouldIncludeChildWindows(true);
     gc.save();
     IntRect dirtyRect(rect);
@@ -1053,7 +1046,7 @@
     webView->QueryInterface(&d->webView);
     d->webView->Release(); // don't hold the extra ref
 
-    OLE_HANDLE viewWindow;
+    HWND viewWindow;
     d->webView->viewWindow(&viewWindow);
 
     this->AddRef(); // We release this ref in frameLoaderDestroyed()
@@ -1067,7 +1060,7 @@
     webView->QueryInterface(&d->webView);
     d->webView->Release(); // don't hold the extra ref
 
-    OLE_HANDLE viewWindow;
+    HWND viewWindow;
     d->webView->viewWindow(&viewWindow);
 
     this->AddRef(); // We release this ref in frameLoaderDestroyed()
@@ -1584,7 +1577,7 @@
     int x = pageRect.x();
     int y = 0;
     RECT headerRect = {x, y, x+pageRect.width(), y+static_cast<int>(headerHeight)};
-    ui->drawHeaderInRect(d->webView, &headerRect, static_cast<OLE_HANDLE>(reinterpret_cast<LONG64>(pctx)));
+    ui->drawHeaderInRect(d->webView, &headerRect, reinterpret_cast<ULONG_PTR>(pctx));
 }
 
 void WebFrame::drawFooter(PlatformGraphicsContext* pctx, IWebUIDelegate* ui, const IntRect& pageRect, UINT page, UINT pageCount, float headerHeight, float footerHeight)
@@ -1592,7 +1585,7 @@
     int x = pageRect.x();
     int y = max((int)headerHeight+pageRect.height(), m_pageHeight-static_cast<int>(footerHeight));
     RECT footerRect = {x, y, x+pageRect.width(), y+static_cast<int>(footerHeight)};
-    ui->drawFooterInRect(d->webView, &footerRect, static_cast<OLE_HANDLE>(reinterpret_cast<LONG64>(pctx)), page+1, pageCount);
+    ui->drawFooterInRect(d->webView, &footerRect, reinterpret_cast<ULONG_PTR>(pctx), page + 1, pageCount);
 }
 
 void WebFrame::spoolPage(PlatformGraphicsContext* pctx, GraphicsContext* spoolCtx, HDC printDC, IWebUIDelegate* ui, float headerHeight, float footerHeight, UINT page, UINT pageCount)
@@ -1663,7 +1656,7 @@
     int y = 0;
     RECT headerRect = {x, y, x + pageRect.width(), y + static_cast<int>(headerHeight)};
 
-    ui->drawHeaderInRect(d->webView, &headerRect, static_cast<OLE_HANDLE>(reinterpret_cast<LONG64>(hdc)));
+    ui->drawHeaderInRect(d->webView, &headerRect, reinterpret_cast<ULONG_PTR>(hdc));
 }
 
 void WebFrame::drawFooter(PlatformGraphicsContext* pctx, IWebUIDelegate* ui, const IntRect& pageRect, UINT page, UINT pageCount, float headerHeight, float footerHeight)
@@ -1674,7 +1667,7 @@
     int y = max(static_cast<int>(headerHeight) + pageRect.height(), m_pageHeight  -static_cast<int>(footerHeight));
     RECT footerRect = {x, y, x + pageRect.width(), y + static_cast<int>(footerHeight)};
 
-    ui->drawFooterInRect(d->webView, &footerRect, static_cast<OLE_HANDLE>(reinterpret_cast<LONG64>(hdc)), page+1, pageCount);
+    ui->drawFooterInRect(d->webView, &footerRect, reinterpret_cast<ULONG_PTR>(hdc), page+1, pageCount);
 }
 
 static XFORM buildXFORMFromCairo(HDC targetDC, cairo_t* previewContext)

Modified: trunk/Source/WebKit/win/WebFrame.h (172976 => 172977)


--- trunk/Source/WebKit/win/WebFrame.h	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebFrame.h	2014-08-26 21:39:51 UTC (rev 172977)
@@ -236,14 +236,9 @@
 
     virtual HRESULT STDMETHODCALLTYPE reloadFromOrigin();
 
-    virtual HRESULT STDMETHODCALLTYPE paintDocumentRectToContext(
-        /* [in] */ RECT rect,
-        /* [in] */ OLE_HANDLE deviceContext);
+    virtual HRESULT STDMETHODCALLTYPE paintDocumentRectToContext(/* [in] */ RECT rect, /* [in] */ HDC deviceContext);
 
-    virtual HRESULT STDMETHODCALLTYPE paintScrollViewRectToContextAtPoint(
-        /* [in] */ RECT rect,
-        /* [in] */ POINT pt,
-        /* [in] */ OLE_HANDLE deviceContext);
+    virtual HRESULT STDMETHODCALLTYPE paintScrollViewRectToContextAtPoint(/* [in] */ RECT rect, /* [in] */ POINT pt, /* [in] */ HDC deviceContext);
 
     virtual HRESULT STDMETHODCALLTYPE elementDoesAutoComplete(
         /* [in] */ IDOMElement* element, 

Modified: trunk/Source/WebKit/win/WebHistoryItem.cpp (172976 => 172977)


--- trunk/Source/WebKit/win/WebHistoryItem.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebHistoryItem.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -487,8 +487,7 @@
     return S_OK;
 }
 
-HRESULT STDMETHODCALLTYPE WebHistoryItem::icon( 
-    /* [out, retval] */ OLE_HANDLE* /*hBitmap*/)
+HRESULT STDMETHODCALLTYPE WebHistoryItem::icon(/* [out, retval] */ HBITMAP* /*hBitmap*/)
 {
     ASSERT_NOT_REACHED();
     return E_NOTIMPL;

Modified: trunk/Source/WebKit/win/WebHistoryItem.h (172976 => 172977)


--- trunk/Source/WebKit/win/WebHistoryItem.h	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebHistoryItem.h	2014-08-26 21:39:51 UTC (rev 172977)
@@ -78,8 +78,7 @@
     virtual HRESULT STDMETHODCALLTYPE alternateTitle( 
         /* [retval][out] */ BSTR* title);
     
-    virtual HRESULT STDMETHODCALLTYPE icon( 
-        /* [out, retval] */ OLE_HANDLE *hBitmap);
+    virtual HRESULT STDMETHODCALLTYPE icon(/* [out, retval] */ HBITMAP* hBitmap);
 
     // IWebHistoryItemPrivate
     virtual HRESULT STDMETHODCALLTYPE initFromDictionaryRepresentation(void* dictionary);

Modified: trunk/Source/WebKit/win/WebIconDatabase.cpp (172976 => 172977)


--- trunk/Source/WebKit/win/WebIconDatabase.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebIconDatabase.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008, 2009, 2013-2014 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -161,11 +161,7 @@
     return S_OK;
 }
 
-HRESULT WebIconDatabase::iconForURL(
-        /* [in] */ BSTR url,
-        /* [optional][in] */ LPSIZE size,
-        /* [optional][in] */ BOOL /*cache*/,
-        /* [retval][out] */ OLE_HANDLE* bitmap)
+HRESULT WebIconDatabase::iconForURL(BSTR url, LPSIZE size, BOOL /*cache*/, HBITMAP* bitmap)
 {
     if (!size)
         return E_POINTER;
@@ -178,8 +174,8 @@
 
     // Make sure we check for the case of an "empty image"
     if (icon && icon->width()) {
-        *bitmap = (OLE_HANDLE)(ULONG64)getOrCreateSharedBitmap(intSize);
-        if (!icon->getHBITMAPOfSize((HBITMAP)(ULONG64)*bitmap, &intSize)) {
+        *bitmap = getOrCreateSharedBitmap(intSize);
+        if (!icon->getHBITMAPOfSize(*bitmap, &intSize)) {
             LOG_ERROR("Failed to draw Image to HBITMAP");
             *bitmap = 0;
             return E_FAIL;
@@ -190,16 +186,14 @@
     return defaultIconWithSize(size, bitmap);
 }
 
-HRESULT STDMETHODCALLTYPE WebIconDatabase::defaultIconWithSize(
-        /* [in] */ LPSIZE size,
-        /* [retval][out] */ OLE_HANDLE* result)
+HRESULT WebIconDatabase::defaultIconWithSize(LPSIZE size, HBITMAP* result)
 {
     if (!size)
         return E_POINTER;
 
     IntSize intSize(*size);
 
-    *result = (OLE_HANDLE)(ULONG64)getOrCreateDefaultIconBitmap(intSize);
+    *result = getOrCreateDefaultIconBitmap(intSize);
     return S_OK;
 }
 

Modified: trunk/Source/WebKit/win/WebIconDatabase.h (172976 => 172977)


--- trunk/Source/WebKit/win/WebIconDatabase.h	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebIconDatabase.h	2014-08-26 21:39:51 UTC (rev 172977)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008, 2009, 2013-2014 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -65,16 +65,10 @@
     virtual HRESULT STDMETHODCALLTYPE sharedIconDatabase( 
         /* [retval][out] */ IWebIconDatabase **result);
     
-    virtual HRESULT STDMETHODCALLTYPE iconForURL( 
-        /* [in] */ BSTR url,
-        /* [optional][in] */ LPSIZE size,
-        /* [optional][in] */ BOOL cache,
-        /* [retval][out] */ OLE_HANDLE *image);
+    virtual HRESULT STDMETHODCALLTYPE iconForURL(BSTR url, LPSIZE, BOOL cache, HBITMAP* image);
+
+    virtual HRESULT STDMETHODCALLTYPE defaultIconWithSize(/* [in] */ LPSIZE size, /* [retval][out] */ HBITMAP* result);
     
-    virtual HRESULT STDMETHODCALLTYPE defaultIconWithSize( 
-        /* [in] */ LPSIZE size,
-        /* [retval][out] */ OLE_HANDLE *result);
-    
     virtual HRESULT STDMETHODCALLTYPE retainIconForURL( 
         /* [in] */ BSTR url);
     

Modified: trunk/Source/WebKit/win/WebMutableURLRequest.cpp (172976 => 172977)


--- trunk/Source/WebKit/win/WebMutableURLRequest.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebMutableURLRequest.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -366,13 +366,12 @@
     return S_OK;
 }
 
-HRESULT STDMETHODCALLTYPE WebMutableURLRequest::setClientCertificate(
-    /* [in] */ OLE_HANDLE cert)
+HRESULT STDMETHODCALLTYPE WebMutableURLRequest::setClientCertificate(/* [in] */ ULONG_PTR cert)
 {
     if (!cert)
         return E_POINTER;
 
-    PCCERT_CONTEXT certContext = reinterpret_cast<PCCERT_CONTEXT>((ULONG64)cert);
+    PCCERT_CONTEXT certContext = reinterpret_cast<PCCERT_CONTEXT>(cert);
     RetainPtr<CFDataRef> certData = WebCore::copyCertificateToData(certContext);
     ResourceHandle::setClientCertificate(m_request.url().host(), certData.get());
     return S_OK;

Modified: trunk/Source/WebKit/win/WebMutableURLRequest.h (172976 => 172977)


--- trunk/Source/WebKit/win/WebMutableURLRequest.h	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebMutableURLRequest.h	2014-08-26 21:39:51 UTC (rev 172977)
@@ -155,8 +155,7 @@
 
     // IWebMutableURLRequestPrivate
 
-    virtual HRESULT STDMETHODCALLTYPE setClientCertificate(
-        /* [in] */ OLE_HANDLE cert);
+    virtual HRESULT STDMETHODCALLTYPE setClientCertificate(ULONG_PTR);
 
     virtual /* [local] */ CFURLRequestRef STDMETHODCALLTYPE cfRequest();
 

Modified: trunk/Source/WebKit/win/WebNodeHighlight.cpp (172976 => 172977)


--- trunk/Source/WebKit/win/WebNodeHighlight.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebNodeHighlight.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -57,7 +57,7 @@
     , m_showsWhileWebViewIsVisible(false)
 {
 #if ENABLE(INSPECTOR)
-    m_inspectedWebView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&m_inspectedWebViewWindow));
+    m_inspectedWebView->viewWindow(&m_inspectedWebViewWindow);
 #endif // ENABLE(INSPECTOR)
 }
 

Modified: trunk/Source/WebKit/win/WebURLResponse.cpp (172976 => 172977)


--- trunk/Source/WebKit/win/WebURLResponse.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebURLResponse.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -400,8 +400,7 @@
 }
 
 
-HRESULT STDMETHODCALLTYPE WebURLResponse::sslPeerCertificate( 
-    /* [retval][out] */ OLE_HANDLE* result)
+HRESULT WebURLResponse::sslPeerCertificate(/* [retval][out] */ ULONG_PTR* result)
 {
     if (!result)
         return E_POINTER;
@@ -414,7 +413,7 @@
     void* data = ""
     if (!data)
         return E_FAIL;
-    *result = (OLE_HANDLE)(ULONG64)data;
+    *result = reinterpret_cast<ULONG_PTR>(data);
 #endif
 
     return *result ? S_OK : E_FAIL;

Modified: trunk/Source/WebKit/win/WebURLResponse.h (172976 => 172977)


--- trunk/Source/WebKit/win/WebURLResponse.h	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebURLResponse.h	2014-08-26 21:39:51 UTC (rev 172977)
@@ -81,8 +81,7 @@
         /* [retval][out] */ BOOL *attachment);
 
     // IWebURLResponsePrivate
-    virtual HRESULT STDMETHODCALLTYPE sslPeerCertificate( 
-        /* [retval][out] */ OLE_HANDLE *result);
+    virtual HRESULT STDMETHODCALLTYPE sslPeerCertificate(/* [retval][out] */ ULONG_PTR* result);
     
     const WebCore::ResourceResponse& resourceResponse() const;
 

Modified: trunk/Source/WebKit/win/WebView.cpp (172976 => 172977)


--- trunk/Source/WebKit/win/WebView.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebView.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -1184,7 +1184,7 @@
 
     COMPtr<IWebUIDelegatePrivate2> uiPrivate(Query, m_uiDelegate);
     if (uiPrivate)
-        uiPrivate->drawBackground(this, reinterpret_cast<OLE_HANDLE>(bitmapDC), &rect);
+        uiPrivate->drawBackground(this, bitmapDC, &rect);
 
     if (frameView && frameView->frame().contentRenderer()) {
         gc.clip(dirtyRect);
@@ -1392,7 +1392,7 @@
         m_uiDelegate->hasCustomMenuImplementation(&hasCustomMenus);
 
     if (hasCustomMenus)
-        m_uiDelegate->trackCustomPopupMenu((IWebView*)this, (OLE_HANDLE)(ULONG64)coreMenu->platformContextMenu(), &point);
+        m_uiDelegate->trackCustomPopupMenu((IWebView*)this, coreMenu->platformContextMenu(), &point);
     else {
         // Surprisingly, TPM_RIGHTBUTTON means that items are selectable with either the right OR left mouse button
         UINT flags = TPM_RIGHTBUTTON | TPM_TOPALIGN | TPM_VERPOSANIMATION | TPM_HORIZONTAL
@@ -1445,7 +1445,7 @@
     if (!hasCustomMenus)
         return false;
 
-    m_uiDelegate->addCustomMenuDrawingData((IWebView*)this, (OLE_HANDLE)(ULONG64)menu);
+    m_uiDelegate->addCustomMenuDrawingData((IWebView*)this, menu);
     return true;
 }
 
@@ -1463,7 +1463,7 @@
     if (!hasCustomMenus)
         return false;
 
-    m_uiDelegate->cleanUpCustomMenuDrawingData((IWebView*)this, (OLE_HANDLE)(ULONG64)menu);
+    m_uiDelegate->cleanUpCustomMenuDrawingData((IWebView*)this, menu);
     return true;
 }
 
@@ -2312,7 +2312,7 @@
             HWND newFocusWnd = reinterpret_cast<HWND>(wParam);
             if (SUCCEEDED(webView->uiDelegate(&uiDelegate)) && uiDelegate
                 && SUCCEEDED(uiDelegate->QueryInterface(IID_IWebUIDelegatePrivate, (void**) &uiDelegatePrivate)) && uiDelegatePrivate)
-                uiDelegatePrivate->webViewLostFocus(webView, (OLE_HANDLE)(ULONG64)newFocusWnd);
+                uiDelegatePrivate->webViewLostFocus(webView, newFocusWnd);
 
             FocusController& focusController = webView->page()->focusController();
             Frame& frame = focusController.focusedOrMainFrame();
@@ -2920,7 +2920,7 @@
             icon->getHBITMAPOfSize(hBitmap, &sz);
         }
 
-        HRESULT hr = m_frameLoadDelegate->didReceiveIcon(this, (OLE_HANDLE)hBitmap, frame);
+        HRESULT hr = m_frameLoadDelegate->didReceiveIcon(this, hBitmap, frame);
         if (hr == E_NOTIMPL)
             DeleteObject(hBitmap);
     }
@@ -3445,10 +3445,8 @@
     KillTimer(m_viewWindow, DeleteBackingStoreTimer);
 }
 
-HRESULT STDMETHODCALLTYPE WebView::setHostWindow( 
-    /* [in] */ OLE_HANDLE oleWindow)
+HRESULT WebView::setHostWindow(/* [in] */ HWND window)
 {
-    HWND window = (HWND)(ULONG64)oleWindow;
     if (m_viewWindow) {
         if (window)
             SetParent(m_viewWindow, window);
@@ -3468,10 +3466,9 @@
     return S_OK;
 }
 
-HRESULT STDMETHODCALLTYPE WebView::hostWindow( 
-    /* [retval][out] */ OLE_HANDLE* window)
+HRESULT WebView::hostWindow(/* [retval][out] */ HWND* window)
 {
-    *window = (OLE_HANDLE)(ULONG64)m_hostWindow;
+    *window = m_hostWindow;
     return S_OK;
 }
 
@@ -3594,14 +3591,14 @@
     return createMatchEnumerator(&allRects, pmatches);
 }
 
-HRESULT STDMETHODCALLTYPE WebView::generateSelectionImage(BOOL forceWhiteText, OLE_HANDLE* hBitmap)
+HRESULT STDMETHODCALLTYPE WebView::generateSelectionImage(BOOL forceWhiteText, HBITMAP* hBitmap)
 {
     *hBitmap = 0;
 
     WebCore::Frame& frame = m_page->focusController().focusedOrMainFrame();
 
     auto bitmap = imageFromSelection(&frame, forceWhiteText ? TRUE : FALSE);
-    *hBitmap = static_cast<OLE_HANDLE>(reinterpret_cast<ULONG64>(bitmap.leak()));
+    *hBitmap = bitmap.leak();
 
     return S_OK;
 }
@@ -3856,8 +3853,7 @@
     return E_NOTIMPL;
 }
     
-HRESULT STDMETHODCALLTYPE WebView::mainFrameIcon( 
-        /* [retval][out] */ OLE_HANDLE* /*hBitmap*/)
+HRESULT WebView::mainFrameIcon(/* [retval][out] */ HBITMAP* /*hBitmap*/)
 {
     ASSERT_NOT_REACHED();
     return E_NOTIMPL;
@@ -5128,10 +5124,9 @@
     return E_NOTIMPL;
 }
 
-HRESULT STDMETHODCALLTYPE WebView::viewWindow( 
-        /* [retval][out] */ OLE_HANDLE *window)
+HRESULT WebView::viewWindow(/* [retval][out] */ HWND* window)
 {
-    *window = (OLE_HANDLE)(ULONG64)m_viewWindow;
+    *window = m_viewWindow;
     return S_OK;
 }
 
@@ -5907,9 +5902,7 @@
     return S_OK;
 }
 
-HRESULT STDMETHODCALLTYPE WebView::paintDocumentRectToContext(
-    /* [in] */ RECT rect,
-    /* [in] */ OLE_HANDLE deviceContext)
+HRESULT WebView::paintDocumentRectToContext(RECT rect, HDC deviceContext)
 {
     if (!deviceContext)
         return E_POINTER;
@@ -5920,10 +5913,7 @@
     return m_mainFrame->paintDocumentRectToContext(rect, deviceContext);
 }
 
-HRESULT STDMETHODCALLTYPE WebView::paintScrollViewRectToContextAtPoint(
-    /* [in] */ RECT rect,
-    /* [in] */ POINT pt,
-    /* [in] */ OLE_HANDLE deviceContext)
+HRESULT WebView::paintScrollViewRectToContextAtPoint(RECT rect, POINT pt, HDC deviceContext)
 {
     if (!deviceContext)
         return E_POINTER;
@@ -5992,14 +5982,13 @@
     return E_FAIL;
 }
 
-HRESULT STDMETHODCALLTYPE WebView::backingStore(
-    /* [out, retval] */ OLE_HANDLE* hBitmap)
+HRESULT WebView::backingStore(/* [out, retval] */ HBITMAP* hBitmap)
 {
     if (!hBitmap)
         return E_POINTER;
     if (!m_backingStoreBitmap)
         return E_FAIL;
-    *hBitmap = reinterpret_cast<OLE_HANDLE>(m_backingStoreBitmap->get());
+    *hBitmap = m_backingStoreBitmap->get();
     return S_OK;
 }
 
@@ -6927,7 +6916,7 @@
 
 void WebView::fullScreenClientSetParentWindow(HWND hostWindow)
 {
-    setHostWindow(reinterpret_cast<OLE_HANDLE>(hostWindow));
+    setHostWindow(hostWindow);
 }
 
 void WebView::fullScreenClientWillEnterFullScreen()

Modified: trunk/Source/WebKit/win/WebView.h (172976 => 172977)


--- trunk/Source/WebKit/win/WebView.h	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Source/WebKit/win/WebView.h	2014-08-26 21:39:51 UTC (rev 172977)
@@ -245,11 +245,9 @@
     virtual HRESULT STDMETHODCALLTYPE preferencesIdentifier( 
         /* [retval][out] */ BSTR *anIdentifier);
     
-    virtual HRESULT STDMETHODCALLTYPE setHostWindow( 
-        /* [in] */ OLE_HANDLE window);
+    virtual HRESULT STDMETHODCALLTYPE setHostWindow(HWND);
     
-    virtual HRESULT STDMETHODCALLTYPE hostWindow( 
-        /* [retval][out] */ OLE_HANDLE *window);
+    virtual HRESULT STDMETHODCALLTYPE hostWindow(HWND*);
     
     virtual HRESULT STDMETHODCALLTYPE searchFor( 
         /* [in] */ BSTR str,
@@ -326,8 +324,7 @@
     virtual HRESULT STDMETHODCALLTYPE mainFrameTitle( 
         /* [retval][out] */ BSTR *title);
     
-    virtual HRESULT STDMETHODCALLTYPE mainFrameIcon( 
-        /* [retval][out] */ OLE_HANDLE *hBitmap);
+    virtual HRESULT STDMETHODCALLTYPE mainFrameIcon(/* [retval][out] */ HBITMAP* hBitmap);
 
     virtual HRESULT STDMETHODCALLTYPE registerURLSchemeAsLocal( 
         /* [in] */ BSTR scheme);
@@ -623,8 +620,7 @@
     virtual HRESULT STDMETHODCALLTYPE inViewSourceMode( 
         /* [retval][out] */ BOOL* flag);
 
-    virtual HRESULT STDMETHODCALLTYPE viewWindow( 
-        /* [retval][out] */ OLE_HANDLE *window);
+    virtual HRESULT STDMETHODCALLTYPE viewWindow(/* [retval][out] */ HWND* window);
 
     virtual HRESULT STDMETHODCALLTYPE setFormDelegate( 
         /* [in] */ IWebFormDelegate *formDelegate);
@@ -661,8 +657,7 @@
     virtual HRESULT STDMETHODCALLTYPE rectsForTextMatches(
         IEnumTextMatches** pmatches);
 
-    virtual HRESULT STDMETHODCALLTYPE generateSelectionImage(
-        BOOL forceWhiteText, OLE_HANDLE* hBitmap);
+    virtual HRESULT STDMETHODCALLTYPE generateSelectionImage(BOOL forceWhiteText, HBITMAP* hBitmap);
 
     virtual HRESULT STDMETHODCALLTYPE selectionRect(
         RECT* rc);
@@ -718,14 +713,9 @@
 
     virtual HRESULT STDMETHODCALLTYPE windowAncestryDidChange();
 
-    virtual HRESULT STDMETHODCALLTYPE paintDocumentRectToContext(
-        /* [in] */ RECT rect,
-        /* [in] */ OLE_HANDLE dc);
+    virtual HRESULT STDMETHODCALLTYPE paintDocumentRectToContext(RECT, HDC);
 
-    virtual HRESULT STDMETHODCALLTYPE paintScrollViewRectToContextAtPoint(
-        /* [in] */ RECT rect,
-        /* [in] */ POINT pt,
-        /* [in] */ OLE_HANDLE dc);
+    virtual HRESULT STDMETHODCALLTYPE paintScrollViewRectToContextAtPoint(RECT, POINT, HDC);
 
     virtual HRESULT STDMETHODCALLTYPE reportException(
         /* [in] */ JSContextRef context,
@@ -742,8 +732,7 @@
     virtual HRESULT STDMETHODCALLTYPE setCustomHTMLTokenizerChunkSize(
         /* [in] */ int chunkSize);
 
-    virtual HRESULT STDMETHODCALLTYPE backingStore(
-        /* [out, retval] */ OLE_HANDLE* hBitmap);
+    virtual HRESULT STDMETHODCALLTYPE backingStore(/* [out, retval] */ HBITMAP* hBitmap);
 
     virtual HRESULT STDMETHODCALLTYPE setTransparent(
         /* [in] */ BOOL transparent);

Modified: trunk/Tools/ChangeLog (172976 => 172977)


--- trunk/Tools/ChangeLog	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Tools/ChangeLog	2014-08-26 21:39:51 UTC (rev 172977)
@@ -1,3 +1,56 @@
+2014-08-26  Brent Fulgham  <bfulg...@apple.com>
+
+        [Win] WebKit IDL incorrectly passes HWND as OLE_HANDLE
+        https://bugs.webkit.org/show_bug.cgi?id=136258
+        <rdar://problem/18134138>
+
+        Reviewed by Tim Horton.
+
+        Avoid 32/64-bit truncation by preventing 64-bit HWND (and other)
+        values from passing through the 32-bit OLE_HANDLE data type.
+
+        * DumpRenderTree/win/AccessibilityControllerWin.cpp:
+        (AccessibilityController::rootElement):
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        (resetWebViewToConsistentStateBeforeTesting):
+        (runTest):
+        (createWebViewAndOffscreenWindow):
+        * DumpRenderTree/win/FrameLoadDelegate.h:
+        (FrameLoadDelegate::didReceiveIcon):
+        * DumpRenderTree/win/TestRunnerWin.cpp:
+        (TestRunner::setWindowIsKey):
+        * DumpRenderTree/win/UIDelegate.cpp:
+        (UIDelegate::trackCustomPopupMenu):
+        (UIDelegate::drawHeaderInRect):
+        (UIDelegate::drawFooterInRect):
+        (UIDelegate::webViewClose):
+        (UIDelegate::webViewFocus):
+        (UIDelegate::webViewSetCursor):
+        (UIDelegate::drawBackground):
+        * DumpRenderTree/win/UIDelegate.h:
+        (UIDelegate::webViewFirstResponder):
+        (UIDelegate::makeFirstResponder):
+        (UIDelegate::contextMenuItemsForElement):
+        (UIDelegate::addCustomMenuDrawingData):
+        (UIDelegate::cleanUpCustomMenuDrawingData):
+        (UIDelegate::webViewLostFocus):
+        * TestWebKitAPI/Tests/WebKit/win/WebViewDestruction.cpp:
+        (TestWebKitAPI::WebViewDestructionWithHostWindow::SetUp):
+        * WinLauncher/PrintWebUIDelegate.cpp:
+        (PrintWebUIDelegate::drawHeaderInRect):
+        (PrintWebUIDelegate::drawFooterInRect):
+        * WinLauncher/PrintWebUIDelegate.h:
+        (PrintWebUIDelegate::webViewFirstResponder):
+        (PrintWebUIDelegate::makeFirstResponder):
+        (PrintWebUIDelegate::contextMenuItemsForElement):
+        (PrintWebUIDelegate::trackCustomPopupMenu):
+        (PrintWebUIDelegate::addCustomMenuDrawingData):
+        (PrintWebUIDelegate::cleanUpCustomMenuDrawingData):
+        * WinLauncher/WinLauncher.cpp:
+        (WinLauncher::prepareViews):
+        * WinLauncher/WinLauncherWebHost.h:
+        (WinLauncherWebHost::didReceiveIcon):
+
 2014-08-26  Daniel Bates  <daba...@apple.com>
 
         Only define WEBCORE_EXPORT when building DumpRenderTree for Windows and iOS

Modified: trunk/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp (172976 => 172977)


--- trunk/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -164,14 +164,14 @@
     if (!viewPrivate)
         return 0;
 
-    OLE_HANDLE webViewWindow;
+    HWND webViewWindow;
     if (FAILED(viewPrivate->viewWindow(&webViewWindow)))
         return 0;
 
     // Get the root accessible object by querying for the accessible object for the
     // WebView's window.
     COMPtr<IAccessible> rootAccessible;
-    if (FAILED(AccessibleObjectFromWindow(reinterpret_cast<HWND>(webViewWindow), static_cast<DWORD>(OBJID_CLIENT), __uuidof(IAccessible), reinterpret_cast<void**>(&rootAccessible))))
+    if (FAILED(AccessibleObjectFromWindow(webViewWindow, static_cast<DWORD>(OBJID_CLIENT), __uuidof(IAccessible), reinterpret_cast<void**>(&rootAccessible))))
         return 0;
 
     return rootAccessible;

Modified: trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp (172976 => 172977)


--- trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -878,7 +878,7 @@
         return;
 
     HWND viewWindow;
-    if (SUCCEEDED(webViewPrivate->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow))) && viewWindow)
+    if (SUCCEEDED(webViewPrivate->viewWindow(&viewWindow)) && viewWindow)
         SetFocus(viewWindow);
 
     webViewPrivate->clearMainFrameName();
@@ -1065,7 +1065,7 @@
     WorkQueue::shared()->setFrozen(false);
 
     HWND hostWindow;
-    webView->hostWindow(reinterpret_cast<OLE_HANDLE*>(&hostWindow));
+    webView->hostWindow(&hostWindow);
 
     COMPtr<IWebMutableURLRequest> request;
     HRESULT hr = WebKitCreateInstance(CLSID_WebMutableURLRequest, 0, IID_IWebMutableURLRequest, (void**)&request);
@@ -1151,7 +1151,7 @@
         return 0;
     }
 
-    if (FAILED(webView->setHostWindow((OLE_HANDLE)(ULONG64)hostWindow)))
+    if (FAILED(webView->setHostWindow(hostWindow)))
         return 0;
 
     RECT clientRect;
@@ -1174,7 +1174,7 @@
         return 0;
 
     HWND viewWindow;
-    if (FAILED(viewPrivate->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow))))
+    if (FAILED(viewPrivate->viewWindow(&viewWindow)))
         return 0;
     if (webViewWindow)
         *webViewWindow = viewWindow;

Modified: trunk/Tools/DumpRenderTree/win/FrameLoadDelegate.h (172976 => 172977)


--- trunk/Tools/DumpRenderTree/win/FrameLoadDelegate.h	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Tools/DumpRenderTree/win/FrameLoadDelegate.h	2014-08-26 21:39:51 UTC (rev 172977)
@@ -78,10 +78,7 @@
         /* [in] */ IWebView *webView,
         /* [in] */ IWebFrame *frame);
 
-    virtual HRESULT STDMETHODCALLTYPE didReceiveIcon( 
-        /* [in] */ IWebView *webView,
-        /* [in] */ OLE_HANDLE image,
-        /* [in] */ IWebFrame *frame) { return E_NOTIMPL; } 
+    virtual HRESULT STDMETHODCALLTYPE didReceiveIcon(/* [in] */ IWebView*, /* [in] */ HBITMAP, /* [in] */ IWebFrame*) { return E_NOTIMPL; } 
 
     virtual HRESULT STDMETHODCALLTYPE didFinishLoadForFrame( 
         /* [in] */ IWebView *webView,

Modified: trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp (172976 => 172977)


--- trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -690,11 +690,11 @@
     if (FAILED(webView->QueryInterface(&viewPrivate)))
         return;
 
-    OLE_HANDLE webViewWindow;
+    HWND webViewWindow;
     if (FAILED(viewPrivate->viewWindow(&webViewWindow)))
         return;
 
-    ::SendMessage(reinterpret_cast<HWND>(webViewWindow), flag ? WM_SETFOCUS : WM_KILLFOCUS, (WPARAM)::GetDesktopWindow(), 0);
+    ::SendMessage(webViewWindow, flag ? WM_SETFOCUS : WM_KILLFOCUS, (WPARAM)::GetDesktopWindow(), 0);
 }
 
 static const CFTimeInterval waitToDumpWatchdogInterval = 30.0;

Modified: trunk/Tools/DumpRenderTree/win/UIDelegate.cpp (172976 => 172977)


--- trunk/Tools/DumpRenderTree/win/UIDelegate.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Tools/DumpRenderTree/win/UIDelegate.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -206,7 +206,7 @@
     return S_OK;
 }
 
-HRESULT UIDelegate::trackCustomPopupMenu(IWebView* /*sender*/, OLE_HANDLE /*menu*/, LPPOINT /*point*/)
+HRESULT UIDelegate::trackCustomPopupMenu(IWebView* /*sender*/, HMENU /*menu*/, LPPOINT /*point*/)
 {
     // Do nothing
     return S_OK;
@@ -291,12 +291,12 @@
     return E_NOTIMPL;
 }
 
-HRESULT UIDelegate::drawHeaderInRect(IWebView* /*webView*/, RECT* /*rect*/, OLE_HANDLE /*drawingContext*/)
+HRESULT UIDelegate::drawHeaderInRect(IWebView* /*webView*/, RECT* /*rect*/, ULONG_PTR /*drawingContext*/)
 {
     return E_NOTIMPL;
 }
 
-HRESULT UIDelegate::drawFooterInRect(IWebView* /*webView*/, RECT* /*rect*/, OLE_HANDLE /*drawingContext*/, UINT /*pageIndex*/, UINT /*pageCount*/)
+HRESULT UIDelegate::drawFooterInRect(IWebView* /*webView*/, RECT* /*rect*/, ULONG_PTR /*drawingContext*/, UINT /*pageIndex*/, UINT /*pageCount*/)
 {
     return E_NOTIMPL;
 }
@@ -452,7 +452,7 @@
 HRESULT UIDelegate::webViewClose(IWebView* sender)
 {
     HWND hostWindow;
-    sender->hostWindow(reinterpret_cast<OLE_HANDLE*>(&hostWindow));
+    sender->hostWindow(&hostWindow);
     DestroyWindow(hostWindow);
     return S_OK;
 }
@@ -460,7 +460,7 @@
 HRESULT UIDelegate::webViewFocus(IWebView* sender)
 {
     HWND hostWindow;
-    sender->hostWindow(reinterpret_cast<OLE_HANDLE*>(&hostWindow));
+    sender->hostWindow(&hostWindow);
     SetForegroundWindow(hostWindow);
     return S_OK; 
 }
@@ -540,7 +540,7 @@
     return E_NOTIMPL;
 }
 
-HRESULT UIDelegate::webViewSetCursor(IWebView* /*sender*/, OLE_HANDLE /*cursor*/)
+HRESULT UIDelegate::webViewSetCursor(IWebView* /*sender*/, HCURSOR /*cursor*/)
 {
     return E_NOTIMPL;
 }
@@ -568,7 +568,7 @@
     return E_NOTIMPL;
 }
 
-HRESULT UIDelegate::drawBackground(IWebView* /*sender*/, OLE_HANDLE hdc, const RECT* dirtyRect)
+HRESULT UIDelegate::drawBackground(IWebView* /*sender*/, HDC /*hdc*/, const RECT* /*dirtyRect*/)
 {
     return E_NOTIMPL;
 }

Modified: trunk/Tools/DumpRenderTree/win/UIDelegate.h (172976 => 172977)


--- trunk/Tools/DumpRenderTree/win/UIDelegate.h	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Tools/DumpRenderTree/win/UIDelegate.h	2014-08-26 21:39:51 UTC (rev 172977)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005, 2006, 2007 Apple Inc.  All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2014 Apple Inc.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -66,13 +66,9 @@
     virtual HRESULT STDMETHODCALLTYPE webViewUnfocus( 
         /* [in] */ IWebView *sender);
 
-    virtual HRESULT STDMETHODCALLTYPE webViewFirstResponder( 
-        /* [in] */ IWebView *sender,
-        /* [retval][out] */ OLE_HANDLE *responder) { return E_NOTIMPL; }
+    virtual HRESULT STDMETHODCALLTYPE webViewFirstResponder(IWebView*, HWND*) { return E_NOTIMPL; }
 
-    virtual HRESULT STDMETHODCALLTYPE makeFirstResponder( 
-        /* [in] */ IWebView *sender,
-        /* [in] */ OLE_HANDLE responder) { return E_NOTIMPL; }
+    virtual HRESULT STDMETHODCALLTYPE makeFirstResponder(IWebView*, HWND) { return E_NOTIMPL; }
 
     virtual HRESULT STDMETHODCALLTYPE setStatusText( 
         /* [in] */ IWebView *sender,
@@ -152,11 +148,7 @@
         /* [in] */ IPropertyBag *elementInformation,
         /* [in] */ UINT modifierFlags) { return E_NOTIMPL; }
 
-    virtual HRESULT STDMETHODCALLTYPE contextMenuItemsForElement( 
-        /* [in] */ IWebView *sender,
-        /* [in] */ IPropertyBag *element,
-        /* [in] */ OLE_HANDLE defaultItems,
-        /* [retval][out] */ OLE_HANDLE *resultMenu) { return E_NOTIMPL; }
+    virtual HRESULT STDMETHODCALLTYPE contextMenuItemsForElement(IWebView*, IPropertyBag*, HMENU, HMENU*) { return E_NOTIMPL; }
 
     virtual HRESULT STDMETHODCALLTYPE validateUserInterfaceItem( 
         /* [in] */ IWebView *webView,
@@ -199,10 +191,7 @@
     virtual HRESULT STDMETHODCALLTYPE hasCustomMenuImplementation( 
         /* [retval][out] */ BOOL *hasCustomMenus);
     
-    virtual HRESULT STDMETHODCALLTYPE trackCustomPopupMenu( 
-        /* [in] */ IWebView *sender,
-        /* [in] */ OLE_HANDLE menu,
-        /* [in] */ LPPOINT point);
+    virtual HRESULT STDMETHODCALLTYPE trackCustomPopupMenu(/* [in] */ IWebView* sender, /* [in] */ HMENU, /* [in] */ LPPOINT);
        
     virtual HRESULT STDMETHODCALLTYPE measureCustomMenuItem( 
         /* [in] */ IWebView *sender,
@@ -212,13 +201,9 @@
         /* [in] */ IWebView *sender,
         /* [in] */ void *drawItem) { return E_NOTIMPL; }
 
-    virtual HRESULT STDMETHODCALLTYPE addCustomMenuDrawingData( 
-        /* [in] */ IWebView *sender,
-        /* [in] */ OLE_HANDLE menu) { return E_NOTIMPL; }
+    virtual HRESULT STDMETHODCALLTYPE addCustomMenuDrawingData(IWebView*, HMENU) { return E_NOTIMPL; }
 
-    virtual HRESULT STDMETHODCALLTYPE cleanUpCustomMenuDrawingData( 
-        /* [in] */ IWebView *sender,
-        /* [in] */ OLE_HANDLE menu) { return E_NOTIMPL; }
+    virtual HRESULT STDMETHODCALLTYPE cleanUpCustomMenuDrawingData(IWebView*, HMENU) { return E_NOTIMPL; }
 
     virtual HRESULT STDMETHODCALLTYPE canTakeFocus( 
         /* [in] */ IWebView *sender,
@@ -266,17 +251,9 @@
         /* [in] */ IWebView *webView,
         /* [retval][out] */ float *result);
     
-    virtual HRESULT STDMETHODCALLTYPE drawHeaderInRect( 
-        /* [in] */ IWebView *webView,
-        /* [in] */ RECT *rect,
-        /* [in] */ OLE_HANDLE drawingContext);
+    virtual HRESULT STDMETHODCALLTYPE drawHeaderInRect(IWebView*, RECT*, ULONG_PTR drawingContext);
     
-    virtual HRESULT STDMETHODCALLTYPE drawFooterInRect( 
-        /* [in] */ IWebView *webView,
-        /* [in] */ RECT *rect,
-        /* [in] */ OLE_HANDLE drawingContext,
-        /* [in] */ UINT pageIndex,
-        /* [in] */ UINT pageCount);
+    virtual HRESULT STDMETHODCALLTYPE drawFooterInRect(IWebView*, RECT*, ULONG_PTR drawingContext, UINT pageIndex, UINT pageCount);
     
     virtual HRESULT STDMETHODCALLTYPE webViewPrintingMarginRect( 
         /* [in] */ IWebView *webView,
@@ -327,7 +304,7 @@
 
     virtual HRESULT STDMETHODCALLTYPE createWebViewWithRequest(IWebView* sender, IWebURLRequest* request, IPropertyBag* windowFeatures, IWebView** newWebView);
 
-    virtual HRESULT STDMETHODCALLTYPE drawBackground(IWebView* sender, OLE_HANDLE hdc, const RECT* dirtyRect);
+    virtual HRESULT STDMETHODCALLTYPE drawBackground(IWebView* sender, HDC, const RECT* dirtyRect);
 
     virtual HRESULT STDMETHODCALLTYPE decidePolicyForGeolocationRequest(IWebView* sender, IWebFrame* frame, IWebSecurityOrigin* origin, IWebGeolocationPolicyListener* listener);
 
@@ -359,9 +336,7 @@
     virtual HRESULT STDMETHODCALLTYPE webViewReceivedFocus( 
         /* [in] */ IWebView *sender) { return E_NOTIMPL; }
     
-    virtual HRESULT STDMETHODCALLTYPE webViewLostFocus( 
-        /* [in] */ IWebView *sender,
-        /* [in] */ OLE_HANDLE loseFocusTo) { return E_NOTIMPL; }
+    virtual HRESULT STDMETHODCALLTYPE webViewLostFocus(IWebView*, HWND) { return E_NOTIMPL; }
 
     virtual HRESULT STDMETHODCALLTYPE doDragDrop( 
         /* [in] */ IWebView *sender,
@@ -393,9 +368,7 @@
     virtual HRESULT STDMETHODCALLTYPE webViewClosing( 
         /* [in] */ IWebView *sender);
     
-    virtual HRESULT STDMETHODCALLTYPE webViewSetCursor( 
-        /* [in] */ IWebView *sender,
-        /* [in] */ OLE_HANDLE cursor);
+    virtual HRESULT STDMETHODCALLTYPE webViewSetCursor(IWebView* sender, HCURSOR);
     
     virtual HRESULT STDMETHODCALLTYPE webViewDidInvalidate( 
         /* [in] */ IWebView *sender);

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit/win/WebViewDestruction.cpp (172976 => 172977)


--- trunk/Tools/TestWebKitAPI/Tests/WebKit/win/WebViewDestruction.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit/win/WebViewDestruction.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -80,12 +80,12 @@
     WebViewDestruction::SetUp();
 
     EXPECT_TRUE(m_window.initialize());
-    EXPECT_HRESULT_SUCCEEDED(m_webView->setHostWindow(reinterpret_cast<OLE_HANDLE>(m_window.window())));
+    EXPECT_HRESULT_SUCCEEDED(m_webView->setHostWindow(m_window.window()));
     EXPECT_HRESULT_SUCCEEDED(m_webView->initWithFrame(m_window.clientRect(), 0, 0));
 
     COMPtr<IWebViewPrivate> viewPrivate(Query, m_webView);
     ASSERT_NOT_NULL(viewPrivate);
-    EXPECT_HRESULT_SUCCEEDED(viewPrivate->viewWindow(reinterpret_cast<OLE_HANDLE*>(&m_viewWindow)));
+    EXPECT_HRESULT_SUCCEEDED(viewPrivate->viewWindow(&m_viewWindow));
     EXPECT_TRUE(::IsWindow(m_viewWindow));
 }
 

Modified: trunk/Tools/WinLauncher/PrintWebUIDelegate.cpp (172976 => 172977)


--- trunk/Tools/WinLauncher/PrintWebUIDelegate.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Tools/WinLauncher/PrintWebUIDelegate.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009, 2013 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2009, 2013-2014 Apple Inc. All Rights Reserved.
  * Copyright (C) 2009 Brent Fulgham. All Rights Reserved.
  * Copyright (C) 2013 Alex Christensen. All Rights Reserved.
  *
@@ -12,7 +12,6 @@
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
@@ -164,10 +163,7 @@
     return S_OK;
 }
 
-HRESULT PrintWebUIDelegate::drawHeaderInRect(
-            /* [in] */ IWebView* webView,
-            /* [in] */ RECT* rect,
-            /* [in] */ OLE_HANDLE drawingContext)
+HRESULT PrintWebUIDelegate::drawHeaderInRect(IWebView* webView, RECT* rect, ULONG_PTR drawingContext)
 {
     if (!webView || !rect)
         return E_POINTER;
@@ -196,12 +192,7 @@
     return S_OK;
 }
 
-HRESULT PrintWebUIDelegate::drawFooterInRect(
-            /* [in] */ IWebView* webView,
-            /* [in] */ RECT* rect,
-            /* [in] */ OLE_HANDLE drawingContext,
-            /* [in] */ UINT pageIndex,
-            /* [in] */ UINT pageCount)
+HRESULT PrintWebUIDelegate::drawFooterInRect(IWebView* webView, RECT* rect, ULONG_PTR drawingContext, UINT pageIndex, UINT pageCount)
 {
     if (!webView || !rect)
         return E_POINTER;

Modified: trunk/Tools/WinLauncher/PrintWebUIDelegate.h (172976 => 172977)


--- trunk/Tools/WinLauncher/PrintWebUIDelegate.h	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Tools/WinLauncher/PrintWebUIDelegate.h	2014-08-26 21:39:51 UTC (rev 172977)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2009, 2014 Apple Inc. All Rights Reserved.
  * Copyright (C) 2009 Brent Fulgham. All Rights Reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -43,8 +43,8 @@
     virtual HRESULT STDMETHODCALLTYPE webViewClose(IWebView*) { return E_NOTIMPL; }
     virtual HRESULT STDMETHODCALLTYPE webViewFocus(IWebView*) { return E_NOTIMPL; }
     virtual HRESULT STDMETHODCALLTYPE webViewUnfocus(IWebView*) { return E_NOTIMPL; }
-    virtual HRESULT STDMETHODCALLTYPE webViewFirstResponder(IWebView*, OLE_HANDLE*)  { return E_NOTIMPL; }
-    virtual HRESULT STDMETHODCALLTYPE makeFirstResponder(IWebView*, OLE_HANDLE) { return E_NOTIMPL; }
+    virtual HRESULT STDMETHODCALLTYPE webViewFirstResponder(IWebView*, HWND*)  { return E_NOTIMPL; }
+    virtual HRESULT STDMETHODCALLTYPE makeFirstResponder(IWebView*, HWND) { return E_NOTIMPL; }
     virtual HRESULT STDMETHODCALLTYPE setStatusText(IWebView*, BSTR) { return E_NOTIMPL; }
     virtual HRESULT STDMETHODCALLTYPE webViewStatusText(IWebView*, BSTR*) { return E_NOTIMPL; }
     virtual HRESULT STDMETHODCALLTYPE webViewAreToolbarsVisible(IWebView*, BOOL*) { return E_NOTIMPL; }
@@ -63,7 +63,7 @@
     virtual HRESULT STDMETHODCALLTYPE runBeforeUnloadConfirmPanelWithMessage(IWebView*, BSTR, IWebFrame*, BOOL*) { return E_NOTIMPL; }
     virtual HRESULT STDMETHODCALLTYPE runOpenPanelForFileButtonWithResultListener(IWebView*, IWebOpenPanelResultListener*) { return E_NOTIMPL; }
     virtual HRESULT STDMETHODCALLTYPE mouseDidMoveOverElement(IWebView*, IPropertyBag*, UINT) { return E_NOTIMPL; }
-    virtual HRESULT STDMETHODCALLTYPE contextMenuItemsForElement(IWebView*, IPropertyBag*, OLE_HANDLE, OLE_HANDLE*) { return E_NOTIMPL; }
+    virtual HRESULT STDMETHODCALLTYPE contextMenuItemsForElement(IWebView*, IPropertyBag*, HMENU, HMENU*) { return E_NOTIMPL; }
     virtual HRESULT STDMETHODCALLTYPE validateUserInterfaceItem(IWebView*, UINT, BOOL, BOOL*) { return E_NOTIMPL; }
     virtual HRESULT STDMETHODCALLTYPE shouldPerformAction(IWebView*, UINT, UINT) { return E_NOTIMPL; }
     virtual HRESULT STDMETHODCALLTYPE dragDestinationActionMaskForDraggingInfo(IWebView*, IDataObject*, WebDragDestinationAction*) { return E_NOTIMPL; }
@@ -72,11 +72,11 @@
     virtual HRESULT STDMETHODCALLTYPE willPerformDragSourceAction(IWebView*, WebDragSourceAction, LPPOINT, IDataObject*, IDataObject**) { return E_NOTIMPL; }
     virtual HRESULT STDMETHODCALLTYPE contextMenuItemSelected(IWebView*, void*, IPropertyBag*) { return E_NOTIMPL; }
     virtual HRESULT STDMETHODCALLTYPE hasCustomMenuImplementation(BOOL*) { return E_NOTIMPL; }
-    virtual HRESULT STDMETHODCALLTYPE trackCustomPopupMenu(IWebView*, OLE_HANDLE, LPPOINT) { return E_NOTIMPL; }
+    virtual HRESULT STDMETHODCALLTYPE trackCustomPopupMenu(IWebView*, HMENU, LPPOINT) { return E_NOTIMPL; }
     virtual HRESULT STDMETHODCALLTYPE measureCustomMenuItem(IWebView*, void*) { return E_NOTIMPL; }
     virtual HRESULT STDMETHODCALLTYPE drawCustomMenuItem(IWebView*, void*) { return E_NOTIMPL; }
-    virtual HRESULT STDMETHODCALLTYPE addCustomMenuDrawingData(IWebView*, OLE_HANDLE) { return E_NOTIMPL; }
-    virtual HRESULT STDMETHODCALLTYPE cleanUpCustomMenuDrawingData(IWebView*, OLE_HANDLE) { return E_NOTIMPL; }
+    virtual HRESULT STDMETHODCALLTYPE addCustomMenuDrawingData(IWebView*, HMENU) { return E_NOTIMPL; }
+    virtual HRESULT STDMETHODCALLTYPE cleanUpCustomMenuDrawingData(IWebView*, HMENU) { return E_NOTIMPL; }
     virtual HRESULT STDMETHODCALLTYPE canTakeFocus(IWebView*, BOOL, BOOL*) { return E_NOTIMPL; }
     virtual HRESULT STDMETHODCALLTYPE takeFocus(IWebView*, BOOL) { return E_NOTIMPL; }
     virtual HRESULT STDMETHODCALLTYPE registerUndoWithTarget(IWebUndoTarget*, BSTR, IUnknown*) { return E_NOTIMPL; }
@@ -90,8 +90,8 @@
     virtual HRESULT STDMETHODCALLTYPE ftpDirectoryTemplatePath(IWebView*, BSTR*) { return E_NOTIMPL; }
     virtual HRESULT STDMETHODCALLTYPE webViewHeaderHeight(IWebView*, float*);
     virtual HRESULT STDMETHODCALLTYPE webViewFooterHeight(IWebView*, float*);
-    virtual HRESULT STDMETHODCALLTYPE drawHeaderInRect(IWebView*, RECT*, OLE_HANDLE);
-    virtual HRESULT STDMETHODCALLTYPE drawFooterInRect(IWebView*, RECT*, OLE_HANDLE, UINT, UINT);
+    virtual HRESULT STDMETHODCALLTYPE drawHeaderInRect(IWebView*, RECT*, ULONG_PTR);
+    virtual HRESULT STDMETHODCALLTYPE drawFooterInRect(IWebView*, RECT*, ULONG_PTR, UINT, UINT);
     virtual HRESULT STDMETHODCALLTYPE webViewPrintingMarginRect(IWebView*, RECT*);
     virtual HRESULT STDMETHODCALLTYPE canRunModal(IWebView*, BOOL*) { return E_NOTIMPL; }
     virtual HRESULT STDMETHODCALLTYPE createModalDialog(IWebView*, IWebURLRequest*, IWebView**) { return E_NOTIMPL; }

Modified: trunk/Tools/WinLauncher/WinLauncher.cpp (172976 => 172977)


--- trunk/Tools/WinLauncher/WinLauncher.cpp	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Tools/WinLauncher/WinLauncher.cpp	2014-08-26 21:39:51 UTC (rev 172977)
@@ -86,7 +86,7 @@
     if (!m_webView)
         return E_FAIL;
 
-    HRESULT hr = m_webView->setHostWindow(reinterpret_cast<OLE_HANDLE>(mainWnd));
+    HRESULT hr = m_webView->setHostWindow(mainWnd);
     if (FAILED(hr))
         return hr;
 
@@ -111,7 +111,7 @@
     if (FAILED(hr))
         return hr;
 
-    hr = m_webViewPrivate->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewHwnd));
+    hr = m_webViewPrivate->viewWindow(&viewHwnd);
 
     return hr;
 }

Modified: trunk/Tools/WinLauncher/WinLauncherWebHost.h (172976 => 172977)


--- trunk/Tools/WinLauncher/WinLauncherWebHost.h	2014-08-26 21:24:40 UTC (rev 172976)
+++ trunk/Tools/WinLauncher/WinLauncherWebHost.h	2014-08-26 21:39:51 UTC (rev 172977)
@@ -54,7 +54,7 @@
     
     virtual HRESULT STDMETHODCALLTYPE didReceiveTitle(IWebView*, BSTR title, IWebFrame*) { return S_OK; }
     virtual HRESULT STDMETHODCALLTYPE didChangeIcons(IWebView*, IWebFrame*) { return S_OK; }
-    virtual HRESULT STDMETHODCALLTYPE didReceiveIcon(IWebView*, OLE_HANDLE hBitmap, IWebFrame*) { return S_OK; }
+    virtual HRESULT STDMETHODCALLTYPE didReceiveIcon(IWebView*, HBITMAP, IWebFrame*) { return S_OK; }
     virtual HRESULT STDMETHODCALLTYPE didFinishLoadForFrame(IWebView*, IWebFrame*);   
     virtual HRESULT STDMETHODCALLTYPE didFailLoadWithError(IWebView*, IWebError*, IWebFrame*) { return S_OK; }
     virtual HRESULT STDMETHODCALLTYPE didChangeLocationWithinPageForFrame(IWebView*, IWebFrame*) { return S_OK; }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to