Title: [114080] trunk/Source/WebCore
- Revision
- 114080
- Author
- [email protected]
- Date
- 2012-04-12 21:39:58 -0700 (Thu, 12 Apr 2012)
Log Message
Remove V8DOMWindowShell::setLocation
https://bugs.webkit.org/show_bug.cgi?id=83833
Reviewed by Eric Seidel.
V8DOMWindowShell::setLocation is only used by document.location. It's
more direct for document.location to call Location::setHref directly.
This integrates correctly with the navigation rules for
<iframe seamless>.
(See https://github.com/eseidel/webkit/compare/master...seamless for
more context about the connection with seamless.)
Reviewed on GitHub:
https://github.com/abarth/webkit/commit/48601729d53a6ac39df5a43b22218c91330c3f61
* bindings/v8/V8DOMWindowShell.cpp:
(WebCore):
* bindings/v8/V8DOMWindowShell.h:
(V8DOMWindowShell):
* bindings/v8/custom/V8DocumentLocationCustom.cpp:
(WebCore::V8Document::locationAccessorSetter):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (114079 => 114080)
--- trunk/Source/WebCore/ChangeLog 2012-04-13 04:19:42 UTC (rev 114079)
+++ trunk/Source/WebCore/ChangeLog 2012-04-13 04:39:58 UTC (rev 114080)
@@ -1,3 +1,28 @@
+2012-04-12 Adam Barth <[email protected]>
+
+ Remove V8DOMWindowShell::setLocation
+ https://bugs.webkit.org/show_bug.cgi?id=83833
+
+ Reviewed by Eric Seidel.
+
+ V8DOMWindowShell::setLocation is only used by document.location. It's
+ more direct for document.location to call Location::setHref directly.
+ This integrates correctly with the navigation rules for
+ <iframe seamless>.
+
+ (See https://github.com/eseidel/webkit/compare/master...seamless for
+ more context about the connection with seamless.)
+
+ Reviewed on GitHub:
+ https://github.com/abarth/webkit/commit/48601729d53a6ac39df5a43b22218c91330c3f61
+
+ * bindings/v8/V8DOMWindowShell.cpp:
+ (WebCore):
+ * bindings/v8/V8DOMWindowShell.h:
+ (V8DOMWindowShell):
+ * bindings/v8/custom/V8DocumentLocationCustom.cpp:
+ (WebCore::V8Document::locationAccessorSetter):
+
2012-04-12 Levi Weintraub <[email protected]>
Prepare functions in LengthFunctions.h for LayoutUnits
Modified: trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp (114079 => 114080)
--- trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp 2012-04-13 04:19:42 UTC (rev 114079)
+++ trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp 2012-04-13 04:39:58 UTC (rev 114080)
@@ -594,10 +594,4 @@
setSecurityToken();
}
-void V8DOMWindowShell::setLocation(DOMWindow* window, const String& locationString)
-{
- State<V8Binding>* state = V8BindingState::Only();
- window->setLocation(locationString, state->activeWindow(), state->firstWindow());
-}
-
} // WebCore
Modified: trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.h (114079 => 114080)
--- trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.h 2012-04-13 04:19:42 UTC (rev 114079)
+++ trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.h 2012-04-13 04:39:58 UTC (rev 114080)
@@ -78,8 +78,6 @@
void destroyGlobal();
- static void setLocation(DOMWindow*, const String& relativeURL);
-
V8BindingPerContextData* perContextData() { return m_perContextData.get(); }
private:
Modified: trunk/Source/WebCore/bindings/v8/custom/V8DocumentLocationCustom.cpp (114079 => 114080)
--- trunk/Source/WebCore/bindings/v8/custom/V8DocumentLocationCustom.cpp 2012-04-13 04:19:42 UTC (rev 114079)
+++ trunk/Source/WebCore/bindings/v8/custom/V8DocumentLocationCustom.cpp 2012-04-13 04:39:58 UTC (rev 114080)
@@ -26,7 +26,9 @@
#include "DOMWindow.h"
#include "Frame.h"
+#include "Location.h"
#include "V8Binding.h"
+#include "V8BindingState.h"
#include "V8Location.h"
#include "V8Proxy.h"
@@ -48,9 +50,19 @@
if (!document->frame())
return;
+ State<V8Binding>* state = V8BindingState::Only();
+
+ DOMWindow* activeWindow = state->activeWindow();
+ if (!activeWindow)
+ return;
+
+ DOMWindow* firstWindow = state->firstWindow();
+ if (!firstWindow)
+ return;
+
DOMWindow* window = document->frame()->domWindow();
- // setLocation does security checks. // XXXMB- verify!
- V8DOMWindowShell::setLocation(window, toWebCoreString(value));
+ if (Location* location = window->location())
+ location->setHref(toWebCoreString(value), activeWindow, firstWindow);
}
} // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes