Diff
Modified: trunk/Tools/ChangeLog (152170 => 152171)
--- trunk/Tools/ChangeLog 2013-06-28 16:08:24 UTC (rev 152170)
+++ trunk/Tools/ChangeLog 2013-06-28 16:23:18 UTC (rev 152171)
@@ -1,3 +1,23 @@
+2013-06-27 Roger Fong <roger_f...@apple.com>
+
+ Add IAccessibilityDelegate implementation to WinLauncher for testing purposes.
+ https://bugs.webkit.org/show_bug.cgi?id=118160.
+
+ Reviewed by Brent Fulgham.
+
+ * WinLauncher/AccessibilityDelegate.cpp: Added.
+ (AccessibilityDelegate::QueryInterface):
+ (AccessibilityDelegate::AddRef):
+ (AccessibilityDelegate::Release):
+ (AccessibilityDelegate::fireFrameLoadStartedEvents): Just returns S_OK;
+ (AccessibilityDelegate::fireFrameLoadFinishedEvents): Ditto.
+ * WinLauncher/AccessibilityDelegate.h: Added.
+ (AccessibilityDelegate::AccessibilityDelegate):
+ * WinLauncher/WinLauncher.cpp:
+ (dllLauncherEntryPoint):
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj:
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj.filters:
+
2013-06-28 Christophe Dumez <ch.du...@sisa.samsung.com>
Clean up temporary files created by the bindings test script
Added: trunk/Tools/WinLauncher/AccessibilityDelegate.cpp (0 => 152171)
--- trunk/Tools/WinLauncher/AccessibilityDelegate.cpp (rev 0)
+++ trunk/Tools/WinLauncher/AccessibilityDelegate.cpp 2013-06-28 16:23:18 UTC (rev 152171)
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2013 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * 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
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "stdafx.h"
+#include "AccessibilityDelegate.h"
+
+#include <WebKit/WebKitCOMAPI.h>
+#include <commctrl.h>
+#include <commdlg.h>
+#include <objbase.h>
+#include <shlwapi.h>
+#include <stdio.h>
+#include <wininet.h>
+
+HRESULT AccessibilityDelegate::QueryInterface(REFIID riid, void** ppvObject)
+{
+ *ppvObject = 0;
+ if (IsEqualIID(riid, IID_IUnknown))
+ *ppvObject = static_cast<IAccessibilityDelegate*>(this);
+ else if (IsEqualIID(riid, IID_IAccessibilityDelegate))
+ *ppvObject = static_cast<IAccessibilityDelegate*>(this);
+ else
+ return E_NOINTERFACE;
+
+ AddRef();
+ return S_OK;
+}
+
+ULONG AccessibilityDelegate::AddRef(void)
+{
+ return ++m_refCount;
+}
+
+ULONG AccessibilityDelegate::Release(void)
+{
+ ULONG newRef = --m_refCount;
+ if (!newRef)
+ delete this;
+
+ return newRef;
+}
+
+HRESULT AccessibilityDelegate::fireFrameLoadStartedEvents()
+{
+ return S_OK;
+}
+
+HRESULT AccessibilityDelegate::fireFrameLoadFinishedEvents()
+{
+ return S_OK;
+}
Added: trunk/Tools/WinLauncher/AccessibilityDelegate.h (0 => 152171)
--- trunk/Tools/WinLauncher/AccessibilityDelegate.h (rev 0)
+++ trunk/Tools/WinLauncher/AccessibilityDelegate.h 2013-06-28 16:23:18 UTC (rev 152171)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2013 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * 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
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef AccessibilityDelegate_h
+#define AccessibilityDelegate_h
+
+#include <WebKit/WebKit.h>
+
+class AccessibilityDelegate : public IAccessibilityDelegate {
+public:
+ AccessibilityDelegate() : m_refCount(1) { }
+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
+ virtual ULONG STDMETHODCALLTYPE AddRef(void);
+ virtual ULONG STDMETHODCALLTYPE Release(void);
+
+ virtual HRESULT STDMETHODCALLTYPE fireFrameLoadStartedEvents();
+ virtual HRESULT STDMETHODCALLTYPE fireFrameLoadFinishedEvents();
+private:
+ int m_refCount;
+};
+
+#endif
Modified: trunk/Tools/WinLauncher/WinLauncher.cpp (152170 => 152171)
--- trunk/Tools/WinLauncher/WinLauncher.cpp 2013-06-28 16:08:24 UTC (rev 152170)
+++ trunk/Tools/WinLauncher/WinLauncher.cpp 2013-06-28 16:23:18 UTC (rev 152171)
@@ -28,6 +28,7 @@
#include "stdafx.h"
#include "WinLauncher.h"
+#include "AccessibilityDelegate.h"
#include "DOMDefaultImpl.h"
#include "PrintWebUIDelegate.h"
#include <WebKit/WebKitCOMAPI.h>
@@ -54,6 +55,7 @@
HWND gViewWindow = 0;
WinLauncherWebHost* gWebHost = 0;
PrintWebUIDelegate* gPrintDelegate = 0;
+AccessibilityDelegate* gAccessibilityDelegate = 0;
TCHAR szTitle[MAX_LOADSTRING]; // The title bar text
TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name
@@ -364,6 +366,12 @@
if (FAILED (hr))
goto exit;
+ gAccessibilityDelegate = new AccessibilityDelegate;
+ gAccessibilityDelegate->AddRef();
+ hr = gWebView->setAccessibilityDelegate(gAccessibilityDelegate);
+ if (FAILED (hr))
+ goto exit;
+
hr = gWebView->setHostWindow(reinterpret_cast<OLE_HANDLE>(hMainWnd));
if (FAILED(hr))
goto exit;
Modified: trunk/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj (152170 => 152171)
--- trunk/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj 2013-06-28 16:08:24 UTC (rev 152170)
+++ trunk/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj 2013-06-28 16:23:18 UTC (rev 152171)
@@ -107,12 +107,14 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\WinLauncher.cpp" />
+ <ClCompile Include="AccessibilityDelegate.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\DOMDefaultImpl.h" />
<ClInclude Include="..\PrintWebUIDelegate.h" />
<ClInclude Include="..\stdafx.h" />
<ClInclude Include="..\WinLauncher.h" />
+ <ClInclude Include="AccessibilityDelegate.h" />
<ClInclude Include="WinLauncherLibResource.h" />
</ItemGroup>
<ItemGroup>
Modified: trunk/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj.filters (152170 => 152171)
--- trunk/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj.filters 2013-06-28 16:08:24 UTC (rev 152170)
+++ trunk/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj.filters 2013-06-28 16:23:18 UTC (rev 152171)
@@ -34,6 +34,9 @@
<ClCompile Include="..\WinLauncher.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="AccessibilityDelegate.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\DOMDefaultImpl.h">
@@ -51,6 +54,9 @@
<ClInclude Include="WinLauncherLibResource.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="AccessibilityDelegate.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="WinLauncherLib.rc">