Diff
Modified: branches/safari-601.1-branch/Source/WebKit/win/ChangeLog (186946 => 186947)
--- branches/safari-601.1-branch/Source/WebKit/win/ChangeLog 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Source/WebKit/win/ChangeLog 2015-07-17 06:15:32 UTC (rev 186947)
@@ -1,3 +1,65 @@
+2015-07-16 Matthew Hanson <matthew_han...@apple.com>
+
+ Merge r186881. rdar://problem/21822278
+
+ 2015-07-15 Brent Fulgham <bfulg...@apple.com>
+
+ [Win] Maintain consistent COM Interfaces
+ https://bugs.webkit.org/show_bug.cgi?id=146983
+ <rdar://problem/21822278>
+
+ Reviewed by Dean Jackson.
+
+ Keep WebKit's COM interface compatible with software
+ linked against earlier WebKit releases:
+ 1. Update IDL to present the same interface as earlier
+ releases of WebKit.
+ 2. Add new interface objects (i.g., IWebFrame2) extending
+ earlier interfaces when adding new methods.
+ 3. Update our internal software to use the correct interface
+ objects.
+
+ * DefaultPolicyDelegate.cpp:
+ (DefaultPolicyDelegate::decidePolicyForNavigationAction):
+ * Interfaces/IWebEditingDelegate.idl:
+ * Interfaces/IWebFrame.idl:
+ * Interfaces/IWebPreferencesPrivate.idl:
+ * Interfaces/IWebSecurityOrigin.idl:
+ * Interfaces/IWebUIDelegatePrivate.idl:
+ * Interfaces/IWebViewPrivate.idl:
+ * Interfaces/WebKit.idl:
+ * WebCoreSupport/WebEditorClient.cpp:
+ (WebEditorClient::shouldInsertNode):
+ * WebFrame.cpp:
+ (WebFrame::updateBackground):
+ (WebFrame::isMainFrame):
+ * WebFrame.h:
+ * WebPreferences.cpp:
+ (WebPreferences::initializeDefaultSettings):
+ (WebPreferences::QueryInterface):
+ (WebPreferences::setMockScrollbarsEnabled):
+ (WebPreferences::screenFontSubstitutionEnabled):
+ (WebPreferences::setScreenFontSubstitutionEnabled):
+ (WebPreferences::hyperlinkAuditingEnabled):
+ (WebPreferences::unused4):
+ (WebPreferences::shouldPaintNativeControls):
+ (WebPreferences::setShouldPaintNativeControls):
+ (WebPreferences::setDeveloperExtrasEnabled):
+ (WebPreferences::authorAndUserStylesEnabled):
+ (WebPreferences::inApplicationChromeMode):
+ * WebPreferences.h:
+ * WebSecurityOrigin.cpp:
+ (WebSecurityOrigin::QueryInterface):
+ (WebSecurityOrigin::setQuota):
+ (WebSecurityOrigin::initWithURL):
+ * WebSecurityOrigin.h:
+ * WebView.cpp:
+ (WebView::QueryInterface):
+ (WebView::notifyPreferencesChanged):
+ (WebView::selectedRangeForTesting):
+ (WebView::setLoadResourcesSerially):
+ * WebView.h:
+
2015-07-09 Per Arne Vollan <pe...@outlook.com>
[Win] Add memory pressure handler.
Modified: branches/safari-601.1-branch/Source/WebKit/win/DefaultPolicyDelegate.cpp (186946 => 186947)
--- branches/safari-601.1-branch/Source/WebKit/win/DefaultPolicyDelegate.cpp 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Source/WebKit/win/DefaultPolicyDelegate.cpp 2015-07-17 06:15:32 UTC (rev 186947)
@@ -107,7 +107,7 @@
var.ChangeType(VT_I4, nullptr);
navType = V_I4(&var);
}
- COMPtr<IWebViewPrivate> wvPrivate(Query, webView);
+ COMPtr<IWebViewPrivate2> wvPrivate(Query, webView);
if (wvPrivate) {
BOOL canHandleRequest = FALSE;
if (SUCCEEDED(wvPrivate->canHandleRequest(request, &canHandleRequest)) && canHandleRequest)
Modified: branches/safari-601.1-branch/Source/WebKit/win/Interfaces/IWebEditingDelegate.idl (186946 => 186947)
--- branches/safari-601.1-branch/Source/WebKit/win/Interfaces/IWebEditingDelegate.idl 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Source/WebKit/win/Interfaces/IWebEditingDelegate.idl 2015-07-17 06:15:32 UTC (rev 186947)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008, 2015 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -113,7 +113,7 @@
/*
- (BOOL)webView:(WebView *)webView shouldInsertNode:(DOMNode *)node replacingDOMRange:(DOMRange *)range givenAction:(WebViewInsertAction)action;
*/
- HRESULT shouldInsertNode([in] IWebView* webView, [in] IDOMNode* node, [in] IDOMRange* range, [in] WebViewInsertAction action, [out, retval] BOOL* result);
+ HRESULT shouldInsertNode([in] IWebView* webView, [in] IDOMNode* node, [in] IDOMRange* range, [in] WebViewInsertAction action);
/*
- (BOOL)webView:(WebView *)webView shouldInsertText:(NSString *)text replacingDOMRange:(DOMRange *)range givenAction:(WebViewInsertAction)action;
@@ -188,3 +188,14 @@
HRESULT preflightChosenSpellServer();
HRESULT updateGrammar();
}
+
+[
+ uuid(9973D190-3346-4CAA-AB76-F070CAB0B59B)
+]
+interface IWebEditingDelegate2 : IWebEditingDelegate
+{
+ /*
+ - (BOOL)webView:(WebView *)webView shouldInsertNode:(DOMNode *)node replacingDOMRange:(DOMRange *)range givenAction:(WebViewInsertAction)action;
+ */
+ HRESULT shouldInsertNode([in] IWebView* webView, [in] IDOMNode* node, [in] IDOMRange* range, [in] WebViewInsertAction action, [out, retval] BOOL* result);
+}
\ No newline at end of file
Modified: branches/safari-601.1-branch/Source/WebKit/win/Interfaces/IWebFrame.idl (186946 => 186947)
--- branches/safari-601.1-branch/Source/WebKit/win/Interfaces/IWebFrame.idl 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Source/WebKit/win/Interfaces/IWebFrame.idl 2015-07-17 06:15:32 UTC (rev 186947)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007, 2008, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008, 2014-2015 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -268,7 +268,11 @@
- (DOMWindow *)DOMWindow;
*/
HRESULT DOMWindow([out, retval] IDOMWindow** window);
+}
+[ uuid(5418D783-A3BA-48F3-BAC1-535EE264035A) ]
+interface IWebFrame2 : IWebFrame
+{
/*!
@method isMainFrame
@description Returns TRUE if the frame is the main frame.
Modified: branches/safari-601.1-branch/Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl (186946 => 186947)
--- branches/safari-601.1-branch/Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl 2015-07-17 06:15:32 UTC (rev 186947)
@@ -64,6 +64,11 @@
HRESULT localStorageDatabasePath([out, retval] BSTR* location);
HRESULT setLocalStorageDatabasePath([in] BSTR location);
+ // These two methods are no-ops, and only retained to keep
+ // the Interface consistent. DO NOT USE THEM.
+ HRESULT setShouldPaintNativeControls([in] BOOL shouldPaint);
+ HRESULT shouldPaintNativeControls([out, retval] BOOL* enabled);
+
HRESULT setDatabasesEnabled([in] BOOL enabled);
HRESULT databasesEnabled([out, retval] BOOL *enabled);
@@ -116,9 +121,6 @@
HRESULT _javascript_CanAccessClipboard([out, retval] BOOL *enabled);
HRESULT setJavaScriptCanAccessClipboard([in] BOOL enabled);
- HRESULT _javascript_RuntimeFlags([out, retval] unsigned* flags);
- HRESULT setJavaScriptRuntimeFlags([in] unsigned flags);
-
HRESULT isDNSPrefetchingEnabled([out, retval] BOOL *enabled);
HRESULT setDNSPrefetchingEnabled([in] BOOL enabled);
@@ -152,6 +154,18 @@
HRESULT mockScrollbarsEnabled([out, retval] BOOL* enabled);
HRESULT setMockScrollbarsEnabled([in] BOOL enabled);
+ // These two methods are no-ops, and only retained to keep
+ // the Interface consistent. DO NOT USE THEM.
+ HRESULT screenFontSubstitutionEnabled([out, retval] BOOL* enabled);
+ HRESULT setScreenFontSubstitutionEnabled([in] BOOL enabled);
+
HRESULT isInheritURIQueryComponentEnabled([out, retval] BOOL* enabled);
HRESULT setEnableInheritURIQueryComponent([in] BOOL enabled);
}
+
+[ uuid(0E1DDB80-6B38-4ABC-A252-B58A83EB6D8C) ]
+interface IWebPreferencesPrivate2 : IWebPreferencesPrivate
+{
+ HRESULT _javascript_RuntimeFlags([out, retval] unsigned* flags);
+ HRESULT setJavaScriptRuntimeFlags([in] unsigned flags);
+}
\ No newline at end of file
Modified: branches/safari-601.1-branch/Source/WebKit/win/Interfaces/IWebSecurityOrigin.idl (186946 => 186947)
--- branches/safari-601.1-branch/Source/WebKit/win/Interfaces/IWebSecurityOrigin.idl 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Source/WebKit/win/Interfaces/IWebSecurityOrigin.idl 2015-07-17 06:15:32 UTC (rev 186947)
@@ -47,6 +47,10 @@
HRESULT quota([out, retval] unsigned long long* result);
HRESULT setQuota([in] unsigned long long quota);
+}
+[ uuid(54F73208-4E1D-4BED-BE25-4E076C0AAAD8) ]
+interface IWebSecurityOrigin2 : IWebSecurityOrigin
+{
HRESULT initWithURL([in] BSTR);
}
Modified: branches/safari-601.1-branch/Source/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl (186946 => 186947)
--- branches/safari-601.1-branch/Source/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Source/WebKit/win/Interfaces/IWebUIDelegatePrivate.idl 2015-07-17 06:15:32 UTC (rev 186947)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2015 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -54,7 +54,9 @@
HRESULT unused2();
HRESULT webViewScrolled([in] IWebView* sender);
HRESULT webViewAddMessageToConsole([in] IWebView* sender, [in] BSTR message, [in] int lineNumber, [in] BSTR url, [in] BOOL isError);
- HRESULT unused3();
+ // The following method is a no-op and is only here to maintain
+ // Interface compatibility. DO NOT USE.
+ HRESULT webViewShouldInterruptJavaScript([in] IWebView* sender, [out, retval] BOOL* result);
HRESULT webViewReceivedFocus([in] IWebView* sender);
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);
@@ -62,7 +64,7 @@
HRESULT webViewPainted([in] IWebView* sender);
HRESULT exceededDatabaseQuota([in] IWebView* sender, [in] IWebFrame* frame, [in] IWebSecurityOrigin* origin, [in] BSTR databaseIdentifier);
HRESULT embeddedViewWithArguments([in] IWebView* sender, [in] IWebFrame* frame, [in] IPropertyBag* arguments, [out, retval] IWebEmbeddedView** view);
- HRESULT unused4();
+ HRESULT unused3();
HRESULT webViewClosing([in] IWebView* sender);
HRESULT webViewSetCursor([in] IWebView* sender, [in] HCURSOR cursor);
HRESULT webViewDidInvalidate([in] IWebView* sender);
Modified: branches/safari-601.1-branch/Source/WebKit/win/Interfaces/IWebViewPrivate.idl (186946 => 186947)
--- branches/safari-601.1-branch/Source/WebKit/win/Interfaces/IWebViewPrivate.idl 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Source/WebKit/win/Interfaces/IWebViewPrivate.idl 2015-07-17 06:15:32 UTC (rev 186947)
@@ -290,7 +290,11 @@
HRESULT firstRectForCharacterRangeForTesting([in] UINT location, [in] UINT length, [out, retval] RECT* resultRect);
HRESULT selectedRangeForTesting([out] UINT* location, [out] UINT* length);
+}
+[ uuid(671FB259-ABEF-48FC-88FB-EC4CF304E866) ]
+interface IWebViewPrivate2 : IWebViewPrivate
+{
// SPI for DumpRenderTree
HRESULT setLoadResourcesSerially([in] BOOL serialize);
@@ -300,4 +304,4 @@
HRESULT setCustomBackingScaleFactor([in] double);
HRESULT backingScaleFactor([out] double*);
-}
+}
\ No newline at end of file
Modified: branches/safari-601.1-branch/Source/WebKit/win/Interfaces/WebKit.idl (186946 => 186947)
--- branches/safari-601.1-branch/Source/WebKit/win/Interfaces/WebKit.idl 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Source/WebKit/win/Interfaces/WebKit.idl 2015-07-17 06:15:32 UTC (rev 186947)
@@ -169,7 +169,7 @@
interface IWebViewUndoableEditing;
interface IWebViewEditingActions;
interface IWebNotificationObserver;
- interface IWebViewPrivate;
+ interface IWebViewPrivate2;
}
[uuid(66827ec1-3aef-4241-bac5-f776b44f030f)]
Modified: branches/safari-601.1-branch/Source/WebKit/win/WebCoreSupport/WebEditorClient.cpp (186946 => 186947)
--- branches/safari-601.1-branch/Source/WebKit/win/WebCoreSupport/WebEditorClient.cpp 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Source/WebKit/win/WebCoreSupport/WebEditorClient.cpp 2015-07-17 06:15:32 UTC (rev 186947)
@@ -299,8 +299,11 @@
return true;
BOOL shouldInsert = FALSE;
- if (FAILED(editingDelegate->shouldInsertNode(m_webView, insertDOMNode.get(), insertingDOMRange.get(), static_cast<WebViewInsertAction>(givenAction), &shouldInsert)))
- return true;
+ COMPtr<IWebEditingDelegate2> editingDelegate2(Query, editingDelegate);
+ if (editingDelegate2) {
+ if (FAILED(editingDelegate2->shouldInsertNode(m_webView, insertDOMNode.get(), insertingDOMRange.get(), static_cast<WebViewInsertAction>(givenAction), &shouldInsert)))
+ return true;
+ }
return shouldInsert;
}
Modified: branches/safari-601.1-branch/Source/WebKit/win/WebFrame.cpp (186946 => 186947)
--- branches/safari-601.1-branch/Source/WebKit/win/WebFrame.cpp 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Source/WebKit/win/WebFrame.cpp 2015-07-17 06:15:32 UTC (rev 186947)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006-2009, 2011, 2013-2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2009, 2011, 2013-2015 Apple Inc. All rights reserved.
* Copyright (C) Research In Motion Limited 2009. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -2097,6 +2097,7 @@
coreFrame->view()->updateBackgroundRecursively(backgroundColor, webView()->transparent());
}
+// IWebFrame2
HRESULT WebFrame::isMainFrame(BOOL* value)
{
if (!value)
Modified: branches/safari-601.1-branch/Source/WebKit/win/WebFrame.h (186946 => 186947)
--- branches/safari-601.1-branch/Source/WebKit/win/WebFrame.h 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Source/WebKit/win/WebFrame.h 2015-07-17 06:15:32 UTC (rev 186947)
@@ -75,7 +75,7 @@
WebFrame* kit(WebCore::Frame*);
WebCore::Frame* core(WebFrame*);
-class DECLSPEC_UUID("{A3676398-4485-4a9d-87DC-CB5A40E6351D}") WebFrame : public IWebFrame, IWebFramePrivate, IWebDocumentText
+class DECLSPEC_UUID("{A3676398-4485-4a9d-87DC-CB5A40E6351D}") WebFrame : public IWebFrame2, IWebFramePrivate, IWebDocumentText
{
public:
static WebFrame* createInstance();
Modified: branches/safari-601.1-branch/Source/WebKit/win/WebPreferences.cpp (186946 => 186947)
--- branches/safari-601.1-branch/Source/WebKit/win/WebPreferences.cpp 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Source/WebKit/win/WebPreferences.cpp 2015-07-17 06:15:32 UTC (rev 186947)
@@ -194,13 +194,13 @@
CFMutableDictionaryRef defaults = CFDictionaryCreateMutable(0, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
- CFDictionaryAddValue(defaults, CFSTR(WebKitStandardFontPreferenceKey), CFSTR("Times New Roman"));
+ CFDictionaryAddValue(defaults, CFSTR(WebKitStandardFontPreferenceKey), CFSTR("Segoe UI"));
CFDictionaryAddValue(defaults, CFSTR(WebKitFixedFontPreferenceKey), CFSTR("Courier New"));
CFDictionaryAddValue(defaults, CFSTR(WebKitSerifFontPreferenceKey), CFSTR("Times New Roman"));
CFDictionaryAddValue(defaults, CFSTR(WebKitSansSerifFontPreferenceKey), CFSTR("Arial"));
CFDictionaryAddValue(defaults, CFSTR(WebKitCursiveFontPreferenceKey), CFSTR("Comic Sans MS"));
CFDictionaryAddValue(defaults, CFSTR(WebKitFantasyFontPreferenceKey), CFSTR("Comic Sans MS"));
- CFDictionaryAddValue(defaults, CFSTR(WebKitPictographFontPreferenceKey), CFSTR("Times New Roman"));
+ CFDictionaryAddValue(defaults, CFSTR(WebKitPictographFontPreferenceKey), CFSTR("Segoe UI Symbol"));
CFDictionaryAddValue(defaults, CFSTR(WebKitMinimumFontSizePreferenceKey), CFSTR("0"));
CFDictionaryAddValue(defaults, CFSTR(WebKitMinimumLogicalFontSizePreferenceKey), CFSTR("9"));
CFDictionaryAddValue(defaults, CFSTR(WebKitDefaultFontSizePreferenceKey), CFSTR("16"));
@@ -530,6 +530,8 @@
*ppvObject = static_cast<IWebPreferences*>(this);
else if (IsEqualGUID(riid, IID_IWebPreferencesPrivate))
*ppvObject = static_cast<IWebPreferencesPrivate*>(this);
+ else if (IsEqualGUID(riid, IID_IWebPreferencesPrivate2))
+ *ppvObject = static_cast<IWebPreferencesPrivate2*>(this);
else if (IsEqualGUID(riid, CLSID_WebPreferences))
*ppvObject = this;
else
@@ -1293,6 +1295,18 @@
return S_OK;
}
+// These two methods are no-ops, and only retained to keep
+// the Interface consistent. DO NOT USE THEM.
+HRESULT WebPreferences::screenFontSubstitutionEnabled(BOOL*)
+{
+ return S_OK;
+}
+
+HRESULT WebPreferences::setScreenFontSubstitutionEnabled(BOOL)
+{
+ return S_OK;
+}
+
HRESULT STDMETHODCALLTYPE WebPreferences::hyperlinkAuditingEnabled(
/* [in] */ BOOL* enabled)
{
@@ -1412,6 +1426,18 @@
return E_FAIL;
}
+// These two methods are no-ops, and only retained to keep
+// the Interface consistent. DO NOT USE THEM.
+HRESULT WebPreferences::shouldPaintNativeControls(BOOL*)
+{
+ return S_OK;
+}
+
+HRESULT WebPreferences::setShouldPaintNativeControls(BOOL)
+{
+ return S_OK;
+}
+
HRESULT WebPreferences::setDeveloperExtrasEnabled(BOOL enabled)
{
setBoolValue(WebKitDeveloperExtrasEnabledPreferenceKey, enabled);
@@ -1462,6 +1488,8 @@
return S_OK;
}
+// These two methods are no-ops, and only retained to keep
+// the Interface consistent. DO NOT USE THEM.
HRESULT WebPreferences::inApplicationChromeMode(BOOL*)
{
return S_OK;
Modified: branches/safari-601.1-branch/Source/WebKit/win/WebPreferences.h (186946 => 186947)
--- branches/safari-601.1-branch/Source/WebKit/win/WebPreferences.h 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Source/WebKit/win/WebPreferences.h 2015-07-17 06:15:32 UTC (rev 186947)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008, 2009, 2015 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -31,7 +31,7 @@
#include <WebCore/BString.h>
#include <wtf/RetainPtr.h>
-class WebPreferences : public IWebPreferences, public IWebPreferencesPrivate {
+class WebPreferences : public IWebPreferences, public IWebPreferencesPrivate2 {
public:
static WebPreferences* createInstance();
protected:
@@ -151,12 +151,6 @@
virtual HRESULT STDMETHODCALLTYPE setJavaScriptEnabled(
/* [in] */ BOOL enabled);
- virtual HRESULT STDMETHODCALLTYPE _javascript_RuntimeFlags(
- /* [retval][out] */ unsigned*);
-
- virtual HRESULT STDMETHODCALLTYPE setJavaScriptRuntimeFlags(
- /* [in] */ unsigned);
-
virtual HRESULT STDMETHODCALLTYPE _javascript_CanOpenWindowsAutomatically(
/* [retval][out] */ BOOL* enabled);
@@ -377,6 +371,11 @@
virtual HRESULT STDMETHODCALLTYPE setExperimentalNotificationsEnabled(
/* [in] */ BOOL enabled);
+ // These two methods are no-ops, and only retained to keep
+ // the Interface consistent. DO NOT USE THEM.
+ virtual HRESULT STDMETHODCALLTYPE setShouldPaintNativeControls(BOOL);
+ virtual HRESULT STDMETHODCALLTYPE shouldPaintNativeControls(BOOL*);
+
virtual HRESULT STDMETHODCALLTYPE setZoomsTextOnly(
/* [retval][out] */ BOOL zoomsTextOnly);
@@ -480,9 +479,18 @@
virtual HRESULT STDMETHODCALLTYPE mockScrollbarsEnabled(BOOL*);
virtual HRESULT STDMETHODCALLTYPE setMockScrollbarsEnabled(BOOL);
+ // These two methods are no-ops, and only retained to keep
+ // the Interface consistent. DO NOT USE THEM.
+ virtual HRESULT STDMETHODCALLTYPE screenFontSubstitutionEnabled(BOOL*);
+ virtual HRESULT STDMETHODCALLTYPE setScreenFontSubstitutionEnabled(BOOL);
+
virtual HRESULT STDMETHODCALLTYPE isInheritURIQueryComponentEnabled(BOOL*);
virtual HRESULT STDMETHODCALLTYPE setEnableInheritURIQueryComponent(BOOL);
+ // IWebPreferencesPrivate2
+ virtual HRESULT STDMETHODCALLTYPE _javascript_RuntimeFlags(unsigned*);
+ virtual HRESULT STDMETHODCALLTYPE setJavaScriptRuntimeFlags(unsigned);
+
// WebPreferences
// This method accesses a different preference key than developerExtrasEnabled.
Modified: branches/safari-601.1-branch/Source/WebKit/win/WebSecurityOrigin.cpp (186946 => 186947)
--- branches/safari-601.1-branch/Source/WebKit/win/WebSecurityOrigin.cpp 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Source/WebKit/win/WebSecurityOrigin.cpp 2015-07-17 06:15:32 UTC (rev 186947)
@@ -63,9 +63,11 @@
{
*ppvObject = 0;
if (IsEqualGUID(riid, IID_IUnknown))
- *ppvObject = static_cast<IWebSecurityOrigin*>(this);
+ *ppvObject = static_cast<IWebSecurityOrigin2*>(this);
else if (IsEqualGUID(riid, IID_IWebSecurityOrigin))
*ppvObject = static_cast<IWebSecurityOrigin*>(this);
+ else if (IsEqualGUID(riid, IID_IWebSecurityOrigin2))
+ *ppvObject = static_cast<IWebSecurityOrigin2*>(this);
else if (IsEqualGUID(riid, __uuidof(this)))
*ppvObject = this;
else
@@ -147,6 +149,8 @@
return S_OK;
}
+// IWebSecurityOrigin2 --------------------------------------------------------------
+
HRESULT WebSecurityOrigin::initWithURL(/* [in] */ BSTR urlBstr)
{
m_securityOrigin = WebCore::SecurityOrigin::create(MarshallingHelpers::BSTRToKURL(urlBstr));
Modified: branches/safari-601.1-branch/Source/WebKit/win/WebSecurityOrigin.h (186946 => 186947)
--- branches/safari-601.1-branch/Source/WebKit/win/WebSecurityOrigin.h 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Source/WebKit/win/WebSecurityOrigin.h 2015-07-17 06:15:32 UTC (rev 186947)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2015 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -32,7 +32,7 @@
#include "WebKit.h"
#include <WebCore/SecurityOrigin.h>
-class DECLSPEC_UUID("6EB8D98F-2723-4472-88D3-5936F9D6E631") WebSecurityOrigin : public IWebSecurityOrigin {
+class DECLSPEC_UUID("6EB8D98F-2723-4472-88D3-5936F9D6E631") WebSecurityOrigin : public IWebSecurityOrigin2 {
public:
// WebSecurityOrigin
static WebSecurityOrigin* createInstance(WebCore::SecurityOrigin* origin);
@@ -67,6 +67,7 @@
virtual HRESULT STDMETHODCALLTYPE setQuota(
/* [in] */ unsigned long long quota);
+ // IWebSecurityOrigin2
virtual HRESULT STDMETHODCALLTYPE initWithURL(/*[in]*/ BSTR);
private:
Modified: branches/safari-601.1-branch/Source/WebKit/win/WebView.cpp (186946 => 186947)
--- branches/safari-601.1-branch/Source/WebKit/win/WebView.cpp 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Source/WebKit/win/WebView.cpp 2015-07-17 06:15:32 UTC (rev 186947)
@@ -2594,6 +2594,8 @@
*ppvObject = static_cast<IWebView*>(this);
else if (IsEqualGUID(riid, IID_IWebViewPrivate))
*ppvObject = static_cast<IWebViewPrivate*>(this);
+ else if (IsEqualGUID(riid, IID_IWebViewPrivate2))
+ *ppvObject = static_cast<IWebViewPrivate2*>(this);
else if (IsEqualGUID(riid, IID_IWebIBActions))
*ppvObject = static_cast<IWebIBActions*>(this);
else if (IsEqualGUID(riid, IID_IWebViewCSS))
@@ -4859,7 +4861,7 @@
settings.setShouldDisplayTextDescriptions(enabled);
#endif
- COMPtr<IWebPreferencesPrivate> prefsPrivate(Query, preferences);
+ COMPtr<IWebPreferencesPrivate2> prefsPrivate(Query, preferences);
if (prefsPrivate) {
hr = prefsPrivate->localStorageDatabasePath(&str);
if (FAILED(hr))
@@ -7141,6 +7143,7 @@
return S_OK;
}
+// IWebViewPrivate2
HRESULT WebView::setLoadResourcesSerially(BOOL serialize)
{
WebPlatformStrategies::initialize();
Modified: branches/safari-601.1-branch/Source/WebKit/win/WebView.h (186946 => 186947)
--- branches/safari-601.1-branch/Source/WebKit/win/WebView.h 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Source/WebKit/win/WebView.h 2015-07-17 06:15:32 UTC (rev 186947)
@@ -79,7 +79,7 @@
class WebView
: public IWebView
- , public IWebViewPrivate
+ , public IWebViewPrivate2
, public IWebIBActions
, public IWebViewCSS
, public IWebViewEditing
@@ -609,7 +609,6 @@
/* [in] */ IWebNotification *notification);
// IWebViewPrivate
-
virtual HRESULT STDMETHODCALLTYPE MIMETypeForExtension(
/* [in] */ BSTR extension,
/* [retval][out] */ BSTR *mimeType);
@@ -841,6 +840,10 @@
virtual HRESULT STDMETHODCALLTYPE setUsesLayeredWindow(BOOL);
virtual HRESULT STDMETHODCALLTYPE usesLayeredWindow(BOOL*);
+ // IWebViewPrivate2
+ HRESULT STDMETHODCALLTYPE setLoadResourcesSerially(BOOL);
+ HRESULT STDMETHODCALLTYPE scaleWebView(double scale, POINT origin);
+ HRESULT STDMETHODCALLTYPE dispatchPendingLoadRequests();
virtual HRESULT STDMETHODCALLTYPE setCustomBackingScaleFactor(double);
virtual HRESULT STDMETHODCALLTYPE backingScaleFactor(double*);
@@ -1023,10 +1026,6 @@
bool m_shouldInvertColors;
void setShouldInvertColors(bool);
- HRESULT STDMETHODCALLTYPE setLoadResourcesSerially(BOOL);
- HRESULT STDMETHODCALLTYPE scaleWebView(double scale, POINT origin);
- HRESULT STDMETHODCALLTYPE dispatchPendingLoadRequests();
-
float deviceScaleFactor() const;
protected:
Modified: branches/safari-601.1-branch/Tools/ChangeLog (186946 => 186947)
--- branches/safari-601.1-branch/Tools/ChangeLog 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Tools/ChangeLog 2015-07-17 06:15:32 UTC (rev 186947)
@@ -1,3 +1,80 @@
+2015-07-16 Matthew Hanson <matthew_han...@apple.com>
+
+ Merge r186881. rdar://problem/21822278
+
+ 2015-07-15 Brent Fulgham <bfulg...@apple.com>
+
+ [Win] Maintain consistent COM Interfaces
+ https://bugs.webkit.org/show_bug.cgi?id=146983
+ <rdar://problem/21822278>
+
+ Reviewed by Dean Jackson.
+
+ Update DumpRenderTree and WinLauncher to use the properly
+ versioned COM interface objects.
+
+ * DumpRenderTree/win/AccessibilityControllerWin.cpp:
+ (AccessibilityController::rootElement):
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (resetWebPreferencesToConsistentValues):
+ (resetWebViewToConsistentStateBeforeTesting):
+ (runTest):
+ (createWebViewAndOffscreenWindow):
+ * DumpRenderTree/win/EditingDelegate.cpp:
+ (EditingDelegate::QueryInterface):
+ (EditingDelegate::shouldEndEditingInDOMRange):
+ (EditingDelegate::shouldInsertNode):
+ * DumpRenderTree/win/EditingDelegate.h:
+ * DumpRenderTree/win/EventSender.cpp:
+ (scalePageByCallback):
+ * DumpRenderTree/win/FrameLoadDelegate.cpp:
+ (FrameLoadDelegate::didCommitLoadForFrame):
+ * DumpRenderTree/win/TestRunnerWin.cpp:
+ (TestRunner::callShouldCloseOnWebView):
+ (TestRunner::applicationCacheDiskUsageForOrigin):
+ (TestRunner::clearApplicationCacheForOrigin):
+ (TestRunner::setDefersLoading):
+ (TestRunner::setDomainRelaxationForbiddenForURLScheme):
+ (TestRunner::setTabKeyCyclesThroughElements):
+ (TestRunner::setValueForUser):
+ (TestRunner::dispatchPendingLoadRequests):
+ (TestRunner::setWindowIsKey):
+ (TestRunner::execCommand):
+ (TestRunner::addOriginAccessWhitelistEntry):
+ (TestRunner::removeOriginAccessWhitelistEntry):
+ (TestRunner::addUserScript):
+ (TestRunner::addUserStyleSheet):
+ (TestRunner::showWebInspector):
+ (TestRunner::closeWebInspector):
+ (TestRunner::evaluateInWebInspector):
+ (TestRunner::setSerializeHTTPLoads):
+ * DumpRenderTree/win/TextInputControllerWin.cpp:
+ (TextInputController::setMarkedText):
+ (TextInputController::hasMarkedText):
+ (TextInputController::unmarkText):
+ (TextInputController::markedRange):
+ (TextInputController::insertText):
+ (TextInputController::firstRectForCharacterRange):
+ (TextInputController::selectedRange):
+ * DumpRenderTree/win/UIDelegate.h:
+ (UIDelegate::unused2):
+ (UIDelegate::unused3):
+ (UIDelegate::webViewScrolled):
+ (UIDelegate::webViewShouldInterruptJavaScript):
+ (UIDelegate::webViewReceivedFocus):
+ (UIDelegate::unused4): Deleted.
+ * TestWebKitAPI/Tests/WebKit/win/WebViewDestruction.cpp:
+ (TestWebKitAPI::WebViewDestructionWithHostWindow::SetUp):
+ * WinLauncher/PageLoadTestClient.cpp:
+ (PageLoadTestClient::didStartProvisionalLoad):
+ * WinLauncher/WinLauncher.cpp:
+ (WinLauncher::init):
+ * WinLauncher/WinLauncher.h:
+ * WinLauncher/WinLauncherWebHost.cpp:
+ (WinLauncherWebHost::didFinishLoadForFrame):
+ (WinLauncherWebHost::didFirstLayoutInFrame):
+ * WinLauncher/WinLauncherWebHost.h:
+
2015-07-15 Lucas Forschler <lforsch...@apple.com>
Merge r186826
Modified: branches/safari-601.1-branch/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp (186946 => 186947)
--- branches/safari-601.1-branch/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp 2015-07-17 06:15:32 UTC (rev 186947)
@@ -152,7 +152,7 @@
if (FAILED(frame->webView(&view)))
return 0;
- COMPtr<IWebViewPrivate> viewPrivate(Query, view);
+ COMPtr<IWebViewPrivate2> viewPrivate(Query, view);
if (!viewPrivate)
return 0;
Modified: branches/safari-601.1-branch/Tools/DumpRenderTree/win/DumpRenderTree.cpp (186946 => 186947)
--- branches/safari-601.1-branch/Tools/DumpRenderTree/win/DumpRenderTree.cpp 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Tools/DumpRenderTree/win/DumpRenderTree.cpp 2015-07-17 06:15:32 UTC (rev 186947)
@@ -782,7 +782,7 @@
static _bstr_t sansSerifFamily(TEXT("Arial"));
static _bstr_t cursiveFamily(TEXT("Comic Sans MS")); // Not actually cursive, but it's what IE and Firefox use.
static _bstr_t fantasyFamily(TEXT("Times New Roman"));
- static _bstr_t pictographFamily(TEXT("Times New Roman"));
+ static _bstr_t pictographFamily(TEXT("Segoe UI Symbol"));
#endif
prefsPrivate->setAllowUniversalAccessFromFileURLs(TRUE);
@@ -818,7 +818,9 @@
prefsPrivate->setJavaScriptCanAccessClipboard(TRUE);
prefsPrivate->setOfflineWebApplicationCacheEnabled(TRUE);
prefsPrivate->setDeveloperExtrasEnabled(FALSE);
- prefsPrivate->setJavaScriptRuntimeFlags(WebKitJavaScriptRuntimeFlagsAllEnabled);
+ COMPtr<IWebPreferencesPrivate2> prefsPrivate2(Query, preferences);
+ if (prefsPrivate2)
+ prefsPrivate2->setJavaScriptRuntimeFlags(WebKitJavaScriptRuntimeFlagsAllEnabled);
// Set JS experiments enabled: YES
preferences->setLoadsImagesAutomatically(TRUE);
prefsPrivate->setLoadsSiteIconsIgnoringImageLoadingPreference(FALSE);
@@ -886,7 +888,7 @@
webIBActions->resetPageZoom(0);
}
- COMPtr<IWebViewPrivate> webViewPrivate(Query, webView);
+ COMPtr<IWebViewPrivate2> webViewPrivate(Query, webView);
if (webViewPrivate)
webViewPrivate->setTabKeyCyclesThroughElements(TRUE);
@@ -1082,7 +1084,7 @@
COMPtr<IWebView> webView;
if (SUCCEEDED(frame->webView(&webView))) {
- COMPtr<IWebViewPrivate> viewPrivate;
+ COMPtr<IWebViewPrivate2> viewPrivate;
if (SUCCEEDED(webView->QueryInterface(&viewPrivate))) {
if (shouldLogHistoryDelegates(pathOrURL.c_str())) {
::gTestRunner->setDumpHistoryDelegateCallbacks(true);
@@ -1224,7 +1226,7 @@
if (FAILED(webView->initWithFrame(clientRect, 0, groupName)))
return nullptr;
- COMPtr<IWebViewPrivate> viewPrivate;
+ COMPtr<IWebViewPrivate2> viewPrivate;
if (FAILED(webView->QueryInterface(&viewPrivate)))
return nullptr;
Modified: branches/safari-601.1-branch/Tools/DumpRenderTree/win/EditingDelegate.cpp (186946 => 186947)
--- branches/safari-601.1-branch/Tools/DumpRenderTree/win/EditingDelegate.cpp 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Tools/DumpRenderTree/win/EditingDelegate.cpp 2015-07-17 06:15:32 UTC (rev 186947)
@@ -52,9 +52,11 @@
{
*ppvObject = 0;
if (IsEqualGUID(riid, IID_IUnknown))
- *ppvObject = static_cast<IWebEditingDelegate*>(this);
+ *ppvObject = static_cast<IWebEditingDelegate2*>(this);
else if (IsEqualGUID(riid, IID_IWebEditingDelegate))
*ppvObject = static_cast<IWebEditingDelegate*>(this);
+ else if (IsEqualGUID(riid, IID_IWebEditingDelegate2))
+ *ppvObject = static_cast<IWebEditingDelegate2*>(this);
else if (IsEqualGUID(riid, IID_IWebNotificationObserver))
*ppvObject = static_cast<IWebNotificationObserver*>(this);
else
@@ -150,6 +152,14 @@
return S_OK;
}
+// IWebEditingDelegate
+HRESULT EditingDelegate::shouldInsertNode(IWebView* webView, IDOMNode* node, IDOMRange* range, WebViewInsertAction action)
+{
+ BOOL ignore;
+ return shouldInsertNode(webView, node, range, action, &ignore);
+}
+
+// IWebEditingDelegate2
HRESULT EditingDelegate::shouldInsertNode(IWebView* /*webView*/, IDOMNode* node, IDOMRange* range, WebViewInsertAction action, BOOL* result)
{
static const char* insertActionString[] = {
Modified: branches/safari-601.1-branch/Tools/DumpRenderTree/win/EditingDelegate.h (186946 => 186947)
--- branches/safari-601.1-branch/Tools/DumpRenderTree/win/EditingDelegate.h 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Tools/DumpRenderTree/win/EditingDelegate.h 2015-07-17 06:15:32 UTC (rev 186947)
@@ -31,7 +31,7 @@
#include <WebKit/WebKit.h>
-class __declspec(uuid("265DCD4B-79C3-44a2-84BC-511C3EDABD6F")) EditingDelegate : public IWebEditingDelegate, public IWebNotificationObserver {
+class __declspec(uuid("265DCD4B-79C3-44a2-84BC-511C3EDABD6F")) EditingDelegate : public IWebEditingDelegate2, public IWebNotificationObserver {
public:
EditingDelegate();
@@ -53,7 +53,7 @@
/* [in] */ IDOMRange *range,
/* [retval][out] */ BOOL *result);
- virtual HRESULT STDMETHODCALLTYPE shouldInsertNode(IWebView*, IDOMNode*, IDOMRange*, WebViewInsertAction, BOOL* result);
+ virtual HRESULT STDMETHODCALLTYPE shouldInsertNode(IWebView*, IDOMNode*, IDOMRange*, WebViewInsertAction);
virtual HRESULT STDMETHODCALLTYPE shouldInsertText(
/* [in] */ IWebView *webView,
@@ -167,6 +167,9 @@
// IWebNotificationObserver
virtual HRESULT STDMETHODCALLTYPE onNotify(IWebNotification* notification);
+ // IWebEditingDelegate2
+ virtual HRESULT STDMETHODCALLTYPE shouldInsertNode(IWebView*, IDOMNode*, IDOMRange*, WebViewInsertAction, BOOL* result);
+
private:
bool m_acceptsEditing;
ULONG m_refCount;
Modified: branches/safari-601.1-branch/Tools/DumpRenderTree/win/EventSender.cpp (186946 => 186947)
--- branches/safari-601.1-branch/Tools/DumpRenderTree/win/EventSender.cpp 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Tools/DumpRenderTree/win/EventSender.cpp 2015-07-17 06:15:32 UTC (rev 186947)
@@ -760,7 +760,7 @@
if (FAILED(frame->webView(&webView)))
return JSValueMakeUndefined(context);
- COMPtr<IWebViewPrivate> webViewPrivate;
+ COMPtr<IWebViewPrivate2> webViewPrivate;
if (FAILED(webView->QueryInterface(&webViewPrivate)))
return JSValueMakeUndefined(context);
Modified: branches/safari-601.1-branch/Tools/DumpRenderTree/win/FrameLoadDelegate.cpp (186946 => 186947)
--- branches/safari-601.1-branch/Tools/DumpRenderTree/win/FrameLoadDelegate.cpp 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Tools/DumpRenderTree/win/FrameLoadDelegate.cpp 2015-07-17 06:15:32 UTC (rev 186947)
@@ -163,7 +163,7 @@
if (!done && gTestRunner->dumpFrameLoadCallbacks())
printf("%s - didCommitLoadForFrame\n", descriptionSuitableForTestResult(frame).c_str());
- COMPtr<IWebViewPrivate> webViewPrivate;
+ COMPtr<IWebViewPrivate2> webViewPrivate;
HRESULT hr = webView->QueryInterface(&webViewPrivate);
if (FAILED(hr))
return hr;
Modified: branches/safari-601.1-branch/Tools/DumpRenderTree/win/TestRunnerWin.cpp (186946 => 186947)
--- branches/safari-601.1-branch/Tools/DumpRenderTree/win/TestRunnerWin.cpp 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Tools/DumpRenderTree/win/TestRunnerWin.cpp 2015-07-17 06:15:32 UTC (rev 186947)
@@ -86,7 +86,7 @@
if (FAILED(frame->webView(&webView)))
return false;
- COMPtr<IWebViewPrivate> viewPrivate;
+ COMPtr<IWebViewPrivate2> viewPrivate;
if (FAILED(webView->QueryInterface(&viewPrivate)))
return false;
@@ -106,8 +106,8 @@
long long TestRunner::applicationCacheDiskUsageForOrigin(JSStringRef url)
{
- COMPtr<IWebSecurityOrigin> origin;
- if (FAILED(WebKitCreateInstance(CLSID_WebSecurityOrigin, 0, IID_IWebSecurityOrigin, reinterpret_cast<void**>(&origin))))
+ COMPtr<IWebSecurityOrigin2> origin;
+ if (FAILED(WebKitCreateInstance(CLSID_WebSecurityOrigin, 0, IID_IWebSecurityOrigin2, reinterpret_cast<void**>(&origin))))
return 0;
COMPtr<IWebApplicationCache> applicationCache;
@@ -126,8 +126,8 @@
void TestRunner::clearApplicationCacheForOrigin(JSStringRef origin)
{
- COMPtr<IWebSecurityOrigin> securityOrigin;
- if (FAILED(WebKitCreateInstance(CLSID_WebSecurityOrigin, 0, IID_IWebSecurityOrigin, reinterpret_cast<void**>(&securityOrigin))))
+ COMPtr<IWebSecurityOrigin2> securityOrigin;
+ if (FAILED(WebKitCreateInstance(CLSID_WebSecurityOrigin, 0, IID_IWebSecurityOrigin2, reinterpret_cast<void**>(&securityOrigin))))
return;
_bstr_t originBstr(JSStringCopyBSTR(origin), false);
@@ -418,7 +418,7 @@
if (FAILED(frame->webView(&webView)))
return;
- COMPtr<IWebViewPrivate> viewPrivate;
+ COMPtr<IWebViewPrivate2> viewPrivate;
if (FAILED(webView->QueryInterface(&viewPrivate)))
return;
@@ -427,7 +427,7 @@
void TestRunner::setDomainRelaxationForbiddenForURLScheme(bool forbidden, JSStringRef scheme)
{
- COMPtr<IWebViewPrivate> webView;
+ COMPtr<IWebViewPrivate2> webView;
if (FAILED(WebKitCreateInstance(__uuidof(WebView), 0, __uuidof(webView), reinterpret_cast<void**>(&webView))))
return;
@@ -607,7 +607,7 @@
if (FAILED(frame->webView(&webView)))
return;
- COMPtr<IWebViewPrivate> viewPrivate;
+ COMPtr<IWebViewPrivate2> viewPrivate;
if (FAILED(webView->QueryInterface(&viewPrivate)))
return;
@@ -788,7 +788,7 @@
if (FAILED(frame->webView(&webView)))
return;
- COMPtr<IWebViewPrivate> webViewPrivate(Query, webView);
+ COMPtr<IWebViewPrivate2> webViewPrivate(Query, webView);
if (!webViewPrivate)
return;
@@ -816,7 +816,7 @@
if (FAILED(frame->webView(&webView)))
return;
- COMPtr<IWebViewPrivate> viewPrivate;
+ COMPtr<IWebViewPrivate2> viewPrivate;
if (FAILED(webView->QueryInterface(&viewPrivate)))
return;
@@ -876,7 +876,7 @@
if (FAILED(frame->webView(&webView)))
return;
- COMPtr<IWebViewPrivate> viewPrivate;
+ COMPtr<IWebViewPrivate2> viewPrivate;
if (FAILED(webView->QueryInterface(&viewPrivate)))
return;
@@ -912,7 +912,7 @@
if (FAILED(frame->webView(&webView)))
return;
- COMPtr<IWebViewPrivate> viewPrivate;
+ COMPtr<IWebViewPrivate2> viewPrivate;
if (FAILED(webView->QueryInterface(&viewPrivate)))
return;
@@ -966,7 +966,7 @@
void TestRunner::addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains)
{
- COMPtr<IWebViewPrivate> webView;
+ COMPtr<IWebViewPrivate2> webView;
if (FAILED(WebKitCreateInstance(__uuidof(WebView), 0, __uuidof(webView), reinterpret_cast<void**>(&webView))))
return;
@@ -975,7 +975,7 @@
void TestRunner::removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains)
{
- COMPtr<IWebViewPrivate> webView;
+ COMPtr<IWebViewPrivate2> webView;
if (FAILED(WebKitCreateInstance(__uuidof(WebView), 0, __uuidof(webView), reinterpret_cast<void**>(&webView))))
return;
@@ -989,7 +989,7 @@
void TestRunner::addUserScript(JSStringRef source, bool runAtStart, bool allFrames)
{
- COMPtr<IWebViewPrivate> webView;
+ COMPtr<IWebViewPrivate2> webView;
if (FAILED(WebKitCreateInstance(__uuidof(WebView), 0, __uuidof(webView), reinterpret_cast<void**>(&webView))))
return;
@@ -1002,7 +1002,7 @@
void TestRunner::addUserStyleSheet(JSStringRef source, bool allFrames)
{
- COMPtr<IWebViewPrivate> webView;
+ COMPtr<IWebViewPrivate2> webView;
if (FAILED(WebKitCreateInstance(__uuidof(WebView), 0, __uuidof(webView), reinterpret_cast<void**>(&webView))))
return;
@@ -1036,7 +1036,7 @@
if (FAILED(frame->webView(&webView)))
return;
- COMPtr<IWebViewPrivate> viewPrivate(Query, webView);
+ COMPtr<IWebViewPrivate2> viewPrivate(Query, webView);
if (!viewPrivate)
return;
@@ -1051,7 +1051,7 @@
if (FAILED(frame->webView(&webView)))
return;
- COMPtr<IWebViewPrivate> viewPrivate(Query, webView);
+ COMPtr<IWebViewPrivate2> viewPrivate(Query, webView);
if (!viewPrivate)
return;
@@ -1068,7 +1068,7 @@
if (FAILED(frame->webView(&webView)))
return;
- COMPtr<IWebViewPrivate> viewPrivate(Query, webView);
+ COMPtr<IWebViewPrivate2> viewPrivate(Query, webView);
if (!viewPrivate)
return;
@@ -1182,7 +1182,7 @@
if (FAILED(frame->webView(&webView)))
return;
- COMPtr<IWebViewPrivate> viewPrivate;
+ COMPtr<IWebViewPrivate2> viewPrivate;
if (FAILED(webView->QueryInterface(&viewPrivate)))
return;
Modified: branches/safari-601.1-branch/Tools/DumpRenderTree/win/TextInputControllerWin.cpp (186946 => 186947)
--- branches/safari-601.1-branch/Tools/DumpRenderTree/win/TextInputControllerWin.cpp 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Tools/DumpRenderTree/win/TextInputControllerWin.cpp 2015-07-17 06:15:32 UTC (rev 186947)
@@ -44,7 +44,7 @@
if (FAILED(frame->webView(&webView)))
return;
- COMPtr<IWebViewPrivate> viewPrivate;
+ COMPtr<IWebViewPrivate2> viewPrivate;
if (FAILED(webView->QueryInterface(&viewPrivate)))
return;
@@ -59,7 +59,7 @@
if (FAILED(frame->webView(&webView)))
return false;
- COMPtr<IWebViewPrivate> viewPrivate;
+ COMPtr<IWebViewPrivate2> viewPrivate;
if (FAILED(webView->QueryInterface(&viewPrivate)))
return false;
@@ -74,7 +74,7 @@
if (FAILED(frame->webView(&webView)))
return;
- COMPtr<IWebViewPrivate> viewPrivate;
+ COMPtr<IWebViewPrivate2> viewPrivate;
if (FAILED(webView->QueryInterface(&viewPrivate)))
return;
@@ -91,7 +91,7 @@
if (FAILED(frame->webView(&webView)))
return result;
- COMPtr<IWebViewPrivate> viewPrivate;
+ COMPtr<IWebViewPrivate2> viewPrivate;
if (FAILED(webView->QueryInterface(&viewPrivate)))
return result;
@@ -112,7 +112,7 @@
if (FAILED(frame->webView(&webView)))
return;
- COMPtr<IWebViewPrivate> viewPrivate;
+ COMPtr<IWebViewPrivate2> viewPrivate;
if (FAILED(webView->QueryInterface(&viewPrivate)))
return;
@@ -130,7 +130,7 @@
if (FAILED(frame->webView(&webView)))
return result;
- COMPtr<IWebViewPrivate> viewPrivate;
+ COMPtr<IWebViewPrivate2> viewPrivate;
if (FAILED(webView->QueryInterface(&viewPrivate)))
return result;
@@ -155,7 +155,7 @@
if (FAILED(frame->webView(&webView)))
return result;
- COMPtr<IWebViewPrivate> viewPrivate;
+ COMPtr<IWebViewPrivate2> viewPrivate;
if (FAILED(webView->QueryInterface(&viewPrivate)))
return result;
Modified: branches/safari-601.1-branch/Tools/DumpRenderTree/win/UIDelegate.h (186946 => 186947)
--- branches/safari-601.1-branch/Tools/DumpRenderTree/win/UIDelegate.h 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Tools/DumpRenderTree/win/UIDelegate.h 2015-07-17 06:15:32 UTC (rev 186947)
@@ -317,9 +317,7 @@
virtual HRESULT STDMETHODCALLTYPE unused2() { return E_NOTIMPL; }
virtual HRESULT STDMETHODCALLTYPE unused3() { return E_NOTIMPL; }
-
- virtual HRESULT STDMETHODCALLTYPE unused4() { return E_NOTIMPL; }
-
+
virtual HRESULT STDMETHODCALLTYPE webViewScrolled(
/* [in] */ IWebView *sender) { return E_NOTIMPL; }
@@ -330,6 +328,8 @@
/* [in] */ BSTR url,
/* [in] */ BOOL isError);
+ virtual HRESULT STDMETHODCALLTYPE webViewShouldInterruptJavaScript(IWebView*, BOOL*) { return E_NOTIMPL; }
+
virtual HRESULT STDMETHODCALLTYPE webViewReceivedFocus(
/* [in] */ IWebView *sender) { return E_NOTIMPL; }
Modified: branches/safari-601.1-branch/Tools/TestWebKitAPI/Tests/WebKit/win/WebViewDestruction.cpp (186946 => 186947)
--- branches/safari-601.1-branch/Tools/TestWebKitAPI/Tests/WebKit/win/WebViewDestruction.cpp 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Tools/TestWebKitAPI/Tests/WebKit/win/WebViewDestruction.cpp 2015-07-17 06:15:32 UTC (rev 186947)
@@ -82,7 +82,7 @@
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);
+ COMPtr<IWebViewPrivate2> viewPrivate(Query, m_webView);
ASSERT_NOT_NULL(viewPrivate);
EXPECT_HRESULT_SUCCEEDED(viewPrivate->viewWindow(&m_viewWindow));
EXPECT_TRUE(::IsWindow(m_viewWindow));
Modified: branches/safari-601.1-branch/Tools/WinLauncher/PageLoadTestClient.cpp (186946 => 186947)
--- branches/safari-601.1-branch/Tools/WinLauncher/PageLoadTestClient.cpp 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Tools/WinLauncher/PageLoadTestClient.cpp 2015-07-17 06:15:32 UTC (rev 186947)
@@ -60,10 +60,14 @@
void PageLoadTestClient::didStartProvisionalLoad(IWebFrame& frame)
{
- BOOL mainFrame;
- if (FAILED(frame.isMainFrame(&mainFrame)))
+ _com_ptr_t<_com_IIID<IWebFrame2, &__uuidof(IWebFrame2)>> frame2;
+ if (FAILED(frame.QueryInterface(&frame2.GetInterfacePtr())))
return;
+ BOOL mainFrame = FALSE;
+ if (frame2 && FAILED(frame2->isMainFrame(&mainFrame)))
+ return;
+
if (mainFrame) {
clearPageLoadState();
pageLoadStartedAtTime(CFAbsoluteTimeGetCurrent());
Modified: branches/safari-601.1-branch/Tools/WinLauncher/WinLauncher.cpp (186946 => 186947)
--- branches/safari-601.1-branch/Tools/WinLauncher/WinLauncher.cpp 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Tools/WinLauncher/WinLauncher.cpp 2015-07-17 06:15:32 UTC (rev 186947)
@@ -65,7 +65,7 @@
if (FAILED(hr))
return hr;
- hr = m_webView->QueryInterface(IID_IWebViewPrivate, reinterpret_cast<void**>(&m_webViewPrivate.GetInterfacePtr()));
+ hr = m_webView->QueryInterface(IID_IWebViewPrivate2, reinterpret_cast<void**>(&m_webViewPrivate.GetInterfacePtr()));
if (FAILED(hr))
return hr;
Modified: branches/safari-601.1-branch/Tools/WinLauncher/WinLauncher.h (186946 => 186947)
--- branches/safari-601.1-branch/Tools/WinLauncher/WinLauncher.h 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Tools/WinLauncher/WinLauncher.h 2015-07-17 06:15:32 UTC (rev 186947)
@@ -30,7 +30,7 @@
typedef _com_ptr_t<_com_IIID<IWebFrame, &__uuidof(IWebFrame)>> IWebFramePtr;
typedef _com_ptr_t<_com_IIID<IWebView, &__uuidof(IWebView)>> IWebViewPtr;
-typedef _com_ptr_t<_com_IIID<IWebViewPrivate, &__uuidof(IWebViewPrivate)>> IWebViewPrivatePtr;
+typedef _com_ptr_t<_com_IIID<IWebViewPrivate2, &__uuidof(IWebViewPrivate2)>> IWebViewPrivatePtr;
typedef _com_ptr_t<_com_IIID<IWebFrameLoadDelegate, &__uuidof(IWebFrameLoadDelegate)>> IWebFrameLoadDelegatePtr;
typedef _com_ptr_t<_com_IIID<IWebHistory, &__uuidof(IWebHistory)>> IWebHistoryPtr;
typedef _com_ptr_t<_com_IIID<IWebHistoryItem, &__uuidof(IWebHistoryItem)>> IWebHistoryItemPtr;
Modified: branches/safari-601.1-branch/Tools/WinLauncher/WinLauncherWebHost.cpp (186946 => 186947)
--- branches/safari-601.1-branch/Tools/WinLauncher/WinLauncherWebHost.cpp 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Tools/WinLauncher/WinLauncherWebHost.cpp 2015-07-17 06:15:32 UTC (rev 186947)
@@ -142,16 +142,20 @@
typedef _com_ptr_t<_com_IIID<IDOMDocument, &__uuidof(IDOMDocument)>> IDOMDocumentPtr;
typedef _com_ptr_t<_com_IIID<IDOMElement, &__uuidof(IDOMElement)>> IDOMElementPtr;
typedef _com_ptr_t<_com_IIID<IDOMEventTarget, &__uuidof(IDOMEventTarget)>> IDOMEventTargetPtr;
+typedef _com_ptr_t<_com_IIID<IWebFrame2, &__uuidof(IWebFrame2)>> IWebFrame2Ptr;
HRESULT WinLauncherWebHost::didFinishLoadForFrame(IWebView* webView, IWebFrame* frame)
{
if (!frame || !webView)
return E_POINTER;
- BOOL mainFrame;
- if (SUCCEEDED(frame->isMainFrame(&mainFrame))) {
- if (mainFrame)
- m_client->pageLoadTestClient().didFinishLoad();
+ IWebFrame2Ptr frame2;
+ if (SUCCEEDED(frame->QueryInterface(&frame2.GetInterfacePtr()))) {
+ BOOL mainFrame = FALSE;
+ if (frame2 && SUCCEEDED(frame2->isMainFrame(&mainFrame))) {
+ if (mainFrame)
+ m_client->pageLoadTestClient().didFinishLoad();
+ }
}
IDOMDocumentPtr doc;
@@ -221,8 +225,15 @@
HRESULT WinLauncherWebHost::didFirstLayoutInFrame(IWebView*, IWebFrame* frame)
{
+ if (!frame)
+ return E_POINTER;
+
+ IWebFrame2Ptr frame2;
+ if (FAILED(frame->QueryInterface(&frame2.GetInterfacePtr())))
+ return S_OK;
+
BOOL mainFrame;
- if (SUCCEEDED(frame->isMainFrame(&mainFrame))) {
+ if (frame2 && SUCCEEDED(frame2->isMainFrame(&mainFrame))) {
if (mainFrame)
m_client->pageLoadTestClient().didFirstLayoutForMainFrame();
}
Modified: branches/safari-601.1-branch/Tools/WinLauncher/WinLauncherWebHost.h (186946 => 186947)
--- branches/safari-601.1-branch/Tools/WinLauncher/WinLauncherWebHost.h 2015-07-17 06:15:23 UTC (rev 186946)
+++ branches/safari-601.1-branch/Tools/WinLauncher/WinLauncherWebHost.h 2015-07-17 06:15:32 UTC (rev 186947)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2014-2015 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions