[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

abarth at webkit.org abarth at webkit.org
Wed Dec 22 13:00:03 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 270ebcea28de97300328d6ebc175f6c8601f59cd
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Sep 3 22:46:47 2010 +0000

    2010-09-03  Sheriff Bot  <webkit.review.bot at gmail.com>
    
            Unreviewed, rolling out r66770.
            http://trac.webkit.org/changeset/66770
            https://bugs.webkit.org/show_bug.cgi?id=45200
    
            Broke Windows in a way I can't figure out now to fix
            (Requested by abarth on #webkit).
    
            * GNUmakefile.am:
            * WebCore.gypi:
            * WebCore.pro:
            * WebCore.vcproj/WebCore.vcproj:
            * WebCore.xcodeproj/project.pbxproj:
            * bindings/generic/BindingDOMWindow.h:
            (WebCore::::completeURL):
            * bindings/generic/BindingFrame.h: Removed.
            * bindings/generic/BindingLocation.h: Removed.
            * bindings/generic/GenericBinding.h:
            * bindings/js/JSBinding.h: Removed.
            * bindings/js/JSBindingsAllInOne.cpp:
            * bindings/js/JSDOMBinding.cpp:
            (WebCore::shouldAllowNavigation):
            (WebCore::toLexicalFrame):
            (WebCore::toDynamicFrame):
            (WebCore::processingUserGesture):
            (WebCore::completeURL):
            * bindings/js/JSLocationCustom.cpp:
            (WebCore::navigateIfAllowed):
            (WebCore::JSLocation::replace):
            * bindings/js/specialization/JSBindingState.cpp: Removed.
            * bindings/js/specialization/JSBindingState.h: Removed.
            * bindings/v8/V8Binding.h:
            * bindings/v8/V8Utilities.cpp:
            (WebCore::completeURL):
            (WebCore::navigateIfAllowed):
            * bindings/v8/custom/V8LocationCustom.cpp:
            (WebCore::V8Location::replaceCallback):
            * bindings/v8/specialization/V8BindingState.cpp:
            * bindings/v8/specialization/V8BindingState.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66774 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ef5fce4..afda76d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,44 @@
+2010-09-03  Sheriff Bot  <webkit.review.bot at gmail.com>
+
+        Unreviewed, rolling out r66770.
+        http://trac.webkit.org/changeset/66770
+        https://bugs.webkit.org/show_bug.cgi?id=45200
+
+        Broke Windows in a way I can't figure out now to fix
+        (Requested by abarth on #webkit).
+
+        * GNUmakefile.am:
+        * WebCore.gypi:
+        * WebCore.pro:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/generic/BindingDOMWindow.h:
+        (WebCore::::completeURL):
+        * bindings/generic/BindingFrame.h: Removed.
+        * bindings/generic/BindingLocation.h: Removed.
+        * bindings/generic/GenericBinding.h:
+        * bindings/js/JSBinding.h: Removed.
+        * bindings/js/JSBindingsAllInOne.cpp:
+        * bindings/js/JSDOMBinding.cpp:
+        (WebCore::shouldAllowNavigation):
+        (WebCore::toLexicalFrame):
+        (WebCore::toDynamicFrame):
+        (WebCore::processingUserGesture):
+        (WebCore::completeURL):
+        * bindings/js/JSLocationCustom.cpp:
+        (WebCore::navigateIfAllowed):
+        (WebCore::JSLocation::replace):
+        * bindings/js/specialization/JSBindingState.cpp: Removed.
+        * bindings/js/specialization/JSBindingState.h: Removed.
+        * bindings/v8/V8Binding.h:
+        * bindings/v8/V8Utilities.cpp:
+        (WebCore::completeURL):
+        (WebCore::navigateIfAllowed):
+        * bindings/v8/custom/V8LocationCustom.cpp:
+        (WebCore::V8Location::replaceCallback):
+        * bindings/v8/specialization/V8BindingState.cpp:
+        * bindings/v8/specialization/V8BindingState.h:
+
 2010-09-03  Jian Li  <jianli at chromium.org>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index 53f7778..d361810 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -9,7 +9,6 @@ webcore_cppflags += \
 	-I$(srcdir)/WebCore/accessibility \
 	-I$(srcdir)/WebCore/bindings/generic \
 	-I$(srcdir)/WebCore/bindings/js \
-	-I$(srcdir)/WebCore/bindings/js/specialization \
 	-I$(srcdir)/WebCore/bindings/gobject \
 	-I$(srcdir)/WebCore/bridge \
 	-I$(srcdir)/WebCore/bridge/c \
@@ -624,12 +623,6 @@ webcore_sources += \
 	WebCore/accessibility/AccessibilityTableRow.h \
 	WebCore/bindings/generic/ActiveDOMCallback.cpp \
 	WebCore/bindings/generic/ActiveDOMCallback.h \
-	WebCore/bindings/generic/BindingFrame.h \
-	WebCore/bindings/generic/BindingLocation.h \
-	WebCore/bindings/generic/BindingSecurity.h \
-	WebCore/bindings/generic/BindingSecurityBase.cpp \
-	WebCore/bindings/generic/BindingSecurityBase.h \
-	WebCore/bindings/generic/GenericBinding.h \
 	WebCore/bindings/generic/RuntimeEnabledFeatures.cpp \
 	WebCore/bindings/generic/RuntimeEnabledFeatures.h \
 	WebCore/bindings/js/CachedScriptSourceProvider.h \
@@ -803,8 +796,6 @@ webcore_sources += \
 	WebCore/bindings/js/SerializedScriptValue.h \
 	WebCore/bindings/js/StringSourceProvider.h \
 	WebCore/bindings/js/WebCoreJSClientData.h \
-	WebCore/bindings/js/specialization/JSBindingState.cpp \
-	WebCore/bindings/js/specialization/JSBindingState.h \
 	WebCore/bindings/ScriptControllerBase.cpp \
 	WebCore/bindings/ScriptControllerBase.h \
 	WebCore/bridge/Bridge.h \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 1412824..99e891d 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -512,8 +512,6 @@
             'bindings/generic/ActiveDOMCallback.cpp',
             'bindings/generic/ActiveDOMCallback.h',
             'bindings/generic/BindingDOMWindow.h',
-            'bindings/generic/BindingFrame.h',
-            'bindings/generic/BindingLocation.h',
             'bindings/generic/BindingSecurity.h',
             'bindings/generic/BindingSecurityBase.cpp',
             'bindings/generic/BindingSecurityBase.h',
@@ -533,7 +531,6 @@
             'bindings/js/JSAttrCustom.cpp',
             'bindings/js/JSAudioConstructor.cpp',
             'bindings/js/JSAudioConstructor.h',
-            'bindings/js/JSBinding.h',
             'bindings/js/JSCanvasRenderingContextCustom.cpp',
             'bindings/js/JSCanvasRenderingContext2DCustom.cpp',
             'bindings/js/JSCDATASectionCustom.cpp',
@@ -713,8 +710,6 @@
             'bindings/js/WebCoreJSClientData.h',
             'bindings/js/WorkerScriptController.cpp',
             'bindings/js/WorkerScriptController.h',
-            'bindings/js/specialization/JSBindingState.cpp',
-            'bindings/js/specialization/JSBindingState.h',
             'bindings/ScriptControllerBase.cpp',
             'bindings/ScriptControllerBase.h',
             'bindings/v8/ChildThreadDOMData.cpp',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 8350892..3f23cdd 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -184,7 +184,6 @@ WEBCORE_INCLUDEPATH = \
     $$PWD/bindings \
     $$PWD/bindings/generic \
     $$PWD/bindings/js \
-    $$PWD/bindings/js/specialization \
     $$PWD/bridge \
     $$PWD/bridge/c \
     $$PWD/bridge/jsc \
@@ -393,7 +392,6 @@ SOURCES += \
     bindings/js/ScriptValue.cpp \
     bindings/js/ScheduledAction.cpp \
     bindings/js/SerializedScriptValue.cpp \
-    bindings/js/specialization/JSBindingState.cpp \
     bindings/ScriptControllerBase.cpp \
     bridge/IdentifierRep.cpp \
     bridge/NP_jsobject.cpp \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 9ce3b1f..f3e49f5 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -41967,30 +41967,6 @@
 					RelativePath="..\bindings\generic\ActiveDOMCallback.h"
 					>
 				</File>
-				<File
-					RelativePath="..\bindings\generic\BindingFrame.h"
-					>
-				</File>
-				<File
-					RelativePath="..\bindings\generic\BindingLocation.h"
-					>
-				</File>
-				<File
-					RelativePath="..\bindings\generic\BindingSecurity.h"
-					>
-				</File>
-				<File
-					RelativePath="..\bindings\generic\BindingSecurityBase.cpp"
-					>
-				</File>
-				<File
-					RelativePath="..\bindings\generic\BindingSecurityBase.h"
-					>
-				</File>
-				<File
-					RelativePath="..\bindings\generic\GenericBinding.h"
-					>
-				</File>
 			</Filter>
 			<Filter
 				Name="generic"
@@ -42348,10 +42324,6 @@
 					>
 				</File>
 				<File
-					RelativePath="..\bindings\js\JSBinding.h"
-					>
-				</File>
-				<File
 					RelativePath="..\bindings\js\JSBindingsAllInOne.cpp"
 					>
 				</File>
@@ -49647,62 +49619,6 @@
 					RelativePath="..\bindings\js\WorkerScriptController.h"
 					>
 				</File>
-				<File
-					RelativePath="..\bindings\js\specialization\JSBindingState.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						ExcludedFromBuild="true"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						ExcludedFromBuild="true"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Debug_Internal|Win32"
-						ExcludedFromBuild="true"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Debug_Cairo|Win32"
-						ExcludedFromBuild="true"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release_Cairo|Win32"
-						ExcludedFromBuild="true"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Debug_All|Win32"
-						ExcludedFromBuild="true"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\bindings\js\specialization\JSBindingState.h"
-					>
-				</File>
 			</Filter>
 		</Filter>
 		<Filter
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index db96ce2..c8b88ec 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -2837,15 +2837,6 @@
 		A59E3C1F11580F510072928E /* KeyEventIPhone.mm in Sources */ = {isa = PBXBuildFile; fileRef = A59E3C1D11580F510072928E /* KeyEventIPhone.mm */; };
 		A5AFB34F115151A700B045CB /* StepRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5AFB34D115151A700B045CB /* StepRange.cpp */; };
 		A5AFB350115151A700B045CB /* StepRange.h in Headers */ = {isa = PBXBuildFile; fileRef = A5AFB34E115151A700B045CB /* StepRange.h */; };
-		A622A8EE122C442A00A785B3 /* JSBinding.h in Headers */ = {isa = PBXBuildFile; fileRef = A622A8ED122C442A00A785B3 /* JSBinding.h */; };
-		A622A8F2122C444500A785B3 /* JSBindingState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A622A8F0122C444500A785B3 /* JSBindingState.cpp */; };
-		A622A8F3122C444500A785B3 /* JSBindingState.h in Headers */ = {isa = PBXBuildFile; fileRef = A622A8F1122C444500A785B3 /* JSBindingState.h */; };
-		A622A8FA122C44A600A785B3 /* BindingLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = A622A8F4122C44A600A785B3 /* BindingLocation.h */; };
-		A622A8FB122C44A600A785B3 /* BindingSecurity.h in Headers */ = {isa = PBXBuildFile; fileRef = A622A8F5122C44A600A785B3 /* BindingSecurity.h */; };
-		A622A8FC122C44A600A785B3 /* BindingSecurityBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A622A8F6122C44A600A785B3 /* BindingSecurityBase.cpp */; };
-		A622A8FD122C44A600A785B3 /* BindingSecurityBase.h in Headers */ = {isa = PBXBuildFile; fileRef = A622A8F7122C44A600A785B3 /* BindingSecurityBase.h */; };
-		A622A8FE122C44A600A785B3 /* BindingUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = A622A8F8122C44A600A785B3 /* BindingUtilities.h */; };
-		A622A8FF122C44A600A785B3 /* GenericBinding.h in Headers */ = {isa = PBXBuildFile; fileRef = A622A8F9122C44A600A785B3 /* GenericBinding.h */; };
 		A718760E0B2A120100A16ECE /* DragActions.h in Headers */ = {isa = PBXBuildFile; fileRef = A718760D0B2A120100A16ECE /* DragActions.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		A71878900B2D04AC00A16ECE /* DragControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = A718788F0B2D04AC00A16ECE /* DragControllerMac.mm */; };
 		A7352C190B1BB89D00A986D0 /* RenderSVGBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7352C170B1BB89D00A986D0 /* RenderSVGBlock.cpp */; };
