+2012-04-12 Adam Barth <abarth@webkit.org>
+
+ 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 <leviw@chromium.org>
Prepare functions in LengthFunctions.h for LayoutUnits
setSecurityToken();
}
-void V8DOMWindowShell::setLocation(DOMWindow* window, const String& locationString)
-{
- State<V8Binding>* state = V8BindingState::Only();
- window->setLocation(locationString, state->activeWindow(), state->firstWindow());
-}
-
} // WebCore
#include "DOMWindow.h"
#include "Frame.h"
+#include "Location.h"
#include "V8Binding.h"
+#include "V8BindingState.h"
#include "V8Location.h"
#include "V8Proxy.h"
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