Reviewed by Geoff Garen.
Fix for http://bugs.webkit.org/show_bug.cgi?id=17419
Remove CompatMode from JavaScriptCore as it is never set to anything other than NativeMode
* kjs/JSGlobalObject.cpp:
(KJS::JSGlobalObject::init):
* kjs/JSGlobalObject.h:
(KJS::JSGlobalObject::setDebugger):
* kjs/date_object.cpp:
(KJS::dateProtoFuncGetYear):
WebCore:
Reviewed by Geoff Garen.
Fix for http://bugs.webkit.org/show_bug.cgi?id=17419
Remove CompatMode from JavaScriptCore as it is never set to anything other than NativeMode
* bindings/js/kjs_proxy.cpp:
(WebCore::KJSProxy::initScript):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30387
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2008-02-18 Samuel Weinig <sam@webkit.org>
+
+ Reviewed by Geoff Garen.
+
+ Fix for http://bugs.webkit.org/show_bug.cgi?id=17419
+ Remove CompatMode from JavaScriptCore as it is never set to anything other than NativeMode
+
+ * kjs/JSGlobalObject.cpp:
+ (KJS::JSGlobalObject::init):
+ * kjs/JSGlobalObject.h:
+ (KJS::JSGlobalObject::setDebugger):
+ * kjs/date_object.cpp:
+ (KJS::dateProtoFuncGetYear):
+
2008-02-18 Darin Adler <darin@apple.com>
Reviewed by Sam.
} else
s_head = d()->next = d()->prev = this;
- d()->compatMode = NativeMode;
-
resetTimeoutCheck();
d()->timeoutTime = 0;
d()->timeoutCheckCount = 0;
class UriErrorPrototype;
struct ActivationStackNode;
- enum CompatMode { NativeMode, IECompat, NetscapeCompat };
-
class JSGlobalObject : public JSVariableObject {
protected:
using JSVariableObject::JSVariableObjectData;
JSGlobalObject* prev;
Debugger* debugger;
- CompatMode compatMode;
GlobalExecState globalExec;
int recursion;
Debugger* debugger() const { return d()->debugger; }
void setDebugger(Debugger* debugger) { d()->debugger = debugger; }
-
- // FIXME: Let's just pick one compatible behavior and go with it.
- void setCompatMode(CompatMode mode) { d()->compatMode = mode; }
- CompatMode compatMode() const { return d()->compatMode; }
int recursion() { return d()->recursion; }
void incRecursion() { ++d()->recursion; }
GregorianDateTime t;
msToGregorianDateTime(milli, utc, t);
- // IE returns the full year even in getYear.
- if (exec->dynamicGlobalObject()->compatMode() == IECompat)
- return jsNumber(1900 + t.year);
+ // NOTE: IE returns the full year even in getYear.
return jsNumber(t.year);
}
+2008-02-18 Samuel Weinig <sam@webkit.org>
+
+ Reviewed by Geoff Garen.
+
+ Fix for http://bugs.webkit.org/show_bug.cgi?id=17419
+ Remove CompatMode from JavaScriptCore as it is never set to anything other than NativeMode
+
+ * bindings/js/kjs_proxy.cpp:
+ (WebCore::KJSProxy::initScript):
+
2008-02-18 Alp Toker <alp@atoker.com>
Reviewed by Mark Rowe.
/*
* Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
* Copyright (C) 2001 Peter Kelly (pmk@post.com)
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
m_globalObject = new JSDOMWindow(m_frame->domWindow());
- // FIXME: We can get rid of this (and eliminate compatMode entirely).
- String userAgent = m_frame->loader()->userAgent(m_frame->document() ? m_frame->document()->url() : KURL());
- if (userAgent.find("Microsoft") >= 0 || userAgent.find("MSIE") >= 0)
- m_globalObject->setCompatMode(IECompat);
- else {
- // If we find "Mozilla" but not "(compatible, ...)" we are a real Netscape
- if (userAgent.find("Mozilla") >= 0 && userAgent.find("compatible") == -1)
- m_globalObject->setCompatMode(NetscapeCompat);
- }
-
m_frame->loader()->dispatchWindowObjectAvailable();
}