@@ -8716,15 +8707,6 @@
 		A5AFB34E115151A700B045CB /* StepRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StepRange.h; sourceTree = "<group>"; };
 		A5C974CF11485FF10066F2AB /* KeyEventCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KeyEventCocoa.h; path = cocoa/KeyEventCocoa.h; sourceTree = "<group>"; };
 		A5C974D011485FF10066F2AB /* KeyEventCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = KeyEventCocoa.mm; path = cocoa/KeyEventCocoa.mm; sourceTree = "<group>"; };
-		A622A8ED122C442A00A785B3 /* JSBinding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSBinding.h; sourceTree = "<group>"; };
-		A622A8F0122C444500A785B3 /* JSBindingState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSBindingState.cpp; sourceTree = "<group>"; };
-		A622A8F1122C444500A785B3 /* JSBindingState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSBindingState.h; sourceTree = "<group>"; };
-		A622A8F4122C44A600A785B3 /* BindingLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BindingLocation.h; path = generic/BindingLocation.h; sourceTree = "<group>"; };
-		A622A8F5122C44A600A785B3 /* BindingSecurity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BindingSecurity.h; path = generic/BindingSecurity.h; sourceTree = "<group>"; };
-		A622A8F6122C44A600A785B3 /* BindingSecurityBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BindingSecurityBase.cpp; path = generic/BindingSecurityBase.cpp; sourceTree = "<group>"; };
-		A622A8F7122C44A600A785B3 /* BindingSecurityBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BindingSecurityBase.h; path = generic/BindingSecurityBase.h; sourceTree = "<group>"; };
-		A622A8F8122C44A600A785B3 /* BindingUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BindingUtilities.h; path = generic/BindingUtilities.h; sourceTree = "<group>"; };
-		A622A8F9122C44A600A785B3 /* GenericBinding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GenericBinding.h; path = generic/GenericBinding.h; sourceTree = "<group>"; };
 		A718760D0B2A120100A16ECE /* DragActions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DragActions.h; sourceTree = "<group>"; };
 		A718788F0B2D04AC00A16ECE /* DragControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DragControllerMac.mm; sourceTree = "<group>"; };
 		A71A70C911AFB02000989D6D /* HTMLMeterElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLMeterElement.idl; sourceTree = "<group>"; };
@@ -14470,15 +14452,6 @@
 			name = cocoa;
 			sourceTree = "<group>";
 		};
-		A622A8EF122C444500A785B3 /* specialization */ = {
-			isa = PBXGroup;
-			children = (
-				A622A8F0122C444500A785B3 /* JSBindingState.cpp */,
-				A622A8F1122C444500A785B3 /* JSBindingState.h */,
-			);
-			path = specialization;
-			sourceTree = "<group>";
-		};
 		A75E8B7F0E1DE2B0007F2481 /* filters */ = {
 			isa = PBXGroup;
 			children = (
@@ -16096,12 +16069,6 @@
 			children = (
 				B5D31DF811CF610B009F22B4 /* ActiveDOMCallback.cpp */,
 				B5D31DF911CF610B009F22B4 /* ActiveDOMCallback.h */,
-				A622A8F4122C44A600A785B3 /* BindingLocation.h */,
-				A622A8F5122C44A600A785B3 /* BindingSecurity.h */,
-				A622A8F6122C44A600A785B3 /* BindingSecurityBase.cpp */,
-				A622A8F7122C44A600A785B3 /* BindingSecurityBase.h */,
-				A622A8F8122C44A600A785B3 /* BindingUtilities.h */,
-				A622A8F9122C44A600A785B3 /* GenericBinding.h */,
 			);
 			name = generic;
 			sourceTree = "<group>";
@@ -16141,7 +16108,6 @@
 				BCCE58A71061E82F008FB35A /* Callback Objects */,
 				BCCE58B41061E925008FB35A /* Constructors */,
 				BC4EDEF70C08F414007EDD49 /* Custom */,
-				A622A8EF122C444500A785B3 /* specialization */,
 				14DFB33F0A7DF7630018F769 /* Derived Sources */,
 				BCD533630ED6848900887468 /* CachedScriptSourceProvider.h */,
 				93F8B3060A300FEA00F61AB8 /* CodeGeneratorJS.pm */,
@@ -16155,7 +16121,6 @@
 				C585A66111D4FAC5004C3E4B /* IDBBindingUtilities.h */,
 				1C81BA030E97348300266E07 /* JavaScriptCallFrame.cpp */,
 				1C81BA040E97348300266E07 /* JavaScriptCallFrame.h */,
-				A622A8ED122C442A00A785B3 /* JSBinding.h */,
 				BC53DAC411432FD9000D817E /* JSDebugWrapperSet.cpp */,
 				BC53DAC111432EEE000D817E /* JSDebugWrapperSet.h */,
 				93B70D4709EB0C7C009D8468 /* JSDOMBinding.cpp */,
@@ -20467,13 +20432,6 @@
 				898785B9122CA2A7003AABDA /* JSMetadataCallback.h in Headers */,
 				898785F1122E1E87003AABDA /* JSFileException.h in Headers */,
 				898785F5122E1EAC003AABDA /* JSFileReaderSync.h in Headers */,
-				A622A8EE122C442A00A785B3 /* JSBinding.h in Headers */,
-				A622A8F3122C444500A785B3 /* JSBindingState.h in Headers */,
-				A622A8FA122C44A600A785B3 /* BindingLocation.h in Headers */,
-				A622A8FB122C44A600A785B3 /* BindingSecurity.h in Headers */,
-				A622A8FD122C44A600A785B3 /* BindingSecurityBase.h in Headers */,
-				A622A8FE122C44A600A785B3 /* BindingUtilities.h in Headers */,
-				A622A8FF122C44A600A785B3 /* GenericBinding.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -22937,8 +22895,6 @@
 				898785B8122CA2A7003AABDA /* JSMetadataCallback.cpp in Sources */,
 				898785F0122E1E87003AABDA /* JSFileException.cpp in Sources */,
 				898785F4122E1EAC003AABDA /* JSFileReaderSync.cpp in Sources */,
-				A622A8F2122C444500A785B3 /* JSBindingState.cpp in Sources */,
-				A622A8FC122C44A600A785B3 /* BindingSecurityBase.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/WebCore/bindings/generic/BindingDOMWindow.h b/WebCore/bindings/generic/BindingDOMWindow.h
index 96b8b9d..0c450a5 100644
--- a/WebCore/bindings/generic/BindingDOMWindow.h
+++ b/WebCore/bindings/generic/BindingDOMWindow.h
@@ -65,6 +65,9 @@ public:
                                     const String& frameName,
                                     const WindowFeatures& rawFeatures);
 
+    // FIXME: There should be a place for generic binding utilities.
+    static KURL completeURL(State<Binding>*, const String& relativeURL);
+
 private:
     // Horizontal and vertical offset, from the parent content area,
     // around newly opened popups that don't specify a location.
@@ -265,6 +268,18 @@ WebCore::DOMWindow* BindingDOMWindow<Binding>::open(State<Binding>* state,
     return frame->domWindow();
 }
 
+template <class Binding>
+KURL BindingDOMWindow<Binding>::completeURL(State<Binding>* state,
+                                            const String& relativeURL)
+{
+    // For historical reasons, we need to complete the URL using the
+    // dynamic frame.
+    Frame* frame = state->getFirstFrame();
+    if (!frame)
+        return KURL();
+    return frame->loader()->completeURL(relativeURL);
+}
+
 } // namespace WebCore
 
 #endif // BindingDOMWindow_h
diff --git a/WebCore/bindings/generic/BindingFrame.h b/WebCore/bindings/generic/BindingFrame.h
deleted file mode 100644
index f1fdc79..0000000
--- a/WebCore/bindings/generic/BindingFrame.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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
- * 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 BindingFrame_h
-#define BindingFrame_h
-
-#include "Frame.h"
-#include "GenericBinding.h"
-
-namespace WebCore {
-
-template <class Binding>
-class BindingFrame {
-public:
-    static void navigateIfAllowed(State<Binding>*, Frame*, const KURL&, bool lockHistory, bool lockBackForwardList);
-};
-
-template <class Binding>
-void BindingFrame<Binding>::navigateIfAllowed(State<Binding>* state, Frame* frame, const KURL& url, bool lockHistory, bool lockBackForwardList)
-{
-    Frame* activeFrame = state->getActiveFrame();
-    if (!activeFrame)
-        return;
-    if (!protocolIsJavaScript(url) || state->allowsAccessFromFrame(frame))
-        frame->redirectScheduler()->scheduleLocationChange(url.string(), activeFrame->loader()->outgoingReferrer(), lockHistory, lockBackForwardList, state->processingUserGesture());
-}
-
-} // namespace WebCore
-
-#endif // BindingFrame_h
diff --git a/WebCore/bindings/generic/BindingLocation.h b/WebCore/bindings/generic/BindingLocation.h
deleted file mode 100644
index ca52814..0000000
--- a/WebCore/bindings/generic/BindingLocation.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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
- * 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 BindingLocation_h
-#define BindingLocation_h
-
-#include "BindingSecurity.h"
-#include "GenericBinding.h"
-#include "Location.h"
-
-namespace WebCore {
-
-template <class Binding>
-class BindingLocation {
-public:
-    static void replace(State<Binding>*, Location*, const String& url);
-};
-
-template <class Binding>
-void BindingLocation<Binding>::replace(State<Binding>* state, Location* location, const String& url)
-{
-    Frame* frame = location->frame();
-    if (!frame)
-        return;
-
-    KURL fullURL = completeURL(state, url);
-    if (fullURL.isNull())
-        return;
-
-    if (!BindingSecurity<Binding>::shouldAllowNavigation(state, frame))
-        return;
-
-    Binding::Frame::navigateIfAllowed(state, frame, fullURL, true, true);
-}
-
-} // namespace WebCore
-
-#endif // BindingLocation_h
diff --git a/WebCore/bindings/generic/GenericBinding.h b/WebCore/bindings/generic/GenericBinding.h
index 8bf1343..d030b45 100644
--- a/WebCore/bindings/generic/GenericBinding.h
+++ b/WebCore/bindings/generic/GenericBinding.h
@@ -31,9 +31,6 @@
 #ifndef GenericBinding_h
 #define GenericBinding_h
 
-#include "Frame.h"
-#include "FrameLoader.h"
-
 namespace WebCore {
 
 // Used to instantiate binding templates for any methods shared among all
@@ -50,17 +47,6 @@ class State<GenericBinding> {
     // Any methods shared across bindings can go here.
 };
 
-template <class Binding>
-KURL completeURL(State<Binding>* state, const String& relativeURL)
-{
-    // For historical reasons, we need to complete the URL using the
-    // dynamic frame.
-    Frame* frame = state->getFirstFrame();
-    if (!frame)
-        return KURL();
-    return frame->loader()->completeURL(relativeURL);
-}
-
 }
 
 #endif // GenericBinding_h
diff --git a/WebCore/bindings/js/JSBinding.h b/WebCore/bindings/js/JSBinding.h
deleted file mode 100644
index b42c9be..0000000
--- a/WebCore/bindings/js/JSBinding.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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
- * 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 JSBinding_h
-#define JSBinding_h
-
-#include "BindingFrame.h"
-#include "BindingLocation.h"
-#include "BindingSecurity.h"
-
-namespace WebCore {
-
-// Instantiate binding template classes for JSC.
-class JSBinding {
-public:
-    typedef BindingFrame<JSBinding> Frame;
-    typedef BindingLocation<JSBinding> Location;
-};
-
-typedef BindingSecurity<JSBinding> JSBindingSecurity;
-
-} // namespace WebCore
-
-#endif // JSBinding_h
diff --git a/WebCore/bindings/js/JSBindingsAllInOne.cpp b/WebCore/bindings/js/JSBindingsAllInOne.cpp
index 6e1cc1e..922e449 100644
--- a/WebCore/bindings/js/JSBindingsAllInOne.cpp
+++ b/WebCore/bindings/js/JSBindingsAllInOne.cpp
@@ -30,7 +30,6 @@
 #include "GCController.cpp"
 #include "JSAttrCustom.cpp"
 #include "JSAudioConstructor.cpp"
-#include "JSBindingState.cpp"
 #include "JSCDATASectionCustom.cpp"
 #include "JSCSSRuleCustom.cpp"
 #include "JSCSSRuleListCustom.cpp"
diff --git a/WebCore/bindings/js/JSDOMBinding.cpp b/WebCore/bindings/js/JSDOMBinding.cpp
index 74c8131..96394eb 100644
--- a/WebCore/bindings/js/JSDOMBinding.cpp
+++ b/WebCore/bindings/js/JSDOMBinding.cpp
@@ -38,14 +38,11 @@
 #include "HTMLImageElement.h"
 #include "HTMLNames.h"
 #include "HTMLScriptElement.h"
-#include "JSBinding.h"
-#include "JSBindingState.h"
 #include "JSDOMCoreException.h"
 #include "JSDOMWindowCustom.h"
 #include "JSDebugWrapperSet.h"
 #include "JSEventException.h"
 #include "JSExceptionBase.h"
-#include "JSMainThreadExecState.h"
 #include "JSNode.h"
 #include "JSRangeException.h"
 #include "JSXMLHttpRequestException.h"
@@ -642,8 +639,8 @@ bool allowsAccessFromFrame(ExecState* exec, Frame* frame, String& message)
 
 bool shouldAllowNavigation(ExecState* exec, Frame* frame)
 {
-    JSBindingState state(exec);
-    return JSBindingSecurity::shouldAllowNavigation(&state, frame);
+    Frame* lexicalFrame = toLexicalFrame(exec);
+    return lexicalFrame && lexicalFrame->loader()->shouldAllowNavigation(frame);
 }
 
 bool allowSettingSrcToJavascriptURL(ExecState* exec, Element* element, const String& name, const String& value)
@@ -674,23 +671,26 @@ void printErrorMessageForFrame(Frame* frame, const String& message)
 
 Frame* toLexicalFrame(ExecState* exec)
 {
-    return JSBindingState(exec).getActiveFrame();
+    return asJSDOMWindow(exec->lexicalGlobalObject())->impl()->frame();
 }
 
 Frame* toDynamicFrame(ExecState* exec)
 {
-    return JSBindingState(exec).getFirstFrame();
+    return asJSDOMWindow(exec->dynamicGlobalObject())->impl()->frame();
 }
 
 bool processingUserGesture()
 {
-    return JSBindingState(JSMainThreadExecState::currentState()).processingUserGesture();
+    return ScriptController::processingUserGesture();
 }
 
 KURL completeURL(ExecState* exec, const String& relativeURL)
 {
-    JSBindingState state(exec);
-    return completeURL(&state, relativeURL);
+    // For historical reasons, we need to complete the URL using the dynamic frame.
+    Frame* frame = toDynamicFrame(exec);
+    if (!frame)
+        return KURL();
+    return frame->loader()->completeURL(relativeURL);
 }
 
 JSValue objectToStringFunctionGetter(ExecState* exec, JSValue, const Identifier& propertyName)
diff --git a/WebCore/bindings/js/JSLocationCustom.cpp b/WebCore/bindings/js/JSLocationCustom.cpp
index 09e7294..99166cd 100644
--- a/WebCore/bindings/js/JSLocationCustom.cpp
+++ b/WebCore/bindings/js/JSLocationCustom.cpp
@@ -27,8 +27,6 @@
 #include "ExceptionCode.h"
 #include "Frame.h"
 #include "FrameLoader.h"
-#include "JSBinding.h"
-#include "JSBindingState.h"
 #include "JSDOMBinding.h"
 #include "JSDOMWindowCustom.h"
 #include "KURL.h"
@@ -188,8 +186,12 @@ void JSLocation::defineGetter(ExecState* exec, const Identifier& propertyName, J
 
 static void navigateIfAllowed(ExecState* exec, Frame* frame, const KURL& url, bool lockHistory, bool lockBackForwardList)
 {
-    JSBindingState state(exec);
-    JSBinding::Frame::navigateIfAllowed(&state, frame, url, lockHistory, lockBackForwardList);
+    Frame* lexicalFrame = toLexicalFrame(exec);
+    if (!lexicalFrame)
+        return;
+
+    if (!protocolIsJavaScript(url) || allowsAccessFromFrame(exec, frame))
+        frame->redirectScheduler()->scheduleLocationChange(url.string(), lexicalFrame->loader()->outgoingReferrer(), lockHistory, lockBackForwardList, processingUserGesture());
 }
 
 void JSLocation::setHref(ExecState* exec, JSValue value)
@@ -301,8 +303,18 @@ void JSLocation::setHash(ExecState* exec, JSValue value)
 
 JSValue JSLocation::replace(ExecState* exec)
 {
-    JSBindingState state(exec);
-    JSBinding::Location::replace(&state, impl(), ustringToString(exec->argument(0).toString(exec)));
+    Frame* frame = impl()->frame();
+    if (!frame)
+        return jsUndefined();
+
+    KURL url = completeURL(exec, ustringToString(exec->argument(0).toString(exec)));
+    if (url.isNull())
+        return jsUndefined();
+
+    if (!shouldAllowNavigation(exec, frame))
+        return jsUndefined();
+
+    navigateIfAllowed(exec, frame, url, true, true);
     return jsUndefined();
 }
 
diff --git a/WebCore/bindings/js/specialization/JSBindingState.cpp b/WebCore/bindings/js/specialization/JSBindingState.cpp
deleted file mode 100644
index 950b813..0000000
--- a/WebCore/bindings/js/specialization/JSBindingState.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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
- * 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 "JSBindingState.h"
-
-#include "DOMWindow.h"
-#include "JSDOMWindow.h"
-#include "JSDOMWindowCustom.h"
-#include "ScriptController.h"
-
-namespace WebCore {
-
-class Frame;
-
-Frame* State<JSBinding>::getActiveFrame()
-{
-    return asJSDOMWindow(m_exec->lexicalGlobalObject())->impl()->frame();
-}
-
-Frame* State<JSBinding>::getFirstFrame()
-{
-    return asJSDOMWindow(m_exec->dynamicGlobalObject())->impl()->frame();
-}
-
-bool State<JSBinding>::processingUserGesture()
-{
-    return ScriptController::processingUserGesture();
-}
-
-bool State<JSBinding>::allowsAccessFromFrame(Frame* frame)
-{
-    return WebCore::allowsAccessFromFrame(m_exec, frame);
-}
-
-} // namespace WebCore
diff --git a/WebCore/bindings/js/specialization/JSBindingState.h b/WebCore/bindings/js/specialization/JSBindingState.h
deleted file mode 100644
index 6640140..0000000
--- a/WebCore/bindings/js/specialization/JSBindingState.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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
- * 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 JSBindingState_h
-#define JSBindingState_h
-
-#include "GenericBinding.h"
-#include "JSBinding.h"
-
-namespace JSC {
-
-class ExecState;
-
-} // namespace JSC
-
-namespace WebCore {
-
-class Frame;
-
-template <>
-class State<JSBinding> : public State<GenericBinding> {
-public:
-    explicit State(JSC::ExecState* exec)
-        : m_exec(exec)
-    {
-    }
-
-    virtual ~State()
-    {
-    }
-
-    Frame* getActiveFrame();
-    Frame* getFirstFrame();
-
-    bool processingUserGesture();
-
-    // FIXME: This should be shared in BindingSecurity
-    bool allowsAccessFromFrame(Frame*);
-
-private:
-    JSC::ExecState* m_exec;
-};
-
-typedef State<JSBinding> JSBindingState;
-
-} // namespace WebCore
-
-#endif // JSBindingState_h
diff --git a/WebCore/bindings/v8/V8Binding.h b/WebCore/bindings/v8/V8Binding.h
index 566e8ac..58989ed 100644
--- a/WebCore/bindings/v8/V8Binding.h
+++ b/WebCore/bindings/v8/V8Binding.h
@@ -31,8 +31,6 @@
 #ifndef V8Binding_h
 #define V8Binding_h
 
-#include "BindingFrame.h"
-#include "BindingLocation.h"
 #include "BindingSecurity.h"
 #include "MathExtras.h"
 #include "PlatformString.h"
@@ -52,18 +50,16 @@ namespace WebCore {
     public:
         typedef v8::Handle<v8::Value> Value;
         typedef V8BindingDOMWindow DOMWindow;
-        typedef BindingFrame<V8Binding> Frame;
-        typedef BindingLocation<V8Binding> Location;
 
         static Value emptyScriptValue() { return v8::Local<v8::Value>(); }
     };
     typedef BindingSecurity<V8Binding> V8BindingSecurity;
-
+    
     enum ExternalMode {
         Externalize,
         DoNotExternalize
     };
-
+    
     template <typename StringType>
     StringType v8StringToWebCoreString(v8::Handle<v8::String> v8String, ExternalMode external);
 
diff --git a/WebCore/bindings/v8/V8Utilities.cpp b/WebCore/bindings/v8/V8Utilities.cpp
index e497071..2e5cf8b 100644
--- a/WebCore/bindings/v8/V8Utilities.cpp
+++ b/WebCore/bindings/v8/V8Utilities.cpp
@@ -38,6 +38,7 @@
 #include "ScriptExecutionContext.h"
 #include "ScriptState.h"
 #include "V8Binding.h"
+#include "V8BindingDOMWindow.h" // FIXME: remove when completeURL moves
 #include "V8BindingState.h"
 #include "V8Proxy.h"
 #include "WorkerContext.h"
@@ -111,12 +112,16 @@ bool shouldAllowNavigation(Frame* frame)
 
 KURL completeURL(const String& relativeURL)
 {
-    return completeURL(V8BindingState::Only(), relativeURL);
+    return V8BindingDOMWindow::completeURL(V8BindingState::Only(), relativeURL);
 }
 
 void navigateIfAllowed(Frame* frame, const KURL& url, bool lockHistory, bool lockBackForwardList)
 {
-    return V8Binding::Frame::navigateIfAllowed(V8BindingState::Only(), frame, url, lockHistory, lockBackForwardList);
+    Frame* callingOrEntered = callingOrEnteredFrame();
+    if (!callingOrEntered)
+        return;
+    if (!protocolIsJavaScript(url) || ScriptController::isSafeScript(frame))
+        frame->redirectScheduler()->scheduleLocationChange(url.string(), callingOrEntered->loader()->outgoingReferrer(), lockHistory, lockBackForwardList, processingUserGesture());
 }
 
 ScriptExecutionContext* getScriptExecutionContext()
diff --git a/WebCore/bindings/v8/custom/V8LocationCustom.cpp b/WebCore/bindings/v8/custom/V8LocationCustom.cpp
index 6068aa2..ac305c9 100644
--- a/WebCore/bindings/v8/custom/V8LocationCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8LocationCustom.cpp
@@ -292,7 +292,19 @@ v8::Handle<v8::Value> V8Location::replaceCallback(const v8::Arguments& args)
     INC_STATS("DOM.Location.replace");
     v8::Handle<v8::Object> holder = args.Holder();
     Location* imp = V8Location::toNative(holder);
-    V8Binding::Location::replace(V8BindingState::Only(), imp, toWebCoreString(args[0]));
+
+    Frame* frame = imp->frame();
+    if (!frame)
+        return v8::Undefined();
+
+    KURL url = completeURL(toWebCoreString(args[0]));
+    if (url.isNull())
+        return v8::Undefined();
+
+    if (!shouldAllowNavigation(frame))
+        return v8::Undefined();
+
+    navigateIfAllowed(frame, url, true, true);
     return v8::Undefined();
 }
 
@@ -366,3 +378,4 @@ v8::Handle<v8::Value> toV8(Location* impl)
 }
 
 }  // namespace WebCore
+
diff --git a/WebCore/bindings/v8/specialization/V8BindingState.cpp b/WebCore/bindings/v8/specialization/V8BindingState.cpp
index 2193c9f..ccdd7c8 100644
--- a/WebCore/bindings/v8/specialization/V8BindingState.cpp
+++ b/WebCore/bindings/v8/specialization/V8BindingState.cpp
@@ -84,9 +84,4 @@ bool State<V8Binding>::processingUserGesture()
     return ScriptController::processingUserGesture();
 }
 
-bool State<V8Binding>::allowsAccessFromFrame(Frame* frame)
-{
-    return ScriptController::isSafeScript(frame);
-}
-
 } // namespace WebCore
diff --git a/WebCore/bindings/v8/specialization/V8BindingState.h b/WebCore/bindings/v8/specialization/V8BindingState.h
index 14305b8..baba0c6 100644
--- a/WebCore/bindings/v8/specialization/V8BindingState.h
+++ b/WebCore/bindings/v8/specialization/V8BindingState.h
@@ -60,9 +60,6 @@ public:
 
     bool processingUserGesture();
 
-    // FIXME: This should be shared in BindingSecurity
-    bool allowsAccessFromFrame(Frame*);
-
 private:
     explicit State() {}
     ~State();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list