summaryrefslogtreecommitdiff
path: root/Source/WebKit/win
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-05-07 11:21:11 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-05-07 11:21:11 +0200
commit2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch)
tree988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Source/WebKit/win
parentdd91e772430dc294e3bf478c119ef8d43c0a3358 (diff)
downloadqtwebkit-2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47.tar.gz
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Source/WebKit/win')
-rw-r--r--Source/WebKit/win/AccessibleBase.cpp2
-rw-r--r--Source/WebKit/win/ChangeLog340
-rw-r--r--Source/WebKit/win/FullscreenVideoController.cpp3
-rw-r--r--Source/WebKit/win/Interfaces/IWebFramePrivate.idl2
-rw-r--r--Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl3
-rw-r--r--Source/WebKit/win/MarshallingHelpers.cpp2
-rw-r--r--Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp2
-rw-r--r--Source/WebKit/win/WebCoreSupport/WebChromeClient.h9
-rw-r--r--Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp8
-rw-r--r--Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h9
-rw-r--r--Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp38
-rw-r--r--Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h3
-rw-r--r--Source/WebKit/win/WebCoreSupport/WebGeolocationClient.cpp4
-rw-r--r--Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp4
-rw-r--r--Source/WebKit/win/WebDatabaseManager.cpp2
-rw-r--r--Source/WebKit/win/WebFrame.cpp6
-rw-r--r--Source/WebKit/win/WebFrame.h2
-rw-r--r--Source/WebKit/win/WebGeolocationPosition.cpp8
-rw-r--r--Source/WebKit/win/WebGeolocationPosition.h6
-rw-r--r--Source/WebKit/win/WebInspector.cpp4
-rw-r--r--Source/WebKit/win/WebKit.vcproj/WebKit.sln4
-rw-r--r--Source/WebKit/win/WebKitCOMAPI.cpp7
-rw-r--r--Source/WebKit/win/WebNodeHighlight.cpp12
-rw-r--r--Source/WebKit/win/WebNodeHighlight.h2
-rw-r--r--Source/WebKit/win/WebPreferenceKeysPrivate.h3
-rw-r--r--Source/WebKit/win/WebPreferences.cpp15
-rw-r--r--Source/WebKit/win/WebPreferences.h3
-rw-r--r--Source/WebKit/win/WebView.cpp43
-rw-r--r--Source/WebKit/win/WebView.h6
29 files changed, 445 insertions, 107 deletions
diff --git a/Source/WebKit/win/AccessibleBase.cpp b/Source/WebKit/win/AccessibleBase.cpp
index d26086677..e733141f2 100644
--- a/Source/WebKit/win/AccessibleBase.cpp
+++ b/Source/WebKit/win/AccessibleBase.cpp
@@ -498,7 +498,7 @@ HRESULT STDMETHODCALLTYPE AccessibleBase::accLocation(long* left, long* top, lon
if (!childObj->documentFrameView())
return E_FAIL;
- IntRect screenRect(childObj->documentFrameView()->contentsToScreen(childObj->elementRect()));
+ IntRect screenRect(childObj->documentFrameView()->contentsToScreen(childObj->pixelSnappedElementRect()));
*left = screenRect.x();
*top = screenRect.y();
*width = screenRect.width();
diff --git a/Source/WebKit/win/ChangeLog b/Source/WebKit/win/ChangeLog
index 795dca1af..56dea8721 100644
--- a/Source/WebKit/win/ChangeLog
+++ b/Source/WebKit/win/ChangeLog
@@ -1,3 +1,343 @@
+2012-05-05 Dean Jackson <dino@apple.com>
+
+ Add new Setting/Preference to disable requestAnimationFrame
+ https://bugs.webkit.org/show_bug.cgi?id=85693
+
+ Reviewed by Simon Fraser.
+
+ Exposes a new WebPreference: WebKitRequestAnimationFrameEnabled.
+ The default value is true. The majority of applications will leave
+ it this way.
+
+ * Interfaces/IWebPreferencesPrivate.idl:
+ * WebPreferenceKeysPrivate.h:
+ * WebPreferences.cpp:
+ (WebPreferences::initializeDefaultSettings):
+ (WebPreferences::setRequestAnimationFrameEnabled):
+ (WebPreferences::requestAnimationFrameEnabled):
+ * WebPreferences.h:
+ (WebPreferences):
+ * WebView.cpp:
+ (WebView::notifyPreferencesChanged):
+
+2012-05-04 Nate Chapin <japhet@chromium.org>
+
+ Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
+ https://bugs.webkit.org/show_bug.cgi?id=85533
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebFrameLoaderClient::finishedLoading):
+
+2012-04-27 Jon Lee <jonlee@apple.com>
+
+ Migrate permission functions to Notification from NotificationCenter
+ https://bugs.webkit.org/show_bug.cgi?id=80485
+ <rdar://problem/10965458>
+
+ Reviewed by Jian Li.
+
+ * WebCoreSupport/WebDesktopNotificationsDelegate.cpp:
+ (WebDesktopNotificationsDelegate::requestPermission):
+ * WebCoreSupport/WebDesktopNotificationsDelegate.h:
+ (WebDesktopNotificationsDelegate): Add stub implementation of requestPermission.
+
+2012-04-23 Jon Honeycutt <jhoneycutt@apple.com>
+
+ FrameLoaderClient::dispatchWillSendSubmitEvent() should be given more
+ information about the form being submitted
+ https://bugs.webkit.org/show_bug.cgi?id=84297
+
+ Reviewed by Andy Estes.
+
+ * WebFrame.h:
+ Fix function stub for new parameter.
+
+2012-05-01 Ryosuke Niwa <rniwa@webkit.org>
+
+ *Command.h files shouldn't be exported to WebKit layer
+ https://bugs.webkit.org/show_bug.cgi?id=74778
+
+ Reviewed by Eric Seidel.
+
+ * WebView.cpp:
+
+2012-04-20 Emil A Eklund <eae@chromium.org>
+
+ [win] Update windows platform code to use pixel snapped values
+ https://bugs.webkit.org/show_bug.cgi?id=84283
+
+ Reviewed by Eric Seidel.
+
+ * AccessibleBase.cpp:
+ (AccessibleBase::accLocation):
+
+2012-04-18 Vivek Galatage <vivekgalatage@gmail.com>
+
+ Web Inspector: Disabling Inspector causes build failure on Windows
+ https://bugs.webkit.org/show_bug.cgi?id=83557
+
+ Reviewed by Pavel Feldman.
+
+ The calls to inspector APIs are not put under ENABLE(INSPECTOR) guard.
+ This change brings all such API calls under the guard.
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ * WebInspector.cpp:
+ * WebNodeHighlight.cpp:
+ (WebNodeHighlight::WebNodeHighlight):
+ (WebNodeHighlight::update):
+ * WebNodeHighlight.h:
+ (WebNodeHighlight):
+ * WebView.cpp:
+ (WebView::WebView):
+ (WebView::close):
+ (WebView::initWithFrame):
+ (WebView::inspector):
+ * WebView.h:
+ (WebView):
+
+2012-04-11 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r113836.
+ http://trac.webkit.org/changeset/113836
+ https://bugs.webkit.org/show_bug.cgi?id=83705
+
+ Broke all the WebKit2 inspector tests (Requested by andersca
+ on #webkit).
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (registerWindowClass):
+ * WebInspector.cpp:
+ (WebInspector::setTimelineProfilingEnabled):
+ * WebNodeHighlight.cpp:
+ (WebNodeHighlight::WebNodeHighlight):
+ (WebNodeHighlight::update):
+ * WebNodeHighlight.h:
+ (WebNodeHighlight):
+ * WebView.cpp:
+ (WebView::WebView):
+ (WebView::close):
+ (WebView::initWithFrame):
+ (WebView::inspector):
+ * WebView.h:
+ (WebView):
+
+2012-04-11 Vivek Galatage <vivekgalatage@gmail.com>
+
+ Web Inspector: Disabling Inspector causes build failure on Windows
+ https://bugs.webkit.org/show_bug.cgi?id=83557
+
+ Reviewed by Pavel Feldman.
+
+ The calls to inspector APIs are not put under ENABLE(INSPECTOR) guard.
+ This change brings all such API calls under the guard.
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ * WebInspector.cpp:
+ * WebNodeHighlight.cpp:
+ (WebNodeHighlight::WebNodeHighlight):
+ (WebNodeHighlight::update):
+ * WebNodeHighlight.h:
+ (WebNodeHighlight):
+ * WebView.cpp:
+ (WebView::WebView):
+ (WebView::close):
+ (WebView::initWithFrame):
+ (WebView::inspector):
+ * WebView.h:
+ (WebView):
+
+2012-03-30 Mark Pilgrim <pilgrim@chromium.org>
+
+ GEOLOCATION should be implemented as Page Supplement
+ https://bugs.webkit.org/show_bug.cgi?id=82228
+
+ Reviewed by Adam Barth.
+
+ Geolocation is now a Supplement in Page so the interface
+ has changed for setting up the page's geolocation client
+ initially and accessing the controller later.
+
+ * WebView.cpp:
+ (WebView::initWithFrame):
+ (WebView::geolocationDidChangePosition):
+ (WebView::geolocationDidFailWithError):
+
+2012-03-29 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r112553.
+ http://trac.webkit.org/changeset/112553
+ https://bugs.webkit.org/show_bug.cgi?id=82638
+
+ It made all tests crash on Qt WK2 (Requested by Ossy_away on
+ #webkit).
+
+ * WebView.cpp:
+ (WebView::initWithFrame):
+ (WebView::geolocationDidChangePosition):
+ (WebView::geolocationDidFailWithError):
+
+2012-03-29 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
+
+ HashMap<>::add should return a more descriptive object
+ https://bugs.webkit.org/show_bug.cgi?id=71063
+
+ Reviewed by Ryosuke Niwa.
+
+ Update code to use AddResult instead of a pair.
+
+ * WebKitCOMAPI.cpp:
+ (classFactory):
+
+2012-03-29 Mark Pilgrim <pilgrim@chromium.org>
+
+ GEOLOCATION should be implemented as Page Supplement
+ https://bugs.webkit.org/show_bug.cgi?id=82228
+
+ Reviewed by Adam Barth.
+
+ Geolocation is now a Supplement in Page so the interface
+ has changed for setting up the page's geolocation client
+ initially and accessing the controller later.
+
+ * WebView.cpp:
+ (WebView::initWithFrame):
+ (WebView::geolocationDidChangePosition):
+ (WebView::geolocationDidFailWithError):
+
+2012-03-28 Nate Chapin <japhet@chromium.org>
+
+ Remove dispatchDidLoadMainResource callback, since no
+ port implements it.
+ https://bugs.webkit.org/show_bug.cgi?id=82539
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ (WebFrameLoaderClient):
+
+2012-03-26 Adam Barth <abarth@webkit.org>
+
+ FrameLoader::shouldAllowNavigation uses Frame for context rather than Document
+ https://bugs.webkit.org/show_bug.cgi?id=81020
+
+ Reviewed by Eric Seidel.
+
+ Update call site to new function name.
+
+ * WebFrame.cpp:
+ (WebFrame::dispatchWillSubmitForm):
+
+2012-03-22 Anders Carlsson <andersca@apple.com>
+
+ ASSERT(!needsLayout) in RenderView.cpp when visiting http://www.panic.com/blog/
+ https://bugs.webkit.org/show_bug.cgi?id=81953
+ <rdar://problem/11086998>
+
+ Reviewed by Sam Weinig.
+
+ Update for changes to WebCore.
+
+ * FullscreenVideoController.cpp:
+ (FullscreenVideoController::LayerClient::platformCALayerDidCreateTiles):
+
+2012-03-20 Steve Falkenburg <sfalken@apple.com>
+
+ Move WTF-related Windows project files out of JavaScriptCore
+ https://bugs.webkit.org/show_bug.cgi?id=80680
+
+ Reviewed by Jessie Berlin.
+
+ * WebKit.vcproj/WebKit.sln:
+
+2012-03-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Convert hasSpellingMarker to use Internals interface.
+ https://bugs.webkit.org/show_bug.cgi?id=81300
+
+ Reviewed by Ryosuke Niwa.
+
+ Remove hasSpellingMarker interface support, since it can support in the cross-port
+ way through the Internals interface.
+
+ * Interfaces/IWebFramePrivate.idl:
+
+2012-03-19 Adam Barth <abarth@webkit.org>
+
+ Remove support for "magic" iframe
+ https://bugs.webkit.org/show_bug.cgi?id=81590
+
+ Reviewed by Eric Seidel.
+
+ Remove FrameLoaderClient methods that no longer exist.
+
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ (WebFrameLoaderClient):
+
+2012-03-19 Anders Carlsson <andersca@apple.com>
+
+ Fix Windows build.
+
+ * FullscreenVideoController.cpp:
+ (FullscreenVideoController::LayerClient::platformCALayerDeviceScaleFactor):
+
+2012-03-13 Jon Lee <jonlee@apple.com>
+
+ Separate NOTIFICATIONS and LEGACY_NOTIFICATIONS
+ https://bugs.webkit.org/show_bug.cgi?id=80922
+ <rdar://problem/11035082>
+
+ Reviewed by Jian Li.
+
+ You can include either NOTIFICATIONS or LEGACY_NOTIFICATIONS and have a complete API.
+ LEGACY_NOTIFICATIONS should cover all of the previous functionality, and NOTIFICATIONS will cover the
+ new API. Therefore, APIs that are common between the two will have:
+ #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+
+ This patch initially sets both to be exactly the same. As other bugs with patches begin to migrate to
+ the new API, the defines will begin to split. This allows ports to decide which set of APIs to include.
+
+ Update everything to be #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+ * WebCoreSupport/WebChromeClient.cpp:
+ (WebChromeClient::WebChromeClient):
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient):
+ * WebCoreSupport/WebDesktopNotificationsDelegate.cpp:
+ * WebCoreSupport/WebDesktopNotificationsDelegate.h:
+
+2012-03-13 Adam Barth <abarth@webkit.org> && Benjamin Poulain <bpoulain@apple.com>
+
+ Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
+ https://bugs.webkit.org/show_bug.cgi?id=78853
+
+ Reviewed by Adam Barth.
+
+ * WebCoreSupport/WebChromeClient.h:
+ (WebChromeClient):
+ * WebCoreSupport/WebGeolocationClient.cpp:
+ (WebGeolocationClient::lastPosition):
+ * WebGeolocationPosition.cpp:
+ (WebGeolocationPosition::initWithTimestamp):
+ (core):
+ * WebGeolocationPosition.h:
+ (WebGeolocationPosition):
+ (WebGeolocationPosition::impl):
+ * WebView.cpp:
+ (WebView::initWithFrame):
+ (WebView::geolocationDidChangePosition):
+ (WebView::geolocationDidFailWithError):
+
+2012-03-12 Jessie Berlin <jberlin@apple.com>
+
+ More Windows build fixing.
+
+ * MarshallingHelpers.cpp:
+ * WebDatabaseManager.cpp:
+
2012-03-09 Jon Lee <jonlee@apple.com>
Rename NotificationPresenter to NotificationClient
diff --git a/Source/WebKit/win/FullscreenVideoController.cpp b/Source/WebKit/win/FullscreenVideoController.cpp
index 29ffacd0e..203e229e3 100644
--- a/Source/WebKit/win/FullscreenVideoController.cpp
+++ b/Source/WebKit/win/FullscreenVideoController.cpp
@@ -195,7 +195,8 @@ private:
virtual bool platformCALayerContentsOpaque() const { return false; }
virtual bool platformCALayerDrawsContent() const { return false; }
virtual void platformCALayerLayerDidDisplay(PlatformLayer*) { }
- virtual void platformCALayerDidCreateTiles() { }
+ virtual void platformCALayerDidCreateTiles(const Vector<FloatRect>&) { }
+ virtual float platformCALayerDeviceScaleFactor() { return 1; }
FullscreenVideoController* m_parent;
};
diff --git a/Source/WebKit/win/Interfaces/IWebFramePrivate.idl b/Source/WebKit/win/Interfaces/IWebFramePrivate.idl
index 90ba4bdb9..cb7a46997 100644
--- a/Source/WebKit/win/Interfaces/IWebFramePrivate.idl
+++ b/Source/WebKit/win/Interfaces/IWebFramePrivate.idl
@@ -115,8 +115,6 @@ interface IWebFramePrivate : IUnknown
HRESULT loadPlainTextString([in] BSTR string, [in] BSTR url);
- HRESULT hasSpellingMarker([in] UINT from, [in] UINT length, [out, retval] BOOL* result);
-
HRESULT clearOpener();
HRESULT setTextDirection([in] BSTR direction);
diff --git a/Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl b/Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
index ad67a56b0..2f1fdeae5 100644
--- a/Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
+++ b/Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
@@ -142,4 +142,7 @@ interface IWebPreferencesPrivate : IUnknown
HRESULT setShouldInvertColors([in] BOOL);
HRESULT shouldInvertColors([out, retval] BOOL*);
+
+ HRESULT setRequestAnimationFrameEnabled([in] BOOL);
+ HRESULT requestAnimationFrameEnabled([out, retval] BOOL*);
}
diff --git a/Source/WebKit/win/MarshallingHelpers.cpp b/Source/WebKit/win/MarshallingHelpers.cpp
index b29804e98..c7719fdb2 100644
--- a/Source/WebKit/win/MarshallingHelpers.cpp
+++ b/Source/WebKit/win/MarshallingHelpers.cpp
@@ -26,11 +26,11 @@
#include "config.h"
#include "WebKitDLL.h"
#include "MarshallingHelpers.h"
-#include "MathExtras.h"
#include <WebCore/IntRect.h>
#include <WebCore/KURL.h>
#include <WebCore/PlatformString.h>
+#include <wtf/MathExtras.h>
using namespace WebCore;
diff --git a/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp b/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp
index cca9ec0e7..4435b48d6 100644
--- a/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp
+++ b/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp
@@ -74,7 +74,7 @@ static const size_t maxFilePathsListSize = USHRT_MAX;
WebChromeClient::WebChromeClient(WebView* webView)
: m_webView(webView)
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
, m_notificationsDelegate(new WebDesktopNotificationsDelegate(webView))
#endif
{
diff --git a/Source/WebKit/win/WebCoreSupport/WebChromeClient.h b/Source/WebKit/win/WebCoreSupport/WebChromeClient.h
index 478f5d53b..f22d6f3ab 100644
--- a/Source/WebKit/win/WebCoreSupport/WebChromeClient.h
+++ b/Source/WebKit/win/WebCoreSupport/WebChromeClient.h
@@ -144,18 +144,13 @@ public:
virtual void scrollRectIntoView(const WebCore::IntRect&) const { }
- // FIXME: Remove once all ports are using client-based geolocation. https://bugs.webkit.org/show_bug.cgi?id=40373
- // For client-based geolocation, these two methods have been moved to WebGeolocationClient. https://bugs.webkit.org/show_bug.cgi?id=50061
- virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*) { }
- virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*) { }
-
#if ENABLE(VIDEO)
virtual bool supportsFullscreenForNode(const WebCore::Node*);
virtual void enterFullscreenForNode(WebCore::Node*);
virtual void exitFullscreenForNode(WebCore::Node*);
#endif
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
virtual WebCore::NotificationClient* notificationPresenter() const { return reinterpret_cast<WebCore::NotificationClient*>(m_notificationsDelegate.get()); }
#endif
@@ -180,7 +175,7 @@ private:
WebView* m_webView;
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
OwnPtr<WebDesktopNotificationsDelegate> m_notificationsDelegate;
#endif
};
diff --git a/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp b/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp
index 70ed482c3..a5646f255 100644
--- a/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp
+++ b/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp
@@ -36,7 +36,7 @@
#include <WebCore/Document.h>
#include <WebCore/KURL.h>
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
using namespace WebCore;
@@ -176,6 +176,10 @@ void WebDesktopNotificationsDelegate::requestPermission(SecurityOrigin* origin,
notificationDelegate()->requestNotificationPermission(org);
}
+void WebDesktopNotificationsDelegate::requestPermission(SecurityOrigin*, PassRefPtr<NotificationPermissionCallback>)
+{
+}
+
void WebDesktopNotificationsDelegate::cancelRequestsForPermission(ScriptExecutionContext* context)
{
}
@@ -211,4 +215,4 @@ COMPtr<IWebDesktopNotificationsDelegate> WebDesktopNotificationsDelegate::notifi
return delegate;
}
-#endif // ENABLE(NOTIFICATIONS)
+#endif // ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
diff --git a/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h b/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h
index a1a1185c5..b6f9c218f 100644
--- a/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h
+++ b/Source/WebKit/win/WebCoreSupport/WebDesktopNotificationsDelegate.h
@@ -32,7 +32,7 @@
#include <WebCore/Notification.h>
#include <WebCore/NotificationClient.h>
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
interface IWebDesktopNotificationPresenter;
@@ -50,7 +50,12 @@ public:
virtual void cancel(WebCore::Notification* object);
virtual void notificationObjectDestroyed(WebCore::Notification* object);
virtual void notificationControllerDestroyed();
- virtual void requestPermission(WebCore::SecurityOrigin* origin, PassRefPtr<WebCore::VoidCallback> callback);
+#if ENABLE(LEGACY_NOTIFICATIONS)
+ virtual void requestPermission(WebCore::SecurityOrigin*, PassRefPtr<WebCore::VoidCallback>);
+#endif
+#if ENABLE(NOTIFICATIONS)
+ virtual void requestPermission(WebCore::SecurityOrigin*, PassRefPtr<WebCore::NotificationPermissionCallback>);
+#endif
virtual void cancelRequestsForPermission(WebCore::ScriptExecutionContext*);
virtual WebCore::NotificationClient::Permission checkPermission(const KURL&);
diff --git a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp b/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
index f2e81aca4..4f717c57b 100644
--- a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -460,10 +460,6 @@ void WebFrameLoaderClient::dispatchShow()
ui->webViewShow(webView);
}
-void WebFrameLoaderClient::dispatchDidLoadMainResource(DocumentLoader*)
-{
-}
-
void WebFrameLoaderClient::setMainDocumentError(DocumentLoader*, const ResourceError& error)
{
if (!m_manualLoader)
@@ -521,13 +517,8 @@ void WebFrameLoaderClient::committedLoad(DocumentLoader* loader, const char* dat
m_manualLoader->didReceiveData(data, length);
}
-void WebFrameLoaderClient::finishedLoading(DocumentLoader* loader)
+void WebFrameLoaderClient::finishedLoading(DocumentLoader*)
{
- // Telling the frame we received some data and passing 0 as the data is our
- // way to get work done that is normally done when the first bit of data is
- // received, even for the case of a document with no data (like about:blank)
- committedLoad(loader, 0, 0);
-
if (!m_manualLoader)
return;
@@ -762,33 +753,6 @@ PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& url, const Strin
return result.release();
}
-void WebFrameLoaderClient::didTransferChildFrameToNewDocument(Page*)
-{
- Frame* coreFrame = core(m_webFrame);
- ASSERT(coreFrame);
- WebView* webView = kit(coreFrame->page());
- if (m_webFrame->webView() != webView)
- m_webFrame->setWebView(webView);
-}
-
-void WebFrameLoaderClient::transferLoadingResourceFromPage(ResourceLoader* loader, const ResourceRequest& request, Page* oldPage)
-{
- assignIdentifierToInitialRequest(loader->identifier(), loader->documentLoader(), request);
-
- WebView* oldWebView = kit(oldPage);
- if (!oldWebView)
- return;
-
- COMPtr<IWebResourceLoadDelegate> oldResourceLoadDelegate;
- if (FAILED(oldWebView->resourceLoadDelegate(&oldResourceLoadDelegate)))
- return;
-
- COMPtr<IWebResourceLoadDelegatePrivate2> oldResourceLoadDelegatePrivate2(Query, oldResourceLoadDelegate);
- if (!oldResourceLoadDelegatePrivate2)
- return;
- oldResourceLoadDelegatePrivate2->removeIdentifierForRequest(oldWebView, loader->identifier());
-}
-
PassRefPtr<Frame> WebFrameLoaderClient::createFrame(const KURL& URL, const String& name, HTMLFrameOwnerElement* ownerElement, const String& referrer)
{
Frame* coreFrame = core(m_webFrame);
diff --git a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h b/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
index e3e895382..d65f1658b 100644
--- a/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
+++ b/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.h
@@ -80,7 +80,6 @@ public:
virtual WebCore::Frame* dispatchCreatePage(const WebCore::NavigationAction&);
virtual void dispatchShow();
- virtual void dispatchDidLoadMainResource(WebCore::DocumentLoader*);
virtual void setMainDocumentError(WebCore::DocumentLoader*, const WebCore::ResourceError&);
virtual void postProgressStartedNotification();
@@ -116,8 +115,6 @@ public:
virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement* ownerElement,
const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
- virtual void didTransferChildFrameToNewDocument(WebCore::Page*);
- virtual void transferLoadingResourceFromPage(WebCore::ResourceLoader*, const WebCore::ResourceRequest&, WebCore::Page*);
virtual PassRefPtr<WebCore::Widget> createPlugin(const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&, const Vector<WTF::String>&, const Vector<WTF::String>&, const WTF::String&, bool loadManually);
virtual void redirectDataToPlugin(WebCore::Widget* pluginWidget);
diff --git a/Source/WebKit/win/WebCoreSupport/WebGeolocationClient.cpp b/Source/WebKit/win/WebCoreSupport/WebGeolocationClient.cpp
index b1d83fbd9..41bcb48f8 100644
--- a/Source/WebKit/win/WebCoreSupport/WebGeolocationClient.cpp
+++ b/Source/WebKit/win/WebCoreSupport/WebGeolocationClient.cpp
@@ -66,7 +66,6 @@ void WebGeolocationClient::stopUpdating()
GeolocationPosition* WebGeolocationClient::lastPosition()
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
COMPtr<IWebGeolocationProvider> provider;
if (FAILED(m_webView->geolocationProvider(&provider)))
return 0;
@@ -74,9 +73,6 @@ GeolocationPosition* WebGeolocationClient::lastPosition()
if (FAILED(provider->lastPosition(&position)))
return 0;
return core(position.get());
-#else
- return 0;
-#endif
}
void WebGeolocationClient::requestPermission(Geolocation* geolocation)
diff --git a/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp b/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
index 03d3a5e39..0355282c6 100644
--- a/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
+++ b/Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
@@ -29,6 +29,8 @@
#include "config.h"
#include "WebInspectorClient.h"
+#if ENABLE(INSPECTOR)
+
#include "WebInspectorDelegate.h"
#include "WebKit.h"
#include "WebMutableURLRequest.h"
@@ -546,3 +548,5 @@ static ATOM registerWindowClass()
return ::RegisterClassEx(&wcex);
}
+
+#endif // ENABLE(INSPECTOR)
diff --git a/Source/WebKit/win/WebDatabaseManager.cpp b/Source/WebKit/win/WebDatabaseManager.cpp
index cf9706c4a..6e687f193 100644
--- a/Source/WebKit/win/WebDatabaseManager.cpp
+++ b/Source/WebKit/win/WebDatabaseManager.cpp
@@ -38,12 +38,12 @@
#include "WebNotificationCenter.h"
#include "WebSecurityOrigin.h"
-#include <JavaScriptCore/MainThread.h>
#include <WebCore/BString.h>
#include <WebCore/COMPtr.h>
#include <WebCore/DatabaseTracker.h>
#include <WebCore/FileSystem.h>
#include <WebCore/SecurityOrigin.h>
+#include <wtf/MainThread.h>
using namespace WebCore;
diff --git a/Source/WebKit/win/WebFrame.cpp b/Source/WebKit/win/WebFrame.cpp
index 3564bd986..1a4b676a0 100644
--- a/Source/WebKit/win/WebFrame.cpp
+++ b/Source/WebKit/win/WebFrame.cpp
@@ -1556,6 +1556,10 @@ void WebFrame::cancelPolicyCheck()
d->m_policyFunction = 0;
}
+void WebFrame::dispatchWillSendSubmitEvent(PassRefPtr<WebCore::FormState>)
+{
+}
+
void WebFrame::dispatchWillSubmitForm(FramePolicyFunction function, PassRefPtr<FormState> formState)
{
Frame* coreFrame = core(this);
@@ -1578,7 +1582,7 @@ void WebFrame::dispatchWillSubmitForm(FramePolicyFunction function, PassRefPtr<F
COMPtr<IPropertyBag> formValuesPropertyBag(AdoptCOM, COMPropertyBag<String>::createInstance(formValuesMap));
- COMPtr<WebFrame> sourceFrame(kit(formState->sourceFrame()));
+ COMPtr<WebFrame> sourceFrame(kit(formState->sourceDocument()->frame()));
if (SUCCEEDED(formDelegate->willSubmitForm(this, sourceFrame.get(), formElement.get(), formValuesPropertyBag.get(), setUpPolicyListener(function).get())))
return;
diff --git a/Source/WebKit/win/WebFrame.h b/Source/WebKit/win/WebFrame.h
index c6286b0d0..c7ddfe860 100644
--- a/Source/WebKit/win/WebFrame.h
+++ b/Source/WebKit/win/WebFrame.h
@@ -305,7 +305,7 @@ public:
virtual void detachedFromParent2();
virtual void detachedFromParent3();
virtual void cancelPolicyCheck();
- virtual void dispatchWillSendSubmitEvent(WebCore::HTMLFormElement*) { }
+ virtual void dispatchWillSendSubmitEvent(PassRefPtr<WebCore::FormState>);
virtual void dispatchWillSubmitForm(WebCore::FramePolicyFunction, PassRefPtr<WebCore::FormState>);
virtual void revertToProvisionalState(WebCore::DocumentLoader*);
virtual void setMainFrameDocumentReady(bool);
diff --git a/Source/WebKit/win/WebGeolocationPosition.cpp b/Source/WebKit/win/WebGeolocationPosition.cpp
index 26554ddf8..fb2ac6fa4 100644
--- a/Source/WebKit/win/WebGeolocationPosition.cpp
+++ b/Source/WebKit/win/WebGeolocationPosition.cpp
@@ -27,11 +27,9 @@
#include "WebGeolocationPosition.h"
#include <WebCore/COMPtr.h>
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
#include <WebCore/GeolocationPosition.h>
using namespace WebCore;
-#endif
COMPtr<WebGeolocationPosition> WebGeolocationPosition::createInstance()
{
@@ -83,15 +81,10 @@ ULONG WebGeolocationPosition::Release()
HRESULT WebGeolocationPosition::initWithTimestamp(double timestamp, double latitude, double longitude, double accuracy)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
m_position = GeolocationPosition::create(timestamp, latitude, longitude, accuracy);
return S_OK;
-#else
- return E_FAIL;
-#endif
}
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
GeolocationPosition* core(IWebGeolocationPosition* position)
{
if (!position)
@@ -103,4 +96,3 @@ GeolocationPosition* core(IWebGeolocationPosition* position)
return webGeolocationPosition->impl();
}
-#endif
diff --git a/Source/WebKit/win/WebGeolocationPosition.h b/Source/WebKit/win/WebGeolocationPosition.h
index 81602706b..3e11dcfd1 100644
--- a/Source/WebKit/win/WebGeolocationPosition.h
+++ b/Source/WebKit/win/WebGeolocationPosition.h
@@ -48,19 +48,13 @@ public:
// IWebGeolocationPosition
virtual HRESULT STDMETHODCALLTYPE initWithTimestamp(double timestamp, double latitude, double longitude, double accuracy);
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
WebCore::GeolocationPosition* impl() const { return m_position.get(); }
-#endif
private:
ULONG m_refCount;
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
RefPtr<WebCore::GeolocationPosition> m_position;
-#endif
};
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
WebCore::GeolocationPosition* core(IWebGeolocationPosition*);
-#endif
#endif // WebGeolocationPosition_h
diff --git a/Source/WebKit/win/WebInspector.cpp b/Source/WebKit/win/WebInspector.cpp
index 17f6f0732..39c75277d 100644
--- a/Source/WebKit/win/WebInspector.cpp
+++ b/Source/WebKit/win/WebInspector.cpp
@@ -29,6 +29,8 @@
#include "config.h"
#include "WebInspector.h"
+#if ENABLE(INSPECTOR)
+
#include "WebInspectorClient.h"
#include "WebKitDLL.h"
#include "WebView.h"
@@ -276,3 +278,5 @@ HRESULT STDMETHODCALLTYPE WebInspector::setTimelineProfilingEnabled(BOOL enabled
frontendClient()->setTimelineProfilingEnabled(enabled);
return S_OK;
}
+
+#endif // ENABLE(INSPECTOR)
diff --git a/Source/WebKit/win/WebKit.vcproj/WebKit.sln b/Source/WebKit/win/WebKit.vcproj/WebKit.sln
index a41ab21ae..d9ff7968f 100644
--- a/Source/WebKit/win/WebKit.vcproj/WebKit.sln
+++ b/Source/WebKit/win/WebKit.vcproj/WebKit.sln
@@ -11,7 +11,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCore", "..\..\..\WebCore
{E498CA9D-3BD2-4D52-8E37-C8DC76526325} = {E498CA9D-3BD2-4D52-8E37-C8DC76526325}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTF", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\WTF\WTF.vcproj", "{AA8A5A85-592B-4357-BC60-E0E91E026AF6}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTF", "..\..\..\WTF\WTF.vcproj\WTF.vcproj", "{AA8A5A85-592B-4357-BC60-E0E91E026AF6}"
ProjectSection(ProjectDependencies) = postProject
{5AE5F5E4-782D-4F63-B4D7-3977B52B9950} = {5AE5F5E4-782D-4F63-B4D7-3977B52B9950}
EndProjectSection
@@ -188,7 +188,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitTestRunnerLauncher",
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WTF", "WTF", "{A671AE22-FBCE-4C41-A723-82939FCA3E92}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTFGenerated", "..\..\..\JavaScriptCore\JavaScriptCore.vcproj\WTF\WTFGenerated.vcproj", "{5AE5F5E4-782D-4F63-B4D7-3977B52B9950}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WTFGenerated", "..\..\..\WTF\WTF.vcproj\WTFGenerated.vcproj", "{5AE5F5E4-782D-4F63-B4D7-3977B52B9950}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/Source/WebKit/win/WebKitCOMAPI.cpp b/Source/WebKit/win/WebKitCOMAPI.cpp
index c4450f749..9c9cc026b 100644
--- a/Source/WebKit/win/WebKitCOMAPI.cpp
+++ b/Source/WebKit/win/WebKitCOMAPI.cpp
@@ -51,10 +51,9 @@ static COMPtr<IClassFactory> classFactory(const CLSID& clsid)
typedef HashMap<CLSID, COMPtr<IClassFactory>, CLSIDHash, CLSIDHashTraits> FactoryMap;
static FactoryMap& factories = *new FactoryMap;
- pair<FactoryMap::iterator, bool> result = factories.add(clsid, 0);
- COMPtr<IClassFactory>& factory = result.first->second;
- bool added = result.second;
- if (added && FAILED(DllGetClassObject(clsid, __uuidof(factory), reinterpret_cast<void**>(&factory))))
+ FactoryMap::AddResult result = factories.add(clsid, 0);
+ COMPtr<IClassFactory>& factory = result.iterator->second;
+ if (result.isNewEntry && FAILED(DllGetClassObject(clsid, __uuidof(factory), reinterpret_cast<void**>(&factory))))
factory = 0;
return factory;
diff --git a/Source/WebKit/win/WebNodeHighlight.cpp b/Source/WebKit/win/WebNodeHighlight.cpp
index c35d0b6ab..182ae72e5 100644
--- a/Source/WebKit/win/WebNodeHighlight.cpp
+++ b/Source/WebKit/win/WebNodeHighlight.cpp
@@ -47,12 +47,17 @@ static ATOM registerOverlayClass();
static LPCTSTR kWebNodeHighlightPointerProp = TEXT("WebNodeHighlightPointer");
WebNodeHighlight::WebNodeHighlight(WebView* webView)
- : m_inspectedWebView(webView)
- , m_overlay(0)
+ :
+#if ENABLE(INSPECTOR)
+ m_inspectedWebView(webView),
+#endif // ENABLE(INSPECTOR)
+ m_overlay(0)
, m_observedWindow(0)
, m_showsWhileWebViewIsVisible(false)
{
+#if ENABLE(INSPECTOR)
m_inspectedWebView->viewWindow(reinterpret_cast<OLE_HANDLE*>(&m_inspectedWebViewWindow));
+#endif // ENABLE(INSPECTOR)
}
WebNodeHighlight::~WebNodeHighlight()
@@ -158,8 +163,9 @@ void WebNodeHighlight::update()
::SelectObject(hdc, hbmp.get());
GraphicsContext context(hdc);
-
+#if ENABLE(INSPECTOR)
m_inspectedWebView->page()->inspectorController()->drawHighlight(context);
+#endif // ENABLE(INSPECTOR)
BLENDFUNCTION bf;
bf.BlendOp = AC_SRC_OVER;
diff --git a/Source/WebKit/win/WebNodeHighlight.h b/Source/WebKit/win/WebNodeHighlight.h
index 1d154f91d..da2faa663 100644
--- a/Source/WebKit/win/WebNodeHighlight.h
+++ b/Source/WebKit/win/WebNodeHighlight.h
@@ -59,7 +59,9 @@ private:
void onWebViewWindowPosChanged(WINDOWPOS*);
void onRootWindowPosChanged(WINDOWPOS*);
+#if ENABLE(INSPECTOR)
WebView* m_inspectedWebView;
+#endif // ENABLE(INSPECTOR)
HWND m_inspectedWebViewWindow;
HWND m_overlay;
HWND m_observedWindow;
diff --git a/Source/WebKit/win/WebPreferenceKeysPrivate.h b/Source/WebKit/win/WebPreferenceKeysPrivate.h
index 468944657..deed43636 100644
--- a/Source/WebKit/win/WebPreferenceKeysPrivate.h
+++ b/Source/WebKit/win/WebPreferenceKeysPrivate.h
@@ -162,3 +162,6 @@
#define WebKitMediaPlaybackAllowsInlinePreferenceKey "WebKitMediaPlaybackAllowsInline"
#define WebKitAVFoundationEnabledPreferenceKey "WebKitAVFoundationEnabled"
+
+#define WebKitRequestAnimationFrameEnabledPreferenceKey "WebKitRequestAnimationFrameEnabled"
+
diff --git a/Source/WebKit/win/WebPreferences.cpp b/Source/WebKit/win/WebPreferences.cpp
index 6f5ed8e7e..8cd8fbe4b 100644
--- a/Source/WebKit/win/WebPreferences.cpp
+++ b/Source/WebKit/win/WebPreferences.cpp
@@ -273,6 +273,8 @@ void WebPreferences::initializeDefaultSettings()
CFDictionaryAddValue(defaults, CFSTR(WebKitMediaPlaybackRequiresUserGesturePreferenceKey), kCFBooleanFalse);
CFDictionaryAddValue(defaults, CFSTR(WebKitMediaPlaybackAllowsInlinePreferenceKey), kCFBooleanTrue);
+ CFDictionaryAddValue(defaults, CFSTR(WebKitRequestAnimationFrameEnabledPreferenceKey), kCFBooleanTrue);
+
defaultSettings = defaults;
}
@@ -1736,3 +1738,16 @@ HRESULT WebPreferences::setShouldDisplayTextDescriptions(BOOL enabled)
return E_NOTIMPL;
#endif
}
+
+HRESULT WebPreferences::setRequestAnimationFrameEnabled(BOOL enabled)
+{
+ setBoolValue(CFSTR(WebKitRequestAnimationFrameEnabledPreferenceKey), enabled);
+ return S_OK;
+}
+
+HRESULT WebPreferences::requestAnimationFrameEnabled(BOOL* enabled)
+{
+ *enabled = boolValueForKey(CFSTR(WebKitRequestAnimationFrameEnabledPreferenceKey));
+ return S_OK;
+}
+
diff --git a/Source/WebKit/win/WebPreferences.h b/Source/WebKit/win/WebPreferences.h
index baf56ecd0..3afb7444c 100644
--- a/Source/WebKit/win/WebPreferences.h
+++ b/Source/WebKit/win/WebPreferences.h
@@ -471,6 +471,9 @@ public:
virtual HRESULT STDMETHODCALLTYPE shouldInvertColors(BOOL*);
virtual HRESULT STDMETHODCALLTYPE setShouldInvertColors(BOOL);
+ virtual HRESULT STDMETHODCALLTYPE requestAnimationFrameEnabled(BOOL*);
+ virtual HRESULT STDMETHODCALLTYPE setRequestAnimationFrameEnabled(BOOL);
+
// WebPreferences
// This method accesses a different preference key than developerExtrasEnabled.
diff --git a/Source/WebKit/win/WebView.cpp b/Source/WebKit/win/WebView.cpp
index 141d36c95..26e5835dd 100644
--- a/Source/WebKit/win/WebView.cpp
+++ b/Source/WebKit/win/WebView.cpp
@@ -92,6 +92,8 @@
#include <WebCore/FrameView.h>
#include <WebCore/FrameWin.h>
#include <WebCore/GDIObjectCounter.h>
+#include <WebCore/GeolocationController.h>
+#include <WebCore/GeolocationError.h>
#include <WebCore/GraphicsContext.h>
#include <WebCore/HTMLMediaElement.h>
#include <WebCore/HTMLNames.h>
@@ -134,16 +136,10 @@
#include <WebCore/Settings.h>
#include <WebCore/SimpleFontData.h>
#include <WebCore/SystemInfo.h>
-#include <WebCore/TypingCommand.h>
#include <WebCore/WindowMessageBroadcaster.h>
#include <WebCore/WindowsTouch.h>
#include <wtf/MainThread.h>
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
-#include <WebCore/GeolocationController.h>
-#include <WebCore/GeolocationError.h>
-#endif
-
#if USE(CG)
#include <CoreGraphics/CGContext.h>
#endif
@@ -340,7 +336,9 @@ WebView::WebView()
, m_viewWindow(0)
, m_mainFrame(0)
, m_page(0)
+#if ENABLE(INSPECTOR)
, m_inspectorClient(0)
+#endif // ENABLE(INSPECTOR)
, m_hasCustomDropTarget(false)
, m_useBackForwardList(true)
, m_userAgentOverridden(false)
@@ -713,9 +711,11 @@ HRESULT STDMETHODCALLTYPE WebView::close()
setUIDelegate(0);
setFormDelegate(0);
+#if ENABLE(INSPECTOR)
m_inspectorClient = 0;
if (m_webInspector)
m_webInspector->webViewClosed();
+#endif // ENABLE(INSPECTOR)
delete m_page;
m_page = 0;
@@ -2661,18 +2661,21 @@ HRESULT STDMETHODCALLTYPE WebView::initWithFrame(
if (SUCCEEDED(m_preferences->shouldUseHighResolutionTimers(&useHighResolutionTimer)))
Settings::setShouldUseHighResolutionTimers(useHighResolutionTimer);
+#if ENABLE(INSPECTOR)
m_inspectorClient = new WebInspectorClient(this);
+#endif // ENABLE(INSPECTOR)
Page::PageClients pageClients;
pageClients.chromeClient = new WebChromeClient(this);
pageClients.contextMenuClient = new WebContextMenuClient(this);
pageClients.editorClient = new WebEditorClient(this);
pageClients.dragClient = new WebDragClient(this);
+#if ENABLE(INSPECTOR)
pageClients.inspectorClient = m_inspectorClient;
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- pageClients.geolocationClient = new WebGeolocationClient(this);
-#endif
+#endif // ENABLE(INSPECTOR)
+
m_page = new Page(pageClients);
+ provideGeolocationTo(m_page, new WebGeolocationClient(this));
BSTR localStoragePath;
if (SUCCEEDED(m_preferences->localStorageDatabasePath(&localStoragePath))) {
@@ -4944,6 +4947,11 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
return hr;
setShouldInvertColors(enabled);
+ hr = prefsPrivate->requestAnimationFrameEnabled(&enabled);
+ if (FAILED(hr))
+ return hr;
+ settings->setRequestAnimationFrameEnabled(enabled);
+
return S_OK;
}
@@ -5776,12 +5784,17 @@ bool WebView::onIMESetContext(WPARAM wparam, LPARAM)
HRESULT STDMETHODCALLTYPE WebView::inspector(IWebInspector** inspector)
{
+#if ENABLE(INSPECTOR)
if (!m_webInspector)
m_webInspector.adoptRef(WebInspector::createInstance(this, m_inspectorClient));
return m_webInspector.copyRefTo(inspector);
+#else // !ENABLE(INSPECTOR)
+ return S_OK;
+#endif // ENABLE(INSPECTOR)
}
+
HRESULT STDMETHODCALLTYPE WebView::windowAncestryDidChange()
{
HWND newParent;
@@ -6569,19 +6582,14 @@ HRESULT WebView::geolocationProvider(IWebGeolocationProvider** locationProvider)
HRESULT WebView::geolocationDidChangePosition(IWebGeolocationPosition* position)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
if (!m_page)
return E_FAIL;
- m_page->geolocationController()->positionChanged(core(position));
+ GeolocationController::from(m_page)->positionChanged(core(position));
return S_OK;
-#else
- return E_NOTIMPL;
-#endif
}
HRESULT WebView::geolocationDidFailWithError(IWebError* error)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
if (!m_page)
return E_FAIL;
if (!error)
@@ -6594,11 +6602,8 @@ HRESULT WebView::geolocationDidFailWithError(IWebError* error)
SysFreeString(descriptionBSTR);
RefPtr<GeolocationError> geolocationError = GeolocationError::create(GeolocationError::PositionUnavailable, descriptionString);
- m_page->geolocationController()->errorOccurred(geolocationError.get());
+ GeolocationController::from(m_page)->errorOccurred(geolocationError.get());
return S_OK;
-#else
- return E_NOTIMPL;
-#endif
}
HRESULT WebView::setDomainRelaxationForbiddenForURLScheme(BOOL forbidden, BSTR scheme)
diff --git a/Source/WebKit/win/WebView.h b/Source/WebKit/win/WebView.h
index 30843d366..3a0f95aff 100644
--- a/Source/WebKit/win/WebView.h
+++ b/Source/WebKit/win/WebView.h
@@ -704,7 +704,7 @@ public:
virtual HRESULT STDMETHODCALLTYPE loadBackForwardListFromOtherView(
/* [in] */ IWebView *otherView);
-
+
virtual HRESULT STDMETHODCALLTYPE inspector(
/* [retval][out] */ IWebInspector**);
@@ -1047,7 +1047,9 @@ protected:
HWND m_viewWindow;
WebFrame* m_mainFrame;
WebCore::Page* m_page;
+#if ENABLE(INSPECTOR)
WebInspectorClient* m_inspectorClient;
+#endif // ENABLE(INSPECTOR)
RefPtr<RefCountedHBITMAP> m_backingStoreBitmap;
SIZE m_backingStoreSize;
@@ -1064,7 +1066,9 @@ protected:
COMPtr<IWebDownloadDelegate> m_downloadDelegate;
COMPtr<IWebHistoryDelegate> m_historyDelegate;
COMPtr<WebPreferences> m_preferences;
+#if ENABLE(INSPECTOR)
COMPtr<WebInspector> m_webInspector;
+#endif // ENABLE(INSPECTOR)
COMPtr<IWebGeolocationProvider> m_geolocationProvider;
bool m_userAgentOverridden;