summaryrefslogtreecommitdiff
path: root/Source/WebKit/win
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/win')
-rw-r--r--Source/WebKit/win/ChangeLog100
-rw-r--r--Source/WebKit/win/DOMHTMLClasses.cpp6
-rw-r--r--Source/WebKit/win/Interfaces/IWebPreferences.idl3
-rw-r--r--Source/WebKit/win/WebCoreStatistics.cpp10
-rw-r--r--Source/WebKit/win/WebFrame.cpp3
-rw-r--r--Source/WebKit/win/WebJavaScriptCollector.cpp2
-rw-r--r--Source/WebKit/win/WebPreferenceKeysPrivate.h1
-rw-r--r--Source/WebKit/win/WebPreferences.cpp19
-rw-r--r--Source/WebKit/win/WebPreferences.h6
-rw-r--r--Source/WebKit/win/WebView.cpp23
10 files changed, 149 insertions, 24 deletions
diff --git a/Source/WebKit/win/ChangeLog b/Source/WebKit/win/ChangeLog
index 39d4d0796..ce2d8d010 100644
--- a/Source/WebKit/win/ChangeLog
+++ b/Source/WebKit/win/ChangeLog
@@ -1,3 +1,103 @@
+2012-07-10 Adam Barth <abarth@webkit.org>
+
+ WebCore::Settings for Hixie76 WebSocket protocol doesn't do anything and should be removed
+ https://bugs.webkit.org/show_bug.cgi?id=90910
+
+ Reviewed by Eric Seidel.
+
+ * WebPreferences.cpp:
+ (WebPreferences::initializeDefaultSettings):
+ (WebPreferences::setHixie76WebSocketProtocolEnabled):
+ (WebPreferences::hixie76WebSocketProtocolEnabled):
+ * WebView.cpp:
+ (WebView::notifyPreferencesChanged):
+
+2012-07-02 Ryosuke Niwa <rniwa@webkit.org>
+
+ Make HTMLCollection RefCounted
+ https://bugs.webkit.org/show_bug.cgi?id=90414
+
+ Reviewed by Sam Weinig.
+
+ * DOMHTMLClasses.cpp:
+ (DOMHTMLDocument::forms):
+ (DOMHTMLSelectElement::options):
+
+2012-07-03 Mihai Balan <mibalan@adobe.com>
+
+ [CSS Regions] Enabling regions on Windows lead to crash-on-launch for WebKit.exe
+ https://bugs.webkit.org/show_bug.cgi?id=90435
+
+ Reviewed by Csaba Osztrogonác.
+
+ Initial patch for enabling regions led to WebKit crashing on launch. Moving the
+ IDL declarations for CSS regions getter/setter at the end of the file solves the
+ problem. As per http://trac.webkit.org/changeset/95650 seems it has to do with
+ binary compatibility.
+
+ * Interfaces/IWebPreferences.idl: Mover getter/setter for CSS regions at the end of file
+
+2012-07-02 Benjamin Poulain <bpoulain@apple.com>
+
+ Do not do any logging initialization when logging is disabled
+ https://bugs.webkit.org/show_bug.cgi?id=90228
+
+ Reviewed by Simon Fraser.
+
+ * WebView.cpp:
+ (WebView::initWithFrame):
+
+2012-06-29 Mihai Balan <mibalan@adobe.com>
+
+ [CSS Regions] Adding feature defines for CSS Regions for Windows
+ https://bugs.webkit.org/show_bug.cgi?id=88645
+
+ Reviewed by Tony Chang.
+
+ Re-trying to enable CSS regions on Windows. This time only enabling
+ regions since exclusions lead to some very strange compiling/linking
+ problems. This time adding preferences code to make sure the settings
+ get propagated to DRT (previous experiments by abucur showed they
+ didn't.).
+
+ * WebPreferenceKeysPrivate.h: Added preference key for CSS regions
+ * Interfaces/IWebPreferences.idl: Added getters and setters for CSS regions settings
+ * WebPreferences.cpp: ditto
+ (WebPreferences::initializeDefaultSettings):
+ (WebPreferences::isCSSRegionsEnabled):
+ (WebPreferences::setCSSRegionsEnabled):
+ * WebPreferences.h: ditto
+ (WebPreferences):
+ * WebView.cpp: Added settings code to handle CSS regions, too
+ (WebView::notifyPreferencesChanged):
+
+2012-06-25 Mark Hahnenberg <mhahnenberg@apple.com>
+
+ JSLock should be per-JSGlobalData
+ https://bugs.webkit.org/show_bug.cgi?id=89123
+
+ Reviewed by Geoffrey Garen.
+
+ Changed all sites that used JSLock to instead use the new JSLockHolder
+ and pass in the correct JS context that the code is about to interact with that
+ needs protection. Also added a couple JSLocks to places that didn't already
+ have it that needed it.
+
+ * WebCoreStatistics.cpp:
+ (WebCoreStatistics::javaScriptObjectsCount):
+ (WebCoreStatistics::javaScriptGlobalObjectsCount):
+ (WebCoreStatistics::javaScriptProtectedObjectsCount):
+ (WebCoreStatistics::javaScriptProtectedGlobalObjectsCount):
+ (WebCoreStatistics::javaScriptProtectedObjectTypeCounts):
+ * WebFrame.cpp:
+ (WebFrame::stringByEvaluatingJavaScriptInScriptWorld):
+ * WebJavaScriptCollector.cpp:
+ (WebJavaScriptCollector::objectCount):
+ * WebView.cpp:
+ (WebView::stringByEvaluatingJavaScriptFromString):
+ (WebView::reportException):
+ (WebView::elementFromJS):
+
2012-06-23 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r121058.
diff --git a/Source/WebKit/win/DOMHTMLClasses.cpp b/Source/WebKit/win/DOMHTMLClasses.cpp
index 5f156b7a5..d58fc6910 100644
--- a/Source/WebKit/win/DOMHTMLClasses.cpp
+++ b/Source/WebKit/win/DOMHTMLClasses.cpp
@@ -305,7 +305,8 @@ HRESULT STDMETHODCALLTYPE DOMHTMLDocument::forms(
return E_FAIL;
HTMLDocument* htmlDoc = static_cast<HTMLDocument*>(m_document);
- *collection = DOMHTMLCollection::createInstance(htmlDoc->forms());
+ RefPtr<HTMLCollection> forms = htmlDoc->forms();
+ *collection = DOMHTMLCollection::createInstance(forms.get());
return S_OK;
}
@@ -709,7 +710,8 @@ HRESULT STDMETHODCALLTYPE DOMHTMLSelectElement::options(
if (!selectElement->options())
return E_FAIL;
- *result = DOMHTMLOptionsCollection::createInstance(selectElement->options());
+ RefPtr<HTMLOptionsCollection> options = selectElement->options();
+ *result = DOMHTMLOptionsCollection::createInstance(options.get());
return S_OK;
}
diff --git a/Source/WebKit/win/Interfaces/IWebPreferences.idl b/Source/WebKit/win/Interfaces/IWebPreferences.idl
index a1511bb7e..a15eeae62 100644
--- a/Source/WebKit/win/Interfaces/IWebPreferences.idl
+++ b/Source/WebKit/win/Interfaces/IWebPreferences.idl
@@ -207,4 +207,7 @@ interface IWebPreferences : IUnknown
HRESULT setShouldDisplayTextDescriptions(BOOL shouldDisplayTextDescriptions);
HRESULT shouldDisplayTextDescriptions(BOOL *shouldDisplayTextDescriptions);
+
+ HRESULT isCSSRegionsEnabled([out, retval] BOOL* enabled);
+ HRESULT setCSSRegionsEnabled([in] BOOL enabled);
}
diff --git a/Source/WebKit/win/WebCoreStatistics.cpp b/Source/WebKit/win/WebCoreStatistics.cpp
index 0e3057682..c1ca9f214 100644
--- a/Source/WebKit/win/WebCoreStatistics.cpp
+++ b/Source/WebKit/win/WebCoreStatistics.cpp
@@ -98,7 +98,7 @@ HRESULT STDMETHODCALLTYPE WebCoreStatistics::javaScriptObjectsCount(
if (!count)
return E_POINTER;
- JSLock lock(SilenceAssertionsOnly);
+ JSLockHolder lock(JSDOMWindow::commonJSGlobalData());
*count = (UINT)JSDOMWindow::commonJSGlobalData()->heap.objectCount();
return S_OK;
}
@@ -109,7 +109,7 @@ HRESULT STDMETHODCALLTYPE WebCoreStatistics::javaScriptGlobalObjectsCount(
if (!count)
return E_POINTER;
- JSLock lock(SilenceAssertionsOnly);
+ JSLockHolder lock(JSDOMWindow::commonJSGlobalData());
*count = (UINT)JSDOMWindow::commonJSGlobalData()->heap.globalObjectCount();
return S_OK;
}
@@ -120,7 +120,7 @@ HRESULT STDMETHODCALLTYPE WebCoreStatistics::javaScriptProtectedObjectsCount(
if (!count)
return E_POINTER;
- JSLock lock(SilenceAssertionsOnly);
+ JSLockHolder lock(JSDOMWindow::commonJSGlobalData());
*count = (UINT)JSDOMWindow::commonJSGlobalData()->heap.protectedObjectCount();
return S_OK;
}
@@ -131,7 +131,7 @@ HRESULT STDMETHODCALLTYPE WebCoreStatistics::javaScriptProtectedGlobalObjectsCou
if (!count)
return E_POINTER;
- JSLock lock(SilenceAssertionsOnly);
+ JSLockHolder lock(JSDOMWindow::commonJSGlobalData());
*count = (UINT)JSDOMWindow::commonJSGlobalData()->heap.protectedGlobalObjectCount();
return S_OK;
}
@@ -139,7 +139,7 @@ HRESULT STDMETHODCALLTYPE WebCoreStatistics::javaScriptProtectedGlobalObjectsCou
HRESULT STDMETHODCALLTYPE WebCoreStatistics::javaScriptProtectedObjectTypeCounts(
/* [retval][out] */ IPropertyBag2** typeNamesAndCounts)
{
- JSLock lock(SilenceAssertionsOnly);
+ JSLockHolder lock(JSDOMWindow::commonJSGlobalData());
OwnPtr<TypeCountSet> jsObjectTypeNames(JSDOMWindow::commonJSGlobalData()->heap.protectedObjectTypeCounts());
typedef TypeCountSet::const_iterator Iterator;
Iterator end = jsObjectTypeNames->end();
diff --git a/Source/WebKit/win/WebFrame.cpp b/Source/WebKit/win/WebFrame.cpp
index 27d24f2fb..9ce1c7811 100644
--- a/Source/WebKit/win/WebFrame.cpp
+++ b/Source/WebKit/win/WebFrame.cpp
@@ -126,7 +126,6 @@ using namespace std;
using JSC::JSGlobalObject;
using JSC::JSLock;
using JSC::JSValue;
-using JSC::SilenceAssertionsOnly;
#define FLASH_REDRAW 0
@@ -2528,8 +2527,8 @@ HRESULT WebFrame::stringByEvaluatingJavaScriptInScriptWorld(IWebScriptWorld* iWo
if (!result || !result.isBoolean() && !result.isString() && !result.isNumber())
return S_OK;
- JSLock lock(SilenceAssertionsOnly);
JSC::ExecState* exec = anyWorldGlobalObject->globalExec();
+ JSC::JSLockHolder lock(exec);
String resultString = ustringToString(result.toString(exec)->value(exec));
*evaluationResult = BString(resultString).release();
diff --git a/Source/WebKit/win/WebJavaScriptCollector.cpp b/Source/WebKit/win/WebJavaScriptCollector.cpp
index cb56b27e2..7b2f67fa6 100644
--- a/Source/WebKit/win/WebJavaScriptCollector.cpp
+++ b/Source/WebKit/win/WebJavaScriptCollector.cpp
@@ -111,7 +111,7 @@ HRESULT STDMETHODCALLTYPE WebJavaScriptCollector::objectCount(
return E_POINTER;
}
- JSLock lock(SilenceAssertionsOnly);
+ JSLockHolder lock(JSDOMWindow::commonJSGlobalData());
*count = (UINT)JSDOMWindow::commonJSGlobalData()->heap.objectCount();
return S_OK;
}
diff --git a/Source/WebKit/win/WebPreferenceKeysPrivate.h b/Source/WebKit/win/WebPreferenceKeysPrivate.h
index 95e9f9f5f..56efccc87 100644
--- a/Source/WebKit/win/WebPreferenceKeysPrivate.h
+++ b/Source/WebKit/win/WebPreferenceKeysPrivate.h
@@ -53,6 +53,7 @@
#define WebKitAllowFileAccessFromFileURLsPreferenceKey "WebKitAllowFileAccessFromFileURLs"
#define WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey "WebKitJavaScriptCanOpenWindowsAutomatically"
#define WebKitPluginsEnabledPreferenceKey "WebKitPluginsEnabled"
+#define WebKitCSSRegionsEnabledPreferenceKey "WebKitCSSRegionsEnabled"
#define WebKitDatabasesEnabledPreferenceKey "WebKitDatabasesEnabled"
#define WebKitLocalStorageEnabledPreferenceKey "WebKitLocalStorageEnabled"
#define WebKitExperimentalNotificationsEnabledPreferenceKey "WebKitExperimentalNotificationsEnabled"
diff --git a/Source/WebKit/win/WebPreferences.cpp b/Source/WebKit/win/WebPreferences.cpp
index 3946b5e72..e1784a761 100644
--- a/Source/WebKit/win/WebPreferences.cpp
+++ b/Source/WebKit/win/WebPreferences.cpp
@@ -212,6 +212,7 @@ void WebPreferences::initializeDefaultSettings()
CFDictionaryAddValue(defaults, CFSTR(WebKitFrameFlatteningEnabledPreferenceKey), kCFBooleanFalse);
CFDictionaryAddValue(defaults, CFSTR(WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey), kCFBooleanTrue);
CFDictionaryAddValue(defaults, CFSTR(WebKitPluginsEnabledPreferenceKey), kCFBooleanTrue);
+ CFDictionaryAddValue(defaults, CFSTR(WebKitCSSRegionsEnabledPreferenceKey), kCFBooleanTrue);
CFDictionaryAddValue(defaults, CFSTR(WebKitDatabasesEnabledPreferenceKey), kCFBooleanTrue);
CFDictionaryAddValue(defaults, CFSTR(WebKitLocalStorageEnabledPreferenceKey), kCFBooleanTrue);
CFDictionaryAddValue(defaults, CFSTR(WebKitExperimentalNotificationsEnabledPreferenceKey), kCFBooleanFalse);
@@ -268,7 +269,6 @@ void WebPreferences::initializeDefaultSettings()
CFDictionaryAddValue(defaults, CFSTR(WebKitMemoryInfoEnabledPreferenceKey), kCFBooleanFalse);
CFDictionaryAddValue(defaults, CFSTR(WebKitHyperlinkAuditingEnabledPreferenceKey), kCFBooleanTrue);
- CFDictionaryAddValue(defaults, CFSTR(WebKitHixie76WebSocketProtocolEnabledPreferenceKey), kCFBooleanFalse);
CFDictionaryAddValue(defaults, CFSTR(WebKitMediaPlaybackRequiresUserGesturePreferenceKey), kCFBooleanFalse);
CFDictionaryAddValue(defaults, CFSTR(WebKitMediaPlaybackAllowsInlinePreferenceKey), kCFBooleanTrue);
@@ -908,6 +908,20 @@ HRESULT STDMETHODCALLTYPE WebPreferences::setPlugInsEnabled(
return S_OK;
}
+HRESULT STDMETHODCALLTYPE WebPreferences::isCSSRegionsEnabled(
+ /* [retval][out] */ BOOL* enabled)
+{
+ *enabled = boolValueForKey(CFSTR(WebKitCSSRegionsEnabledPreferenceKey));
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE WebPreferences::setCSSRegionsEnabled(
+ /* [in] */ BOOL enabled)
+{
+ setBoolValue(CFSTR(WebKitCSSRegionsEnabledPreferenceKey), enabled);
+ return S_OK;
+}
+
HRESULT STDMETHODCALLTYPE WebPreferences::allowsAnimatedImages(
/* [retval][out] */ BOOL* enabled)
{
@@ -967,14 +981,13 @@ HRESULT STDMETHODCALLTYPE WebPreferences::loadsSiteIconsIgnoringImageLoadingPref
HRESULT STDMETHODCALLTYPE WebPreferences::setHixie76WebSocketProtocolEnabled(
/* [in] */ BOOL enabled)
{
- setBoolValue(CFSTR(WebKitHixie76WebSocketProtocolEnabledPreferenceKey), enabled);
return S_OK;
}
HRESULT STDMETHODCALLTYPE WebPreferences::hixie76WebSocketProtocolEnabled(
/* [retval][out] */ BOOL* enabled)
{
- *enabled = boolValueForKey(CFSTR(WebKitHixie76WebSocketProtocolEnabledPreferenceKey));
+ *enabled = false;
return S_OK;
}
diff --git a/Source/WebKit/win/WebPreferences.h b/Source/WebKit/win/WebPreferences.h
index bfc4d3159..884ef1184 100644
--- a/Source/WebKit/win/WebPreferences.h
+++ b/Source/WebKit/win/WebPreferences.h
@@ -162,6 +162,12 @@ public:
virtual HRESULT STDMETHODCALLTYPE setPlugInsEnabled(
/* [in] */ BOOL enabled);
+
+ virtual HRESULT STDMETHODCALLTYPE isCSSRegionsEnabled(
+ /* [retval][out] */ BOOL* enabled);
+
+ virtual HRESULT STDMETHODCALLTYPE setCSSRegionsEnabled(
+ /* [in] */ BOOL);
virtual HRESULT STDMETHODCALLTYPE allowsAnimatedImages(
/* [retval][out] */ BOOL* enabled);
diff --git a/Source/WebKit/win/WebView.cpp b/Source/WebKit/win/WebView.cpp
index 880bc1bd0..c709ba9f1 100644
--- a/Source/WebKit/win/WebView.cpp
+++ b/Source/WebKit/win/WebView.cpp
@@ -2641,7 +2641,9 @@ HRESULT STDMETHODCALLTYPE WebView::initWithFrame(
static bool didOneTimeInitialization;
if (!didOneTimeInitialization) {
+#if !LOG_DISABLED
initializeLoggingChannelsIfNecessary();
+#endif // !LOG_DISABLED
#if ENABLE(SQL_DATABASE)
WebKitInitializeWebDatabasesIfNecessary();
#endif
@@ -3194,8 +3196,8 @@ HRESULT STDMETHODCALLTYPE WebView::stringByEvaluatingJavaScriptFromString(
if (!scriptExecutionResult)
return E_FAIL;
else if (scriptExecutionResult.isString()) {
- JSLock lock(JSC::SilenceAssertionsOnly);
JSC::ExecState* exec = coreFrame->script()->globalObject(mainThreadNormalWorld())->globalExec();
+ JSC::JSLockHolder lock(exec);
*result = BString(ustringToString(scriptExecutionResult.getString(exec)));
}
@@ -4668,6 +4670,11 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
return hr;
settings->setPluginsEnabled(!!enabled);
+ hr = preferences->isCSSRegionsEnabled(&enabled);
+ if (FAILED(hr))
+ return hr;
+ settings->setCSSRegionsEnabled(!!enabled);
+
hr = preferences->privateBrowsingEnabled(&enabled);
if (FAILED(hr))
return hr;
@@ -4900,13 +4907,6 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
return hr;
settings->setLoadsSiteIconsIgnoringImageLoadingSetting(!!enabled);
-#if ENABLE(WEB_SOCKETS)
- hr = prefsPrivate->hixie76WebSocketProtocolEnabled(&enabled);
- if (FAILED(hr))
- return hr;
- settings->setUseHixie76WebSocketProtocol(enabled);
-#endif
-
hr = prefsPrivate->showsToolTipOverTruncatedText(&enabled);
if (FAILED(hr))
return hr;
@@ -5851,8 +5851,8 @@ HRESULT STDMETHODCALLTYPE WebView::reportException(
if (!context || !exception)
return E_FAIL;
- JSLock lock(JSC::SilenceAssertionsOnly);
JSC::ExecState* execState = toJS(context);
+ JSC::JSLockHolder lock(execState);
// Make sure the context has a DOMWindow global object, otherwise this context didn't originate from a WebView.
if (!toJSDOMWindow(execState->lexicalGlobalObject()))
@@ -5878,8 +5878,9 @@ HRESULT STDMETHODCALLTYPE WebView::elementFromJS(
if (!nodeObject)
return E_FAIL;
- JSLock lock(JSC::SilenceAssertionsOnly);
- Element* elt = toElement(toJS(toJS(context), nodeObject));
+ JSC::ExecState* exec = toJS(context);
+ JSC::JSLockHolder lock(exec);
+ Element* elt = toElement(toJS(exec, nodeObject));
if (!elt)
return E_FAIL;