summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/js/JSDOMWindowCustom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/js/JSDOMWindowCustom.cpp')
-rw-r--r--WebCore/bindings/js/JSDOMWindowCustom.cpp68
1 files changed, 13 insertions, 55 deletions
diff --git a/WebCore/bindings/js/JSDOMWindowCustom.cpp b/WebCore/bindings/js/JSDOMWindowCustom.cpp
index 252ea93..2ad71f0 100644
--- a/WebCore/bindings/js/JSDOMWindowCustom.cpp
+++ b/WebCore/bindings/js/JSDOMWindowCustom.cpp
@@ -20,7 +20,6 @@
#include "config.h"
#include "JSDOMWindowCustom.h"
-#include "AtomicString.h"
#include "Chrome.h"
#include "DOMWindow.h"
#include "Document.h"
@@ -87,6 +86,7 @@
#include <runtime/JSFunction.h>
#include <runtime/JSObject.h>
#include <runtime/PrototypeFunction.h>
+#include <wtf/text/AtomicString.h>
using namespace JSC;
@@ -271,7 +271,7 @@ bool JSDOMWindow::getOwnPropertySlot(ExecState* exec, const Identifier& property
// allow window[1] or parent[1] etc. (#56983)
bool ok;
- unsigned i = propertyName.toArrayIndex(&ok);
+ unsigned i = propertyName.toArrayIndex(ok);
if (ok && i < impl()->frame()->tree()->childCount()) {
slot.setCustomIndex(this, i, indexGetter);
return true;
@@ -345,7 +345,7 @@ bool JSDOMWindow::getOwnPropertyDescriptor(ExecState* exec, const Identifier& pr
}
bool ok;
- unsigned i = propertyName.toArrayIndex(&ok);
+ unsigned i = propertyName.toArrayIndex(ok);
if (ok && i < impl()->frame()->tree()->childCount()) {
PropertySlot slot;
slot.setCustomIndex(this, i, indexGetter);
@@ -512,7 +512,7 @@ void JSDOMWindow::setLocation(ExecState* exec, JSValue value)
if (!protocolIsJavaScript(url) || allowsAccessFrom(exec)) {
// We want a new history item if this JS was called via a user gesture
- frame->redirectScheduler()->scheduleLocationChange(url, lexicalFrame->loader()->outgoingReferrer(), !lexicalFrame->script()->anyPageIsProcessingUserGesture(), false, processingUserGesture(exec));
+ frame->redirectScheduler()->scheduleLocationChange(url, lexicalFrame->loader()->outgoingReferrer(), !lexicalFrame->script()->anyPageIsProcessingUserGesture(), false, processingUserGesture());
}
}
@@ -606,47 +606,6 @@ JSValue JSDOMWindow::float32Array(ExecState* exec) const
return getDOMConstructor<JSFloat32ArrayConstructor>(exec, this);
}
-// Temporary aliases to keep current WebGL content working during transition period to TypedArray spec.
-// To be removed before WebGL spec is finalized. (FIXME)
-JSValue JSDOMWindow::webGLArrayBuffer(ExecState* exec) const
-{
- return getDOMConstructor<JSArrayBufferConstructor>(exec, this);
-}
-
-JSValue JSDOMWindow::webGLByteArray(ExecState* exec) const
-{
- return getDOMConstructor<JSInt8ArrayConstructor>(exec, this);
-}
-
-JSValue JSDOMWindow::webGLUnsignedByteArray(ExecState* exec) const
-{
- return getDOMConstructor<JSUint8ArrayConstructor>(exec, this);
-}
-
-JSValue JSDOMWindow::webGLIntArray(ExecState* exec) const
-{
- return getDOMConstructor<JSInt32ArrayConstructor>(exec, this);
-}
-
-JSValue JSDOMWindow::webGLUnsignedIntArray(ExecState* exec) const
-{
- return getDOMConstructor<JSUint32ArrayConstructor>(exec, this);
-}
-
-JSValue JSDOMWindow::webGLShortArray(ExecState* exec) const
-{
- return getDOMConstructor<JSInt16ArrayConstructor>(exec, this);
-}
-
-JSValue JSDOMWindow::webGLUnsignedShortArray(ExecState* exec) const
-{
- return getDOMConstructor<JSUint16ArrayConstructor>(exec, this);
-}
-
-JSValue JSDOMWindow::webGLFloatArray(ExecState* exec) const
-{
- return getDOMConstructor<JSFloat32ArrayConstructor>(exec, this);
-}
#endif
JSValue JSDOMWindow::xmlHttpRequest(ExecState* exec) const
@@ -724,10 +683,9 @@ static Frame* createWindow(ExecState* exec, Frame* lexicalFrame, Frame* dynamicF
// We'd have to resolve all those issues to pass the URL instead of "".
bool created;
- // We pass in the opener frame here so it can be used for looking up the frame name, in case the active frame
- // is different from the opener frame, and the name references a frame relative to the opener frame, for example
- // "_self" or "_parent".
- Frame* newFrame = lexicalFrame->loader()->createWindow(openerFrame->loader(), frameRequest, windowFeatures, created);
+ // We pass the opener frame for the lookupFrame in case the active frame is different from
+ // the opener frame, and the name references a frame relative to the opener frame.
+ Frame* newFrame = createWindow(lexicalFrame, openerFrame, frameRequest, windowFeatures, created);
if (!newFrame)
return 0;
@@ -742,7 +700,7 @@ static Frame* createWindow(ExecState* exec, Frame* lexicalFrame, Frame* dynamicF
if (!protocolIsJavaScript(url) || newWindow->allowsAccessFrom(exec)) {
KURL completedURL = url.isEmpty() ? KURL(ParsedURLString, "") : completeURL(exec, url);
- bool userGesture = processingUserGesture(exec);
+ bool userGesture = processingUserGesture();
if (created)
newFrame->loader()->changeLocation(completedURL, referrer, false, false, userGesture);
@@ -753,10 +711,10 @@ static Frame* createWindow(ExecState* exec, Frame* lexicalFrame, Frame* dynamicF
return newFrame;
}
-static bool domWindowAllowPopUp(Frame* activeFrame, ExecState* exec)
+static bool domWindowAllowPopUp(Frame* activeFrame)
{
ASSERT(activeFrame);
- if (activeFrame->script()->processingUserGesture(currentWorld(exec)))
+ if (ScriptController::processingUserGesture())
return true;
return DOMWindow::allowPopUp(activeFrame);
}
@@ -781,7 +739,7 @@ JSValue JSDOMWindow::open(ExecState* exec)
// Because FrameTree::find() returns true for empty strings, we must check for empty framenames.
// Otherwise, illegitimate window.open() calls with no name will pass right through the popup blocker.
- if (!domWindowAllowPopUp(dynamicFrame, exec) && (frameName.isEmpty() || !frame->tree()->find(frameName)))
+ if (!domWindowAllowPopUp(dynamicFrame) && (frameName.isEmpty() || !frame->tree()->find(frameName)))
return jsUndefined();
// Get the target frame for the special cases of _top and _parent. In those
@@ -805,7 +763,7 @@ JSValue JSDOMWindow::open(ExecState* exec)
const JSDOMWindow* targetedWindow = toJSDOMWindow(frame, currentWorld(exec));
if (!completedURL.isEmpty() && (!protocolIsJavaScript(completedURL) || (targetedWindow && targetedWindow->allowsAccessFrom(exec)))) {
- bool userGesture = processingUserGesture(exec);
+ bool userGesture = processingUserGesture();
// For whatever reason, Firefox uses the dynamicGlobalObject to
// determine the outgoingReferrer. We replicate that behavior
@@ -851,7 +809,7 @@ JSValue JSDOMWindow::showModalDialog(ExecState* exec)
if (!dynamicFrame)
return jsUndefined();
- if (!DOMWindow::canShowModalDialogNow(frame) || !domWindowAllowPopUp(dynamicFrame, exec))
+ if (!DOMWindow::canShowModalDialogNow(frame) || !domWindowAllowPopUp(dynamicFrame))
return jsUndefined();
HashMap<String, String> features;