[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756
eric at webkit.org
eric at webkit.org
Fri Feb 26 22:16:43 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit ee55b838f6e4448f80736a591d2c0ffb7364a8d6
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Feb 10 10:36:40 2010 +0000
2010-02-10 Yaar Schnitman <yaar at chromium.org>
Reviewed by Adam Barth.
Simplified RuntimeEnabledFeatures and corresponding v8 generated code
https://bugs.webkit.org/show_bug.cgi?id=34667
* WebCore.gypi:
* bindings/generic/RuntimeEnabledFeatures.cpp: Added.
(WebCore::RuntimeEnabledFeatures::audioEnabled):
(WebCore::RuntimeEnabledFeatures::htmlMediaElementEnabled):
(WebCore::RuntimeEnabledFeatures::htmlAudioElementEnabled):
(WebCore::RuntimeEnabledFeatures::htmlVideoElementEnabled):
(WebCore::RuntimeEnabledFeatures::mediaErrorEnabled):
(WebCore::RuntimeEnabledFeatures::sharedWorkerEnabled):
(WebCore::RuntimeEnabledFeatures::webSocketEnabled):
(WebCore::RuntimeEnabledFeatures::openDatabaseEnabled):
* bindings/generic/RuntimeEnabledFeatures.h: Added.
(WebCore::RuntimeEnabledFeatures::setLocalStorageEnabled):
(WebCore::RuntimeEnabledFeatures::localStorageEnabled):
(WebCore::RuntimeEnabledFeatures::setSessionStorageEnabled):
(WebCore::RuntimeEnabledFeatures::sessionStorageEnabled):
(WebCore::RuntimeEnabledFeatures::setWebkitNotificationsEnabled):
(WebCore::RuntimeEnabledFeatures::webkitNotificationsEnabled):
(WebCore::RuntimeEnabledFeatures::setApplicationCacheEnabled):
(WebCore::RuntimeEnabledFeatures::applicationCacheEnabled):
(WebCore::RuntimeEnabledFeatures::setGeolocationEnabled):
(WebCore::RuntimeEnabledFeatures::geolocationEnabled):
(WebCore::RuntimeEnabledFeatures::setIndexedDBEnabled):
(WebCore::RuntimeEnabledFeatures::indexedDBEnabled):
(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
* bindings/scripts/CodeGenerator.pm:
* bindings/scripts/CodeGeneratorV8.pm:
* bindings/v8/RuntimeEnabledFeatures.cpp: Removed.
* bindings/v8/RuntimeEnabledFeatures.h: Removed.
* bindings/v8/custom/V8DOMWindowCustom.cpp:
* bindings/v8/custom/V8NavigatorCustom.cpp:
* bindings/v8/custom/V8WorkerContextCustom.cpp:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b55baf6..64974b5 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,42 @@
+2010-02-10 Yaar Schnitman <yaar at chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Simplified RuntimeEnabledFeatures and corresponding v8 generated code
+ https://bugs.webkit.org/show_bug.cgi?id=34667
+
+ * WebCore.gypi:
+ * bindings/generic/RuntimeEnabledFeatures.cpp: Added.
+ (WebCore::RuntimeEnabledFeatures::audioEnabled):
+ (WebCore::RuntimeEnabledFeatures::htmlMediaElementEnabled):
+ (WebCore::RuntimeEnabledFeatures::htmlAudioElementEnabled):
+ (WebCore::RuntimeEnabledFeatures::htmlVideoElementEnabled):
+ (WebCore::RuntimeEnabledFeatures::mediaErrorEnabled):
+ (WebCore::RuntimeEnabledFeatures::sharedWorkerEnabled):
+ (WebCore::RuntimeEnabledFeatures::webSocketEnabled):
+ (WebCore::RuntimeEnabledFeatures::openDatabaseEnabled):
+ * bindings/generic/RuntimeEnabledFeatures.h: Added.
+ (WebCore::RuntimeEnabledFeatures::setLocalStorageEnabled):
+ (WebCore::RuntimeEnabledFeatures::localStorageEnabled):
+ (WebCore::RuntimeEnabledFeatures::setSessionStorageEnabled):
+ (WebCore::RuntimeEnabledFeatures::sessionStorageEnabled):
+ (WebCore::RuntimeEnabledFeatures::setWebkitNotificationsEnabled):
+ (WebCore::RuntimeEnabledFeatures::webkitNotificationsEnabled):
+ (WebCore::RuntimeEnabledFeatures::setApplicationCacheEnabled):
+ (WebCore::RuntimeEnabledFeatures::applicationCacheEnabled):
+ (WebCore::RuntimeEnabledFeatures::setGeolocationEnabled):
+ (WebCore::RuntimeEnabledFeatures::geolocationEnabled):
+ (WebCore::RuntimeEnabledFeatures::setIndexedDBEnabled):
+ (WebCore::RuntimeEnabledFeatures::indexedDBEnabled):
+ (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
+ * bindings/scripts/CodeGenerator.pm:
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/RuntimeEnabledFeatures.cpp: Removed.
+ * bindings/v8/RuntimeEnabledFeatures.h: Removed.
+ * bindings/v8/custom/V8DOMWindowCustom.cpp:
+ * bindings/v8/custom/V8NavigatorCustom.cpp:
+ * bindings/v8/custom/V8WorkerContextCustom.cpp:
+
2010-02-09 Alexander Pavlov <apavlov at chromium.org>
Reviewed by Pavel Feldman.
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 92ebf49..c80d77d 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -455,6 +455,8 @@
'bindings/generic/BindingSecurityBase.cpp',
'bindings/generic/BindingSecurityBase.h',
'bindings/generic/GenericBinding.h',
+ 'bindings/generic/RuntimeEnabledFeatures.cpp',
+ 'bindings/generic/RuntimeEnabledFeatures.h',
'bindings/js/CachedScriptSourceProvider.h',
'bindings/js/DOMObjectWithSVGContext.h',
'bindings/js/GCController.cpp',
@@ -786,8 +788,6 @@
'bindings/v8/NPV8Object.cpp',
'bindings/v8/NPV8Object.h',
'bindings/v8/OwnHandle.h',
- 'bindings/v8/RuntimeEnabledFeatures.cpp',
- 'bindings/v8/RuntimeEnabledFeatures.h',
'bindings/v8/ScheduledAction.cpp',
'bindings/v8/ScheduledAction.h',
'bindings/v8/ScopedDOMDataStore.cpp',
@@ -3823,7 +3823,7 @@
'inspector/front-end/Images/enableSolidButtonGlyph.png',
'inspector/front-end/Images/errorIcon.png',
'inspector/front-end/Images/errorMediumIcon.png',
- 'inspector/front-end/Images/errorRedDot.png',
+ 'inspector/front-end/Images/errorRedDot.png',
'inspector/front-end/Images/excludeButtonGlyph.png',
'inspector/front-end/Images/focusButtonGlyph.png',
'inspector/front-end/Images/forward.png',
diff --git a/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp b/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
new file mode 100644
index 0000000..3fdbb6d
--- /dev/null
+++ b/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "RuntimeEnabledFeatures.h"
+
+#include "Database.h"
+#include "MediaPlayer.h"
+#include "SharedWorkerRepository.h"
+#include "WebSocket.h"
+
+namespace WebCore {
+
+bool RuntimeEnabledFeatures::isLocalStorageEnabled = true;
+bool RuntimeEnabledFeatures::isSessionStorageEnabled = true;
+bool RuntimeEnabledFeatures::isWebkitNotificationsEnabled = false;
+bool RuntimeEnabledFeatures::isApplicationCacheEnabled = false;
+bool RuntimeEnabledFeatures::isGeolocationEnabled = false;
+bool RuntimeEnabledFeatures::isIndexedDBEnabled = false;
+
+#if ENABLE(VIDEO)
+
+bool RuntimeEnabledFeatures::audioEnabled()
+{
+ return MediaPlayer::isAvailable();
+}
+
+bool RuntimeEnabledFeatures::htmlMediaElementEnabled()
+{
+ return MediaPlayer::isAvailable();
+}
+
+bool RuntimeEnabledFeatures::htmlAudioElementEnabled()
+{
+ return MediaPlayer::isAvailable();
+}
+
+bool RuntimeEnabledFeatures::htmlVideoElementEnabled()
+{
+ return MediaPlayer::isAvailable();
+}
+
+bool RuntimeEnabledFeatures::mediaErrorEnabled()
+{
+ return MediaPlayer::isAvailable();
+}
+
+#endif
+
+#if ENABLE(SHARED_WORKERS)
+bool RuntimeEnabledFeatures::sharedWorkerEnabled()
+{
+ return SharedWorkerRepository::isAvailable();
+}
+#endif
+
+#if ENABLE(WEB_SOCKETS)
+bool RuntimeEnabledFeatures::webSocketEnabled()
+{
+ return WebSocket::isAvailable();
+}
+#endif
+
+#if ENABLE(DATABASE)
+bool RuntimeEnabledFeatures::openDatabaseEnabled()
+{
+ return Database::isAvailable();
+}
+#endif
+
+} // namespace WebCore
diff --git a/WebCore/bindings/generic/RuntimeEnabledFeatures.h b/WebCore/bindings/generic/RuntimeEnabledFeatures.h
new file mode 100644
index 0000000..6f0f78f
--- /dev/null
+++ b/WebCore/bindings/generic/RuntimeEnabledFeatures.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef RuntimeEnabledFeatures_h
+#define RuntimeEnabledFeatures_h
+
+namespace WebCore {
+
+// A class that stores static enablers for all experimental features. Note that
+// the method names must line up with the JavaScript method they enable for code
+// generation to work properly.
+
+class RuntimeEnabledFeatures {
+public:
+ static void setLocalStorageEnabled(bool isEnabled) { isLocalStorageEnabled = isEnabled; }
+ static bool localStorageEnabled() { return isLocalStorageEnabled; }
+
+ static void setSessionStorageEnabled(bool isEnabled) { isSessionStorageEnabled = isEnabled; }
+ static bool sessionStorageEnabled() { return isSessionStorageEnabled; }
+
+ static void setWebkitNotificationsEnabled(bool isEnabled) { isWebkitNotificationsEnabled = isEnabled; }
+ static bool webkitNotificationsEnabled() { return isWebkitNotificationsEnabled; }
+
+ static void setApplicationCacheEnabled(bool isEnabled) { isApplicationCacheEnabled = isEnabled; }
+ static bool applicationCacheEnabled() { return isApplicationCacheEnabled; }
+
+ static void setGeolocationEnabled(bool isEnabled) { isGeolocationEnabled = isEnabled; }
+ static bool geolocationEnabled() { return isGeolocationEnabled; }
+
+ static void setIndexedDBEnabled(bool isEnabled) { isIndexedDBEnabled = isEnabled; }
+ static bool indexedDBEnabled() { return isIndexedDBEnabled; }
+
+#if ENABLE(VIDEO)
+ static bool audioEnabled();
+ static bool htmlMediaElementEnabled();
+ static bool htmlAudioElementEnabled();
+ static bool htmlVideoElementEnabled();
+ static bool mediaErrorEnabled();
+#endif
+
+#if ENABLE(SHARED_WORKERS)
+ static bool sharedWorkerEnabled();
+#endif
+
+#if ENABLE(WEB_SOCKETS)
+ static bool webSocketEnabled();
+#endif
+
+#if ENABLE(DATABASE)
+ static bool openDatabaseEnabled();
+#endif
+
+private:
+ // Never instantiate.
+ RuntimeEnabledFeatures() { }
+
+ static bool isLocalStorageEnabled;
+ static bool isSessionStorageEnabled;
+ static bool isWebkitNotificationsEnabled;
+ static bool isApplicationCacheEnabled;
+ static bool isGeolocationEnabled;
+ static bool isIndexedDBEnabled;
+};
+
+} // namespace WebCore
+
+#endif // RuntimeEnabledFeatures_h
diff --git a/WebCore/bindings/scripts/CodeGenerator.pm b/WebCore/bindings/scripts/CodeGenerator.pm
index dc3c7c0..506e8ea 100644
--- a/WebCore/bindings/scripts/CodeGenerator.pm
+++ b/WebCore/bindings/scripts/CodeGenerator.pm
@@ -1,26 +1,26 @@
#
# WebKit IDL parser
-#
+#
# Copyright (C) 2005 Nikolas Zimmermann <wildfox at kde.org>
# Copyright (C) 2006 Samuel Weinig <sam.weinig at gmail.com>
# Copyright (C) 2007 Apple Inc. All rights reserved.
# Copyright (C) 2009 Cameron McCormack <cam at mcc.id.au>
-#
+#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
-#
+#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
-#
+#
# You should have received a copy of the GNU Library General Public License
# aint with this library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
-#
+#
package CodeGenerator;
@@ -39,10 +39,10 @@ my $codeGenerator = 0;
my $verbose = 0;
-my %primitiveTypeHash = ("int" => 1, "short" => 1, "long" => 1, "long long" => 1,
+my %primitiveTypeHash = ("int" => 1, "short" => 1, "long" => 1, "long long" => 1,
"unsigned int" => 1, "unsigned short" => 1,
- "unsigned long" => 1, "unsigned long long" => 1,
- "float" => 1, "double" => 1,
+ "unsigned long" => 1, "unsigned long long" => 1,
+ "float" => 1, "double" => 1,
"boolean" => 1, "void" => 1,
"Date" => 1);
@@ -328,10 +328,10 @@ sub IsSVGAnimatedType
my $type = shift;
return 1 if $svgAnimatedTypeHash{$type};
- return 0;
+ return 0;
}
-# Uppercase the first letter while respecting WebKit style guidelines.
+# Uppercase the first letter while respecting WebKit style guidelines.
# E.g., xmlEncoding becomes XMLEncoding, but xmlllang becomes Xmllang.
sub WK_ucfirst
{
@@ -341,12 +341,13 @@ sub WK_ucfirst
return $ret;
}
-# Lowercase the first letter while respecting WebKit style guidelines.
+# Lowercase the first letter while respecting WebKit style guidelines.
# URL becomes url, but SetURL becomes setURL.
sub WK_lcfirst
{
my ($object, $param) = @_;
my $ret = lcfirst($param);
+ $ret =~ s/hTML/html/ if $ret =~ /^hTML/;
$ret =~ s/uRL/url/ if $ret =~ /^uRL/;
$ret =~ s/jS/js/ if $ret =~ /^jS/;
$ret =~ s/xML/xml/ if $ret =~ /^xML/;
diff --git a/WebCore/bindings/scripts/CodeGeneratorV8.pm b/WebCore/bindings/scripts/CodeGeneratorV8.pm
index c9868c3..938ee6d 100644
--- a/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -303,7 +303,7 @@ END
static v8::Handle<v8::Value> constructorCallback(const v8::Arguments& args);
END
}
-
+
foreach my $attribute (@{$dataNode->attributes}) {
my $name = $attribute->signature->name;
my $attrExt = $attribute->signature->extendedAttributes;
@@ -324,11 +324,10 @@ END
}
}
- GenerateHeaderRuntimeEnablerDeclarations(@enabledAtRuntime);
GenerateHeaderNamedAndIndexedPropertyAccessors($dataNode);
GenerateHeaderCustomCall($dataNode);
GenerateHeaderCustomInternalFieldIndices($dataNode);
-
+
if ($dataNode->extendedAttributes->{"CheckDomainSecurity"}) {
push(@headerContent, <<END);
static bool namedSecurityCheck(v8::Local<v8::Object> host, v8::Local<v8::Value> key, v8::AccessType, v8::Local<v8::Value> data);
@@ -357,7 +356,7 @@ sub GetInternalFields
{
my $dataNode = shift;
my $name = $dataNode->name;
-
+
# FIXME: I am hideous and hard-coded. Make me beautiful.
return ("cacheIndex", "implementationIndex") if ($name eq "Document") || ($name eq "SVGDocument");
return ("cacheIndex", "implementationIndex", "markerIndex", "shadowIndex") if $name eq "HTMLDocument";
@@ -413,25 +412,6 @@ END
END
}
-sub GenerateHeaderRuntimeEnablerDeclarations
-{
- my @enabledAtRuntime = @_;
-
- foreach my $runtime_attr (@enabledAtRuntime) {
- my $enabledAtRuntimeConditionalString = GenerateConditionalString($runtime_attr->signature);
- my $enabler = $codeGenerator->WK_ucfirst($runtime_attr->signature->name);
- if ($enabledAtRuntimeConditionalString) {
- push(@headerContent, "\n#if ${enabledAtRuntimeConditionalString}\n");
- }
- push(@headerContent, <<END);
- static bool ${enabler}Enabled();
-END
- if ($enabledAtRuntimeConditionalString) {
- push(@headerContent, "#endif\n");
- }
- }
-}
-
my %indexerSpecialCases = (
"Storage" => 1,
"HTMLAppletElement" => 1,
@@ -469,7 +449,7 @@ sub GenerateHeaderNamedAndIndexedPropertyAccessors
static v8::Handle<v8::Value> indexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info);
END
}
-
+
if ($isIndexerSpecialCase || $hasCustomIndexedSetter) {
push(@headerContent, <<END);
static v8::Handle<v8::Value> indexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
@@ -505,7 +485,7 @@ END
sub GenerateHeaderCustomCall
{
my $dataNode = shift;
-
+
if ($dataNode->extendedAttributes->{"CustomCall"}) {
push(@headerContent, " static v8::Handle<v8::Value> callAsFunctionCallback(const v8::Arguments&);\n");
}
@@ -994,7 +974,7 @@ sub GetFunctionTemplateCallbackName
{
$function = shift;
$dataNode = shift;
-
+
my $interfaceName = $dataNode->name;
my $name = $function->signature->name;
@@ -1062,7 +1042,7 @@ END
" return v8::Handle<v8::Value>();\n" .
" }\n");
}
-
+
my $raisesExceptions = @{$function->raisesExceptions};
if (!$raisesExceptions) {
foreach my $parameter (@{$function->parameters}) {
@@ -1147,7 +1127,7 @@ END
push(@implContentDecls, " V8Proxy::setDOMException(ec);\n");
push(@implContentDecls, " return v8::Handle<v8::Value>();\n");
}
-
+
push(@implContentDecls, " }\n\n");
}
@@ -1470,6 +1450,7 @@ sub GenerateImplementation
push(@implFixedHeader,
"#include \"config.h\"\n" .
+ "#include \"RuntimeEnabledFeatures.h\"\n" .
"#include \"V8Proxy.h\"\n" .
"#include \"V8Binding.h\"\n" .
"#include \"V8BindingState.h\"\n" .
@@ -1538,7 +1519,7 @@ sub GenerateImplementation
if ($hasConstructors) {
GenerateConstructorGetter($implClassName, $classIndex);
}
-
+
my $indexer;
my $namedPropertyGetter;
# Generate methods for functions.
@@ -1599,7 +1580,7 @@ sub GenerateImplementation
GenerateBatchedAttributeData($dataNode, $attributes);
push(@implContent, "};\n");
}
-
+
# Setup table of standard callback functions
$num_callbacks = 0;
$has_callbacks = 0;
@@ -1697,7 +1678,7 @@ END
$parentClassIndex = uc($codeGenerator->StripModule($parent));
last;
}
-
+
# Generate the template configuration method
push(@implContent, <<END);
static v8::Persistent<v8::FunctionTemplate> Configure${className}Template(v8::Persistent<v8::FunctionTemplate> desc) {
@@ -1714,7 +1695,7 @@ END
NULL, 0,
END
}
-
+
if ($has_callbacks) {
push(@implContent, <<END);
${interfaceName}_callbacks, sizeof(${interfaceName}_callbacks)/sizeof(*${interfaceName}_callbacks));
@@ -1732,20 +1713,21 @@ END
}
if ($access_check or @enabledAtRuntime or @{$dataNode->functions} or $has_constants) {
- push(@implContent, <<END);
+ push(@implContent, <<END);
v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
END
}
push(@implContent, " $access_check\n");
-
+
# Setup the enable-at-runtime attrs if we have them
foreach my $runtime_attr (@enabledAtRuntime) {
- $enable_function = $interfaceName . "::" . $codeGenerator->WK_ucfirst($runtime_attr->signature->name);
+ # A function named RuntimeEnabledFeatures::{methodName}Enabled() need to be written by hand.
+ $enable_function = "RuntimeEnabledFeatures::" . $codeGenerator->WK_lcfirst($runtime_attr->signature->name) . "Enabled";
my $conditionalString = GenerateConditionalString($runtime_attr->signature);
push(@implContent, "\n#if ${conditionalString}\n") if $conditionalString;
- push(@implContent, " if (V8${enable_function}Enabled()) {\n");
+ push(@implContent, " if (${enable_function}()) {\n");
push(@implContent, " static const BatchedAttribute attrData =\\\n");
GenerateSingleBatchedAttribute($interfaceName, $runtime_attr, ";", " ");
push(@implContent, <<END);
@@ -1785,8 +1767,8 @@ END
my $conditional = "";
if ($attrExt->{"EnabledAtRuntime"}) {
# Only call Set()/SetAccessor() if this method should be enabled
- $enable_function = $interfaceName . "::" . $codeGenerator->WK_ucfirst($function->signature->name);
- $conditional = "if (V8${enable_function}Enabled())\n";
+ $enable_function = "RuntimeEnabledFeatures::" . $codeGenerator->WK_lcfirst($function->signature->name) . "Enabled";
+ $conditional = "if (${enable_function}())\n";
}
if ($attrExt->{"DoNotCheckDomainSecurity"} &&
@@ -1833,24 +1815,24 @@ END
# Normal function call is a template
my $callback = GetFunctionTemplateCallbackName($function, $dataNode);
-
+
if ($property_attributes eq "v8::DontDelete") {
$property_attributes = "";
} else {
$property_attributes = ", static_cast<v8::PropertyAttribute>($property_attributes)";
}
-
+
if ($template eq "proto" && $conditional eq "" && $signature eq "default_signature" && $property_attributes eq "") {
# Standard type of callback, already created in the batch, so skip it here.
next;
}
-
+
push(@implContent, <<END);
${conditional}$template->Set(v8::String::New("$name"), v8::FunctionTemplate::New($callback, v8::Handle<v8::Value>(), ${signature})$property_attributes);
END
$num_callbacks++;
}
-
+
die "Wrong number of callbacks generated for $interfaceName ($num_callbacks, should be $total_functions)" if $num_callbacks != $total_functions;
if ($has_constants) {
@@ -1858,11 +1840,11 @@ END
batchConfigureConstants(desc, proto, ${interfaceName}_consts, sizeof(${interfaceName}_consts)/sizeof(*${interfaceName}_consts));
END
}
-
+
# Special cases
if ($interfaceName eq "DOMWindow") {
push(@implContent, <<END);
-
+
proto->SetInternalFieldCount(V8DOMWindow::internalFieldCount);
desc->SetHiddenPrototype(true);
instance->SetInternalFieldCount(V8DOMWindow::internalFieldCount);
@@ -1874,8 +1856,8 @@ END
}
if ($interfaceName eq "Location") {
push(@implContent, <<END);
-
- // For security reasons, these functions are on the instance instead
+
+ // For security reasons, these functions are on the instance instead
// of on the prototype object to insure that they cannot be overwritten.
instance->SetAccessor(v8::String::New("reload"), V8Location::reloadAccessorGetter, 0, v8::Handle<v8::Value>(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly));
instance->SetAccessor(v8::String::New("replace"), V8Location::replaceAccessorGetter, 0, v8::Handle<v8::Value>(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly));
@@ -1888,7 +1870,7 @@ END
$nativeType = "V8SVGPODTypeWrapper<${nativeType}>";
}
push(@implContent, <<END);
-
+
// Custom toString template
desc->Set(getToStringName(), getToStringTemplate());
return desc;
@@ -1905,7 +1887,7 @@ v8::Persistent<v8::FunctionTemplate> ${className}::GetTemplate() {
}
${nativeType}* ${className}::toNative(v8::Handle<v8::Object> object) {
- return reinterpret_cast<${nativeType}*>(object->GetPointerFromInternalField(v8DOMWrapperObjectIndex));
+ return reinterpret_cast<${nativeType}*>(object->GetPointerFromInternalField(v8DOMWrapperObjectIndex));
}
bool ${className}::HasInstance(v8::Handle<v8::Value> value) {
@@ -1926,7 +1908,7 @@ v8::Persistent<v8::ObjectTemplate> V8DOMWindow::GetShadowObjectTemplate() {
}
END
}
-
+
GenerateToV8Converters($dataNode, $interfaceName, $className, $nativeType);
push(@implContent, <<END);
@@ -1936,19 +1918,19 @@ END
push(@implContent, "\n#endif // ${conditionalString}\n") if $conditionalString;
}
-sub GenerateToV8Converters
+sub GenerateToV8Converters
{
my $dataNode = shift;
my $interfaceName = shift;
my $className = shift;
my $nativeType = shift;
-
+
my $wrapperType = "V8ClassIndex::" . uc($interfaceName);
my $domMapFunction = GetDomMapFunction($dataNode, $interfaceName);
my $forceNewObjectInput = IsDOMNodeType($interfaceName) ? ", bool forceNewObject" : "";
my $forceNewObjectCall = IsDOMNodeType($interfaceName) ? ", forceNewObject" : "";
-
- push(@implContent, <<END);
+
+ push(@implContent, <<END);
v8::Handle<v8::Object> ${className}::wrap(${nativeType}* impl${forceNewObjectInput}) {
v8::Handle<v8::Object> wrapper;
@@ -2003,7 +1985,7 @@ END
context->Exit();
END
}
-
+
push(@implContent, <<END);
if (wrapper.IsEmpty())
return wrapper;
@@ -2029,7 +2011,7 @@ v8::Handle<v8::Value> toV8(PassRefPtr<${nativeType} > impl${forceNewObjectInput}
}
END
}
-
+
if (!HasCustomToV8Implementation($dataNode, $interfaceName)) {
push(@implContent, <<END);
@@ -2046,7 +2028,7 @@ sub HasCustomToV8Implementation {
# FIXME: This subroutine is lame. Probably should be an .idl attribute (CustomToV8)?
$dataNode = shift;
$interfaceName = shift;
-
+
# We generate a custom converter (but JSC doesn't) for the following:
return 1 if $interfaceName eq "BarInfo";
return 1 if $interfaceName eq "CSSStyleSheet";
@@ -2064,7 +2046,6 @@ sub HasCustomToV8Implementation {
return 1 if $interfaceName eq "SVGElement";
return 1 if $interfaceName eq "Screen";
return 1 if $interfaceName eq "WorkerContext";
-
# We don't generate a custom converter (but JSC does) for the following:
return 0 if $interfaceName eq "AbstractWorker";
return 0 if $interfaceName eq "CanvasRenderingContext";
@@ -2293,7 +2274,7 @@ sub GetNativeTypeFromSignature
}
$type = GetNativeType($type, $parameterIndex >= 0 ? 1 : 0);
-
+
if ($parameterIndex >= 0 && $type eq "V8Parameter") {
my $mode = "";
if ($signature->extendedAttributes->{"ConvertUndefinedOrNullToNullString"}) {
@@ -2303,7 +2284,7 @@ sub GetNativeTypeFromSignature
}
$type .= "<$mode>";
}
-
+
return $type;
}
diff --git a/WebCore/bindings/v8/RuntimeEnabledFeatures.cpp b/WebCore/bindings/v8/RuntimeEnabledFeatures.cpp
deleted file mode 100644
index a480480..0000000
--- a/WebCore/bindings/v8/RuntimeEnabledFeatures.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "RuntimeEnabledFeatures.h"
-
-namespace WebCore {
-
-bool RuntimeEnabledFeatures::isLocalStorageEnabled = true;
-bool RuntimeEnabledFeatures::isSessionStorageEnabled = true;
-bool RuntimeEnabledFeatures::isNotificationsEnabled = false;
-bool RuntimeEnabledFeatures::isApplicationCacheEnabled = false;
-bool RuntimeEnabledFeatures::isGeolocationEnabled = false;
-bool RuntimeEnabledFeatures::isIndexedDatabaseEnabled = false;
-
-} // namespace WebCore
diff --git a/WebCore/bindings/v8/RuntimeEnabledFeatures.h b/WebCore/bindings/v8/RuntimeEnabledFeatures.h
deleted file mode 100644
index 4428004..0000000
--- a/WebCore/bindings/v8/RuntimeEnabledFeatures.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef RuntimeEnabledFeatures_h
-#define RuntimeEnabledFeatures_h
-
-namespace WebCore {
-
-// A class that stores static enablers for all experimental features
-class RuntimeEnabledFeatures {
-public:
- static void setLocalStorageEnabled(bool isEnabled) { isLocalStorageEnabled = isEnabled; }
- static bool localStorageEnabled() { return isLocalStorageEnabled; }
-
- static void setSessionStorageEnabled(bool isEnabled) { isSessionStorageEnabled = isEnabled; }
- static bool sessionStorageEnabled() { return isSessionStorageEnabled; }
-
- static void setNotificationsEnabled(bool isEnabled) { isNotificationsEnabled = isEnabled; }
- static bool notificationsEnabled() { return isNotificationsEnabled; }
-
- static void setApplicationCacheEnabled(bool isEnabled) { isApplicationCacheEnabled = isEnabled; }
- static bool applicationCacheEnabled() { return isApplicationCacheEnabled; }
-
- static void setGeolocationEnabled(bool isEnabled) { isGeolocationEnabled = isEnabled; }
- static bool geolocationEnabled() { return isGeolocationEnabled; }
-
- static void setIndexedDatabaseEnabled(bool isEnabled) { isIndexedDatabaseEnabled = isEnabled; }
- static bool indexedDatabaseEnabled() { return isIndexedDatabaseEnabled; }
-
-private:
- // Never instantiate.
- RuntimeEnabledFeatures() { }
-
- static bool isLocalStorageEnabled;
- static bool isSessionStorageEnabled;
- static bool isNotificationsEnabled;
- static bool isApplicationCacheEnabled;
- static bool isGeolocationEnabled;
- static bool isIndexedDatabaseEnabled;
-};
-
-} // namespace WebCore
-
-#endif // RuntimeEnabledFeatures_h
diff --git a/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp b/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
index 4b7f819..3828de8 100644
--- a/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
@@ -1,10 +1,10 @@
/*
* Copyright (C) 2009 Google Inc. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
- *
+ *
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
@@ -14,7 +14,7 @@
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -45,7 +45,6 @@
#include "MediaPlayer.h"
#include "Page.h"
#include "PlatformScreen.h"
-#include "RuntimeEnabledFeatures.h"
#include "ScheduledAction.h"
#include "ScriptSourceCode.h"
#include "SerializedScriptValue.h"
@@ -95,9 +94,9 @@ v8::Handle<v8::Value> WindowSetTimeoutImpl(const v8::Arguments& args, bool singl
else {
v8::Handle<v8::Value> v8String = function->ToString();
- // Bail out if string conversion failed.
- if (v8String.IsEmpty())
- return v8::Undefined();
+ // Bail out if string conversion failed.
+ if (v8String.IsEmpty())
+ return v8::Undefined();
functionString = toWebCoreString(v8String);
}
@@ -228,7 +227,7 @@ void V8DOMWindow::openerAccessorSetter(v8::Local<v8::String> name, v8::Local<v8:
if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), true))
return;
-
+
// Opener can be shadowed if it is in the same domain.
// Have a special handling of null value to behave
// like Firefox. See bug http://b/1224887 & http://b/791706.
@@ -254,85 +253,6 @@ v8::Handle<v8::Value> V8DOMWindow::AudioAccessorGetter(v8::Local<v8::String> nam
return V8DOMWrapper::getConstructor(V8ClassIndex::AUDIO, window);
}
-bool V8DOMWindow::AudioEnabled()
-{
- return MediaPlayer::isAvailable();
-}
-
-bool V8DOMWindow::HTMLMediaElementEnabled()
-{
- return MediaPlayer::isAvailable();
-}
-
-bool V8DOMWindow::HTMLAudioElementEnabled()
-{
- return MediaPlayer::isAvailable();
-}
-
-bool V8DOMWindow::HTMLVideoElementEnabled()
-{
- return MediaPlayer::isAvailable();
-}
-
-bool V8DOMWindow::MediaErrorEnabled()
-{
- return MediaPlayer::isAvailable();
-}
-
-#endif
-
-#if ENABLE(SHARED_WORKERS)
-bool V8DOMWindow::SharedWorkerEnabled()
-{
- return SharedWorkerRepository::isAvailable();
-}
-#endif
-
-#if ENABLE(WEB_SOCKETS)
-bool V8DOMWindow::WebSocketEnabled()
-{
- return WebSocket::isAvailable();
-}
-#endif
-
-#if ENABLE(DATABASE)
-bool V8DOMWindow::OpenDatabaseEnabled()
-{
- return Database::isAvailable();
-}
-#endif
-
-#if ENABLE(INDEXED_DATABASE)
-bool V8DOMWindow::IndexedDBEnabled()
-{
- return RuntimeEnabledFeatures::indexedDatabaseEnabled();
-}
-#endif
-
-#if ENABLE(DOM_STORAGE)
-bool V8DOMWindow::LocalStorageEnabled()
-{
- return RuntimeEnabledFeatures::localStorageEnabled();
-}
-
-bool V8DOMWindow::SessionStorageEnabled()
-{
- return RuntimeEnabledFeatures::sessionStorageEnabled();
-}
-#endif
-
-#if ENABLE(NOTIFICATIONS)
-bool V8DOMWindow::WebkitNotificationsEnabled()
-{
- return RuntimeEnabledFeatures::notificationsEnabled();
-}
-#endif
-
-#if ENABLE(OFFLINE_WEB_APPLICATIONS)
-bool V8DOMWindow::ApplicationCacheEnabled()
-{
- return RuntimeEnabledFeatures::applicationCacheEnabled();
-}
#endif
v8::Handle<v8::Value> V8DOMWindow::ImageAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
@@ -595,7 +515,7 @@ v8::Handle<v8::Value> V8DOMWindow::showModalDialogCallback(const v8::Arguments&
// default here came from frame size of dialog in MacIE.
windowFeatures.height = WindowFeatures::floatFeature(features, "dialogheight", 100, screenRect.height(), 450);
windowFeatures.heightSet = true;
-
+
windowFeatures.x = WindowFeatures::floatFeature(features, "dialogleft", screenRect.x(), screenRect.right() - windowFeatures.width, -1);
windowFeatures.xSet = windowFeatures.x > 0;
windowFeatures.y = WindowFeatures::floatFeature(features, "dialogtop", screenRect.y(), screenRect.bottom() - windowFeatures.height, -1);
@@ -694,11 +614,11 @@ v8::Handle<v8::Value> V8DOMWindow::openCallback(const v8::Arguments& args)
if (topOrParent) {
if (!shouldAllowNavigation(frame))
return v8::Undefined();
-
+
String completedUrl;
if (!urlString.isEmpty())
completedUrl = completeURL(urlString);
-
+
if (!completedUrl.isEmpty() &&
(!protocolIsJavaScript(completedUrl) || ScriptController::isSafeScript(frame))) {
bool userGesture = processingUserGesture();
diff --git a/WebCore/bindings/v8/custom/V8NavigatorCustom.cpp b/WebCore/bindings/v8/custom/V8NavigatorCustom.cpp
index 75922e7..42e1718 100644
--- a/WebCore/bindings/v8/custom/V8NavigatorCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8NavigatorCustom.cpp
@@ -1,10 +1,10 @@
/*
* Copyright (C) 2010 Google Inc. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
- *
+ *
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
@@ -14,7 +14,7 @@
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -37,13 +37,6 @@
namespace WebCore {
-#if ENABLE(GEOLOCATION)
-bool V8Navigator::GeolocationEnabled()
-{
- return RuntimeEnabledFeatures::geolocationEnabled();
-}
-#endif
-
v8::Handle<v8::Value> toV8(Navigator* impl)
{
if (!impl)
diff --git a/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp b/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp
index 805b746..7677e27 100644
--- a/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp
@@ -35,7 +35,6 @@
#include "DOMTimer.h"
#include "ExceptionCode.h"
-#include "RuntimeEnabledFeatures.h"
#include "ScheduledAction.h"
#include "V8Binding.h"
#include "V8Proxy.h"
@@ -47,20 +46,6 @@
namespace WebCore {
-#if ENABLE(NOTIFICATIONS)
-bool V8WorkerContext::WebkitNotificationsEnabled()
-{
- return RuntimeEnabledFeatures::notificationsEnabled();
-}
-#endif
-
-#if ENABLE(WEB_SOCKETS)
-bool V8WorkerContext::WebSocketEnabled()
-{
- return WebSocket::isAvailable();
-}
-#endif
-
v8::Handle<v8::Value> SetTimeoutOrInterval(const v8::Arguments& args, bool singleShot)
{
WorkerContext* workerContext = V8WorkerContext::toNative(args.Holder());
diff --git a/WebKit/chromium/src/WebRuntimeFeatures.cpp b/WebKit/chromium/src/WebRuntimeFeatures.cpp
index 0ef8b9b..ad84764 100644
--- a/WebKit/chromium/src/WebRuntimeFeatures.cpp
+++ b/WebKit/chromium/src/WebRuntimeFeatures.cpp
@@ -123,14 +123,14 @@ bool WebRuntimeFeatures::isSocketsEnabled()
void WebRuntimeFeatures::enableNotifications(bool enable)
{
#if ENABLE(NOTIFICATIONS)
- RuntimeEnabledFeatures::setNotificationsEnabled(enable);
+ RuntimeEnabledFeatures::setWebkitNotificationsEnabled(enable);
#endif
}
bool WebRuntimeFeatures::isNotificationsEnabled()
{
#if ENABLE(NOTIFICATIONS)
- return RuntimeEnabledFeatures::notificationsEnabled();
+ return RuntimeEnabledFeatures::webkitNotificationsEnabled();
#else
return false;
#endif
@@ -171,14 +171,14 @@ bool WebRuntimeFeatures::isGeolocationEnabled()
void WebRuntimeFeatures::enableIndexedDatabase(bool enable)
{
#if ENABLE(INDEXED_DATABASE)
- RuntimeEnabledFeatures::setIndexedDatabaseEnabled(enable);
+ RuntimeEnabledFeatures::setIndexedDBEnabled(enable);
#endif
}
bool WebRuntimeFeatures::isIndexedDatabaseEnabled()
{
#if ENABLE(INDEXED_DATABASE)
- return RuntimeEnabledFeatures::indexedDatabaseEnabled();
+ return RuntimeEnabledFeatures::indexedDBEnabled();
#else
return false;
#endif
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list