From 85628b1798ec4c98333c8f4529f5d5628f3f1bbb Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 18 Feb 2010 13:47:38 +0100 Subject: qdoc: Added "Inherited by" list to QML elements. But the listed elements are not links yet, just plain text. Task: QTBUG-8153 --- tools/qdoc3/cppcodeparser.cpp | 13 ++++-------- tools/qdoc3/htmlgenerator.cpp | 46 +++++++++++++++++++++++++++++++++++++++++++ tools/qdoc3/htmlgenerator.h | 1 + tools/qdoc3/node.cpp | 20 +++++++++++++++++++ tools/qdoc3/node.h | 6 +++++- 5 files changed, 76 insertions(+), 10 deletions(-) diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index c8655a4..021d64a 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -1033,7 +1033,10 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc, #ifdef QDOC_QML else if (command == COMMAND_QMLINHERITS) { setLink(node, Node::InheritsLink, arg); - } + if (node->subType() == Node::QmlClass) { + QmlClassNode::addInheritedBy(arg,node->name()); + } + } else if (command == COMMAND_QMLDEFAULT) { QmlPropGroupNode* qpgn = static_cast(node); qpgn->setDefault(); @@ -2299,14 +2302,6 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake) QString imagesPath = fullPath + "/images"; QStringList imageFiles = Config::getFilesHere(imagesPath,exampleImageFilter); -#if 0 - qDebug() << "examplePath:" << examplePath; - qDebug() << " exampleFiles" << exampleFiles; - qDebug() << "imagesPath:" << imagesPath; - qDebug() << "fullPath:" << fullPath; - qDebug() << " imageFiles" << imageFiles; -#endif - if (!exampleFiles.isEmpty()) { // move main.cpp and to the end, if it exists QString mainCpp; diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index e341a03..01e79dd 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -1525,6 +1525,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) generateQmlInherits(qml_cn, marker); generateQmlInstantiates(qml_cn, marker); generateBrief(qml_cn, marker); + generateQmlInheritedBy(qml_cn, marker); sections = marker->qmlSections(qml_cn,CodeMarker::Summary); s = sections.begin(); while (s != sections.end()) { @@ -4309,6 +4310,51 @@ void HtmlGenerator::generateQmlInherits(const QmlClassNode* cn, } /*! + Output the "Inherit by" list for the QML element, + if it is inherited by any other elements. + */ +void HtmlGenerator::generateQmlInheritedBy(const QmlClassNode* cn, + CodeMarker* marker) +{ + if (cn) { + QStringList subs; + QmlClassNode::subclasses(cn->name(),subs); + if (!subs.isEmpty()) { + subs.sort(); + Text text; + text << Atom::ParaLeft << "Inherited by "; + for (int i = 0; i < subs.size(); ++i) { + text << subs.at(i); + text << separator(i, subs.size()); + } + text << Atom::ParaRight; + generateText(text, cn, marker); + } +#if 0 + if (cn->links().contains(Node::InheritsLink)) { + QPair linkPair; + linkPair = cn->links()[Node::InheritsLink]; + QStringList strList(linkPair.first); + const Node* n = myTree->findNode(strList,Node::Fake); + if (n && n->subType() == Node::QmlClass) { + const QmlClassNode* qcn = static_cast(n); + out() << "

"; + Text text; + text << "[Inherits "; + text << Atom(Atom::LinkNode,CodeMarker::stringForNode(qcn)); + text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK); + text << Atom(Atom::String, linkPair.second); + text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK); + text << "]"; + generateText(text, cn, marker); + out() << "

"; + } + } +#endif + } +} + +/*! Output the "[Xxx instantiates the C++ class QmlGraphicsXxx]" line for the QML element, if there should be one. diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index 369d6c3..551bead 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -185,6 +185,7 @@ class HtmlGenerator : public PageGenerator const InnerNode *relative, CodeMarker *marker); void generateQmlInherits(const QmlClassNode* cn, CodeMarker* marker); + void generateQmlInheritedBy(const QmlClassNode* cn, CodeMarker* marker); void generateQmlInstantiates(const QmlClassNode* qcn, CodeMarker* marker); void generateInstantiatedBy(const ClassNode* cn, CodeMarker* marker); #endif diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index ec574f8..4ddcfb1 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -1257,6 +1257,7 @@ bool TargetNode::isInnerNode() const #ifdef QDOC_QML bool QmlClassNode::qmlOnly = false; +QMultiMap QmlClassNode::inheritedBy; /*! Constructs a Qml class node (i.e. a Fake node with the @@ -1290,6 +1291,25 @@ QString QmlClassNode::fileBase() const } /*! + Record the fact that QML class \a base is inherited by + QML class \a sub. + */ +void QmlClassNode::addInheritedBy(const QString& base, const QString& sub) +{ + inheritedBy.insert(base,sub); +} + +/*! + Loads the list \a subs with the names of all the subclasses of \a base. + */ +void QmlClassNode::subclasses(const QString& base, QStringList& subs) +{ + subs.clear(); + if (inheritedBy.contains(base)) + subs = inheritedBy.values(base); +} + +/*! Constructs a Qml basic type node (i.e. a Fake node with the subtype QmlBasicType. The new node has the given \a parent and \a name. diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h index 021a052..de26025 100644 --- a/tools/qdoc3/node.h +++ b/tools/qdoc3/node.h @@ -383,11 +383,15 @@ class QmlClassNode : public FakeNode const ClassNode* classNode() const { return cnode; } virtual QString fileBase() const; + static void addInheritedBy(const QString& base, const QString& sub); + static void subclasses(const QString& base, QStringList& subs); + public: static bool qmlOnly; + static QMultiMap inheritedBy; private: - const ClassNode* cnode; + const ClassNode* cnode; }; class QmlBasicTypeNode : public FakeNode -- cgit v0.12 From 8865e9cd3389956f2e5909a1261566f21eef128f Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Thu, 18 Feb 2010 12:15:00 +0100 Subject: Cleanup: Move exception helper functions to QScriptEnginePrivate Because that's where they belong. Reviewed-by: Jedrzej Nowacki --- src/script/api/qscriptengine_p.h | 7 +++-- src/script/api/qscriptvalue.cpp | 60 ++++++++++++++++++++-------------------- src/script/api/qscriptvalue_p.h | 3 -- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h index 6780b2c..86ac5df 100644 --- a/src/script/api/qscriptengine_p.h +++ b/src/script/api/qscriptengine_p.h @@ -177,6 +177,9 @@ public: void agentDeleted(QScriptEngineAgent *agent); + static inline void saveException(JSC::ExecState *, JSC::JSValue *); + static inline void restoreException(JSC::ExecState *, JSC::JSValue); + void setCurrentException(QScriptValue exception) { m_currentException = exception; } QScriptValue currentException() const { return m_currentException; } void clearCurrentException() { m_currentException.d_ptr.reset(); } @@ -514,7 +517,7 @@ inline void QScriptValuePrivate::operator delete(void *ptr) qFree(d); } -inline void QScriptValuePrivate::saveException(JSC::ExecState *exec, JSC::JSValue *val) +inline void QScriptEnginePrivate::saveException(JSC::ExecState *exec, JSC::JSValue *val) { if (exec) { *val = exec->exception(); @@ -524,7 +527,7 @@ inline void QScriptValuePrivate::saveException(JSC::ExecState *exec, JSC::JSValu } } -inline void QScriptValuePrivate::restoreException(JSC::ExecState *exec, JSC::JSValue val) +inline void QScriptEnginePrivate::restoreException(JSC::ExecState *exec, JSC::JSValue val) { if (exec && val) exec->setException(val); diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index 5bfe46a..1faade9 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -910,9 +910,9 @@ QScriptValue ToPrimitive(const QScriptValue &object, JSC::PreferredPrimitiveType Q_ASSERT(pp->engine != 0); JSC::ExecState *exec = pp->engine->currentFrame; JSC::JSValue savedException; - QScriptValuePrivate::saveException(exec, &savedException); + QScriptEnginePrivate::saveException(exec, &savedException); JSC::JSValue result = JSC::asObject(pp->jscValue)->toPrimitive(exec, hint); - QScriptValuePrivate::restoreException(exec, savedException); + QScriptEnginePrivate::restoreException(exec, savedException); return pp->engine->scriptValueFromJSCValue(result); } @@ -1103,9 +1103,9 @@ bool QScriptValue::equals(const QScriptValue &other) const if (eng_p) { JSC::ExecState *exec = eng_p->currentFrame; JSC::JSValue savedException; - QScriptValuePrivate::saveException(exec, &savedException); + QScriptEnginePrivate::saveException(exec, &savedException); bool result = JSC::JSValue::equal(exec, d->jscValue, other.d_ptr->jscValue); - QScriptValuePrivate::restoreException(exec, savedException); + QScriptEnginePrivate::restoreException(exec, savedException); return result; } } @@ -1192,16 +1192,16 @@ QString QScriptValue::toString() const case QScriptValuePrivate::JavaScriptCore: { JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0; JSC::JSValue savedException; - QScriptValuePrivate::saveException(exec, &savedException); + QScriptEnginePrivate::saveException(exec, &savedException); JSC::UString str = d->jscValue.toString(exec); if (exec && exec->hadException() && !str.size()) { JSC::JSValue savedException2; - QScriptValuePrivate::saveException(exec, &savedException2); + QScriptEnginePrivate::saveException(exec, &savedException2); str = savedException2.toString(exec); - QScriptValuePrivate::restoreException(exec, savedException2); + QScriptEnginePrivate::restoreException(exec, savedException2); } if (savedException) - QScriptValuePrivate::restoreException(exec, savedException); + QScriptEnginePrivate::restoreException(exec, savedException); return str; } case QScriptValuePrivate::Number: @@ -1233,9 +1233,9 @@ qsreal QScriptValue::toNumber() const case QScriptValuePrivate::JavaScriptCore: { JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0; JSC::JSValue savedException; - QScriptValuePrivate::saveException(exec, &savedException); + QScriptEnginePrivate::saveException(exec, &savedException); qsreal result = d->jscValue.toNumber(exec); - QScriptValuePrivate::restoreException(exec, savedException); + QScriptEnginePrivate::restoreException(exec, savedException); return result; } case QScriptValuePrivate::Number: @@ -1260,9 +1260,9 @@ bool QScriptValue::toBoolean() const case QScriptValuePrivate::JavaScriptCore: { JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0; JSC::JSValue savedException; - QScriptValuePrivate::saveException(exec, &savedException); + QScriptEnginePrivate::saveException(exec, &savedException); bool result = d->jscValue.toBoolean(exec); - QScriptValuePrivate::restoreException(exec, savedException); + QScriptEnginePrivate::restoreException(exec, savedException); return result; } case QScriptValuePrivate::Number: @@ -1296,9 +1296,9 @@ bool QScriptValue::toBool() const case QScriptValuePrivate::JavaScriptCore: { JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0; JSC::JSValue savedException; - QScriptValuePrivate::saveException(exec, &savedException); + QScriptEnginePrivate::saveException(exec, &savedException); bool result = d->jscValue.toBoolean(exec); - QScriptValuePrivate::restoreException(exec, savedException); + QScriptEnginePrivate::restoreException(exec, savedException); return result; } case QScriptValuePrivate::Number: @@ -1330,9 +1330,9 @@ qint32 QScriptValue::toInt32() const case QScriptValuePrivate::JavaScriptCore: { JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0; JSC::JSValue savedException; - QScriptValuePrivate::saveException(exec, &savedException); + QScriptEnginePrivate::saveException(exec, &savedException); qint32 result = d->jscValue.toInt32(exec); - QScriptValuePrivate::restoreException(exec, savedException); + QScriptEnginePrivate::restoreException(exec, savedException); return result; } case QScriptValuePrivate::Number: @@ -1364,9 +1364,9 @@ quint32 QScriptValue::toUInt32() const case QScriptValuePrivate::JavaScriptCore: { JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0; JSC::JSValue savedException; - QScriptValuePrivate::saveException(exec, &savedException); + QScriptEnginePrivate::saveException(exec, &savedException); quint32 result = d->jscValue.toUInt32(exec); - QScriptValuePrivate::restoreException(exec, savedException); + QScriptEnginePrivate::restoreException(exec, savedException); return result; } case QScriptValuePrivate::Number: @@ -1428,9 +1428,9 @@ qsreal QScriptValue::toInteger() const case QScriptValuePrivate::JavaScriptCore: { JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0; JSC::JSValue savedException; - QScriptValuePrivate::saveException(exec, &savedException); + QScriptEnginePrivate::saveException(exec, &savedException); qsreal result = d->jscValue.toInteger(exec); - QScriptValuePrivate::restoreException(exec, savedException); + QScriptEnginePrivate::restoreException(exec, savedException); return result; } case QScriptValuePrivate::Number: @@ -1490,9 +1490,9 @@ QVariant QScriptValue::toVariant() const // try to convert to primitive JSC::ExecState *exec = d->engine->currentFrame; JSC::JSValue savedException; - QScriptValuePrivate::saveException(exec, &savedException); + QScriptEnginePrivate::saveException(exec, &savedException); JSC::JSValue prim = d->jscValue.toPrimitive(exec); - QScriptValuePrivate::restoreException(exec, savedException); + QScriptEnginePrivate::restoreException(exec, savedException); if (!prim.isObject()) return d->engine->scriptValueFromJSCValue(prim).toVariant(); } else if (isNumber()) { @@ -1882,12 +1882,12 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject, JSC::ArgList jscArgs(argsVector.data(), argsVector.size()); JSC::JSValue savedException; - QScriptValuePrivate::saveException(exec, &savedException); + QScriptEnginePrivate::saveException(exec, &savedException); JSC::JSValue result = JSC::call(exec, callee, callType, callData, jscThisObject, jscArgs); if (exec->hadException()) { result = exec->exception(); } else { - QScriptValuePrivate::restoreException(exec, savedException); + QScriptEnginePrivate::restoreException(exec, savedException); } return d->engine->scriptValueFromJSCValue(result); } @@ -1963,12 +1963,12 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject, } JSC::JSValue savedException; - QScriptValuePrivate::saveException(exec, &savedException); + QScriptEnginePrivate::saveException(exec, &savedException); JSC::JSValue result = JSC::call(exec, callee, callType, callData, jscThisObject, applyArgs); if (exec->hadException()) { result = exec->exception(); } else { - QScriptValuePrivate::restoreException(exec, savedException); + QScriptEnginePrivate::restoreException(exec, savedException); } return d->engine->scriptValueFromJSCValue(result); } @@ -2015,12 +2015,12 @@ QScriptValue QScriptValue::construct(const QScriptValueList &args) JSC::ArgList jscArgs(argsVector.data(), argsVector.size()); JSC::JSValue savedException; - QScriptValuePrivate::saveException(exec, &savedException); + QScriptEnginePrivate::saveException(exec, &savedException); JSC::JSObject *result = JSC::construct(exec, callee, constructType, constructData, jscArgs); if (exec->hadException()) { result = JSC::asObject(exec->exception()); } else { - QScriptValuePrivate::restoreException(exec, savedException); + QScriptEnginePrivate::restoreException(exec, savedException); } return d->engine->scriptValueFromJSCValue(result); } @@ -2074,13 +2074,13 @@ QScriptValue QScriptValue::construct(const QScriptValue &arguments) } JSC::JSValue savedException; - QScriptValuePrivate::saveException(exec, &savedException); + QScriptEnginePrivate::saveException(exec, &savedException); JSC::JSObject *result = JSC::construct(exec, callee, constructType, constructData, applyArgs); if (exec->hadException()) { if (exec->exception().isObject()) result = JSC::asObject(exec->exception()); } else { - QScriptValuePrivate::restoreException(exec, savedException); + QScriptEnginePrivate::restoreException(exec, savedException); } return d->engine->scriptValueFromJSCValue(result); } diff --git a/src/script/api/qscriptvalue_p.h b/src/script/api/qscriptvalue_p.h index 7440d21..76fbc18 100644 --- a/src/script/api/qscriptvalue_p.h +++ b/src/script/api/qscriptvalue_p.h @@ -109,9 +109,6 @@ public: return -1; } - static inline void saveException(JSC::ExecState*, JSC::JSValue*); - static inline void restoreException(JSC::ExecState*, JSC::JSValue); - QScriptEnginePrivate *engine; Type type; JSC::JSValue jscValue; -- cgit v0.12 From c86e7dfb0f6bcc0821ece5cf42a793d164d3f7a2 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Thu, 18 Feb 2010 12:25:50 +0100 Subject: Move some helper function declarations outside QT_NO_QOBJECT guard These are not dependent on QObject, I don't know how they ended up inside there. Reviewed-by: Jedrzej Nowacki --- src/script/api/qscriptengine_p.h | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h index 86ac5df..9a357e5 100644 --- a/src/script/api/qscriptengine_p.h +++ b/src/script/api/qscriptengine_p.h @@ -184,6 +184,20 @@ public: QScriptValue currentException() const { return m_currentException; } void clearCurrentException() { m_currentException.d_ptr.reset(); } + static QScriptSyntaxCheckResult checkSyntax(const QString &program); + static bool canEvaluate(const QString &program); + + inline QScriptValuePrivate *allocateScriptValuePrivate(size_t); + inline void freeScriptValuePrivate(QScriptValuePrivate *p); + + inline void registerScriptValue(QScriptValuePrivate *value); + inline void unregisterScriptValue(QScriptValuePrivate *value); + void detachAllRegisteredScriptValues(); + + inline void registerScriptString(QScriptStringPrivate *value); + inline void unregisterScriptString(QScriptStringPrivate *value); + void detachAllRegisteredScriptStrings(); + #ifndef QT_NO_QOBJECT JSC::JSValue newQObject(QObject *object, QScriptEngine::ValueOwnership ownership = QScriptEngine::QtOwnership, @@ -191,8 +205,6 @@ public: JSC::JSValue newQMetaObject(const QMetaObject *metaObject, JSC::JSValue ctor); - static QScriptSyntaxCheckResult checkSyntax(const QString &program); - static bool canEvaluate(const QString &program); static bool convertToNativeQObject(const QScriptValue &value, const QByteArray &targetType, void **result); @@ -223,17 +235,6 @@ public: bool scriptDisconnect(JSC::JSValue signal, JSC::JSValue receiver, JSC::JSValue function); - inline QScriptValuePrivate *allocateScriptValuePrivate(size_t); - inline void freeScriptValuePrivate(QScriptValuePrivate *p); - - inline void registerScriptValue(QScriptValuePrivate *value); - inline void unregisterScriptValue(QScriptValuePrivate *value); - void detachAllRegisteredScriptValues(); - - inline void registerScriptString(QScriptStringPrivate *value); - inline void unregisterScriptString(QScriptStringPrivate *value); - void detachAllRegisteredScriptStrings(); - // private slots void _q_objectDestroyed(QObject *); #endif -- cgit v0.12 From 0cad410d78758c79126d15664ec3d527883a9496 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Thu, 18 Feb 2010 12:36:32 +0100 Subject: Cleanup: Move number conversion functions to QScriptEnginePrivate Also rename ToUint{16,32} to ToUInt{16,32} to follow the Qt naming (it takes precedence over the ECMA one). Reviewed-by: Jedrzej Nowacki --- src/script/api/qscriptengine.cpp | 72 +++++++++++++++++++++++++++++++- src/script/api/qscriptengine_p.h | 5 +++ src/script/api/qscriptvalue.cpp | 88 +++------------------------------------- 3 files changed, 81 insertions(+), 84 deletions(-) diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 237b6fd..d8f7b3f 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -24,7 +24,6 @@ #include "config.h" #include "qscriptengine.h" #include "qscriptsyntaxchecker_p.h" -#include "qnumeric.h" #include "qscriptengine_p.h" #include "qscriptengineagent_p.h" @@ -41,6 +40,9 @@ #include #include +#include +#include + #include "Error.h" #include "JSArray.h" #include "JSLock.h" @@ -328,6 +330,74 @@ public: namespace QScript { +static const qsreal D32 = 4294967296.0; + +qint32 ToInt32(qsreal n) +{ + if (qIsNaN(n) || qIsInf(n) || (n == 0)) + return 0; + + qsreal sign = (n < 0) ? -1.0 : 1.0; + qsreal abs_n = fabs(n); + + n = ::fmod(sign * ::floor(abs_n), D32); + const double D31 = D32 / 2.0; + + if (sign == -1 && n < -D31) + n += D32; + + else if (sign != -1 && n >= D31) + n -= D32; + + return qint32 (n); +} + +quint32 ToUInt32(qsreal n) +{ + if (qIsNaN(n) || qIsInf(n) || (n == 0)) + return 0; + + qsreal sign = (n < 0) ? -1.0 : 1.0; + qsreal abs_n = fabs(n); + + n = ::fmod(sign * ::floor(abs_n), D32); + + if (n < 0) + n += D32; + + return quint32 (n); +} + +quint16 ToUInt16(qsreal n) +{ + static const qsreal D16 = 65536.0; + + if (qIsNaN(n) || qIsInf(n) || (n == 0)) + return 0; + + qsreal sign = (n < 0) ? -1.0 : 1.0; + qsreal abs_n = fabs(n); + + n = ::fmod(sign * ::floor(abs_n), D16); + + if (n < 0) + n += D16; + + return quint16 (n); +} + +qsreal ToInteger(qsreal n) +{ + if (qIsNaN(n)) + return 0; + + if (n == 0 || qIsInf(n)) + return n; + + int sign = n < 0 ? -1 : 1; + return sign * ::floor(::fabs(n)); +} + void GlobalClientData::mark(JSC::MarkStack& markStack) { engine->mark(markStack); diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h index 9a357e5..f55dc27 100644 --- a/src/script/api/qscriptengine_p.h +++ b/src/script/api/qscriptengine_p.h @@ -83,6 +83,11 @@ namespace QScript #endif class TimeoutCheckerProxy; + qint32 ToInt32(qsreal); + quint32 ToUInt32(qsreal); + quint16 ToUInt16(qsreal); + qsreal ToInteger(qsreal); + //some conversion helper functions inline QScriptEnginePrivate *scriptEngineFromExec(const JSC::ExecState *exec); bool isFunction(JSC::JSValue value); diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index 1faade9..e8c2050 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -180,86 +180,8 @@ \omitvalue ResolveFull Check the object's own properties first, then search the prototype chain, and finally search the scope chain. */ -// ### move - -#include -#include - QT_BEGIN_NAMESPACE -namespace QScript -{ - -static const qsreal D32 = 4294967296.0; - -qint32 ToInt32(qsreal n) -{ - if (qIsNaN(n) || qIsInf(n) || (n == 0)) - return 0; - - qsreal sign = (n < 0) ? -1.0 : 1.0; - qsreal abs_n = fabs(n); - - n = ::fmod(sign * ::floor(abs_n), D32); - const double D31 = D32 / 2.0; - - if (sign == -1 && n < -D31) - n += D32; - - else if (sign != -1 && n >= D31) - n -= D32; - - return qint32 (n); -} - -quint32 ToUint32(qsreal n) -{ - if (qIsNaN(n) || qIsInf(n) || (n == 0)) - return 0; - - qsreal sign = (n < 0) ? -1.0 : 1.0; - qsreal abs_n = fabs(n); - - n = ::fmod(sign * ::floor(abs_n), D32); - - if (n < 0) - n += D32; - - return quint32 (n); -} - -quint16 ToUint16(qsreal n) -{ - static const qsreal D16 = 65536.0; - - if (qIsNaN(n) || qIsInf(n) || (n == 0)) - return 0; - - qsreal sign = (n < 0) ? -1.0 : 1.0; - qsreal abs_n = fabs(n); - - n = ::fmod(sign * ::floor(abs_n), D16); - - if (n < 0) - n += D16; - - return quint16 (n); -} - -qsreal ToInteger(qsreal n) -{ - if (qIsNaN(n)) - return 0; - - if (n == 0 || qIsInf(n)) - return n; - - int sign = n < 0 ? -1 : 1; - return sign * ::floor(::fabs(n)); -} - -} // namespace QScript - QScriptValue QScriptValuePrivate::propertyHelper(const JSC::Identifier &id, int resolveMode) const { JSC::JSValue result; @@ -1370,9 +1292,9 @@ quint32 QScriptValue::toUInt32() const return result; } case QScriptValuePrivate::Number: - return QScript::ToUint32(d->numberValue); + return QScript::ToUInt32(d->numberValue); case QScriptValuePrivate::String: - return QScript::ToUint32(((JSC::UString)d->stringValue).toDouble()); + return QScript::ToUInt32(((JSC::UString)d->stringValue).toDouble()); } return 0; } @@ -1397,12 +1319,12 @@ quint16 QScriptValue::toUInt16() const switch (d->type) { case QScriptValuePrivate::JavaScriptCore: { // ### no equivalent function in JSC - return QScript::ToUint16(toNumber()); + return QScript::ToUInt16(toNumber()); } case QScriptValuePrivate::Number: - return QScript::ToUint16(d->numberValue); + return QScript::ToUInt16(d->numberValue); case QScriptValuePrivate::String: - return QScript::ToUint16(((JSC::UString)d->stringValue).toDouble()); + return QScript::ToUInt16(((JSC::UString)d->stringValue).toDouble()); } return 0; } -- cgit v0.12 From d65299511f80c67be4c326a91106ae273aad6d66 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Thu, 18 Feb 2010 12:59:48 +0100 Subject: Move implementation of QScriptValue construction functions to private class In preparation of getting rid of QScriptValue construction internally; the implementation should only call the private functions that operate directly on JSC::JSValues. Reviewed-by: Jedrzej Nowacki --- src/script/api/qscriptengine.cpp | 185 ++++++++++++++++++++------------------- src/script/api/qscriptengine_p.h | 39 +++++++++ 2 files changed, 133 insertions(+), 91 deletions(-) diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index d8f7b3f..988e362 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -44,11 +44,8 @@ #include #include "Error.h" -#include "JSArray.h" #include "JSLock.h" #include "Interpreter.h" -#include "DateConstructor.h" -#include "RegExpConstructor.h" #include "PrototypeFunction.h" #include "InitializeThreading.h" @@ -60,9 +57,7 @@ #include "Parser.h" #include "Operations.h" -#include "utils/qscriptdate_p.h" #include "bridge/qscriptfunction_p.h" -#include "bridge/qscriptobject_p.h" #include "bridge/qscriptclassobject_p.h" #include "bridge/qscriptvariant_p.h" #include "bridge/qscriptqobject_p.h" @@ -1497,6 +1492,92 @@ void QScriptEnginePrivate::detachAllRegisteredScriptStrings() registeredScriptStrings = 0; } +#ifndef QT_NO_REGEXP + +extern QString qt_regexp_toCanonical(const QString &, QRegExp::PatternSyntax); + +JSC::JSValue QScriptEnginePrivate::newRegExp(JSC::ExecState *exec, const QRegExp ®exp) +{ + JSC::JSValue buf[2]; + JSC::ArgList args(buf, sizeof(buf)); + + //convert the pattern to a ECMAScript pattern + QString pattern = qt_regexp_toCanonical(regexp.pattern(), regexp.patternSyntax()); + if (regexp.isMinimal()) { + QString ecmaPattern; + int len = pattern.length(); + ecmaPattern.reserve(len); + int i = 0; + const QChar *wc = pattern.unicode(); + bool inBracket = false; + while (i < len) { + QChar c = wc[i++]; + ecmaPattern += c; + switch (c.unicode()) { + case '?': + case '+': + case '*': + case '}': + if (!inBracket) + ecmaPattern += QLatin1Char('?'); + break; + case '\\': + if (i < len) + ecmaPattern += wc[i++]; + break; + case '[': + inBracket = true; + break; + case ']': + inBracket = false; + break; + default: + break; + } + } + pattern = ecmaPattern; + } + + JSC::UString jscPattern = pattern; + QString flags; + if (regexp.caseSensitivity() == Qt::CaseInsensitive) + flags.append(QLatin1Char('i')); + JSC::UString jscFlags = flags; + buf[0] = JSC::jsString(exec, jscPattern); + buf[1] = JSC::jsString(exec, jscFlags); + return JSC::constructRegExp(exec, args); +} + +#endif + +JSC::JSValue QScriptEnginePrivate::newRegExp(JSC::ExecState *exec, const QString &pattern, const QString &flags) +{ + JSC::JSValue buf[2]; + JSC::ArgList args(buf, sizeof(buf)); + JSC::UString jscPattern = pattern; + QString strippedFlags; + if (flags.contains(QLatin1Char('i'))) + strippedFlags += QLatin1Char('i'); + if (flags.contains(QLatin1Char('m'))) + strippedFlags += QLatin1Char('m'); + if (flags.contains(QLatin1Char('g'))) + strippedFlags += QLatin1Char('g'); + JSC::UString jscFlags = strippedFlags; + buf[0] = JSC::jsString(exec, jscPattern); + buf[1] = JSC::jsString(exec, jscFlags); + return JSC::constructRegExp(exec, args); +} + +JSC::JSValue QScriptEnginePrivate::newVariant(const QVariant &value) +{ + QScriptObject *obj = new (currentFrame) QScriptObject(variantWrapperObjectStructure); + obj->setDelegate(new QScript::QVariantDelegate(value)); + JSC::JSValue proto = defaultPrototype(value.userType()); + if (proto) + obj->setPrototype(proto); + return obj; +} + #ifdef QT_NO_QOBJECT QScriptEngine::QScriptEngine() @@ -1669,56 +1750,7 @@ extern QString qt_regexp_toCanonical(const QString &, QRegExp::PatternSyntax); QScriptValue QScriptEngine::newRegExp(const QRegExp ®exp) { Q_D(QScriptEngine); - JSC::ExecState* exec = d->currentFrame; - JSC::JSValue buf[2]; - JSC::ArgList args(buf, sizeof(buf)); - - //convert the pattern to a ECMAScript pattern - QString pattern = qt_regexp_toCanonical(regexp.pattern(), regexp.patternSyntax()); - if (regexp.isMinimal()) { - QString ecmaPattern; - int len = pattern.length(); - ecmaPattern.reserve(len); - int i = 0; - const QChar *wc = pattern.unicode(); - bool inBracket = false; - while (i < len) { - QChar c = wc[i++]; - ecmaPattern += c; - switch (c.unicode()) { - case '?': - case '+': - case '*': - case '}': - if (!inBracket) - ecmaPattern += QLatin1Char('?'); - break; - case '\\': - if (i < len) - ecmaPattern += wc[i++]; - break; - case '[': - inBracket = true; - break; - case ']': - inBracket = false; - break; - default: - break; - } - } - pattern = ecmaPattern; - } - - JSC::UString jscPattern = pattern; - QString flags; - if (regexp.caseSensitivity() == Qt::CaseInsensitive) - flags.append(QLatin1Char('i')); - JSC::UString jscFlags = flags; - buf[0] = JSC::jsString(exec, jscPattern); - buf[1] = JSC::jsString(exec, jscFlags); - JSC::JSObject* result = JSC::constructRegExp(exec, args); - return d->scriptValueFromJSCValue(result); + return d->scriptValueFromJSCValue(d->newRegExp(d->currentFrame, regexp)); } #endif // QT_NO_REGEXP @@ -1736,14 +1768,7 @@ QScriptValue QScriptEngine::newRegExp(const QRegExp ®exp) QScriptValue QScriptEngine::newVariant(const QVariant &value) { Q_D(QScriptEngine); - JSC::ExecState* exec = d->currentFrame; - QScriptObject *obj = new (exec) QScriptObject(d->variantWrapperObjectStructure); - obj->setDelegate(new QScript::QVariantDelegate(value)); - QScriptValue result = d->scriptValueFromJSCValue(obj); - QScriptValue proto = defaultPrototype(value.userType()); - if (proto.isValid()) - result.setPrototype(proto); - return result; + return d->scriptValueFromJSCValue(d->newVariant(value)); } /*! @@ -1882,9 +1907,7 @@ QScriptValue QScriptEngine::newQObject(const QScriptValue &scriptObject, QScriptValue QScriptEngine::newObject() { Q_D(QScriptEngine); - JSC::ExecState* exec = d->currentFrame; - JSC::JSObject *result = new (exec)QScriptObject(d->scriptObjectStructure); - return d->scriptValueFromJSCValue(result); + return d->scriptValueFromJSCValue(d->newObject()); } /*! @@ -2007,9 +2030,7 @@ QScriptValue QScriptEngine::newFunction(QScriptEngine::FunctionWithArgSignature QScriptValue QScriptEngine::newArray(uint length) { Q_D(QScriptEngine); - JSC::ExecState* exec = d->currentFrame; - JSC::JSArray* result = JSC::constructEmptyArray(exec, length); - return d->scriptValueFromJSCValue(result); + return d->scriptValueFromJSCValue(d->newArray(d->currentFrame, length)); } /*! @@ -2022,22 +2043,7 @@ QScriptValue QScriptEngine::newArray(uint length) QScriptValue QScriptEngine::newRegExp(const QString &pattern, const QString &flags) { Q_D(QScriptEngine); - JSC::ExecState* exec = d->currentFrame; - JSC::JSValue buf[2]; - JSC::ArgList args(buf, sizeof(buf)); - JSC::UString jscPattern = pattern; - QString strippedFlags; - if (flags.contains(QLatin1Char('i'))) - strippedFlags += QLatin1Char('i'); - if (flags.contains(QLatin1Char('m'))) - strippedFlags += QLatin1Char('m'); - if (flags.contains(QLatin1Char('g'))) - strippedFlags += QLatin1Char('g'); - JSC::UString jscFlags = strippedFlags; - buf[0] = JSC::jsString(exec, jscPattern); - buf[1] = JSC::jsString(exec, jscFlags); - JSC::JSObject* result = JSC::constructRegExp(exec, args); - return d->scriptValueFromJSCValue(result); + return d->scriptValueFromJSCValue(d->newRegExp(d->currentFrame, pattern, flags)); } /*! @@ -2048,11 +2054,7 @@ QScriptValue QScriptEngine::newRegExp(const QString &pattern, const QString &fla QScriptValue QScriptEngine::newDate(qsreal value) { Q_D(QScriptEngine); - JSC::ExecState* exec = d->currentFrame; - JSC::JSValue val = JSC::jsNumber(exec, value); - JSC::ArgList args(&val, 1); - JSC::JSObject *result = JSC::constructDate(exec, args); - return d->scriptValueFromJSCValue(result); + return d->scriptValueFromJSCValue(d->newDate(d->currentFrame, value)); } /*! @@ -2062,7 +2064,8 @@ QScriptValue QScriptEngine::newDate(qsreal value) */ QScriptValue QScriptEngine::newDate(const QDateTime &value) { - return newDate(QScript::FromDateTime(value)); + Q_D(QScriptEngine); + return d->scriptValueFromJSCValue(d->newDate(d->currentFrame, value)); } #ifndef QT_NO_QOBJECT diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h index f55dc27..46df429 100644 --- a/src/script/api/qscriptengine_p.h +++ b/src/script/api/qscriptengine_p.h @@ -41,10 +41,15 @@ #include #include "qscriptvalue_p.h" #include "qscriptstring_p.h" +#include "bridge/qscriptobject_p.h" +#include "utils/qscriptdate_p.h" +#include "DateConstructor.h" #include "Debugger.h" +#include "JSArray.h" #include "Lexer.h" #include "RefPtr.h" +#include "RegExpConstructor.h" #include "SourceProvider.h" #include "Structure.h" #include "JSGlobalObject.h" @@ -203,6 +208,18 @@ public: inline void unregisterScriptString(QScriptStringPrivate *value); void detachAllRegisteredScriptStrings(); + static inline JSC::JSValue newArray(JSC::ExecState *, uint length); + static inline JSC::JSValue newDate(JSC::ExecState *, qsreal value); + static inline JSC::JSValue newDate(JSC::ExecState *, const QDateTime &); + inline JSC::JSValue newObject(); + +#ifndef QT_NO_REGEXP + static JSC::JSValue newRegExp(JSC::ExecState *, const QRegExp &); +#endif + + static JSC::JSValue newRegExp(JSC::ExecState *, const QString &pattern, const QString &flags); + JSC::JSValue newVariant(const QVariant &); + #ifndef QT_NO_QOBJECT JSC::JSValue newQObject(QObject *object, QScriptEngine::ValueOwnership ownership = QScriptEngine::QtOwnership, @@ -587,6 +604,28 @@ inline JSC::ExecState *QScriptEnginePrivate::globalExec() const return originalGlobalObject()->globalExec(); } +inline JSC::JSValue QScriptEnginePrivate::newArray(JSC::ExecState *exec, uint length) +{ + return JSC::constructEmptyArray(exec, length); +} + +inline JSC::JSValue QScriptEnginePrivate::newDate(JSC::ExecState *exec, qsreal value) +{ + JSC::JSValue val = JSC::jsNumber(exec, value); + JSC::ArgList args(&val, 1); + return JSC::constructDate(exec, args); +} + +inline JSC::JSValue QScriptEnginePrivate::newDate(JSC::ExecState *exec, const QDateTime &value) +{ + return newDate(exec, QScript::FromDateTime(value)); +} + +inline JSC::JSValue QScriptEnginePrivate::newObject() +{ + return new (currentFrame)QScriptObject(scriptObjectStructure); +} + QT_END_NAMESPACE #endif -- cgit v0.12 From bc5c2c7362e0ad60990871e84426027a812937fc Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Thu, 18 Feb 2010 13:10:12 +0100 Subject: Cleanup: Move value conversion code to helper functions In preparation of doing this conversion in more places. Reviewed-by: Jedrzej Nowacki --- src/script/api/qscriptengine.cpp | 1 - src/script/api/qscriptengine_p.h | 50 ++++++++++++++++++++++++++++++++++++++++ src/script/api/qscriptvalue.cpp | 20 ++++++++-------- 3 files changed, 60 insertions(+), 11 deletions(-) diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 988e362..06233d9 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -40,7 +40,6 @@ #include #include -#include #include #include "Error.h" diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h index 46df429..daf670f 100644 --- a/src/script/api/qscriptengine_p.h +++ b/src/script/api/qscriptengine_p.h @@ -38,6 +38,7 @@ #include "private/qobject_p.h" #include +#include #include #include "qscriptvalue_p.h" #include "qscriptstring_p.h" @@ -93,6 +94,15 @@ namespace QScript quint16 ToUInt16(qsreal); qsreal ToInteger(qsreal); + inline bool ToBool(qsreal); + inline bool ToBool(const QString &); + inline qsreal ToNumber(const QString &); + inline qint32 ToInt32(const QString &); + inline quint32 ToUInt32(const QString &); + inline quint16 ToUInt16(const QString &); + inline qsreal ToInteger(const QString &); + inline QString ToString(qsreal); + //some conversion helper functions inline QScriptEnginePrivate *scriptEngineFromExec(const JSC::ExecState *exec); bool isFunction(JSC::JSValue value); @@ -396,6 +406,46 @@ inline QScriptEnginePrivate *scriptEngineFromExec(const JSC::ExecState *exec) return static_cast(exec->globalData().clientData)->engine; } +inline QString ToString(qsreal value) +{ + return JSC::UString::from(value); +} + +inline qsreal ToNumber(const QString &value) +{ + return ((JSC::UString)value).toDouble(); +} + +inline qint32 ToInt32(const QString &value) +{ + return ToInt32(ToNumber(value)); +} + +inline quint32 ToUInt32(const QString &value) +{ + return ToUInt32(ToNumber(value)); +} + +inline quint16 ToUInt16(const QString &value) +{ + return ToUInt16(ToNumber(value)); +} + +inline qsreal ToInteger(const QString &value) +{ + return ToInteger(ToNumber(value)); +} + +inline bool ToBool(qsreal value) +{ + return (value != 0) && !qIsNaN(value); +} + +inline bool ToBool(const QString &value) +{ + return !value.isEmpty(); +} + } // namespace QScript inline QScriptValuePrivate *QScriptEnginePrivate::allocateScriptValuePrivate(size_t size) diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index e8c2050..724bbe3 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -1127,7 +1127,7 @@ QString QScriptValue::toString() const return str; } case QScriptValuePrivate::Number: - return JSC::UString::from(d->numberValue); + return QScript::ToString(d->numberValue); case QScriptValuePrivate::String: return d->stringValue; } @@ -1163,7 +1163,7 @@ qsreal QScriptValue::toNumber() const case QScriptValuePrivate::Number: return d->numberValue; case QScriptValuePrivate::String: - return ((JSC::UString)d->stringValue).toDouble(); + return QScript::ToNumber(d->stringValue); } return 0; } @@ -1188,9 +1188,9 @@ bool QScriptValue::toBoolean() const return result; } case QScriptValuePrivate::Number: - return (d->numberValue != 0) && !qIsNaN(d->numberValue); + return QScript::ToBool(d->numberValue); case QScriptValuePrivate::String: - return (!d->stringValue.isEmpty()); + return QScript::ToBool(d->stringValue); } return false; } @@ -1224,9 +1224,9 @@ bool QScriptValue::toBool() const return result; } case QScriptValuePrivate::Number: - return (d->numberValue != 0) && !qIsNaN(d->numberValue); + return QScript::ToBool(d->numberValue); case QScriptValuePrivate::String: - return (!d->stringValue.isEmpty()); + return QScript::ToBool(d->stringValue); } return false; } @@ -1260,7 +1260,7 @@ qint32 QScriptValue::toInt32() const case QScriptValuePrivate::Number: return QScript::ToInt32(d->numberValue); case QScriptValuePrivate::String: - return QScript::ToInt32(((JSC::UString)d->stringValue).toDouble()); + return QScript::ToInt32(d->stringValue); } return 0; } @@ -1294,7 +1294,7 @@ quint32 QScriptValue::toUInt32() const case QScriptValuePrivate::Number: return QScript::ToUInt32(d->numberValue); case QScriptValuePrivate::String: - return QScript::ToUInt32(((JSC::UString)d->stringValue).toDouble()); + return QScript::ToUInt32(d->stringValue); } return 0; } @@ -1324,7 +1324,7 @@ quint16 QScriptValue::toUInt16() const case QScriptValuePrivate::Number: return QScript::ToUInt16(d->numberValue); case QScriptValuePrivate::String: - return QScript::ToUInt16(((JSC::UString)d->stringValue).toDouble()); + return QScript::ToUInt16(d->stringValue); } return 0; } @@ -1358,7 +1358,7 @@ qsreal QScriptValue::toInteger() const case QScriptValuePrivate::Number: return QScript::ToInteger(d->numberValue); case QScriptValuePrivate::String: - return QScript::ToInteger(((JSC::UString)d->stringValue).toDouble()); + return QScript::ToInteger(d->stringValue); } return 0; } -- cgit v0.12 From af4ccb478650b7efd5de3d81439173cd31931bd2 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Thu, 18 Feb 2010 13:54:18 +0100 Subject: Move more script value conversion code to helper functions In preparation of operating purely on JSC::JSValue internally. Reviewed-by: Jedrzej Nowacki --- src/script/api/qscriptengine_p.h | 131 +++++++++++++++++++++++++++++++++++++++ src/script/api/qscriptvalue.cpp | 86 +++++++------------------ 2 files changed, 152 insertions(+), 65 deletions(-) diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h index daf670f..5f079f4 100644 --- a/src/script/api/qscriptengine_p.h +++ b/src/script/api/qscriptengine_p.h @@ -37,8 +37,10 @@ #include "private/qobject_p.h" +#include #include #include +#include #include #include "qscriptvalue_p.h" #include "qscriptstring_p.h" @@ -46,11 +48,14 @@ #include "utils/qscriptdate_p.h" #include "DateConstructor.h" +#include "DateInstance.h" #include "Debugger.h" +#include "ErrorInstance.h" #include "JSArray.h" #include "Lexer.h" #include "RefPtr.h" #include "RegExpConstructor.h" +#include "RegExpObject.h" #include "SourceProvider.h" #include "Structure.h" #include "JSGlobalObject.h" @@ -134,6 +139,23 @@ public: static QScriptEnginePrivate *get(QScriptEngine *q) { return q ? q->d_func() : 0; } static QScriptEngine *get(QScriptEnginePrivate *d) { return d ? d->q_func() : 0; } + static inline bool isArray(JSC::JSValue); + static inline bool isDate(JSC::JSValue); + static inline bool isError(JSC::JSValue); + static inline bool isObject(JSC::JSValue); + static inline bool isRegExp(JSC::JSValue); + static inline bool isVariant(JSC::JSValue); + + static inline bool toBool(JSC::ExecState *, JSC::JSValue); + static inline qsreal toInteger(JSC::ExecState *, JSC::JSValue); + static inline qsreal toNumber(JSC::ExecState *, JSC::JSValue); + static inline qint32 toInt32(JSC::ExecState *, JSC::JSValue); + static inline quint32 toUInt32(JSC::ExecState *, JSC::JSValue); + static inline quint16 toUInt16(JSC::ExecState *, JSC::JSValue); + static inline QString toString(JSC::ExecState *, JSC::JSValue); + + static inline QDateTime toDateTime(JSC::ExecState *, JSC::JSValue); + static bool convert(const QScriptValue &value, int type, void *ptr, QScriptEnginePrivate *eng); @@ -676,6 +698,115 @@ inline JSC::JSValue QScriptEnginePrivate::newObject() return new (currentFrame)QScriptObject(scriptObjectStructure); } +inline bool QScriptEnginePrivate::isObject(JSC::JSValue value) +{ + return value && value.isObject(); +} + +inline bool QScriptEnginePrivate::isArray(JSC::JSValue value) +{ + return isObject(value) && value.inherits(&JSC::JSArray::info); +} + +inline bool QScriptEnginePrivate::isDate(JSC::JSValue value) +{ + return isObject(value) && value.inherits(&JSC::DateInstance::info); +} + +inline bool QScriptEnginePrivate::isError(JSC::JSValue value) +{ + return isObject(value) && value.inherits(&JSC::ErrorInstance::info); +} + +inline bool QScriptEnginePrivate::isRegExp(JSC::JSValue value) +{ + return isObject(value) && value.inherits(&JSC::RegExpObject::info); +} + +inline bool QScriptEnginePrivate::isVariant(JSC::JSValue value) +{ + if (!isObject(value) || !value.inherits(&QScriptObject::info)) + return false; + QScriptObject *object = static_cast(JSC::asObject(value)); + QScriptObjectDelegate *delegate = object->delegate(); + return (delegate && (delegate->type() == QScriptObjectDelegate::Variant)); +} + +inline bool QScriptEnginePrivate::toBool(JSC::ExecState *exec, JSC::JSValue value) +{ + JSC::JSValue savedException; + saveException(exec, &savedException); + bool result = value.toBoolean(exec); + restoreException(exec, savedException); + return result; +} + +inline qsreal QScriptEnginePrivate::toInteger(JSC::ExecState *exec, JSC::JSValue value) +{ + JSC::JSValue savedException; + saveException(exec, &savedException); + qsreal result = value.toInteger(exec); + restoreException(exec, savedException); + return result; +} + +inline qsreal QScriptEnginePrivate::toNumber(JSC::ExecState *exec, JSC::JSValue value) +{ + JSC::JSValue savedException; + saveException(exec, &savedException); + qsreal result = value.toNumber(exec); + restoreException(exec, savedException); + return result; +} + +inline qint32 QScriptEnginePrivate::toInt32(JSC::ExecState *exec, JSC::JSValue value) +{ + JSC::JSValue savedException; + saveException(exec, &savedException); + qint32 result = value.toInt32(exec); + restoreException(exec, savedException); + return result; +} + +inline quint32 QScriptEnginePrivate::toUInt32(JSC::ExecState *exec, JSC::JSValue value) +{ + JSC::JSValue savedException; + saveException(exec, &savedException); + quint32 result = value.toUInt32(exec); + restoreException(exec, savedException); + return result; +} + +inline quint16 QScriptEnginePrivate::toUInt16(JSC::ExecState *exec, JSC::JSValue value) +{ + // ### no equivalent function in JSC + return QScript::ToUInt16(toNumber(exec, value)); +} + +inline QString QScriptEnginePrivate::toString(JSC::ExecState *exec, JSC::JSValue value) +{ + JSC::JSValue savedException; + saveException(exec, &savedException); + JSC::UString str = value.toString(exec); + if (exec && exec->hadException() && !str.size()) { + JSC::JSValue savedException2; + saveException(exec, &savedException2); + str = savedException2.toString(exec); + restoreException(exec, savedException2); + } + if (savedException) + restoreException(exec, savedException); + return str; +} + +inline QDateTime QScriptEnginePrivate::toDateTime(JSC::ExecState *, JSC::JSValue value) +{ + if (!isDate(value)) + return QDateTime(); + qsreal t = static_cast(JSC::asObject(value))->internalNumber(); + return QScript::ToDateTime(t, Qt::LocalTime); +} + QT_END_NAMESPACE #endif diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index 724bbe3..929f606 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -29,21 +29,15 @@ #include "qscriptengine_p.h" #include "qscriptstring_p.h" -#include "JSArray.h" #include "JSGlobalObject.h" #include "JSImmediate.h" #include "JSObject.h" #include "JSValue.h" #include "JSFunction.h" -#include "DateInstance.h" -#include "ErrorInstance.h" -#include "RegExpObject.h" #include "Identifier.h" #include "Operations.h" #include "Arguments.h" -#include -#include #include #include #include @@ -629,9 +623,9 @@ QScriptValue &QScriptValue::operator=(const QScriptValue &other) bool QScriptValue::isError() const { Q_D(const QScriptValue); - if (!d || !d->isObject()) + if (!d || !d->isJSC()) return false; - return d->jscValue.inherits(&JSC::ErrorInstance::info); + return QScriptEnginePrivate::isError(d->jscValue); } /*! @@ -643,9 +637,9 @@ bool QScriptValue::isError() const bool QScriptValue::isArray() const { Q_D(const QScriptValue); - if (!d || !d->isObject()) + if (!d || !d->isJSC()) return false; - return d->jscValue.inherits(&JSC::JSArray::info); + return QScriptEnginePrivate::isArray(d->jscValue); } /*! @@ -657,9 +651,9 @@ bool QScriptValue::isArray() const bool QScriptValue::isDate() const { Q_D(const QScriptValue); - if (!d || !d->isObject()) + if (!d || !d->isJSC()) return false; - return d->jscValue.inherits(&JSC::DateInstance::info); + return QScriptEnginePrivate::isDate(d->jscValue); } /*! @@ -671,9 +665,9 @@ bool QScriptValue::isDate() const bool QScriptValue::isRegExp() const { Q_D(const QScriptValue); - if (!d || !d->isObject()) + if (!d || !d->isJSC()) return false; - return d->jscValue.inherits(&JSC::RegExpObject::info); + return QScriptEnginePrivate::isRegExp(d->jscValue); } /*! @@ -1113,18 +1107,7 @@ QString QScriptValue::toString() const switch (d->type) { case QScriptValuePrivate::JavaScriptCore: { JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0; - JSC::JSValue savedException; - QScriptEnginePrivate::saveException(exec, &savedException); - JSC::UString str = d->jscValue.toString(exec); - if (exec && exec->hadException() && !str.size()) { - JSC::JSValue savedException2; - QScriptEnginePrivate::saveException(exec, &savedException2); - str = savedException2.toString(exec); - QScriptEnginePrivate::restoreException(exec, savedException2); - } - if (savedException) - QScriptEnginePrivate::restoreException(exec, savedException); - return str; + return QScriptEnginePrivate::toString(exec, d->jscValue); } case QScriptValuePrivate::Number: return QScript::ToString(d->numberValue); @@ -1154,11 +1137,7 @@ qsreal QScriptValue::toNumber() const switch (d->type) { case QScriptValuePrivate::JavaScriptCore: { JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0; - JSC::JSValue savedException; - QScriptEnginePrivate::saveException(exec, &savedException); - qsreal result = d->jscValue.toNumber(exec); - QScriptEnginePrivate::restoreException(exec, savedException); - return result; + return QScriptEnginePrivate::toNumber(exec, d->jscValue); } case QScriptValuePrivate::Number: return d->numberValue; @@ -1181,11 +1160,7 @@ bool QScriptValue::toBoolean() const switch (d->type) { case QScriptValuePrivate::JavaScriptCore: { JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0; - JSC::JSValue savedException; - QScriptEnginePrivate::saveException(exec, &savedException); - bool result = d->jscValue.toBoolean(exec); - QScriptEnginePrivate::restoreException(exec, savedException); - return result; + return QScriptEnginePrivate::toBool(exec, d->jscValue); } case QScriptValuePrivate::Number: return QScript::ToBool(d->numberValue); @@ -1217,11 +1192,7 @@ bool QScriptValue::toBool() const switch (d->type) { case QScriptValuePrivate::JavaScriptCore: { JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0; - JSC::JSValue savedException; - QScriptEnginePrivate::saveException(exec, &savedException); - bool result = d->jscValue.toBoolean(exec); - QScriptEnginePrivate::restoreException(exec, savedException); - return result; + return QScriptEnginePrivate::toBool(exec, d->jscValue); } case QScriptValuePrivate::Number: return QScript::ToBool(d->numberValue); @@ -1251,11 +1222,7 @@ qint32 QScriptValue::toInt32() const switch (d->type) { case QScriptValuePrivate::JavaScriptCore: { JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0; - JSC::JSValue savedException; - QScriptEnginePrivate::saveException(exec, &savedException); - qint32 result = d->jscValue.toInt32(exec); - QScriptEnginePrivate::restoreException(exec, savedException); - return result; + return QScriptEnginePrivate::toInt32(exec, d->jscValue); } case QScriptValuePrivate::Number: return QScript::ToInt32(d->numberValue); @@ -1285,11 +1252,7 @@ quint32 QScriptValue::toUInt32() const switch (d->type) { case QScriptValuePrivate::JavaScriptCore: { JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0; - JSC::JSValue savedException; - QScriptEnginePrivate::saveException(exec, &savedException); - quint32 result = d->jscValue.toUInt32(exec); - QScriptEnginePrivate::restoreException(exec, savedException); - return result; + return QScriptEnginePrivate::toUInt32(exec, d->jscValue); } case QScriptValuePrivate::Number: return QScript::ToUInt32(d->numberValue); @@ -1318,8 +1281,8 @@ quint16 QScriptValue::toUInt16() const return 0; switch (d->type) { case QScriptValuePrivate::JavaScriptCore: { - // ### no equivalent function in JSC - return QScript::ToUInt16(toNumber()); + JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0; + return QScriptEnginePrivate::toUInt16(exec, d->jscValue); } case QScriptValuePrivate::Number: return QScript::ToUInt16(d->numberValue); @@ -1349,11 +1312,7 @@ qsreal QScriptValue::toInteger() const switch (d->type) { case QScriptValuePrivate::JavaScriptCore: { JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0; - JSC::JSValue savedException; - QScriptEnginePrivate::saveException(exec, &savedException); - qsreal result = d->jscValue.toInteger(exec); - QScriptEnginePrivate::restoreException(exec, savedException); - return result; + return QScriptEnginePrivate::toInteger(exec, d->jscValue); } case QScriptValuePrivate::Number: return QScript::ToInteger(d->numberValue); @@ -1456,10 +1415,9 @@ QScriptValue QScriptValue::toObject() const QDateTime QScriptValue::toDateTime() const { Q_D(const QScriptValue); - if (!isDate()) + if (!d || !d->engine) return QDateTime(); - qsreal t = static_cast(JSC::asObject(d->jscValue))->internalNumber(); - return QScript::ToDateTime(t, Qt::LocalTime); + return QScriptEnginePrivate::toDateTime(d->engine->currentFrame, d->jscValue); } #ifndef QT_NO_REGEXP @@ -2151,11 +2109,9 @@ bool QScriptValue::isObject() const bool QScriptValue::isVariant() const { Q_D(const QScriptValue); - if (!d || !d->isJSC() || !d->jscValue.inherits(&QScriptObject::info)) + if (!d || !d->isJSC()) return false; - QScriptObject *object = static_cast(JSC::asObject(d->jscValue)); - QScriptObjectDelegate *delegate = object->delegate(); - return (delegate && (delegate->type() == QScriptObjectDelegate::Variant)); + return QScriptEnginePrivate::isVariant(d->jscValue); } /*! -- cgit v0.12 From 8e0a364f7baed4bbc7ff711be2a15692a40c3e93 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Thu, 18 Feb 2010 14:23:42 +0100 Subject: Move property helper functions to QScriptEnginePrivate More preparation for operating purely on JSC::JSValue internally. Reviewed-by: Jedrzej Nowacki --- src/script/api/qscriptengine.cpp | 166 ++++++++++++++++++++++++++++++ src/script/api/qscriptengine_p.h | 99 +++++++++++++++--- src/script/api/qscriptvalue.cpp | 211 ++++++--------------------------------- src/script/api/qscriptvalue_p.h | 18 ++-- 4 files changed, 288 insertions(+), 206 deletions(-) diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 06233d9..a045bab 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -1577,6 +1577,172 @@ JSC::JSValue QScriptEnginePrivate::newVariant(const QVariant &value) return obj; } +JSC::JSValue QScriptEnginePrivate::propertyHelper(JSC::ExecState *exec, JSC::JSValue value, const JSC::Identifier &id, int resolveMode) +{ + JSC::JSValue result; + if (!(resolveMode & QScriptValue::ResolvePrototype)) { + // Look in the object's own properties + JSC::JSObject *object = JSC::asObject(value); + JSC::PropertySlot slot(object); + if (object->getOwnPropertySlot(exec, id, slot)) + result = slot.getValue(exec, id); + } + if (!result && (resolveMode & QScriptValue::ResolveScope)) { + // ### check if it's a function object and look in the scope chain + JSC::JSValue scope = property(exec, value, QString::fromLatin1("__qt_scope__"), QScriptValue::ResolveLocal); + if (isObject(scope)) + result = property(exec, scope, id, resolveMode); + } + return result; +} + +JSC::JSValue QScriptEnginePrivate::propertyHelper(JSC::ExecState *exec, JSC::JSValue value, quint32 index, int resolveMode) +{ + JSC::JSValue result; + if (!(resolveMode & QScriptValue::ResolvePrototype)) { + // Look in the object's own properties + JSC::JSObject *object = JSC::asObject(value); + JSC::PropertySlot slot(object); + if (object->getOwnPropertySlot(exec, index, slot)) + result = slot.getValue(exec, index); + } + return result; +} + +void QScriptEnginePrivate::setProperty(JSC::ExecState *exec, JSC::JSValue objectValue, const JSC::Identifier &id, + JSC::JSValue value, const QScriptValue::PropertyFlags &flags) +{ + JSC::JSObject *thisObject = JSC::asObject(objectValue); + JSC::JSValue setter = thisObject->lookupSetter(exec, id); + JSC::JSValue getter = thisObject->lookupGetter(exec, id); + if ((flags & QScriptValue::PropertyGetter) || (flags & QScriptValue::PropertySetter)) { + if (!value) { + // deleting getter/setter + if ((flags & QScriptValue::PropertyGetter) && (flags & QScriptValue::PropertySetter)) { + // deleting both: just delete the property + thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false); + } else if (flags & QScriptValue::PropertyGetter) { + // preserve setter, if there is one + thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false); + if (setter && setter.isObject()) + thisObject->defineSetter(exec, id, JSC::asObject(setter)); + } else { // flags & QScriptValue::PropertySetter + // preserve getter, if there is one + thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false); + if (getter && getter.isObject()) + thisObject->defineGetter(exec, id, JSC::asObject(getter)); + } + } else { + if (value.isObject()) { // ### should check if it has callData() + // defining getter/setter + if (id == exec->propertyNames().underscoreProto) { + qWarning("QScriptValue::setProperty() failed: " + "cannot set getter or setter of native property `__proto__'"); + } else { + if (flags & QScriptValue::PropertyGetter) + thisObject->defineGetter(exec, id, JSC::asObject(value)); + if (flags & QScriptValue::PropertySetter) + thisObject->defineSetter(exec, id, JSC::asObject(value)); + } + } else { + qWarning("QScriptValue::setProperty(): getter/setter must be a function"); + } + } + } else { + // setting the value + if (getter && getter.isObject() && !(setter && setter.isObject())) { + qWarning("QScriptValue::setProperty() failed: " + "property '%s' has a getter but no setter", + qPrintable(QString(id.ustring()))); + return; + } + if (!value) { + // ### check if it's a getter/setter property + thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false); + } else if (flags != QScriptValue::KeepExistingFlags) { + if (thisObject->hasOwnProperty(exec, id)) + thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false); // ### hmmm - can't we just update the attributes? + unsigned attribs = 0; + if (flags & QScriptValue::ReadOnly) + attribs |= JSC::ReadOnly; + if (flags & QScriptValue::SkipInEnumeration) + attribs |= JSC::DontEnum; + if (flags & QScriptValue::Undeletable) + attribs |= JSC::DontDelete; + attribs |= flags & QScriptValue::UserRange; + thisObject->putWithAttributes(exec, id, value, attribs); + } else { + JSC::PutPropertySlot slot; + thisObject->put(exec, id, value, slot); + } + } +} + +void QScriptEnginePrivate::setProperty(JSC::ExecState *exec, JSC::JSValue objectValue, quint32 index, + JSC::JSValue value, const QScriptValue::PropertyFlags &flags) +{ + if (!value) { + JSC::asObject(objectValue)->deleteProperty(exec, index, /*checkDontDelete=*/false); + } else { + if ((flags & QScriptValue::PropertyGetter) || (flags & QScriptValue::PropertySetter)) { + // fall back to string-based setProperty(), since there is no + // JSC::JSObject::defineGetter(unsigned) + setProperty(exec, objectValue, JSC::Identifier::from(exec, index), value, flags); + } else { + if (flags != QScriptValue::KeepExistingFlags) { + // if (JSC::asObject(d->jscValue)->hasOwnProperty(exec, arrayIndex)) + // JSC::asObject(d->jscValue)->deleteProperty(exec, arrayIndex); + unsigned attribs = 0; + if (flags & QScriptValue::ReadOnly) + attribs |= JSC::ReadOnly; + if (flags & QScriptValue::SkipInEnumeration) + attribs |= JSC::DontEnum; + if (flags & QScriptValue::Undeletable) + attribs |= JSC::DontDelete; + attribs |= flags & QScriptValue::UserRange; + JSC::asObject(objectValue)->putWithAttributes(exec, index, value, attribs); + } else { + JSC::asObject(objectValue)->put(exec, index, value); + } + } + } +} + +QScriptValue::PropertyFlags QScriptEnginePrivate::propertyFlags(JSC::ExecState *exec, JSC::JSValue value, const JSC::Identifier &id, + const QScriptValue::ResolveFlags &mode) +{ + JSC::JSObject *object = JSC::asObject(value); + unsigned attribs = 0; + JSC::PropertyDescriptor descriptor; + if (object->getOwnPropertyDescriptor(exec, id, descriptor)) + attribs = descriptor.attributes(); + else if (!object->getPropertyAttributes(exec, id, attribs)) { + if ((mode & QScriptValue::ResolvePrototype) && object->prototype() && object->prototype().isObject()) { + JSC::JSValue proto = object->prototype(); + return propertyFlags(exec, proto, id, mode); + } + return 0; + } + QScriptValue::PropertyFlags result = 0; + if (attribs & JSC::ReadOnly) + result |= QScriptValue::ReadOnly; + if (attribs & JSC::DontEnum) + result |= QScriptValue::SkipInEnumeration; + if (attribs & JSC::DontDelete) + result |= QScriptValue::Undeletable; + //We cannot rely on attribs JSC::Setter/Getter because they are not necesserly set by JSC (bug?) + if (attribs & JSC::Getter || !object->lookupGetter(exec, id).isUndefinedOrNull()) + result |= QScriptValue::PropertyGetter; + if (attribs & JSC::Setter || !object->lookupSetter(exec, id).isUndefinedOrNull()) + result |= QScriptValue::PropertySetter; +#ifndef QT_NO_QOBJECT + if (attribs & QScript::QObjectMemberAttribute) + result |= QScriptValue::QObjectMember; +#endif + result |= QScriptValue::PropertyFlag(attribs & QScriptValue::UserRange); + return result; +} + #ifdef QT_NO_QOBJECT QScriptEngine::QScriptEngine() diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h index 5f079f4..4be9146 100644 --- a/src/script/api/qscriptengine_p.h +++ b/src/script/api/qscriptengine_p.h @@ -156,6 +156,24 @@ public: static inline QDateTime toDateTime(JSC::ExecState *, JSC::JSValue); + static inline JSC::JSValue property(JSC::ExecState*, JSC::JSValue, const JSC::Identifier &id, + int resolveMode = QScriptValue::ResolvePrototype); + static JSC::JSValue propertyHelper(JSC::ExecState*, JSC::JSValue, const JSC::Identifier &id, int resolveMode); + static inline JSC::JSValue property(JSC::ExecState*, JSC::JSValue, quint32 index, + int resolveMode = QScriptValue::ResolvePrototype); + static JSC::JSValue propertyHelper(JSC::ExecState*, JSC::JSValue, quint32, int resolveMode); + static inline JSC::JSValue property(JSC::ExecState*, JSC::JSValue, const QString &, int resolveMode); + static inline void setProperty(JSC::ExecState*, JSC::JSValue object, const QString &name, JSC::JSValue, + const QScriptValue::PropertyFlags &flags = QScriptValue::KeepExistingFlags); + static void setProperty(JSC::ExecState*, JSC::JSValue object, const JSC::Identifier &id, JSC::JSValue, + const QScriptValue::PropertyFlags &flags = QScriptValue::KeepExistingFlags); + static void setProperty(JSC::ExecState*, JSC::JSValue object, quint32 index, JSC::JSValue, + const QScriptValue::PropertyFlags &flags = QScriptValue::KeepExistingFlags); + static QScriptValue::PropertyFlags propertyFlags(JSC::ExecState*, JSC::JSValue value, + const JSC::Identifier &id, const QScriptValue::ResolveFlags &mode); + static inline QScriptValue::PropertyFlags propertyFlags(JSC::ExecState*, JSC::JSValue value, + const QString &name, const QScriptValue::ResolveFlags &mode); + static bool convert(const QScriptValue &value, int type, void *ptr, QScriptEnginePrivate *eng); @@ -568,32 +586,83 @@ inline void QScriptValuePrivate::initFrom(const QString &value) engine->registerScriptValue(this); } -inline QScriptValue QScriptValuePrivate::property(const QString &name, int resolveMode) const +inline JSC::JSValue QScriptEnginePrivate::property(JSC::ExecState *exec, JSC::JSValue value, const QString &name, int resolveMode) { - JSC::ExecState *exec = engine->currentFrame; - return property(JSC::Identifier(exec, name), resolveMode); + return property(exec, value, JSC::Identifier(exec, name), resolveMode); } -inline QScriptValue QScriptValuePrivate::property(const JSC::Identifier &id, int resolveMode) const +inline JSC::JSValue QScriptEnginePrivate::property(JSC::ExecState *exec, JSC::JSValue value, const JSC::Identifier &id, int resolveMode) { - Q_ASSERT(isObject()); - JSC::ExecState *exec = engine->currentFrame; - JSC::JSObject *object = JSC::asObject(jscValue); + Q_ASSERT(isObject(value)); + JSC::JSObject *object = JSC::asObject(value); JSC::PropertySlot slot(object); if ((resolveMode & QScriptValue::ResolvePrototype) && object->getPropertySlot(exec, id, slot)) - return engine->scriptValueFromJSCValue(slot.getValue(exec, id)); - return propertyHelper(id, resolveMode); + return slot.getValue(exec, id); + return propertyHelper(exec, value, id, resolveMode); } -inline QScriptValue QScriptValuePrivate::property(quint32 index, int resolveMode) const +inline JSC::JSValue QScriptEnginePrivate::property(JSC::ExecState *exec, JSC::JSValue value, quint32 index, int resolveMode) { - Q_ASSERT(isObject()); - JSC::ExecState *exec = engine->currentFrame; - JSC::JSObject *object = JSC::asObject(jscValue); + Q_ASSERT(isObject(value)); + JSC::JSObject *object = JSC::asObject(value); JSC::PropertySlot slot(object); if ((resolveMode & QScriptValue::ResolvePrototype) && object->getPropertySlot(exec, index, slot)) - return engine->scriptValueFromJSCValue(slot.getValue(exec, index)); - return propertyHelper(index, resolveMode); + return slot.getValue(exec, index); + return propertyHelper(exec, value, index, resolveMode); +} + +inline QScriptValue::PropertyFlags QScriptEnginePrivate::propertyFlags(JSC::ExecState *exec, JSC::JSValue value, + const QString &name, + const QScriptValue::ResolveFlags &mode) +{ + return propertyFlags(exec, value, JSC::Identifier(exec, name), mode); +} + +inline void QScriptEnginePrivate::setProperty(JSC::ExecState *exec, JSC::JSValue objectValue, const QString &name, + JSC::JSValue value, const QScriptValue::PropertyFlags &flags) +{ + setProperty(exec, objectValue, JSC::Identifier(exec, name), value, flags); +} + +inline JSC::JSValue QScriptValuePrivate::property(const JSC::Identifier &id, int resolveMode) const +{ + return QScriptEnginePrivate::property(engine->currentFrame, jscValue, id, resolveMode); +} + +inline JSC::JSValue QScriptValuePrivate::property(quint32 index, int resolveMode) const +{ + return QScriptEnginePrivate::property(engine->currentFrame, jscValue, index, resolveMode); +} + +inline JSC::JSValue QScriptValuePrivate::property(const QString &name, int resolveMode) const +{ + JSC::ExecState *exec = engine->currentFrame; + return QScriptEnginePrivate::property(exec, jscValue, JSC::Identifier(exec, name), resolveMode); +} + +inline QScriptValue::PropertyFlags QScriptValuePrivate::propertyFlags( + const JSC::Identifier &id, const QScriptValue::ResolveFlags &mode) const +{ + return QScriptEnginePrivate::propertyFlags(engine->currentFrame, jscValue, id, mode); +} + +inline void QScriptValuePrivate::setProperty(const JSC::Identifier &id, const JSC::JSValue &value, + const QScriptValue::PropertyFlags &flags) +{ + QScriptEnginePrivate::setProperty(engine->currentFrame, jscValue, id, value, flags); +} + +inline void QScriptValuePrivate::setProperty(quint32 index, const JSC::JSValue &value, + const QScriptValue::PropertyFlags &flags) +{ + QScriptEnginePrivate::setProperty(engine->currentFrame, jscValue, index, value, flags); +} + +inline void QScriptValuePrivate::setProperty(const QString &name, const JSC::JSValue &value, + const QScriptValue::PropertyFlags &flags) +{ + JSC::ExecState *exec = engine->currentFrame; + QScriptEnginePrivate::setProperty(exec, jscValue, JSC::Identifier(exec, name), value, flags); } inline void* QScriptValuePrivate::operator new(size_t size, QScriptEnginePrivate *engine) diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index 929f606..a7d9f79 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -176,152 +176,6 @@ QT_BEGIN_NAMESPACE -QScriptValue QScriptValuePrivate::propertyHelper(const JSC::Identifier &id, int resolveMode) const -{ - JSC::JSValue result; - if (!(resolveMode & QScriptValue::ResolvePrototype)) { - // Look in the object's own properties - JSC::ExecState *exec = engine->currentFrame; - JSC::JSObject *object = JSC::asObject(jscValue); - JSC::PropertySlot slot(object); - if (object->getOwnPropertySlot(exec, id, slot)) - result = slot.getValue(exec, id); - } - if (!result && (resolveMode & QScriptValue::ResolveScope)) { - // ### check if it's a function object and look in the scope chain - QScriptValue scope = property(QString::fromLatin1("__qt_scope__"), QScriptValue::ResolveLocal); - if (scope.isObject()) - result = engine->scriptValueToJSCValue(QScriptValuePrivate::get(scope)->property(id, resolveMode)); - } - return engine->scriptValueFromJSCValue(result); -} - -QScriptValue QScriptValuePrivate::propertyHelper(quint32 index, int resolveMode) const -{ - JSC::JSValue result; - if (!(resolveMode & QScriptValue::ResolvePrototype)) { - // Look in the object's own properties - JSC::ExecState *exec = engine->currentFrame; - JSC::JSObject *object = JSC::asObject(jscValue); - JSC::PropertySlot slot(object); - if (object->getOwnPropertySlot(exec, index, slot)) - result = slot.getValue(exec, index); - } - return engine->scriptValueFromJSCValue(result); -} - -void QScriptValuePrivate::setProperty(const JSC::Identifier &id, const QScriptValue &value, - const QScriptValue::PropertyFlags &flags) -{ - QScriptEnginePrivate *valueEngine = QScriptValuePrivate::getEngine(value); - if (valueEngine && (valueEngine != engine)) { - qWarning("QScriptValue::setProperty(%s) failed: " - "cannot set value created in a different engine", - qPrintable(QString(id.ustring()))); - return; - } - JSC::ExecState *exec = engine->currentFrame; - JSC::JSValue jsValue = engine->scriptValueToJSCValue(value); - JSC::JSObject *thisObject = JSC::asObject(jscValue); - JSC::JSValue setter = thisObject->lookupSetter(exec, id); - JSC::JSValue getter = thisObject->lookupGetter(exec, id); - if ((flags & QScriptValue::PropertyGetter) || (flags & QScriptValue::PropertySetter)) { - if (!jsValue) { - // deleting getter/setter - if ((flags & QScriptValue::PropertyGetter) && (flags & QScriptValue::PropertySetter)) { - // deleting both: just delete the property - thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false); - } else if (flags & QScriptValue::PropertyGetter) { - // preserve setter, if there is one - thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false); - if (setter && setter.isObject()) - thisObject->defineSetter(exec, id, JSC::asObject(setter)); - } else { // flags & QScriptValue::PropertySetter - // preserve getter, if there is one - thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false); - if (getter && getter.isObject()) - thisObject->defineGetter(exec, id, JSC::asObject(getter)); - } - } else { - if (jsValue.isObject()) { // ### should check if it has callData() - // defining getter/setter - if (id == exec->propertyNames().underscoreProto) { - qWarning("QScriptValue::setProperty() failed: " - "cannot set getter or setter of native property `__proto__'"); - } else { - if (flags & QScriptValue::PropertyGetter) - thisObject->defineGetter(exec, id, JSC::asObject(jsValue)); - if (flags & QScriptValue::PropertySetter) - thisObject->defineSetter(exec, id, JSC::asObject(jsValue)); - } - } else { - qWarning("QScriptValue::setProperty(): getter/setter must be a function"); - } - } - } else { - // setting the value - if (getter && getter.isObject() && !(setter && setter.isObject())) { - qWarning("QScriptValue::setProperty() failed: " - "property '%s' has a getter but no setter", - qPrintable(QString(id.ustring()))); - return; - } - if (!jsValue) { - // ### check if it's a getter/setter property - thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false); - } else if (flags != QScriptValue::KeepExistingFlags) { - if (thisObject->hasOwnProperty(exec, id)) - thisObject->deleteProperty(exec, id, /*checkDontDelete=*/false); // ### hmmm - can't we just update the attributes? - unsigned attribs = 0; - if (flags & QScriptValue::ReadOnly) - attribs |= JSC::ReadOnly; - if (flags & QScriptValue::SkipInEnumeration) - attribs |= JSC::DontEnum; - if (flags & QScriptValue::Undeletable) - attribs |= JSC::DontDelete; - attribs |= flags & QScriptValue::UserRange; - thisObject->putWithAttributes(exec, id, jsValue, attribs); - } else { - JSC::PutPropertySlot slot; - thisObject->put(exec, id, jsValue, slot); - } - } -} - -QScriptValue::PropertyFlags QScriptValuePrivate::propertyFlags(const JSC::Identifier &id, - const QScriptValue::ResolveFlags &mode) const -{ - JSC::ExecState *exec = engine->currentFrame; - JSC::JSObject *object = JSC::asObject(jscValue); - unsigned attribs = 0; - JSC::PropertyDescriptor descriptor; - if (object->getOwnPropertyDescriptor(exec, id, descriptor)) - attribs = descriptor.attributes(); - else if (!object->getPropertyAttributes(exec, id, attribs)) { - if ((mode & QScriptValue::ResolvePrototype) && object->prototype() && object->prototype().isObject()) { - QScriptValue proto = engine->scriptValueFromJSCValue(object->prototype()); - return QScriptValuePrivate::get(proto)->propertyFlags(id, mode); - } - return 0; - } - QScriptValue::PropertyFlags result = 0; - if (attribs & JSC::ReadOnly) - result |= QScriptValue::ReadOnly; - if (attribs & JSC::DontEnum) - result |= QScriptValue::SkipInEnumeration; - if (attribs & JSC::DontDelete) - result |= QScriptValue::Undeletable; - //We cannot rely on attribs JSC::Setter/Getter because they are not necesserly set by JSC (bug?) - if (attribs & JSC::Getter || !object->lookupGetter(exec, id).isUndefinedOrNull()) - result |= QScriptValue::PropertyGetter; - if (attribs & JSC::Setter || !object->lookupSetter(exec, id).isUndefinedOrNull()) - result |= QScriptValue::PropertySetter; - if (attribs & QScript::QObjectMemberAttribute) - result |= QScriptValue::QObjectMember; - result |= QScriptValue::PropertyFlag(attribs & QScriptValue::UserRange); - return result; -} - QVariant &QScriptValuePrivate::variantValue() const { Q_ASSERT(jscValue.inherits(&QScriptObject::info)); @@ -732,7 +586,8 @@ QScriptValue QScriptValue::scope() const if (!d || !d->isObject()) return QScriptValue(); // ### make hidden property - return d->property(QLatin1String("__qt_scope__"), QScriptValue::ResolveLocal); + JSC::JSValue result = d->property(QLatin1String("__qt_scope__"), QScriptValue::ResolveLocal); + return d->engine->scriptValueFromJSCValue(result); } /*! @@ -1433,9 +1288,9 @@ QRegExp QScriptValue::toRegExp() const Q_D(const QScriptValue); if (!isRegExp()) return QRegExp(); - QString pattern = d->property(QLatin1String("source"), QScriptValue::ResolvePrototype).toString(); + QString pattern = property(QLatin1String("source"), QScriptValue::ResolvePrototype).toString(); Qt::CaseSensitivity kase = Qt::CaseSensitive; - if (d->property(QLatin1String("ignoreCase"), QScriptValue::ResolvePrototype).toBool()) + if (property(QLatin1String("ignoreCase"), QScriptValue::ResolvePrototype).toBool()) kase = Qt::CaseInsensitive; return QRegExp(pattern, kase, QRegExp::RegExp2); } @@ -1514,8 +1369,15 @@ void QScriptValue::setProperty(const QString &name, const QScriptValue &value, Q_D(QScriptValue); if (!d || !d->isObject()) return; - JSC::ExecState *exec = d->engine->currentFrame; - d->setProperty(JSC::Identifier(exec, name), value, flags); + QScriptEnginePrivate *valueEngine = QScriptValuePrivate::getEngine(value); + if (valueEngine && (valueEngine != d->engine)) { + qWarning("QScriptValue::setProperty(%s) failed: " + "cannot set value created in a different engine", + qPrintable(name)); + return; + } + JSC::JSValue jsValue = d->engine->scriptValueToJSCValue(value); + d->setProperty(name, jsValue, flags); } /*! @@ -1539,7 +1401,7 @@ QScriptValue QScriptValue::property(const QString &name, Q_D(const QScriptValue); if (!d || !d->isObject()) return QScriptValue(); - return d->property(name, mode); + return d->engine->scriptValueFromJSCValue(d->property(name, mode)); } /*! @@ -1561,7 +1423,7 @@ QScriptValue QScriptValue::property(quint32 arrayIndex, Q_D(const QScriptValue); if (!d || !d->isObject()) return QScriptValue(); - return d->property(arrayIndex, mode); + return d->engine->scriptValueFromJSCValue(d->property(arrayIndex, mode)); } /*! @@ -1588,33 +1450,8 @@ void QScriptValue::setProperty(quint32 arrayIndex, const QScriptValue &value, "cannot set value created in a different engine"); return; } - JSC::ExecState *exec = d->engine->currentFrame; - JSC::JSValue jscValue = d->engine->scriptValueToJSCValue(value); - if (!jscValue) { - JSC::asObject(d->jscValue)->deleteProperty(exec, arrayIndex, /*checkDontDelete=*/false); - } else { - if ((flags & QScriptValue::PropertyGetter) || (flags & QScriptValue::PropertySetter)) { - // fall back to string-based setProperty(), since there is no - // JSC::JSObject::defineGetter(unsigned) - d->setProperty(JSC::Identifier::from(exec, arrayIndex), value, flags); - } else { - if (flags != QScriptValue::KeepExistingFlags) { -// if (JSC::asObject(d->jscValue)->hasOwnProperty(exec, arrayIndex)) -// JSC::asObject(d->jscValue)->deleteProperty(exec, arrayIndex); - unsigned attribs = 0; - if (flags & QScriptValue::ReadOnly) - attribs |= JSC::ReadOnly; - if (flags & QScriptValue::SkipInEnumeration) - attribs |= JSC::DontEnum; - if (flags & QScriptValue::Undeletable) - attribs |= JSC::DontDelete; - attribs |= flags & QScriptValue::UserRange; - JSC::asObject(d->jscValue)->putWithAttributes(exec, arrayIndex, jscValue, attribs); - } else { - JSC::asObject(d->jscValue)->put(exec, arrayIndex, jscValue); - } - } - } + JSC::JSValue jsValue = d->engine->scriptValueToJSCValue(value); + d->setProperty(arrayIndex, jsValue, flags); } /*! @@ -1635,7 +1472,7 @@ QScriptValue QScriptValue::property(const QScriptString &name, Q_D(const QScriptValue); if (!d || !d->isObject() || !QScriptStringPrivate::isValid(name)) return QScriptValue(); - return d->property(name.d_ptr->identifier, mode); + return d->engine->scriptValueFromJSCValue(d->property(name.d_ptr->identifier, mode)); } /*! @@ -1658,7 +1495,15 @@ void QScriptValue::setProperty(const QScriptString &name, Q_D(QScriptValue); if (!d || !d->isObject() || !QScriptStringPrivate::isValid(name)) return; - d->setProperty(name.d_ptr->identifier, value, flags); + QScriptEnginePrivate *valueEngine = QScriptValuePrivate::getEngine(value); + if (valueEngine && (valueEngine != d->engine)) { + qWarning("QScriptValue::setProperty(%s) failed: " + "cannot set value created in a different engine", + qPrintable(name.toString())); + return; + } + JSC::JSValue jsValue = d->engine->scriptValueToJSCValue(value); + d->setProperty(name.d_ptr->identifier, jsValue, flags); } /*! @@ -2177,7 +2022,7 @@ QScriptValue QScriptValue::data() const return d->engine->scriptValueFromJSCValue(scriptObject->data()); } else { // ### make hidden property - return d->property(QLatin1String("__qt_data__"), QScriptValue::ResolveLocal); + return property(QLatin1String("__qt_data__"), QScriptValue::ResolveLocal); } } diff --git a/src/script/api/qscriptvalue_p.h b/src/script/api/qscriptvalue_p.h index 76fbc18..dedc250 100644 --- a/src/script/api/qscriptvalue_p.h +++ b/src/script/api/qscriptvalue_p.h @@ -89,14 +89,16 @@ public: return q.d_ptr->engine; } - inline QScriptValue property(const JSC::Identifier &id, int resolveMode) const; - QScriptValue propertyHelper(const JSC::Identifier &id, int resolveMode) const; - inline QScriptValue property(quint32 index, int resolveMode) const; - QScriptValue propertyHelper(quint32, int resolveMode) const; - inline QScriptValue property(const QString &, int resolveMode) const; - void setProperty(const JSC::Identifier &id, const QScriptValue &value, - const QScriptValue::PropertyFlags &flags); - QScriptValue::PropertyFlags propertyFlags( + inline JSC::JSValue property(const JSC::Identifier &id, int resolveMode) const; + inline JSC::JSValue property(quint32 index, int resolveMode) const; + inline JSC::JSValue property(const QString &, int resolveMode) const; + inline void setProperty(const QString &name, const JSC::JSValue &value, + const QScriptValue::PropertyFlags &flags); + inline void setProperty(const JSC::Identifier &id, const JSC::JSValue &value, + const QScriptValue::PropertyFlags &flags); + inline void setProperty(quint32 index, const JSC::JSValue &value, + const QScriptValue::PropertyFlags &flags); + inline QScriptValue::PropertyFlags propertyFlags( const JSC::Identifier &id, const QScriptValue::ResolveFlags &mode) const; void detachFromEngine(); -- cgit v0.12 From d5af42b1b7d792188c689d5425493756f2dcb79e Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Thu, 18 Feb 2010 15:29:32 +0100 Subject: Avoid calling out to public API in the QtScript implementation There's no reason to construct QScriptValues when JSC::JSValues can be operated on directly. A benchmark showed that ~10% of the time for reading a QObject property from a script was spent just creating and destroying QScriptValue temporaries. It's time to finally get rid of this potential bottleneck, not just in the QObject integration but everywhere. This change refactors the code so that all internal operations are performed on JSC::JSValue (most importantly, conversion from/to Qt types), and the public API functions are just thin wrappers around these. E.g. instead of doing enginePrivate->scriptValueFromJSCValue(jsValue).toQObject() the implementation now does QScriptEnginePrivate::toQObject(jsValue) Other operations are delegated to the engine implementation in similar style. Task-number: QTBUG-8304 Reviewed-by: Jedrzej Nowacki --- src/script/api/qscriptengine.cpp | 487 ++++++++++++++++---------- src/script/api/qscriptengine_p.h | 150 +++++++- src/script/api/qscriptvalue.cpp | 106 +----- src/script/api/qscriptvalue_p.h | 3 - src/script/bridge/qscriptclassobject.cpp | 2 +- src/script/bridge/qscriptdeclarativeclass.cpp | 16 +- src/script/bridge/qscriptqobject.cpp | 106 +++--- src/script/bridge/qscriptvariant.cpp | 2 +- 8 files changed, 513 insertions(+), 359 deletions(-) diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index a045bab..739b3fc 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -54,6 +54,7 @@ #include "TimeoutChecker.h" #include "JSFunction.h" #include "Parser.h" +#include "PropertyNameArray.h" #include "Operations.h" #include "bridge/qscriptfunction_p.h" @@ -546,11 +547,9 @@ JSC::JSValue JSC_HOST_CALL functionDisconnect(JSC::ExecState *exec, JSC::JSObjec if (isFunction(arg1)) slot = arg1; else { - // ### don't go via QScriptValue QScript::SaveFrameHelper saveFrame(engine, exec); - QScriptValue tmp = engine->scriptValueFromJSCValue(arg0); - QString propertyName(arg1.toString(exec)); - slot = engine->scriptValueToJSCValue(tmp.property(propertyName, QScriptValue::ResolvePrototype)); + QString propertyName(QScriptEnginePrivate::toString(exec, arg1)); + slot = QScriptEnginePrivate::property(exec, arg0, propertyName, QScriptValue::ResolvePrototype); } } @@ -630,11 +629,9 @@ JSC::JSValue JSC_HOST_CALL functionConnect(JSC::ExecState *exec, JSC::JSObject * if (isFunction(arg1)) slot = arg1; else { - // ### don't go via QScriptValue QScript::SaveFrameHelper saveFrame(engine, exec); - QScriptValue tmp = engine->scriptValueFromJSCValue(arg0); - QString propertyName = arg1.toString(exec); - slot = engine->scriptValueToJSCValue(tmp.property(propertyName, QScriptValue::ResolvePrototype)); + QString propertyName = QScriptEnginePrivate::toString(exec, arg1); + slot = QScriptEnginePrivate::property(exec, arg0, propertyName, QScriptValue::ResolvePrototype); } } @@ -908,22 +905,15 @@ QScriptEnginePrivate::~QScriptEnginePrivate() } } -QScriptValue QScriptEnginePrivate::scriptValueFromVariant(const QVariant &v) -{ - QScriptValue result = create(v.userType(), v.data()); - Q_ASSERT(result.isValid()); - return result; -} - -QVariant QScriptEnginePrivate::scriptValueToVariant(const QScriptValue &value, int targetType) +QVariant QScriptEnginePrivate::jscValueToVariant(JSC::ExecState *exec, JSC::JSValue value, int targetType) { QVariant v(targetType, (void *)0); - if (QScriptEnginePrivate::convert(value, targetType, v.data(), this)) + if (convertValue(exec, value, targetType, v.data())) return v; if (uint(targetType) == QVariant::LastType) - return value.toVariant(); - if (value.isVariant()) { - v = value.toVariant(); + return toVariant(exec, value); + if (isVariant(value)) { + v = variantValue(value); if (v.canConvert(QVariant::Type(targetType))) { v.convert(QVariant::Type(targetType)); return v; @@ -934,88 +924,61 @@ QVariant QScriptEnginePrivate::scriptValueToVariant(const QScriptValue &value, i return QVariant(targetType, *reinterpret_cast(v.data())); } } - return QVariant(); } -JSC::JSValue QScriptEnginePrivate::jscValueFromVariant(const QVariant &v) -{ - // ### it's inefficient to convert to QScriptValue and then to JSValue - QScriptValue vv = scriptValueFromVariant(v); - QScriptValuePrivate *p = QScriptValuePrivate::get(vv); - switch (p->type) { - case QScriptValuePrivate::JavaScriptCore: - return p->jscValue; - case QScriptValuePrivate::Number: - return JSC::jsNumber(currentFrame, p->numberValue); - case QScriptValuePrivate::String: { - JSC::UString str = p->stringValue; - return JSC::jsString(currentFrame, str); - } - } - return JSC::JSValue(); -} - -QVariant QScriptEnginePrivate::jscValueToVariant(JSC::JSValue value, int targetType) +JSC::JSValue QScriptEnginePrivate::arrayFromStringList(JSC::ExecState *exec, const QStringList &lst) { - // ### it's inefficient to convert to QScriptValue and then to QVariant - return scriptValueToVariant(scriptValueFromJSCValue(value), targetType); -} - -QScriptValue QScriptEnginePrivate::arrayFromStringList(const QStringList &lst) -{ - Q_Q(QScriptEngine); - QScriptValue arr = q->newArray(lst.size()); + JSC::JSValue arr = newArray(exec, lst.size()); for (int i = 0; i < lst.size(); ++i) - arr.setProperty(i, QScriptValue(q, lst.at(i))); + setProperty(exec, arr, i, JSC::jsString(exec, lst.at(i))); return arr; } -QStringList QScriptEnginePrivate::stringListFromArray(const QScriptValue &arr) +QStringList QScriptEnginePrivate::stringListFromArray(JSC::ExecState *exec, JSC::JSValue arr) { QStringList lst; - uint len = arr.property(QLatin1String("length")).toUInt32(); + uint len = toUInt32(exec, property(exec, arr, exec->propertyNames().length)); for (uint i = 0; i < len; ++i) - lst.append(arr.property(i).toString()); + lst.append(toString(exec, property(exec, arr, i))); return lst; } -QScriptValue QScriptEnginePrivate::arrayFromVariantList(const QVariantList &lst) +JSC::JSValue QScriptEnginePrivate::arrayFromVariantList(JSC::ExecState *exec, const QVariantList &lst) { - Q_Q(QScriptEngine); - QScriptValue arr = q->newArray(lst.size()); + JSC::JSValue arr = newArray(exec, lst.size()); for (int i = 0; i < lst.size(); ++i) - arr.setProperty(i, scriptValueFromVariant(lst.at(i))); + setProperty(exec, arr, i, jscValueFromVariant(exec, lst.at(i))); return arr; } -QVariantList QScriptEnginePrivate::variantListFromArray(const QScriptValue &arr) +QVariantList QScriptEnginePrivate::variantListFromArray(JSC::ExecState *exec, JSC::JSValue arr) { QVariantList lst; - uint len = arr.property(QLatin1String("length")).toUInt32(); + uint len = toUInt32(exec, property(exec, arr, exec->propertyNames().length)); for (uint i = 0; i < len; ++i) - lst.append(arr.property(i).toVariant()); + lst.append(toVariant(exec, property(exec, arr, i))); return lst; } -QScriptValue QScriptEnginePrivate::objectFromVariantMap(const QVariantMap &vmap) +JSC::JSValue QScriptEnginePrivate::objectFromVariantMap(JSC::ExecState *exec, const QVariantMap &vmap) { - Q_Q(QScriptEngine); - QScriptValue obj = q->newObject(); + JSC::JSValue obj = JSC::constructEmptyObject(exec); QVariantMap::const_iterator it; for (it = vmap.constBegin(); it != vmap.constEnd(); ++it) - obj.setProperty(it.key(), scriptValueFromVariant(it.value())); + setProperty(exec, obj, it.key(), jscValueFromVariant(exec, it.value())); return obj; } -QVariantMap QScriptEnginePrivate::variantMapFromObject(const QScriptValue &obj) +QVariantMap QScriptEnginePrivate::variantMapFromObject(JSC::ExecState *exec, JSC::JSValue obj) { + JSC::PropertyNameArray propertyNames(exec); + propertyNames.setShouldCache(false); + JSC::asObject(obj)->getOwnPropertyNames(exec, propertyNames, /*includeNonEnumerable=*/true); QVariantMap vmap; - QScriptValueIterator it(obj); - while (it.hasNext()) { - it.next(); - vmap.insert(it.name(), it.value().toVariant()); - } + JSC::PropertyNameArray::const_iterator it = propertyNames.begin(); + for( ; it != propertyNames.end(); ++it) + vmap.insert(it->ustring(), toVariant(exec, property(exec, obj, *it))); return vmap; } @@ -1344,13 +1307,13 @@ JSC::JSValue QScriptEnginePrivate::newQMetaObject( return result; } -bool QScriptEnginePrivate::convertToNativeQObject(const QScriptValue &value, +bool QScriptEnginePrivate::convertToNativeQObject(JSC::ExecState *exec, JSC::JSValue value, const QByteArray &targetType, void **result) { if (!targetType.endsWith('*')) return false; - if (QObject *qobject = value.toQObject()) { + if (QObject *qobject = toQObject(exec, value)) { int start = targetType.startsWith("const ") ? 6 : 0; QByteArray className = targetType.mid(start, targetType.size()-start-1); if (void *instance = qobject->qt_metacast(className)) { @@ -1577,6 +1540,76 @@ JSC::JSValue QScriptEnginePrivate::newVariant(const QVariant &value) return obj; } +JSC::JSValue QScriptEnginePrivate::newVariant(JSC::JSValue objectValue, + const QVariant &value) +{ + if (!isObject(objectValue)) + return newVariant(value); + JSC::JSObject *jscObject = JSC::asObject(objectValue); + if (!jscObject->inherits(&QScriptObject::info)) { + qWarning("QScriptEngine::newVariant(): changing class of non-QScriptObject not supported"); + return JSC::JSValue(); + } + QScriptObject *jscScriptObject = static_cast(jscObject); + if (!isVariant(objectValue)) { + jscScriptObject->setDelegate(new QScript::QVariantDelegate(value)); + } else { + setVariantValue(objectValue, value); + } + return objectValue; +} + +#ifndef QT_NO_REGEXP + +QRegExp QScriptEnginePrivate::toRegExp(JSC::ExecState *exec, JSC::JSValue value) +{ + if (!isRegExp(value)) + return QRegExp(); + QString pattern = toString(exec, property(exec, value, QLatin1String("source"), QScriptValue::ResolvePrototype)); + Qt::CaseSensitivity kase = Qt::CaseSensitive; + if (toBool(exec, property(exec, value, QLatin1String("ignoreCase"), QScriptValue::ResolvePrototype))) + kase = Qt::CaseInsensitive; + return QRegExp(pattern, kase, QRegExp::RegExp2); +} + +#endif + +QVariant QScriptEnginePrivate::toVariant(JSC::ExecState *exec, JSC::JSValue value) +{ + if (isObject(value)) { + if (isVariant(value)) + return variantValue(value); +#ifndef QT_NO_QOBJECT + else if (isQObject(value)) + return qVariantFromValue(toQObject(exec, value)); +#endif + else if (isDate(value)) + return QVariant(toDateTime(exec, value)); +#ifndef QT_NO_REGEXP + else if (isRegExp(value)) + return QVariant(toRegExp(exec, value)); +#endif + else if (isArray(value)) + return variantListFromArray(exec, value); + else if (QScriptDeclarativeClass *dc = declarativeClass(value)) + return dc->toVariant(declarativeObject(value)); + // try to convert to primitive + JSC::JSValue savedException; + saveException(exec, &savedException); + JSC::JSValue prim = value.toPrimitive(exec); + restoreException(exec, savedException); + if (!prim.isObject()) + return toVariant(exec, prim); + } else if (value.isNumber()) { + return QVariant(toNumber(exec, value)); + } else if (value.isString()) { + return QVariant(toString(exec, value)); + } else if (value.isBoolean()) { + return QVariant(toBool(exec, value)); + } + return QVariant(); +} + JSC::JSValue QScriptEnginePrivate::propertyHelper(JSC::ExecState *exec, JSC::JSValue value, const JSC::Identifier &id, int resolveMode) { JSC::JSValue result; @@ -1963,20 +1996,9 @@ QScriptValue QScriptEngine::newVariant(const QVariant &value) QScriptValue QScriptEngine::newVariant(const QScriptValue &object, const QVariant &value) { - if (!object.isObject()) - return newVariant(value); - JSC::JSObject *jscObject = JSC::asObject(QScriptValuePrivate::get(object)->jscValue); - if (!jscObject->inherits(&QScriptObject::info)) { - qWarning("QScriptEngine::newVariant(): changing class of non-QScriptObject not supported"); - return QScriptValue(); - } - QScriptObject *jscScriptObject = static_cast(jscObject); - if (!object.isVariant()) { - jscScriptObject->setDelegate(new QScript::QVariantDelegate(value)); - } else { - QScriptValuePrivate::get(object)->setVariantValue(value); - } - return object; + Q_D(QScriptEngine); + JSC::JSValue jsObject = d->scriptValueToJSCValue(object); + return d->scriptValueFromJSCValue(d->newVariant(jsObject, value)); } #ifndef QT_NO_QOBJECT @@ -2789,128 +2811,126 @@ void QScriptEngine::setDefaultPrototype(int metaTypeId, const QScriptValue &prot QScriptValue QScriptEngine::create(int type, const void *ptr) { Q_D(QScriptEngine); - return d->create(type, ptr); + return d->scriptValueFromJSCValue(d->create(d->currentFrame, type, ptr)); } -QScriptValue QScriptEnginePrivate::create(int type, const void *ptr) +JSC::JSValue QScriptEnginePrivate::create(JSC::ExecState *exec, int type, const void *ptr) { - Q_Q(QScriptEngine); Q_ASSERT(ptr != 0); - QScriptValue result; - QScriptTypeInfo *info = m_typeInfos.value(type); + JSC::JSValue result; + QScriptEnginePrivate *eng = exec ? QScript::scriptEngineFromExec(exec) : 0; + QScriptTypeInfo *info = eng ? eng->m_typeInfos.value(type) : 0; if (info && info->marshal) { - result = info->marshal(q, ptr); + result = eng->scriptValueToJSCValue(info->marshal(eng->q_func(), ptr)); } else { // check if it's one of the types we know switch (QMetaType::Type(type)) { case QMetaType::Void: - return QScriptValue(q, QScriptValue::UndefinedValue); + return JSC::jsUndefined(); case QMetaType::Bool: - return QScriptValue(q, *reinterpret_cast(ptr)); + return JSC::jsBoolean(*reinterpret_cast(ptr)); case QMetaType::Int: - return QScriptValue(q, *reinterpret_cast(ptr)); + return JSC::jsNumber(exec, *reinterpret_cast(ptr)); case QMetaType::UInt: - return QScriptValue(q, *reinterpret_cast(ptr)); + return JSC::jsNumber(exec, *reinterpret_cast(ptr)); case QMetaType::LongLong: - return QScriptValue(q, qsreal(*reinterpret_cast(ptr))); + return JSC::jsNumber(exec, qsreal(*reinterpret_cast(ptr))); case QMetaType::ULongLong: #if defined(Q_OS_WIN) && defined(_MSC_FULL_VER) && _MSC_FULL_VER <= 12008804 #pragma message("** NOTE: You need the Visual Studio Processor Pack to compile support for 64bit unsigned integers.") - return QScriptValue(q, qsreal((qlonglong)*reinterpret_cast(ptr))); + return JSC::jsNumber(exec, qsreal((qlonglong)*reinterpret_cast(ptr))); #elif defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET) - return QScriptValue(q, qsreal((qlonglong)*reinterpret_cast(ptr))); + return JSC::jsNumber(exec, qsreal((qlonglong)*reinterpret_cast(ptr))); #else - return QScriptValue(q, qsreal(*reinterpret_cast(ptr))); + return JSC::jsNumber(exec, qsreal(*reinterpret_cast(ptr))); #endif case QMetaType::Double: - return QScriptValue(q, qsreal(*reinterpret_cast(ptr))); + return JSC::jsNumber(exec, qsreal(*reinterpret_cast(ptr))); case QMetaType::QString: - return QScriptValue(q, *reinterpret_cast(ptr)); + return JSC::jsString(exec, *reinterpret_cast(ptr)); case QMetaType::Float: - return QScriptValue(q, *reinterpret_cast(ptr)); + return JSC::jsNumber(exec, *reinterpret_cast(ptr)); case QMetaType::Short: - return QScriptValue(q, *reinterpret_cast(ptr)); + return JSC::jsNumber(exec, *reinterpret_cast(ptr)); case QMetaType::UShort: - return QScriptValue(q, *reinterpret_cast(ptr)); + return JSC::jsNumber(exec, *reinterpret_cast(ptr)); case QMetaType::Char: - return QScriptValue(q, *reinterpret_cast(ptr)); + return JSC::jsNumber(exec, *reinterpret_cast(ptr)); case QMetaType::UChar: - return QScriptValue(q, *reinterpret_cast(ptr)); + return JSC::jsNumber(exec, *reinterpret_cast(ptr)); case QMetaType::QChar: - return QScriptValue(q, (*reinterpret_cast(ptr)).unicode()); + return JSC::jsNumber(exec, (*reinterpret_cast(ptr)).unicode()); case QMetaType::QStringList: - result = arrayFromStringList(*reinterpret_cast(ptr)); + result = arrayFromStringList(exec, *reinterpret_cast(ptr)); break; case QMetaType::QVariantList: - result = arrayFromVariantList(*reinterpret_cast(ptr)); + result = arrayFromVariantList(exec, *reinterpret_cast(ptr)); break; case QMetaType::QVariantMap: - result = objectFromVariantMap(*reinterpret_cast(ptr)); + result = objectFromVariantMap(exec, *reinterpret_cast(ptr)); break; case QMetaType::QDateTime: - result = q->newDate(*reinterpret_cast(ptr)); + result = newDate(exec, *reinterpret_cast(ptr)); break; case QMetaType::QDate: - result = q->newDate(QDateTime(*reinterpret_cast(ptr))); + result = newDate(exec, QDateTime(*reinterpret_cast(ptr))); break; #ifndef QT_NO_REGEXP case QMetaType::QRegExp: - result = q->newRegExp(*reinterpret_cast(ptr)); + result = newRegExp(exec, *reinterpret_cast(ptr)); break; #endif #ifndef QT_NO_QOBJECT case QMetaType::QObjectStar: case QMetaType::QWidgetStar: - result = q->newQObject(*reinterpret_cast(ptr)); + result = eng->newQObject(*reinterpret_cast(ptr)); break; #endif default: if (type == qMetaTypeId()) { - result = *reinterpret_cast(ptr); - if (!result.isValid()) - return QScriptValue(q, QScriptValue::UndefinedValue); + result = eng->scriptValueToJSCValue(*reinterpret_cast(ptr)); + if (!result) + return JSC::jsUndefined(); } #ifndef QT_NO_QOBJECT // lazy registration of some common list types else if (type == qMetaTypeId()) { - qScriptRegisterSequenceMetaType(q); - return create(type, ptr); + qScriptRegisterSequenceMetaType(eng->q_func()); + return create(exec, type, ptr); } #endif else if (type == qMetaTypeId >()) { - qScriptRegisterSequenceMetaType >(q); - return create(type, ptr); + qScriptRegisterSequenceMetaType >(eng->q_func()); + return create(exec, type, ptr); } else { QByteArray typeName = QMetaType::typeName(type); if (typeName == "QVariant") - result = scriptValueFromVariant(*reinterpret_cast(ptr)); + result = jscValueFromVariant(exec, *reinterpret_cast(ptr)); if (typeName.endsWith('*') && !*reinterpret_cast(ptr)) - return QScriptValue(q, QScriptValue::NullValue); + return JSC::jsNull(); else - result = q->newVariant(QVariant(type, ptr)); + result = eng->newVariant(QVariant(type, ptr)); } } } - if (result.isObject() && info && info->prototype - && JSC::JSValue::strictEqual(scriptValueToJSCValue(result.prototype()), originalGlobalObject()->objectPrototype())) { - result.setPrototype(scriptValueFromJSCValue(info->prototype)); + if (result && result.isObject() && info && info->prototype + && JSC::JSValue::strictEqual(JSC::asObject(result)->prototype(), eng->originalGlobalObject()->objectPrototype())) { + JSC::asObject(result)->setPrototype(info->prototype); } return result; } -bool QScriptEnginePrivate::convert(const QScriptValue &value, - int type, void *ptr, - QScriptEnginePrivate *eng) +bool QScriptEnginePrivate::convertValue(JSC::ExecState *exec, JSC::JSValue value, + int type, void *ptr) { - if (!eng) - eng = QScriptValuePrivate::getEngine(value); + QScriptEnginePrivate *eng = exec ? QScript::scriptEngineFromExec(exec) : 0; if (eng) { QScriptTypeInfo *info = eng->m_typeInfos.value(type); if (info && info->demarshal) { - info->demarshal(value, ptr); + info->demarshal(eng->scriptValueFromJSCValue(value), ptr); return true; } } @@ -2918,78 +2938,78 @@ bool QScriptEnginePrivate::convert(const QScriptValue &value, // check if it's one of the types we know switch (QMetaType::Type(type)) { case QMetaType::Bool: - *reinterpret_cast(ptr) = value.toBoolean(); + *reinterpret_cast(ptr) = toBool(exec, value); return true; case QMetaType::Int: - *reinterpret_cast(ptr) = value.toInt32(); + *reinterpret_cast(ptr) = toInt32(exec, value); return true; case QMetaType::UInt: - *reinterpret_cast(ptr) = value.toUInt32(); + *reinterpret_cast(ptr) = toUInt32(exec, value); return true; case QMetaType::LongLong: - *reinterpret_cast(ptr) = qlonglong(value.toInteger()); + *reinterpret_cast(ptr) = qlonglong(toInteger(exec, value)); return true; case QMetaType::ULongLong: - *reinterpret_cast(ptr) = qulonglong(value.toInteger()); + *reinterpret_cast(ptr) = qulonglong(toInteger(exec, value)); return true; case QMetaType::Double: - *reinterpret_cast(ptr) = value.toNumber(); + *reinterpret_cast(ptr) = toNumber(exec, value); return true; case QMetaType::QString: if (value.isUndefined() || value.isNull()) *reinterpret_cast(ptr) = QString(); else - *reinterpret_cast(ptr) = value.toString(); + *reinterpret_cast(ptr) = toString(exec, value); return true; case QMetaType::Float: - *reinterpret_cast(ptr) = value.toNumber(); + *reinterpret_cast(ptr) = toNumber(exec, value); return true; case QMetaType::Short: - *reinterpret_cast(ptr) = short(value.toInt32()); + *reinterpret_cast(ptr) = short(toInt32(exec, value)); return true; case QMetaType::UShort: - *reinterpret_cast(ptr) = value.toUInt16(); + *reinterpret_cast(ptr) = QScript::ToUInt16(toNumber(exec, value)); return true; case QMetaType::Char: - *reinterpret_cast(ptr) = char(value.toInt32()); + *reinterpret_cast(ptr) = char(toInt32(exec, value)); return true; case QMetaType::UChar: - *reinterpret_cast(ptr) = (unsigned char)(value.toInt32()); + *reinterpret_cast(ptr) = (unsigned char)(toInt32(exec, value)); return true; case QMetaType::QChar: if (value.isString()) { - QString str = value.toString(); + QString str = toString(exec, value); *reinterpret_cast(ptr) = str.isEmpty() ? QChar() : str.at(0); } else { - *reinterpret_cast(ptr) = QChar(value.toUInt16()); + *reinterpret_cast(ptr) = QChar(QScript::ToUInt16(toNumber(exec, value))); } return true; case QMetaType::QDateTime: - if (value.isDate()) { - *reinterpret_cast(ptr) = value.toDateTime(); + if (isDate(value)) { + *reinterpret_cast(ptr) = toDateTime(exec, value); return true; } break; case QMetaType::QDate: - if (value.isDate()) { - *reinterpret_cast(ptr) = value.toDateTime().date(); + if (isDate(value)) { + *reinterpret_cast(ptr) = toDateTime(exec, value).date(); return true; } break; #ifndef QT_NO_REGEXP case QMetaType::QRegExp: - if (value.isRegExp()) { - *reinterpret_cast(ptr) = value.toRegExp(); + if (isRegExp(value)) { + *reinterpret_cast(ptr) = toRegExp(exec, value); return true; } break; #endif #ifndef QT_NO_QOBJECT case QMetaType::QObjectStar: - if (value.isQObject() || value.isNull()) { - *reinterpret_cast(ptr) = value.toQObject(); + if (isQObject(value) || value.isNull()) { + *reinterpret_cast(ptr) = toQObject(exec, value); return true; } break; case QMetaType::QWidgetStar: - if (value.isQObject() || value.isNull()) { - QObject *qo = value.toQObject(); + if (isQObject(value) || value.isNull()) { + QObject *qo = toQObject(exec, value); if (!qo || qo->isWidgetType()) { *reinterpret_cast(ptr) = reinterpret_cast(qo); return true; @@ -2997,18 +3017,18 @@ bool QScriptEnginePrivate::convert(const QScriptValue &value, } break; #endif case QMetaType::QStringList: - if (value.isArray()) { - *reinterpret_cast(ptr) = stringListFromArray(value); + if (isArray(value)) { + *reinterpret_cast(ptr) = stringListFromArray(exec, value); return true; } break; case QMetaType::QVariantList: - if (value.isArray()) { - *reinterpret_cast(ptr) = variantListFromArray(value); + if (isArray(value)) { + *reinterpret_cast(ptr) = variantListFromArray(exec, value); return true; } break; case QMetaType::QVariantMap: - if (value.isObject()) { - *reinterpret_cast(ptr) = variantMapFromObject(value); + if (isObject(value)) { + *reinterpret_cast(ptr) = variantMapFromObject(exec, value); return true; } break; default: @@ -3017,28 +3037,28 @@ bool QScriptEnginePrivate::convert(const QScriptValue &value, QByteArray name = QMetaType::typeName(type); #ifndef QT_NO_QOBJECT - if (convertToNativeQObject(value, name, reinterpret_cast(ptr))) + if (convertToNativeQObject(exec, value, name, reinterpret_cast(ptr))) return true; #endif - if (value.isVariant() && name.endsWith('*')) { + if (isVariant(value) && name.endsWith('*')) { int valueType = QMetaType::type(name.left(name.size()-1)); - QVariant &var = QScriptValuePrivate::get(value)->variantValue(); + QVariant &var = variantValue(value); if (valueType == var.userType()) { *reinterpret_cast(ptr) = var.data(); return true; } else { // look in the prototype chain - QScriptValue proto = value.prototype(); + JSC::JSValue proto = JSC::asObject(value)->prototype(); while (proto.isObject()) { bool canCast = false; - if (proto.isVariant()) { - canCast = (type == proto.toVariant().userType()) - || (valueType && (valueType == proto.toVariant().userType())); + if (isVariant(proto)) { + canCast = (type == variantValue(proto).userType()) + || (valueType && (valueType == variantValue(proto).userType())); } #ifndef QT_NO_QOBJECT - else if (proto.isQObject()) { + else if (isQObject(proto)) { QByteArray className = name.left(name.size()-1); - if (QObject *qobject = proto.toQObject()) + if (QObject *qobject = toQObject(exec, proto)) canCast = qobject->qt_metacast(className) != 0; } #endif @@ -3050,7 +3070,7 @@ bool QScriptEnginePrivate::convert(const QScriptValue &value, *reinterpret_cast(ptr) = var.data(); return true; } - proto = proto.prototype(); + proto = JSC::asObject(proto)->prototype(); } } } else if (value.isNull() && name.endsWith('*')) { @@ -3059,10 +3079,10 @@ bool QScriptEnginePrivate::convert(const QScriptValue &value, } else if (type == qMetaTypeId()) { if (!eng) return false; - *reinterpret_cast(ptr) = value; + *reinterpret_cast(ptr) = eng->scriptValueFromJSCValue(value); return true; } else if (name == "QVariant") { - *reinterpret_cast(ptr) = value.toVariant(); + *reinterpret_cast(ptr) = toVariant(exec, value); return true; } @@ -3072,14 +3092,14 @@ bool QScriptEnginePrivate::convert(const QScriptValue &value, if (!eng) return false; qScriptRegisterSequenceMetaType(eng->q_func()); - return convert(value, type, ptr, eng); + return convertValue(exec, value, type, ptr); } #endif else if (type == qMetaTypeId >()) { if (!eng) return false; qScriptRegisterSequenceMetaType >(eng->q_func()); - return convert(value, type, ptr, eng); + return convertValue(exec, value, type, ptr); } #if 0 @@ -3091,6 +3111,102 @@ bool QScriptEnginePrivate::convert(const QScriptValue &value, return false; } +bool QScriptEnginePrivate::convertNumber(qsreal value, int type, void *ptr) +{ + switch (QMetaType::Type(type)) { + case QMetaType::Bool: + *reinterpret_cast(ptr) = QScript::ToBool(value); + return true; + case QMetaType::Int: + *reinterpret_cast(ptr) = QScript::ToInt32(value); + return true; + case QMetaType::UInt: + *reinterpret_cast(ptr) = QScript::ToUInt32(value); + return true; + case QMetaType::LongLong: + *reinterpret_cast(ptr) = qlonglong(QScript::ToInteger(value)); + return true; + case QMetaType::ULongLong: + *reinterpret_cast(ptr) = qulonglong(QScript::ToInteger(value)); + return true; + case QMetaType::Double: + *reinterpret_cast(ptr) = value; + return true; + case QMetaType::QString: + *reinterpret_cast(ptr) = QScript::ToString(value); + return true; + case QMetaType::Float: + *reinterpret_cast(ptr) = value; + return true; + case QMetaType::Short: + *reinterpret_cast(ptr) = short(QScript::ToInt32(value)); + return true; + case QMetaType::UShort: + *reinterpret_cast(ptr) = QScript::ToUInt16(value); + return true; + case QMetaType::Char: + *reinterpret_cast(ptr) = char(QScript::ToInt32(value)); + return true; + case QMetaType::UChar: + *reinterpret_cast(ptr) = (unsigned char)(QScript::ToInt32(value)); + return true; + case QMetaType::QChar: + *reinterpret_cast(ptr) = QChar(QScript::ToUInt16(value)); + return true; + default: + break; + } + return false; +} + +bool QScriptEnginePrivate::convertString(const QString &value, int type, void *ptr) +{ + switch (QMetaType::Type(type)) { + case QMetaType::Bool: + *reinterpret_cast(ptr) = QScript::ToBool(value); + return true; + case QMetaType::Int: + *reinterpret_cast(ptr) = QScript::ToInt32(value); + return true; + case QMetaType::UInt: + *reinterpret_cast(ptr) = QScript::ToUInt32(value); + return true; + case QMetaType::LongLong: + *reinterpret_cast(ptr) = qlonglong(QScript::ToInteger(value)); + return true; + case QMetaType::ULongLong: + *reinterpret_cast(ptr) = qulonglong(QScript::ToInteger(value)); + return true; + case QMetaType::Double: + *reinterpret_cast(ptr) = QScript::ToNumber(value); + return true; + case QMetaType::QString: + *reinterpret_cast(ptr) = value; + return true; + case QMetaType::Float: + *reinterpret_cast(ptr) = QScript::ToNumber(value); + return true; + case QMetaType::Short: + *reinterpret_cast(ptr) = short(QScript::ToInt32(value)); + return true; + case QMetaType::UShort: + *reinterpret_cast(ptr) = QScript::ToUInt16(value); + return true; + case QMetaType::Char: + *reinterpret_cast(ptr) = char(QScript::ToInt32(value)); + return true; + case QMetaType::UChar: + *reinterpret_cast(ptr) = (unsigned char)(QScript::ToInt32(value)); + return true; + case QMetaType::QChar: + *reinterpret_cast(ptr) = QChar(QScript::ToUInt16(value)); + return true; + default: + break; + } + return false; +} + bool QScriptEnginePrivate::hasDemarshalFunction(int type) const { QScriptTypeInfo *info = m_typeInfos.value(type); @@ -3103,7 +3219,7 @@ bool QScriptEnginePrivate::hasDemarshalFunction(int type) const bool QScriptEngine::convert(const QScriptValue &value, int type, void *ptr) { Q_D(QScriptEngine); - return QScriptEnginePrivate::convert(value, type, ptr, d); + return QScriptEnginePrivate::convertValue(d->currentFrame, d->scriptValueToJSCValue(value), type, ptr); } /*! @@ -3111,7 +3227,20 @@ bool QScriptEngine::convert(const QScriptValue &value, int type, void *ptr) */ bool QScriptEngine::convertV2(const QScriptValue &value, int type, void *ptr) { - return QScriptEnginePrivate::convert(value, type, ptr, /*engine=*/0); + QScriptValuePrivate *vp = QScriptValuePrivate::get(value); + if (vp) { + switch (vp->type) { + case QScriptValuePrivate::JavaScriptCore: { + JSC::ExecState *exec = vp->engine ? vp->engine->currentFrame : 0; + return QScriptEnginePrivate::convertValue(exec, vp->jscValue, type, ptr); + } + case QScriptValuePrivate::Number: + return QScriptEnginePrivate::convertNumber(vp->numberValue, type, ptr); + case QScriptValuePrivate::String: + return QScriptEnginePrivate::convertString(vp->stringValue, type, ptr); + } + } + return false; } /*! diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h index 4be9146..eff34af 100644 --- a/src/script/api/qscriptengine_p.h +++ b/src/script/api/qscriptengine_p.h @@ -44,7 +44,12 @@ #include #include "qscriptvalue_p.h" #include "qscriptstring_p.h" +#include "bridge/qscriptclassobject_p.h" +#include "bridge/qscriptdeclarativeclass_p.h" +#include "bridge/qscriptdeclarativeobject_p.h" #include "bridge/qscriptobject_p.h" +#include "bridge/qscriptqobject_p.h" +#include "bridge/qscriptvariant_p.h" #include "utils/qscriptdate_p.h" #include "DateConstructor.h" @@ -145,6 +150,8 @@ public: static inline bool isObject(JSC::JSValue); static inline bool isRegExp(JSC::JSValue); static inline bool isVariant(JSC::JSValue); + static inline bool isQObject(JSC::JSValue); + static inline bool isQMetaObject(JSC::JSValue); static inline bool toBool(JSC::ExecState *, JSC::JSValue); static inline qsreal toInteger(JSC::ExecState *, JSC::JSValue); @@ -155,6 +162,12 @@ public: static inline QString toString(JSC::ExecState *, JSC::JSValue); static inline QDateTime toDateTime(JSC::ExecState *, JSC::JSValue); +#ifndef QT_NO_REGEXP + static QRegExp toRegExp(JSC::ExecState*, JSC::JSValue); +#endif + static QVariant toVariant(JSC::ExecState *, JSC::JSValue); + static inline QObject *toQObject(JSC::ExecState *, JSC::JSValue); + static inline const QMetaObject *toQMetaObject(JSC::ExecState *, JSC::JSValue); static inline JSC::JSValue property(JSC::ExecState*, JSC::JSValue, const JSC::Identifier &id, int resolveMode = QScriptValue::ResolvePrototype); @@ -174,29 +187,29 @@ public: static inline QScriptValue::PropertyFlags propertyFlags(JSC::ExecState*, JSC::JSValue value, const QString &name, const QScriptValue::ResolveFlags &mode); - static bool convert(const QScriptValue &value, - int type, void *ptr, - QScriptEnginePrivate *eng); - QScriptValue create(int type, const void *ptr); + static bool convertValue(JSC::ExecState*, JSC::JSValue value, + int type, void *ptr); + static bool convertNumber(qsreal, int type, void *ptr); + static bool convertString(const QString &, int type, void *ptr); + static JSC::JSValue create(JSC::ExecState*, int type, const void *ptr); bool hasDemarshalFunction(int type) const; inline QScriptValue scriptValueFromJSCValue(JSC::JSValue value); inline JSC::JSValue scriptValueToJSCValue(const QScriptValue &value); - QScriptValue scriptValueFromVariant(const QVariant &value); - QVariant scriptValueToVariant(const QScriptValue &value, int targetType); - - JSC::JSValue jscValueFromVariant(const QVariant &value); - QVariant jscValueToVariant(JSC::JSValue value, int targetType); + static inline JSC::JSValue jscValueFromVariant(JSC::ExecState*, const QVariant &value); + static QVariant jscValueToVariant(JSC::ExecState*, JSC::JSValue value, int targetType); + static inline QVariant &variantValue(JSC::JSValue value); + static inline void setVariantValue(JSC::JSValue objectValue, const QVariant &value); - QScriptValue arrayFromStringList(const QStringList &lst); - static QStringList stringListFromArray(const QScriptValue &arr); + static JSC::JSValue arrayFromStringList(JSC::ExecState*, const QStringList &lst); + static QStringList stringListFromArray(JSC::ExecState*, JSC::JSValue arr); - QScriptValue arrayFromVariantList(const QVariantList &lst); - static QVariantList variantListFromArray(const QScriptValue &arr); + static JSC::JSValue arrayFromVariantList(JSC::ExecState*, const QVariantList &lst); + static QVariantList variantListFromArray(JSC::ExecState*, JSC::JSValue arr); - QScriptValue objectFromVariantMap(const QVariantMap &vmap); - static QVariantMap variantMapFromObject(const QScriptValue &obj); + static JSC::JSValue objectFromVariantMap(JSC::ExecState*, const QVariantMap &vmap); + static QVariantMap variantMapFromObject(JSC::ExecState*, JSC::JSValue obj); JSC::JSValue defaultPrototype(int metaTypeId) const; void setDefaultPrototype(int metaTypeId, JSC::JSValue prototype); @@ -269,6 +282,10 @@ public: static JSC::JSValue newRegExp(JSC::ExecState *, const QString &pattern, const QString &flags); JSC::JSValue newVariant(const QVariant &); + JSC::JSValue newVariant(JSC::JSValue objectValue, const QVariant &); + + static inline QScriptDeclarativeClass *declarativeClass(JSC::JSValue); + static inline QScriptDeclarativeClass::Object *declarativeObject(JSC::JSValue); #ifndef QT_NO_QOBJECT JSC::JSValue newQObject(QObject *object, @@ -277,7 +294,7 @@ public: JSC::JSValue newQMetaObject(const QMetaObject *metaObject, JSC::JSValue ctor); - static bool convertToNativeQObject(const QScriptValue &value, + static bool convertToNativeQObject(JSC::ExecState*, JSC::JSValue, const QByteArray &targetType, void **result); @@ -525,6 +542,13 @@ inline void QScriptEnginePrivate::unregisterScriptValue(QScriptValuePrivate *val value->next = 0; } +inline JSC::JSValue QScriptEnginePrivate::jscValueFromVariant(JSC::ExecState *exec, const QVariant &v) +{ + JSC::JSValue result = create(exec, v.userType(), v.data()); + Q_ASSERT(result); + return result; +} + inline QScriptValue QScriptEnginePrivate::scriptValueFromJSCValue(JSC::JSValue value) { if (!value) @@ -801,6 +825,30 @@ inline bool QScriptEnginePrivate::isVariant(JSC::JSValue value) return (delegate && (delegate->type() == QScriptObjectDelegate::Variant)); } +inline bool QScriptEnginePrivate::isQObject(JSC::JSValue value) +{ +#ifndef QT_NO_QOBJECT + if (!isObject(value) || !value.inherits(&QScriptObject::info)) + return false; + QScriptObject *object = static_cast(JSC::asObject(value)); + QScriptObjectDelegate *delegate = object->delegate(); + return (delegate && (delegate->type() == QScriptObjectDelegate::QtObject || + (delegate->type() == QScriptObjectDelegate::DeclarativeClassObject && + static_cast(delegate)->scriptClass()->isQObject()))); +#else + return false; +#endif +} + +inline bool QScriptEnginePrivate::isQMetaObject(JSC::JSValue value) +{ +#ifndef QT_NO_QOBJECT + return JSC::asObject(value)->inherits(&QScript::QMetaObjectWrapperObject::info); +#else + return false; +#endif +} + inline bool QScriptEnginePrivate::toBool(JSC::ExecState *exec, JSC::JSValue value) { JSC::JSValue savedException; @@ -876,6 +924,76 @@ inline QDateTime QScriptEnginePrivate::toDateTime(JSC::ExecState *, JSC::JSValue return QScript::ToDateTime(t, Qt::LocalTime); } +inline QObject *QScriptEnginePrivate::toQObject(JSC::ExecState *exec, JSC::JSValue value) +{ +#ifndef QT_NO_QOBJECT + if (isObject(value) && value.inherits(&QScriptObject::info)) { + QScriptObject *object = static_cast(JSC::asObject(value)); + QScriptObjectDelegate *delegate = object->delegate(); + if (!delegate) + return 0; + if (delegate->type() == QScriptObjectDelegate::QtObject) + return static_cast(delegate)->value(); + if (delegate->type() == QScriptObjectDelegate::DeclarativeClassObject) + return static_cast(delegate)->scriptClass()->toQObject(declarativeObject(value)); + if (delegate->type() == QScriptObjectDelegate::Variant) { + QVariant var = variantValue(value); + int type = var.userType(); + if ((type == QMetaType::QObjectStar) || (type == QMetaType::QWidgetStar)) + return *reinterpret_cast(var.constData()); + } + } +#endif + return 0; +} + +inline const QMetaObject *QScriptEnginePrivate::toQMetaObject(JSC::ExecState*, JSC::JSValue value) +{ +#ifndef QT_NO_QOBJECT + if (isQMetaObject(value)) + return static_cast(JSC::asObject(value))->value(); +#endif + return 0; +} + +inline QVariant &QScriptEnginePrivate::variantValue(JSC::JSValue value) +{ + Q_ASSERT(value.inherits(&QScriptObject::info)); + QScriptObjectDelegate *delegate = static_cast(JSC::asObject(value))->delegate(); + Q_ASSERT(delegate && (delegate->type() == QScriptObjectDelegate::Variant)); + return static_cast(delegate)->value(); +} + +inline void QScriptEnginePrivate::setVariantValue(JSC::JSValue objectValue, const QVariant &value) +{ + Q_ASSERT(objectValue.inherits(&QScriptObject::info)); + QScriptObjectDelegate *delegate = static_cast(JSC::asObject(objectValue))->delegate(); + Q_ASSERT(delegate && (delegate->type() == QScriptObjectDelegate::Variant)); + static_cast(delegate)->setValue(value); +} + +inline QScriptDeclarativeClass *QScriptEnginePrivate::declarativeClass(JSC::JSValue v) +{ + if (!QScriptEnginePrivate::isObject(v) || !v.inherits(&QScriptObject::info)) + return 0; + QScriptObject *scriptObject = static_cast(JSC::asObject(v)); + QScriptObjectDelegate *delegate = scriptObject->delegate(); + if (!delegate || (delegate->type() != QScriptObjectDelegate::DeclarativeClassObject)) + return 0; + return static_cast(delegate)->scriptClass(); +} + +inline QScriptDeclarativeClass::Object *QScriptEnginePrivate::declarativeObject(JSC::JSValue v) +{ + if (!QScriptEnginePrivate::isObject(v) || !v.inherits(&QScriptObject::info)) + return 0; + QScriptObject *scriptObject = static_cast(JSC::asObject(v)); + QScriptObjectDelegate *delegate = scriptObject->delegate(); + if (!delegate || (delegate->type() != QScriptObjectDelegate::DeclarativeClassObject)) + return 0; + return static_cast(delegate)->object(); +} + QT_END_NAMESPACE #endif diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index a7d9f79..7f1fdaa 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -42,14 +42,6 @@ #include #include -#include "utils/qscriptdate_p.h" -#include "bridge/qscriptobject_p.h" -#include "bridge/qscriptclassobject_p.h" -#include "bridge/qscriptvariant_p.h" -#include "bridge/qscriptqobject_p.h" -#include "bridge/qscriptdeclarativeclass_p.h" -#include "bridge/qscriptdeclarativeobject_p.h" - /*! \since 4.3 \class QScriptValue @@ -176,22 +168,6 @@ QT_BEGIN_NAMESPACE -QVariant &QScriptValuePrivate::variantValue() const -{ - Q_ASSERT(jscValue.inherits(&QScriptObject::info)); - QScriptObjectDelegate *delegate = static_cast(JSC::asObject(jscValue))->delegate(); - Q_ASSERT(delegate && (delegate->type() == QScriptObjectDelegate::Variant)); - return static_cast(delegate)->value(); -} - -void QScriptValuePrivate::setVariantValue(const QVariant &value) -{ - Q_ASSERT(jscValue.inherits(&QScriptObject::info)); - QScriptObjectDelegate *delegate = static_cast(JSC::asObject(jscValue))->delegate(); - Q_ASSERT(delegate && (delegate->type() == QScriptObjectDelegate::Variant)); - static_cast(delegate)->setValue(value); -} - void QScriptValuePrivate::detachFromEngine() { if (isJSC()) @@ -1205,40 +1181,10 @@ QVariant QScriptValue::toVariant() const if (!d) return QVariant(); switch (d->type) { - case QScriptValuePrivate::JavaScriptCore: - if (isObject()) { - if (isVariant()) - return d->variantValue(); -#ifndef QT_NO_QOBJECT - else if (isQObject()) - return qVariantFromValue(toQObject()); -#endif - else if (isDate()) - return QVariant(toDateTime()); -#ifndef QT_NO_REGEXP - else if (isRegExp()) - return QVariant(toRegExp()); -#endif - else if (isArray()) - return QScriptEnginePrivate::variantListFromArray(*this); - else if (QScriptDeclarativeClass *dc = QScriptDeclarativeClass::scriptClass(*this)) - return dc->toVariant(QScriptDeclarativeClass::object(*this)); - // try to convert to primitive - JSC::ExecState *exec = d->engine->currentFrame; - JSC::JSValue savedException; - QScriptEnginePrivate::saveException(exec, &savedException); - JSC::JSValue prim = d->jscValue.toPrimitive(exec); - QScriptEnginePrivate::restoreException(exec, savedException); - if (!prim.isObject()) - return d->engine->scriptValueFromJSCValue(prim).toVariant(); - } else if (isNumber()) { - return QVariant(toNumber()); - } else if (isString()) { - return QVariant(toString()); - } else if (isBool()) { - return QVariant(toBool()); - } - return QVariant(); + case QScriptValuePrivate::JavaScriptCore: { + JSC::ExecState *exec = d->engine ? d->engine->currentFrame : 0; + return QScriptEnginePrivate::toVariant(exec, d->jscValue); + } case QScriptValuePrivate::Number: return QVariant(d->numberValue); case QScriptValuePrivate::String: @@ -1286,13 +1232,9 @@ QDateTime QScriptValue::toDateTime() const QRegExp QScriptValue::toRegExp() const { Q_D(const QScriptValue); - if (!isRegExp()) - return QRegExp(); - QString pattern = property(QLatin1String("source"), QScriptValue::ResolvePrototype).toString(); - Qt::CaseSensitivity kase = Qt::CaseSensitive; - if (property(QLatin1String("ignoreCase"), QScriptValue::ResolvePrototype).toBool()) - kase = Qt::CaseInsensitive; - return QRegExp(pattern, kase, QRegExp::RegExp2); + if (!d || !d->engine) + return QRegExp(); + return QScriptEnginePrivate::toRegExp(d->engine->currentFrame, d->jscValue); } #endif // QT_NO_REGEXP @@ -1309,19 +1251,9 @@ QRegExp QScriptValue::toRegExp() const QObject *QScriptValue::toQObject() const { Q_D(const QScriptValue); - if (isQObject()) { - QScriptObject *object = static_cast(JSC::asObject(d->jscValue)); - QScriptObjectDelegate *delegate = object->delegate(); - if (delegate->type() == QScriptObjectDelegate::DeclarativeClassObject) - return static_cast(delegate)->scriptClass()->toQObject(QScriptDeclarativeClass::object(*this)); - return static_cast(delegate)->value(); - } else if (isVariant()) { - QVariant var = toVariant(); - int type = var.userType(); - if ((type == QMetaType::QObjectStar) || (type == QMetaType::QWidgetStar)) - return *reinterpret_cast(var.constData()); - } - return 0; + if (!d || !d->engine) + return 0; + return QScriptEnginePrivate::toQObject(d->engine->currentFrame, d->jscValue); } /*! @@ -1333,9 +1265,9 @@ QObject *QScriptValue::toQObject() const const QMetaObject *QScriptValue::toQMetaObject() const { Q_D(const QScriptValue); - if (isQMetaObject()) - return static_cast(JSC::asObject(d->jscValue))->value(); - return 0; + if (!d || !d->engine) + return 0; + return QScriptEnginePrivate::toQMetaObject(d->engine->currentFrame, d->jscValue); } /*! @@ -1971,13 +1903,9 @@ bool QScriptValue::isVariant() const bool QScriptValue::isQObject() const { Q_D(const QScriptValue); - if (!d || !d->isJSC() || !d->jscValue.inherits(&QScriptObject::info)) + if (!d || !d->isJSC()) return false; - QScriptObject *object = static_cast(JSC::asObject(d->jscValue)); - QScriptObjectDelegate *delegate = object->delegate(); - return (delegate && (delegate->type() == QScriptObjectDelegate::QtObject || - (delegate->type() == QScriptObjectDelegate::DeclarativeClassObject && - static_cast(delegate)->scriptClass()->isQObject()))); + return QScriptEnginePrivate::isQObject(d->jscValue); } /*! @@ -1989,9 +1917,9 @@ bool QScriptValue::isQObject() const bool QScriptValue::isQMetaObject() const { Q_D(const QScriptValue); - if (!d || !d->isObject()) + if (!d || !d->isJSC()) return false; - return JSC::asObject(d->jscValue)->inherits(&QScript::QMetaObjectWrapperObject::info); + return QScriptEnginePrivate::isQMetaObject(d->jscValue); } /*! diff --git a/src/script/api/qscriptvalue_p.h b/src/script/api/qscriptvalue_p.h index dedc250..77b7330 100644 --- a/src/script/api/qscriptvalue_p.h +++ b/src/script/api/qscriptvalue_p.h @@ -69,9 +69,6 @@ public: inline bool isJSC() const; inline bool isObject() const; - QVariant &variantValue() const; - void setVariantValue(const QVariant &value); - static inline QScriptValuePrivate *get(const QScriptValue &q) { return q.d_ptr.data(); diff --git a/src/script/bridge/qscriptclassobject.cpp b/src/script/bridge/qscriptclassobject.cpp index a3dd239..ce0a08e 100644 --- a/src/script/bridge/qscriptclassobject.cpp +++ b/src/script/bridge/qscriptclassobject.cpp @@ -206,7 +206,7 @@ JSC::JSValue JSC_HOST_CALL ClassObjectDelegate::call(JSC::ExecState *exec, JSC:: QVariant result = scriptClass->extension(QScriptClass::Callable, qVariantFromValue(ctx)); eng_p->popContext(); eng_p->currentFrame = oldFrame; - return eng_p->jscValueFromVariant(result); + return QScriptEnginePrivate::jscValueFromVariant(exec, result); } JSC::ConstructType ClassObjectDelegate::getConstructData(QScriptObject*, JSC::ConstructData &constructData) diff --git a/src/script/bridge/qscriptdeclarativeclass.cpp b/src/script/bridge/qscriptdeclarativeclass.cpp index ce2fc23..1d11ede 100644 --- a/src/script/bridge/qscriptdeclarativeclass.cpp +++ b/src/script/bridge/qscriptdeclarativeclass.cpp @@ -207,25 +207,17 @@ QScriptDeclarativeClass::newObjectValue(QScriptEngine *engine, QScriptDeclarativeClass *QScriptDeclarativeClass::scriptClass(const QScriptValue &v) { QScriptValuePrivate *d = QScriptValuePrivate::get(v); - if (!d || !d->isJSC() || !d->jscValue.inherits(&QScriptObject::info)) + if (!d || !d->isJSC()) return 0; - QScriptObject *scriptObject = static_cast(JSC::asObject(d->jscValue)); - QScriptObjectDelegate *delegate = scriptObject->delegate(); - if (!delegate || (delegate->type() != QScriptObjectDelegate::DeclarativeClassObject)) - return 0; - return static_cast(delegate)->scriptClass(); + return QScriptEnginePrivate::declarativeClass(d->jscValue); } QScriptDeclarativeClass::Object *QScriptDeclarativeClass::object(const QScriptValue &v) { QScriptValuePrivate *d = QScriptValuePrivate::get(v); - if (!d || !d->isJSC() || !d->jscValue.inherits(&QScriptObject::info)) - return 0; - QScriptObject *scriptObject = static_cast(JSC::asObject(d->jscValue)); - QScriptObjectDelegate *delegate = scriptObject->delegate(); - if (!delegate || (delegate->type() != QScriptObjectDelegate::DeclarativeClassObject)) + if (!d || !d->isJSC()) return 0; - return static_cast(delegate)->object(); + return QScriptEnginePrivate::declarativeObject(d->jscValue); } QScriptValue QScriptDeclarativeClass::function(const QScriptValue &v, const Identifier &name) diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp index db312bc..30e5a26 100644 --- a/src/script/bridge/qscriptqobject.cpp +++ b/src/script/bridge/qscriptqobject.cpp @@ -169,17 +169,15 @@ static inline QByteArray methodName(const QMetaMethod &method) return signature.left(signature.indexOf('(')); } -static QVariant variantFromValue(QScriptEnginePrivate *eng, - int targetType, const QScriptValue &value) +static QVariant variantFromValue(JSC::ExecState *exec, int targetType, JSC::JSValue value) { QVariant v(targetType, (void *)0); - Q_ASSERT(eng); - if (QScriptEnginePrivate::convert(value, targetType, v.data(), eng)) + if (QScriptEnginePrivate::convertValue(exec, value, targetType, v.data())) return v; if (uint(targetType) == QVariant::LastType) - return value.toVariant(); - if (value.isVariant()) { - v = value.toVariant(); + return QScriptEnginePrivate::toVariant(exec, value); + if (QScriptEnginePrivate::isVariant(value)) { + v = QScriptEnginePrivate::variantValue(value); if (v.canConvert(QVariant::Type(targetType))) { v.convert(QVariant::Type(targetType)); return v; @@ -591,38 +589,38 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c bool converted = true; int matchDistance = 0; for (int i = 0; converted && i < mtd.argumentCount(); ++i) { - QScriptValue actual; + JSC::JSValue actual; if (i < (int)scriptArgs.size()) - actual = engine->scriptValueFromJSCValue(scriptArgs.at(i)); + actual = scriptArgs.at(i); else - actual = QScriptValue(QScriptValue::UndefinedValue); + actual = JSC::jsUndefined(); QScriptMetaType argType = mtd.argumentType(i); int tid = -1; QVariant v; if (argType.isUnresolved()) { v = QVariant(QMetaType::QObjectStar, (void *)0); - converted = engine->convertToNativeQObject( - actual, argType.name(), reinterpret_cast(v.data())); + converted = QScriptEnginePrivate::convertToNativeQObject( + exec, actual, argType.name(), reinterpret_cast(v.data())); } else if (argType.isVariant()) { - if (actual.isVariant()) { - v = actual.toVariant(); + if (QScriptEnginePrivate::isVariant(actual)) { + v = QScriptEnginePrivate::variantValue(actual); } else { - v = actual.toVariant(); + v = QScriptEnginePrivate::toVariant(exec, actual); converted = v.isValid() || actual.isUndefined() || actual.isNull(); } } else { tid = argType.typeId(); v = QVariant(tid, (void *)0); - converted = QScriptEnginePrivate::convert(actual, tid, v.data(), engine); + converted = QScriptEnginePrivate::convertValue(exec, actual, tid, v.data()); if (exec->hadException()) return exec->exception(); } if (!converted) { - if (actual.isVariant()) { + if (QScriptEnginePrivate::isVariant(actual)) { if (tid == -1) tid = argType.typeId(); - QVariant vv = actual.toVariant(); + QVariant vv = QScriptEnginePrivate::variantValue(actual); if (vv.canConvert(QVariant::Type(tid))) { v = vv; converted = v.convert(QVariant::Type(tid)); @@ -649,14 +647,14 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c } if (m.isValid()) { if (actual.isNumber()) { - int ival = actual.toInt32(); + int ival = QScriptEnginePrivate::toInt32(exec, actual); if (m.valueToKey(ival) != 0) { qVariantSetValue(v, ival); converted = true; matchDistance += 10; } } else { - QString sval = actual.toString(); + QString sval = QScriptEnginePrivate::toString(exec, actual); int ival = m.keyToValue(sval.toLatin1()); if (ival != -1) { qVariantSetValue(v, ival); @@ -718,7 +716,7 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c matchDistance += 10; break; } - } else if (actual.isDate()) { + } else if (QScriptEnginePrivate::isDate(actual)) { switch (tid) { case QMetaType::QDateTime: // perfect @@ -733,7 +731,7 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c matchDistance += 10; break; } - } else if (actual.isRegExp()) { + } else if (QScriptEnginePrivate::isRegExp(actual)) { switch (tid) { case QMetaType::QRegExp: // perfect @@ -742,14 +740,14 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c matchDistance += 10; break; } - } else if (actual.isVariant()) { + } else if (QScriptEnginePrivate::isVariant(actual)) { if (argType.isVariant() - || (actual.toVariant().userType() == tid)) { + || (QScriptEnginePrivate::toVariant(exec, actual).userType() == tid)) { // perfect } else { matchDistance += 10; } - } else if (actual.isArray()) { + } else if (QScriptEnginePrivate::isArray(actual)) { switch (tid) { case QMetaType::QStringList: case QMetaType::QVariantList: @@ -759,7 +757,7 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c matchDistance += 10; break; } - } else if (actual.isQObject()) { + } else if (QScriptEnginePrivate::isQObject(actual)) { switch (tid) { case QMetaType::QObjectStar: case QMetaType::QWidgetStar: @@ -953,13 +951,11 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c } else { QScriptMetaType retType = chosenMethod.returnType(); if (retType.isVariant()) { - result = engine->jscValueFromVariant(*(QVariant *)params[0]); + result = QScriptEnginePrivate::jscValueFromVariant(exec, *(QVariant *)params[0]); } else if (retType.typeId() != 0) { - result = engine->scriptValueToJSCValue(engine->create(retType.typeId(), params[0])); - if (!result) { - QScriptValue sv = QScriptEnginePrivate::get(engine)->newVariant(QVariant(retType.typeId(), params[0])); - result = engine->scriptValueToJSCValue(sv); - } + result = QScriptEnginePrivate::create(exec, retType.typeId(), params[0]); + if (!result) + result = engine->newVariant(QVariant(retType.typeId(), params[0])); } else { result = JSC::jsUndefined(); } @@ -1065,15 +1061,13 @@ JSC::JSValue QtPropertyFunction::execute(JSC::ExecState *exec, { JSC::JSValue result = JSC::jsUndefined(); - // ### don't go via QScriptValue QScriptEnginePrivate *engine = scriptEngineFromExec(exec); thisValue = engine->toUsableValue(thisValue); - QScriptValue object = engine->scriptValueFromJSCValue(thisValue); - QObject *qobject = object.toQObject(); + QObject *qobject = QScriptEnginePrivate::toQObject(exec, thisValue); while ((!qobject || (qobject->metaObject() != data->meta)) - && object.prototype().isObject()) { - object = object.prototype(); - qobject = object.toQObject(); + && JSC::asObject(thisValue)->prototype().isObject()) { + thisValue = JSC::asObject(thisValue)->prototype(); + qobject = QScriptEnginePrivate::toQObject(exec, thisValue); } Q_ASSERT_X(qobject, Q_FUNC_INFO, "this-object must be a QObject"); @@ -1094,7 +1088,7 @@ JSC::JSValue QtPropertyFunction::execute(JSC::ExecState *exec, if (scriptable) QScriptablePrivate::get(scriptable)->engine = oldEngine; - result = engine->jscValueFromVariant(v); + result = QScriptEnginePrivate::jscValueFromVariant(exec, v); } } else { // set @@ -1106,9 +1100,7 @@ JSC::JSValue QtPropertyFunction::execute(JSC::ExecState *exec, // string to enum value v = (QString)arg.toString(exec); } else { - // ### don't go via QScriptValue - QScriptValue tmp = engine->scriptValueFromJSCValue(arg); - v = variantFromValue(engine, prop.userType(), tmp); + v = variantFromValue(exec, prop.userType(), arg); } QScriptable *scriptable = scriptableFromQObject(qobject); @@ -1237,7 +1229,7 @@ bool QObjectDelegate::getOwnPropertySlot(QScriptObject *object, JSC::ExecState * if (!prop.isValid()) val = JSC::jsUndefined(); else - val = eng->jscValueFromVariant(prop.read(qobject)); + val = QScriptEnginePrivate::jscValueFromVariant(exec, prop.read(qobject)); slot.setValue(val); } return true; @@ -1247,7 +1239,7 @@ bool QObjectDelegate::getOwnPropertySlot(QScriptObject *object, JSC::ExecState * index = qobject->dynamicPropertyNames().indexOf(name); if (index != -1) { - JSC::JSValue val = eng->jscValueFromVariant(qobject->property(name)); + JSC::JSValue val = QScriptEnginePrivate::jscValueFromVariant(exec, qobject->property(name)); slot.setValue(val); return true; } @@ -1274,8 +1266,7 @@ bool QObjectDelegate::getOwnPropertySlot(QScriptObject *object, JSC::ExecState * QObject *child = children.at(index); if (child->objectName() == QString(propertyName.ustring())) { QScriptEngine::QObjectWrapOptions opt = QScriptEngine::PreferExistingWrapperObject; - QScriptValue tmp = QScriptEnginePrivate::get(eng)->newQObject(child, QScriptEngine::QtOwnership, opt); - slot.setValue(eng->scriptValueToJSCValue(tmp)); + slot.setValue(eng->newQObject(child, QScriptEngine::QtOwnership, opt)); return true; } } @@ -1370,7 +1361,7 @@ bool QObjectDelegate::getOwnPropertyDescriptor(QScriptObject *object, JSC::ExecS if (!prop.isValid()) val = JSC::jsUndefined(); else - val = eng->jscValueFromVariant(prop.read(qobject)); + val = QScriptEnginePrivate::jscValueFromVariant(exec, prop.read(qobject)); descriptor.setDescriptor(val, attributes); } return true; @@ -1380,7 +1371,7 @@ bool QObjectDelegate::getOwnPropertyDescriptor(QScriptObject *object, JSC::ExecS index = qobject->dynamicPropertyNames().indexOf(name); if (index != -1) { - JSC::JSValue val = eng->jscValueFromVariant(qobject->property(name)); + JSC::JSValue val = QScriptEnginePrivate::jscValueFromVariant(exec, qobject->property(name)); descriptor.setDescriptor(val, QObjectMemberAttribute); return true; } @@ -1410,8 +1401,8 @@ bool QObjectDelegate::getOwnPropertyDescriptor(QScriptObject *object, JSC::ExecS QObject *child = children.at(index); if (child->objectName() == QString(propertyName.ustring())) { QScriptEngine::QObjectWrapOptions opt = QScriptEngine::PreferExistingWrapperObject; - QScriptValue tmp = QScriptEnginePrivate::get(eng)->newQObject(child, QScriptEngine::QtOwnership, opt); - descriptor.setDescriptor(eng->scriptValueToJSCValue(tmp), JSC::ReadOnly | JSC::DontDelete | JSC::DontEnum); + descriptor.setDescriptor(eng->newQObject(child, QScriptEngine::QtOwnership, opt), + JSC::ReadOnly | JSC::DontDelete | JSC::DontEnum); return true; } } @@ -1490,7 +1481,7 @@ void QObjectDelegate::put(QScriptObject *object, JSC::ExecState* exec, // string to enum value v = (QString)value.toString(exec); } else { - v = eng->jscValueToVariant(value, prop.userType()); + v = QScriptEnginePrivate::jscValueToVariant(exec, value, prop.userType()); } (void)prop.write(qobject, v); } @@ -1512,7 +1503,7 @@ void QObjectDelegate::put(QScriptObject *object, JSC::ExecState* exec, index = qobject->dynamicPropertyNames().indexOf(name); if ((index != -1) || (opt & QScriptEngine::AutoCreateDynamicProperties)) { - QVariant v = eng->scriptValueFromJSCValue(value).toVariant(); + QVariant v = QScriptEnginePrivate::toVariant(exec, value); (void)qobject->setProperty(name, v); return; } @@ -2178,24 +2169,23 @@ void QObjectConnectionManager::execute(int slotIndex, void **argv) JSC::ExecState *exec = engine->currentFrame; QVarLengthArray argsVector(argc); for (int i = 0; i < argc; ++i) { - // ### optimize -- no need to convert via QScriptValue - QScriptValue actual; + JSC::JSValue actual; void *arg = argv[i + 1]; QByteArray typeName = parameterTypes.at(i); int argType = QMetaType::type(parameterTypes.at(i)); if (!argType) { if (typeName == "QVariant") { - actual = engine->scriptValueFromVariant(*reinterpret_cast(arg)); + actual = QScriptEnginePrivate::jscValueFromVariant(exec, *reinterpret_cast(arg)); } else { qWarning("QScriptEngine: Unable to handle unregistered datatype '%s' " "when invoking handler of signal %s::%s", typeName.constData(), meta->className(), method.signature()); - actual = QScriptValue(QScriptValue::UndefinedValue); + actual = JSC::jsUndefined(); } } else { - actual = engine->create(argType, arg); + actual = QScriptEnginePrivate::create(exec, argType, arg); } - argsVector[i] = engine->scriptValueToJSCValue(actual); + argsVector[i] = actual; } JSC::ArgList jscArgs(argsVector.data(), argsVector.size()); diff --git a/src/script/bridge/qscriptvariant.cpp b/src/script/bridge/qscriptvariant.cpp index 0287d24..b4f0365 100644 --- a/src/script/bridge/qscriptvariant.cpp +++ b/src/script/bridge/qscriptvariant.cpp @@ -133,7 +133,7 @@ static JSC::JSValue JSC_HOST_CALL variantProtoFuncToString(JSC::ExecState *exec, bool QVariantDelegate::compareToObject(QScriptObject *, JSC::ExecState *exec, JSC::JSObject *o2) { const QVariant &variant1 = value(); - return variant1 == scriptEngineFromExec(exec)->scriptValueFromJSCValue(o2).toVariant(); + return variant1 == QScriptEnginePrivate::toVariant(exec, o2); } QVariantPrototype::QVariantPrototype(JSC::ExecState* exec, WTF::PassRefPtr structure, -- cgit v0.12 From 83d7242271cf8196a8133de0406788135e16abbb Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 19 Feb 2010 12:35:50 +0100 Subject: qdoc: Finished "Inherited by" list for QML elements. The listed elements are now links. Task: QTBUG-8153 --- tools/qdoc3/cppcodeparser.cpp | 2 +- tools/qdoc3/generator.cpp | 26 ++++++++++++++++++++++++++ tools/qdoc3/generator.h | 7 +++++++ tools/qdoc3/htmlgenerator.cpp | 30 +++--------------------------- tools/qdoc3/node.cpp | 8 ++++---- tools/qdoc3/node.h | 6 +++--- 6 files changed, 44 insertions(+), 35 deletions(-) diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index 021d64a..d9e9c3b 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -1034,7 +1034,7 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc, else if (command == COMMAND_QMLINHERITS) { setLink(node, Node::InheritsLink, arg); if (node->subType() == Node::QmlClass) { - QmlClassNode::addInheritedBy(arg,node->name()); + QmlClassNode::addInheritedBy(arg,node); } } else if (command == COMMAND_QMLDEFAULT) { diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index 9b58d7f..d092f86 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -1213,6 +1213,32 @@ void Generator::appendSortedNames(Text& text, } } +void Generator::appendSortedNames(Text& text, + const Node* base, + const NodeList& subs, + CodeMarker *marker) +{ + NodeList::ConstIterator r; + QMap classMap; + int index = 0; + + r = subs.begin(); + while (r != subs.end()) { + Text className; + appendFullName(className, (*r), base, marker); + classMap[className.toString().toLower()] = className; + ++r; + } + + QStringList classNames = classMap.keys(); + classNames.sort(); + + foreach (const QString &className, classNames) { + text << classMap[className]; + text << separator(index++, classNames.count()); + } +} + int Generator::skipAtoms(const Atom *atom, Atom::Type type) const { int skipAhead = 0; diff --git a/tools/qdoc3/generator.h b/tools/qdoc3/generator.h index 06f7f88..77dcfd4 100644 --- a/tools/qdoc3/generator.h +++ b/tools/qdoc3/generator.h @@ -170,6 +170,13 @@ class Generator const QList &classes, CodeMarker *marker); + protected: + void appendSortedNames(Text& text, + const Node* base, + const NodeList& subs, + CodeMarker *marker); + + private: QString amp; QString lt; QString gt; diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 01e79dd..45da0f1 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -4317,40 +4317,16 @@ void HtmlGenerator::generateQmlInheritedBy(const QmlClassNode* cn, CodeMarker* marker) { if (cn) { - QStringList subs; + NodeList subs; QmlClassNode::subclasses(cn->name(),subs); if (!subs.isEmpty()) { - subs.sort(); + //subs.sort(); Text text; text << Atom::ParaLeft << "Inherited by "; - for (int i = 0; i < subs.size(); ++i) { - text << subs.at(i); - text << separator(i, subs.size()); - } + appendSortedNames(text,cn,subs,marker); text << Atom::ParaRight; generateText(text, cn, marker); } -#if 0 - if (cn->links().contains(Node::InheritsLink)) { - QPair linkPair; - linkPair = cn->links()[Node::InheritsLink]; - QStringList strList(linkPair.first); - const Node* n = myTree->findNode(strList,Node::Fake); - if (n && n->subType() == Node::QmlClass) { - const QmlClassNode* qcn = static_cast(n); - out() << "

"; - Text text; - text << "[Inherits "; - text << Atom(Atom::LinkNode,CodeMarker::stringForNode(qcn)); - text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK); - text << Atom(Atom::String, linkPair.second); - text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK); - text << "]"; - generateText(text, cn, marker); - out() << "

"; - } - } -#endif } } diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 4ddcfb1..5357597 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -1257,7 +1257,7 @@ bool TargetNode::isInnerNode() const #ifdef QDOC_QML bool QmlClassNode::qmlOnly = false; -QMultiMap QmlClassNode::inheritedBy; +QMultiMap QmlClassNode::inheritedBy; /*! Constructs a Qml class node (i.e. a Fake node with the @@ -1294,15 +1294,15 @@ QString QmlClassNode::fileBase() const Record the fact that QML class \a base is inherited by QML class \a sub. */ -void QmlClassNode::addInheritedBy(const QString& base, const QString& sub) +void QmlClassNode::addInheritedBy(const QString& base, Node* sub) { inheritedBy.insert(base,sub); } /*! - Loads the list \a subs with the names of all the subclasses of \a base. + Loads the list \a subs with the nodes of all the subclasses of \a base. */ -void QmlClassNode::subclasses(const QString& base, QStringList& subs) +void QmlClassNode::subclasses(const QString& base, NodeList& subs) { subs.clear(); if (inheritedBy.contains(base)) diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h index de26025..3798e4e 100644 --- a/tools/qdoc3/node.h +++ b/tools/qdoc3/node.h @@ -383,12 +383,12 @@ class QmlClassNode : public FakeNode const ClassNode* classNode() const { return cnode; } virtual QString fileBase() const; - static void addInheritedBy(const QString& base, const QString& sub); - static void subclasses(const QString& base, QStringList& subs); + static void addInheritedBy(const QString& base, Node* sub); + static void subclasses(const QString& base, NodeList& subs); public: static bool qmlOnly; - static QMultiMap inheritedBy; + static QMultiMap inheritedBy; private: const ClassNode* cnode; -- cgit v0.12 From da1d0f7d34b7acdd4e38a8940279d9255eb15dc5 Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Fri, 19 Feb 2010 13:26:27 +0100 Subject: Fix an issue about double-click on Mac OS X. A test is added when we double-click to verify that both pushed buttons are the same. --- src/gui/kernel/qt_cocoa_helpers_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index f2ec4af..71d6ff8 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -956,7 +956,7 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev #ifndef QT_NAMESPACE Q_ASSERT(clickCount > 0); #endif - if (clickCount % 2 == 0) + if (clickCount % 2 == 0 && buttons == button) eventType = QEvent::MouseButtonDblClick; if (button == Qt::LeftButton && (keyMods & Qt::MetaModifier)) { button = Qt::RightButton; -- cgit v0.12 From 4607a42e3043c1201f4380e8090d8f66a71e10d1 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Fri, 19 Feb 2010 13:36:02 +0100 Subject: Cocoa: event dispatcher eats mouse events It turns out that the event dispatcher did not flush queued user input events under some circumstances (when adding the exec-flag to processEvents). And this caused problems in the QML-editor in creator regarding focus frames. This patch makes sure that we always flush the queued user input events when calling processEvents. Task-number: QTBUG-8274 Reviewed-by: Prasanth Reviewed-by: cduclos --- src/gui/kernel/qeventdispatcher_mac.mm | 74 ++++++++++++++++------------------ 1 file changed, 35 insertions(+), 39 deletions(-) diff --git a/src/gui/kernel/qeventdispatcher_mac.mm b/src/gui/kernel/qeventdispatcher_mac.mm index 8a67dee..b76ba44 100644 --- a/src/gui/kernel/qeventdispatcher_mac.mm +++ b/src/gui/kernel/qeventdispatcher_mac.mm @@ -565,6 +565,18 @@ bool QEventDispatcherMac::processEvents(QEventLoop::ProcessEventsFlags flags) QMacCocoaAutoReleasePool pool; NSEvent* event = 0; + // First, send all previously excluded input events, if any: + if (!(flags & QEventLoop::ExcludeUserInputEvents)) { + while (!d->queuedUserInputEvents.isEmpty()) { + event = static_cast(d->queuedUserInputEvents.takeFirst()); + if (!filterEvent(event)) { + qt_mac_send_event(flags, event, 0); + retVal = true; + } + [event release]; + } + } + // If Qt is used as a plugin, or as an extension in a native cocoa // application, we should not run or stop NSApplication; This will be // done from the application itself. And if processEvents is called @@ -598,49 +610,33 @@ bool QEventDispatcherMac::processEvents(QEventLoop::ProcessEventsFlags flags) // We cannot block the thread (and run in a tight loop). // Instead we will process all current pending events and return. d->ensureNSAppInitialized(); - do { - bool releaseEvent = false; - - if (!(flags & QEventLoop::ExcludeUserInputEvents) - && !d->queuedUserInputEvents.isEmpty()) { - // Process a pending user input event - releaseEvent = true; - event = static_cast(d->queuedUserInputEvents.takeFirst()); - } else { - if (NSModalSession session = d->currentModalSession()) { - if (flags & QEventLoop::WaitForMoreEvents) - qt_mac_waitForMoreModalSessionEvents(); - NSInteger status = [NSApp runModalSession:session]; - if (status != NSRunContinuesResponse && session == d->currentModalSessionCached) { - // INVARIANT: Someone called [NSApp stopModal:] from outside the event - // dispatcher (e.g to stop a native dialog). But that call wrongly stopped - // 'session' as well. As a result, we need to restart all internal sessions: - d->temporarilyStopAllModalSessions(); - } - retVal = true; - break; - } else { - event = [NSApp nextEventMatchingMask:NSAnyEventMask - untilDate:nil - inMode:NSDefaultRunLoopMode - dequeue: YES]; - - if (event != nil) { - if (flags & QEventLoop::ExcludeUserInputEvents) { - if (IsMouseOrKeyEvent(event)) { - [event retain]; - d->queuedUserInputEvents.append(event); - continue; - } - } - } - } + if (NSModalSession session = d->currentModalSession()) { + if (flags & QEventLoop::WaitForMoreEvents) + qt_mac_waitForMoreModalSessionEvents(); + NSInteger status = [NSApp runModalSession:session]; + if (status != NSRunContinuesResponse && session == d->currentModalSessionCached) { + // INVARIANT: Someone called [NSApp stopModal:] from outside the event + // dispatcher (e.g to stop a native dialog). But that call wrongly stopped + // 'session' as well. As a result, we need to restart all internal sessions: + d->temporarilyStopAllModalSessions(); } + retVal = true; + } else do { + event = [NSApp nextEventMatchingMask:NSAnyEventMask + untilDate:nil + inMode:NSDefaultRunLoopMode + dequeue: YES]; + if (event) { + if (flags & QEventLoop::ExcludeUserInputEvents) { + if (IsMouseOrKeyEvent(event)) { + [event retain]; + d->queuedUserInputEvents.append(event); + continue; + } + } if (!filterEvent(event) && qt_mac_send_event(flags, event, 0)) retVal = true; - if (releaseEvent) - [event release]; } } while (!d->interrupt && event != nil); -- cgit v0.12 From 7ca94f32c1a32ab96e4476388bea59d209dae4de Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 19 Feb 2010 14:23:57 +0100 Subject: doc: Added "\since 4.7" to a bunch of declarative stuff. --- .../graphicsitems/qmlgraphicsanchors.cpp | 1 + .../graphicsitems/qmlgraphicsanimatedimage.cpp | 1 + .../graphicsitems/qmlgraphicsborderimage.cpp | 3 +- .../graphicsitems/qmlgraphicsevents.cpp | 1 + .../graphicsitems/qmlgraphicsflipable.cpp | 1 + .../graphicsitems/qmlgraphicsfocuspanel.cpp | 1 + .../graphicsitems/qmlgraphicsfocusscope.cpp | 1 + .../qmlgraphicsgraphicsobjectcontainer.cpp | 1 + src/declarative/graphicsitems/qmlgraphicsimage.cpp | 1 + src/declarative/graphicsitems/qmlgraphicsitem.cpp | 7 ++++ .../graphicsitems/qmlgraphicslayoutitem.cpp | 1 + .../graphicsitems/qmlgraphicslistview.cpp | 1 + .../graphicsitems/qmlgraphicsloader.cpp | 1 + .../graphicsitems/qmlgraphicsmouseregion.cpp | 1 + .../graphicsitems/qmlgraphicsparticles.cpp | 23 +++++++++---- src/declarative/graphicsitems/qmlgraphicspath.cpp | 7 ++++ .../graphicsitems/qmlgraphicspathview.cpp | 1 + .../graphicsitems/qmlgraphicspositioners.cpp | 39 ++++++++++++++++------ .../graphicsitems/qmlgraphicsrectangle.cpp | 3 ++ .../graphicsitems/qmlgraphicsrepeater.cpp | 1 + src/declarative/graphicsitems/qmlgraphicstext.cpp | 1 + .../graphicsitems/qmlgraphicstextedit.cpp | 1 + .../graphicsitems/qmlgraphicstextinput.cpp | 1 + .../graphicsitems/qmlgraphicsvisualitemmodel.cpp | 1 + .../graphicsitems/qmlgraphicswebview.cpp | 1 + src/declarative/qml/qmlcomponent.cpp | 2 ++ src/declarative/qml/qmlcontext.cpp | 1 + src/declarative/qml/qmlengine.cpp | 2 ++ src/declarative/qml/qmlerror.cpp | 1 + src/declarative/qml/qmlexpression.cpp | 1 + src/declarative/qml/qmlmoduleplugin.cpp | 1 + .../qml/qmlnetworkaccessmanagerfactory.cpp | 1 + src/declarative/qml/qmlparserstatus.cpp | 1 + src/declarative/qml/qmlscriptstring.cpp | 1 + src/declarative/util/qmlanimation.cpp | 11 ++++++ src/declarative/util/qmlbind.cpp | 1 + src/declarative/util/qmlconnection.cpp | 1 + src/declarative/util/qmldatetimeformatter.cpp | 1 + src/declarative/util/qmlnumberformatter.cpp | 1 + src/declarative/util/qmlpropertychanges.cpp | 1 + src/declarative/util/qmlpropertymap.cpp | 1 + src/declarative/util/qmlstate.cpp | 1 + src/declarative/util/qmltransition.cpp | 1 + src/declarative/util/qmlview.cpp | 1 + src/declarative/util/qmlxmllistmodel.cpp | 2 ++ 45 files changed, 116 insertions(+), 18 deletions(-) diff --git a/src/declarative/graphicsitems/qmlgraphicsanchors.cpp b/src/declarative/graphicsitems/qmlgraphicsanchors.cpp index 3a6ec48..9bc4c09 100644 --- a/src/declarative/graphicsitems/qmlgraphicsanchors.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsanchors.cpp @@ -125,6 +125,7 @@ static qreal adjustedPosition(QmlGraphicsItem *item, QmlGraphicsAnchorLine::Anch /*! \internal \class QmlGraphicsAnchors + \since 4.7 \ingroup group_layouts \brief The QmlGraphicsAnchors class provides a way to lay out items relative to other items. diff --git a/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp b/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp index eb60495..3eaa16f 100644 --- a/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp @@ -58,6 +58,7 @@ QT_BEGIN_NAMESPACE /*! \qmlclass AnimatedImage QmlGraphicsAnimatedImage \inherits Image + \since 4.7 This item provides for playing animations stored as images containing a series of frames, such as GIF files. The full list of supported formats can be determined with diff --git a/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp b/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp index 493b148..a3b8e53 100644 --- a/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp @@ -56,6 +56,7 @@ QML_DEFINE_TYPE(Qt,4,6,BorderImage,QmlGraphicsBorderImage) \qmlclass BorderImage QmlGraphicsBorderImage \brief The BorderImage element provides an image that can be used as a border. \inherits Item + \since 4.7 \snippet snippets/declarative/border-image.qml 0 @@ -63,8 +64,8 @@ QML_DEFINE_TYPE(Qt,4,6,BorderImage,QmlGraphicsBorderImage) */ /*! - \internal \class QmlGraphicsBorderImage BorderImage + \internal \brief The QmlGraphicsBorderImage class provides an image item that you can add to a QmlView. */ diff --git a/src/declarative/graphicsitems/qmlgraphicsevents.cpp b/src/declarative/graphicsitems/qmlgraphicsevents.cpp index d42708c..3c828c4 100644 --- a/src/declarative/graphicsitems/qmlgraphicsevents.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsevents.cpp @@ -44,6 +44,7 @@ QT_BEGIN_NAMESPACE /*! \qmlclass KeyEvent QmlGraphicsKeyEvent + \since 4.7 \brief The KeyEvent object provides information about a key event. For example, the following changes the Item's state property when the Enter diff --git a/src/declarative/graphicsitems/qmlgraphicsflipable.cpp b/src/declarative/graphicsitems/qmlgraphicsflipable.cpp index a30ba6c..ef7bbc1 100644 --- a/src/declarative/graphicsitems/qmlgraphicsflipable.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsflipable.cpp @@ -66,6 +66,7 @@ public: /*! \qmlclass Flipable QmlGraphicsFlipable + \since 4.7 \brief The Flipable item provides a surface that can be flipped. \inherits Item diff --git a/src/declarative/graphicsitems/qmlgraphicsfocuspanel.cpp b/src/declarative/graphicsitems/qmlgraphicsfocuspanel.cpp index 093e9de..2d0f782 100644 --- a/src/declarative/graphicsitems/qmlgraphicsfocuspanel.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsfocuspanel.cpp @@ -50,6 +50,7 @@ QML_DEFINE_TYPE(Qt,4,6,FocusPanel,QmlGraphicsFocusPanel) /*! \qmlclass FocusPanel QmlGraphicsFocusPanel + \since 4.7 \brief The FocusPanel item explicitly creates a focus panel. \inherits Item diff --git a/src/declarative/graphicsitems/qmlgraphicsfocusscope.cpp b/src/declarative/graphicsitems/qmlgraphicsfocusscope.cpp index 084e244..5d8c238 100644 --- a/src/declarative/graphicsitems/qmlgraphicsfocusscope.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsfocusscope.cpp @@ -46,6 +46,7 @@ QML_DEFINE_TYPE(Qt,4,6,FocusScope,QmlGraphicsFocusScope) /*! \qmlclass FocusScope QmlGraphicsFocusScope + \since 4.7 \brief The FocusScope object explicitly creates a focus scope. \inherits Item diff --git a/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer.cpp b/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer.cpp index e7206f1..6d33b80 100644 --- a/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer.cpp @@ -83,6 +83,7 @@ public: /*! \qmlclass GraphicsObjectContainer QmlGraphicsGraphicsObjectContainer + \since 4.7 \brief The GraphicsObjectContainer element allows you to add QGraphicsObjects into Fluid UI elements. While any QObject based class can be exposed to QML, QmlGraphicsItem diff --git a/src/declarative/graphicsitems/qmlgraphicsimage.cpp b/src/declarative/graphicsitems/qmlgraphicsimage.cpp index d4ad3c8..6d60a87 100644 --- a/src/declarative/graphicsitems/qmlgraphicsimage.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsimage.cpp @@ -52,6 +52,7 @@ QML_DEFINE_TYPE(Qt,4,6,Image,QmlGraphicsImage) /*! \qmlclass Image QmlGraphicsImage + \since 4.7 \brief The Image element allows you to add bitmaps to a scene. \inherits Item diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.cpp b/src/declarative/graphicsitems/qmlgraphicsitem.cpp index 17362d0..cdfa24e 100644 --- a/src/declarative/graphicsitems/qmlgraphicsitem.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsitem.cpp @@ -79,6 +79,7 @@ QML_DEFINE_TYPE(Qt,4,6,Rotation,QGraphicsRotation) /*! \qmlclass Transform QGraphicsTransform + \since 4.7 \brief The Transform elements provide a way of building advanced transformations on Items. The Transform elements let you create and control advanced transformations that can be configured @@ -92,6 +93,7 @@ QML_DEFINE_TYPE(Qt,4,6,Rotation,QGraphicsRotation) /*! \qmlclass Scale QGraphicsScale + \since 4.7 \brief The Scale object provides a way to scale an Item. The Scale object gives more control over scaling than using Item's scale property. Specifically, @@ -130,6 +132,7 @@ QML_DEFINE_TYPE(Qt,4,6,Rotation,QGraphicsRotation) /*! \qmlclass Rotation QGraphicsRotation + \since 4.7 \brief The Rotation object provides a way to rotate an Item. The Rotation object gives more control over rotation than using Item's rotation property. @@ -391,6 +394,7 @@ void QmlGraphicsItemKeyFilter::componentComplete() /*! \qmlclass KeyNavigation + \since 4.7 \brief The KeyNavigation attached property supports key navigation by arrow keys. It is common in key-based UIs to use arrow keys to navigate @@ -639,6 +643,7 @@ void QmlGraphicsKeyNavigationAttached::keyReleased(QKeyEvent *event) /*! \qmlclass Keys + \since 4.7 \brief The Keys attached property provides key handling to Items. All visual primitives support key handling via the \e Keys @@ -1281,6 +1286,7 @@ QmlGraphicsKeysAttached *QmlGraphicsKeysAttached::qmlAttachedProperties(QObject /*! \class QmlGraphicsItem + \since 4.7 \brief The QmlGraphicsItem class provides the most basic of all visual items in QML. All visual items in Qt Declarative inherit from QmlGraphicsItem. Although QmlGraphicsItem @@ -1294,6 +1300,7 @@ QmlGraphicsKeysAttached *QmlGraphicsKeysAttached::qmlAttachedProperties(QObject /*! \qmlclass Item QmlGraphicsItem + \since 4.7 \brief The Item is the most basic of all visual items in QML. All visual items in Qt Declarative inherit from Item. Although Item diff --git a/src/declarative/graphicsitems/qmlgraphicslayoutitem.cpp b/src/declarative/graphicsitems/qmlgraphicslayoutitem.cpp index b054ced..8d2012f 100644 --- a/src/declarative/graphicsitems/qmlgraphicslayoutitem.cpp +++ b/src/declarative/graphicsitems/qmlgraphicslayoutitem.cpp @@ -51,6 +51,7 @@ QML_DEFINE_TYPE(Qt,4,6,LayoutItem,QmlGraphicsLayoutItem) /*! \qmlclass LayoutItem QmlGraphicsLayoutItem + \since 4.7 \brief The LayoutItem element allows you to place your Fluid UI elements inside a classical Qt layout. */ diff --git a/src/declarative/graphicsitems/qmlgraphicslistview.cpp b/src/declarative/graphicsitems/qmlgraphicslistview.cpp index 1e2698c..eb408c3 100644 --- a/src/declarative/graphicsitems/qmlgraphicslistview.cpp +++ b/src/declarative/graphicsitems/qmlgraphicslistview.cpp @@ -1389,6 +1389,7 @@ void QmlGraphicsListViewPrivate::flickY(qreal velocity) /*! \qmlclass ListView QmlGraphicsListView + \since 4.7 \inherits Flickable \brief The ListView item provides a list view of items provided by a model. diff --git a/src/declarative/graphicsitems/qmlgraphicsloader.cpp b/src/declarative/graphicsitems/qmlgraphicsloader.cpp index 44932a2..bd4725a 100644 --- a/src/declarative/graphicsitems/qmlgraphicsloader.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsloader.cpp @@ -112,6 +112,7 @@ QML_DEFINE_TYPE(Qt,4,6,Loader,QmlGraphicsLoader) /*! \qmlclass Loader QmlGraphicsLoader + \since 4.7 \inherits Item \brief The Loader item allows dynamically loading an Item-based diff --git a/src/declarative/graphicsitems/qmlgraphicsmouseregion.cpp b/src/declarative/graphicsitems/qmlgraphicsmouseregion.cpp index 1f8435e..099f685 100644 --- a/src/declarative/graphicsitems/qmlgraphicsmouseregion.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsmouseregion.cpp @@ -127,6 +127,7 @@ QmlGraphicsMouseRegionPrivate::~QmlGraphicsMouseRegionPrivate() /*! \qmlclass MouseRegion QmlGraphicsMouseRegion + \since 4.7 \brief The MouseRegion item enables simple mouse handling. \inherits Item diff --git a/src/declarative/graphicsitems/qmlgraphicsparticles.cpp b/src/declarative/graphicsitems/qmlgraphicsparticles.cpp index 95d4844..eef9571 100644 --- a/src/declarative/graphicsitems/qmlgraphicsparticles.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsparticles.cpp @@ -157,6 +157,7 @@ void QmlGraphicsParticleMotion::destroy(QmlGraphicsParticle &particle) /*! \qmlclass ParticleMotionLinear + \since 4.7 \brief The ParticleMotionLinear object moves particles linearly. \sa Particles @@ -179,6 +180,7 @@ void QmlGraphicsParticleMotionLinear::advance(QmlGraphicsParticle &p, int interv /*! \qmlclass ParticleMotionGravity + \since 4.7 \brief The ParticleMotionGravity object moves particles towards a point. \sa Particles @@ -236,6 +238,7 @@ void QmlGraphicsParticleMotionGravity::advance(QmlGraphicsParticle &p, int inter /*! \qmlclass ParticleMotionWander + \since 4.7 \brief The ParticleMotionWander object moves particles in a somewhat random fashion. The particles will continue roughly in the original direction, however will randomly @@ -565,19 +568,25 @@ QML_DEFINE_TYPE(Qt,4,6,Particles,QmlGraphicsParticles) /*! \qmlclass Particles + \since 4.7 \brief The Particles object generates and moves particles. \inherits Item - This element provides preliminary support for particles in QML, and may be heavily changed or removed in later versions. + This element provides preliminary support for particles in QML, + and may be heavily changed or removed in later versions. - The particles created by this object cannot be dealt with directly, they can only be controlled through the parameters of the Particles object. The particles are all the same pixmap, specified by the user. + The particles created by this object cannot be dealt with + directly, they can only be controlled through the parameters of + the Particles object. The particles are all the same pixmap, + specified by the user. - The particles are painted relative to the parent of the Particles object. Moving the - Particles object will not move the particles already emitted. + The particles are painted relative to the parent of the Particles + object. Moving the Particles object will not move the particles + already emitted. - The below example creates two differently behaving particle sources. - The top one has particles falling from the top like snow, - the lower one has particles expelled up like a fountain. + The below example creates two differently behaving particle + sources. The top one has particles falling from the top like + snow, the lower one has particles expelled up like a fountain. \qml Rectangle { diff --git a/src/declarative/graphicsitems/qmlgraphicspath.cpp b/src/declarative/graphicsitems/qmlgraphicspath.cpp index 6f04b75..5c0683b 100644 --- a/src/declarative/graphicsitems/qmlgraphicspath.cpp +++ b/src/declarative/graphicsitems/qmlgraphicspath.cpp @@ -60,6 +60,7 @@ QML_DEFINE_TYPE(Qt,4,6,PathCubic,QmlGraphicsPathCubic) /*! \qmlclass PathElement QmlGraphicsPathElement + \since 4.7 \brief PathElement is the base path type. This type is the base for all path types. It cannot @@ -76,6 +77,7 @@ QML_DEFINE_TYPE(Qt,4,6,PathCubic,QmlGraphicsPathCubic) /*! \qmlclass Path QmlGraphicsPath + \since 4.7 \brief A Path object defines a path for use by \l PathView. A Path is composed of one or more path segments - PathLine, PathQuad, @@ -476,6 +478,7 @@ void QmlGraphicsCurve::setY(qreal y) /*! \qmlclass PathAttribute QmlGraphicsPathAttribute + \since 4.7 \brief The PathAttribute allows setting an attribute at a given position in a Path. The PathAttribute object allows attibutes consisting of a name and @@ -555,6 +558,7 @@ void QmlGraphicsPathAttribute::setValue(qreal value) /*! \qmlclass PathLine QmlGraphicsPathLine + \since 4.7 \brief The PathLine defines a straight line. The example below creates a path consisting of a straight line from @@ -595,6 +599,7 @@ void QmlGraphicsPathLine::addToPath(QPainterPath &path) /*! \qmlclass PathQuad QmlGraphicsPathQuad + \since 4.7 \brief The PathQuad defines a quadratic Bezier curve with a control point. The following QML produces the path shown below: @@ -679,6 +684,7 @@ void QmlGraphicsPathQuad::addToPath(QPainterPath &path) /*! \qmlclass PathCubic QmlGraphicsPathCubic + \since 4.7 \brief The PathCubic defines a cubic Bezier curve with two control points. The following QML produces the path shown below: @@ -789,6 +795,7 @@ void QmlGraphicsPathCubic::addToPath(QPainterPath &path) /*! \qmlclass PathPercent QmlGraphicsPathPercent + \since 4.7 \brief The PathPercent manipulates the way a path is interpreted. The examples below show the normal distrubution of items along a path diff --git a/src/declarative/graphicsitems/qmlgraphicspathview.cpp b/src/declarative/graphicsitems/qmlgraphicspathview.cpp index 4511820..101c2c6 100644 --- a/src/declarative/graphicsitems/qmlgraphicspathview.cpp +++ b/src/declarative/graphicsitems/qmlgraphicspathview.cpp @@ -138,6 +138,7 @@ void QmlGraphicsPathViewPrivate::releaseItem(QmlGraphicsItem *item) /*! \qmlclass PathView QmlGraphicsPathView + \since 4.7 \brief The PathView element lays out model-provided items on a path. \inherits Item diff --git a/src/declarative/graphicsitems/qmlgraphicspositioners.cpp b/src/declarative/graphicsitems/qmlgraphicspositioners.cpp index ba26f62..e3306f2 100644 --- a/src/declarative/graphicsitems/qmlgraphicspositioners.cpp +++ b/src/declarative/graphicsitems/qmlgraphicspositioners.cpp @@ -291,6 +291,7 @@ void QmlGraphicsBasePositioner::finishApplyTransitions() QML_DEFINE_TYPE(Qt,4,6,Column,QmlGraphicsColumn) /*! \qmlclass Column QmlGraphicsColumn + \since 4.7 \brief The Column item lines up its children vertically. \inherits Item @@ -340,19 +341,28 @@ Column { */ /*! \qmlproperty Transition Column::add - This property holds the transition to be applied when adding an item to the positioner. The transition will only be applied to the added item(s). - Positioner transitions will only affect the position (x,y) of items. - Added can mean that either the object has been created or reparented, and thus is now a child or the positioner, or that the object has had its opacity increased from zero, and thus is now visible. + This property holds the transition to be applied when adding an + item to the positioner. The transition will only be applied to the + added item(s). Positioner transitions will only affect the + position (x,y) of items. + + Added can mean that either the object has been created or + reparented, and thus is now a child or the positioner, or that the + object has had its opacity increased from zero, and thus is now + visible. */ /*! \qmlproperty Transition Column::move - This property holds the transition to apply when moving an item within the positioner. - Positioner transitions will only affect the position (x,y) of items. - This can happen when other items are added or removed from the positioner, or when items resize themselves. + This property holds the transition to apply when moving an item + within the positioner. Positioner transitions will only affect + the position (x,y) of items. + + This can happen when other items are added or removed from the + positioner, or when items resize themselves. \table \row @@ -421,6 +431,7 @@ void QmlGraphicsColumn::doPositioning() QML_DEFINE_TYPE(Qt,4,6,Row,QmlGraphicsRow) /*! \qmlclass Row QmlGraphicsRow + \since 4.7 \brief The Row item lines up its children horizontally. \inherits Item @@ -456,16 +467,22 @@ Row { The transition will only be applied to the added item(s). Positioner transitions will only affect the position (x,y) of items. - Added can mean that either the object has been created or reparented, and thus is now a child or the positioner, or that the object has had its opacity increased from zero, and thus is now visible. + Added can mean that either the object has been created or + reparented, and thus is now a child or the positioner, or that the + object has had its opacity increased from zero, and thus is now + visible. */ /*! \qmlproperty Transition Row::move - This property holds the transition to apply when moving an item within the positioner. - Positioner transitions will only affect the position (x,y) of items. - This can happen when other items are added or removed from the positioner, or when items resize themselves. + This property holds the transition to apply when moving an item + within the positioner. Positioner transitions will only affect + the position (x,y) of items. + + This can happen when other items are added or removed from the + positioner, or when items resize themselves. \qml Row { @@ -527,6 +544,7 @@ QML_DEFINE_TYPE(Qt,4,6,Grid,QmlGraphicsGrid) /*! \qmlclass Grid QmlGraphicsGrid + \since 4.7 \brief The Grid item positions its children in a grid. \inherits Item @@ -714,6 +732,7 @@ void QmlGraphicsGrid::doPositioning() QML_DEFINE_TYPE(Qt,4,6,Flow,QmlGraphicsFlow) /*! \qmlclass Flow QmlGraphicsFlow + \since 4.7 \brief The Flow item lines up its children side by side, wrapping as necessary. \inherits Item diff --git a/src/declarative/graphicsitems/qmlgraphicsrectangle.cpp b/src/declarative/graphicsitems/qmlgraphicsrectangle.cpp index 1fa63e0..25ddaf5 100644 --- a/src/declarative/graphicsitems/qmlgraphicsrectangle.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsrectangle.cpp @@ -86,6 +86,7 @@ void QmlGraphicsPen::setWidth(int w) /*! \qmlclass GradientStop QmlGraphicsGradientStop + \since 4.7 \brief The GradientStop item defines the color at a position in a Gradient \sa Gradient @@ -106,6 +107,7 @@ void QmlGraphicsGradientStop::updateGradient() /*! \qmlclass Gradient QmlGraphicsGradient + \since 4.7 \brief The Gradient item defines a gradient fill. A gradient is defined by two or more colors, which will be blended seemlessly. The @@ -153,6 +155,7 @@ QML_DEFINE_TYPE(Qt,4,6,Rectangle,QmlGraphicsRectangle) /*! \qmlclass Rectangle QmlGraphicsRectangle + \since 4.7 \brief The Rectangle item allows you to add rectangles to a scene. \inherits Item diff --git a/src/declarative/graphicsitems/qmlgraphicsrepeater.cpp b/src/declarative/graphicsitems/qmlgraphicsrepeater.cpp index 0c27f4c..899de0d 100644 --- a/src/declarative/graphicsitems/qmlgraphicsrepeater.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsrepeater.cpp @@ -64,6 +64,7 @@ QML_DEFINE_TYPE(Qt,4,6,Repeater,QmlGraphicsRepeater) /*! \qmlclass Repeater QmlGraphicsRepeater + \since 4.7 \inherits Item \brief The Repeater item allows you to repeat a component based on a model. diff --git a/src/declarative/graphicsitems/qmlgraphicstext.cpp b/src/declarative/graphicsitems/qmlgraphicstext.cpp index e9e5924..4d228dd 100644 --- a/src/declarative/graphicsitems/qmlgraphicstext.cpp +++ b/src/declarative/graphicsitems/qmlgraphicstext.cpp @@ -59,6 +59,7 @@ QML_DEFINE_TYPE(Qt,4,6,Text,QmlGraphicsText) /*! \qmlclass Text QmlGraphicsText + \since 4.7 \brief The Text item allows you to add formatted text to a scene. \inherits Item diff --git a/src/declarative/graphicsitems/qmlgraphicstextedit.cpp b/src/declarative/graphicsitems/qmlgraphicstextedit.cpp index e8cde10..5d410be 100644 --- a/src/declarative/graphicsitems/qmlgraphicstextedit.cpp +++ b/src/declarative/graphicsitems/qmlgraphicstextedit.cpp @@ -60,6 +60,7 @@ QML_DEFINE_TYPE(Qt,4,6,TextEdit,QmlGraphicsTextEdit) /*! \qmlclass TextEdit QmlGraphicsTextEdit + \since 4.7 \brief The TextEdit item allows you to add editable formatted text to a scene. It can display both plain and rich text. For example: diff --git a/src/declarative/graphicsitems/qmlgraphicstextinput.cpp b/src/declarative/graphicsitems/qmlgraphicstextinput.cpp index a7b25c5..56e0610 100644 --- a/src/declarative/graphicsitems/qmlgraphicstextinput.cpp +++ b/src/declarative/graphicsitems/qmlgraphicstextinput.cpp @@ -59,6 +59,7 @@ QML_DEFINE_TYPE(Qt,4,6,QRegExpValidator,QRegExpValidator); /*! \qmlclass TextInput QmlGraphicsTextInput + \since 4.7 The TextInput item allows you to add an editable line of text to a scene. TextInput can only display a single line of text, and can only display diff --git a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp index f9ebef9..ae045ae 100644 --- a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp @@ -140,6 +140,7 @@ public: /*! \qmlclass VisualItemModel QmlGraphicsVisualItemModel + \since 4.7 \brief The VisualItemModel allows items to be provided to a view. The children of the VisualItemModel are provided in a model which diff --git a/src/declarative/graphicsitems/qmlgraphicswebview.cpp b/src/declarative/graphicsitems/qmlgraphicswebview.cpp index a811506..5b6b34e 100644 --- a/src/declarative/graphicsitems/qmlgraphicswebview.cpp +++ b/src/declarative/graphicsitems/qmlgraphicswebview.cpp @@ -124,6 +124,7 @@ public: /*! \qmlclass WebView QmlGraphicsWebView + \since 4.7 \brief The WebView item allows you to add web content to a canvas. \inherits Item diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp index f15c364..2b62887 100644 --- a/src/declarative/qml/qmlcomponent.cpp +++ b/src/declarative/qml/qmlcomponent.cpp @@ -69,12 +69,14 @@ int statusId = qRegisterMetaType("QmlComponent::Status"); /*! \class QmlComponent + \since 4.7 \brief The QmlComponent class encapsulates a QML component description. \mainclass */ /*! \qmlclass Component QmlComponent + \since 4.7 \brief The Component element encapsulates a QML component description. Components are reusable, encapsulated Qml element with a well-defined interface. diff --git a/src/declarative/qml/qmlcontext.cpp b/src/declarative/qml/qmlcontext.cpp index 4011d8d..c540cc2 100644 --- a/src/declarative/qml/qmlcontext.cpp +++ b/src/declarative/qml/qmlcontext.cpp @@ -130,6 +130,7 @@ void QmlContextPrivate::init() /*! \class QmlContext + \since 4.7 \brief The QmlContext class defines a context within a QML engine. \mainclass diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index bb36035..01bc6d3 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -112,6 +112,7 @@ DEFINE_BOOL_CONFIG_OPTION(qmlImportTrace, QML_IMPORT_TRACE) QML_DEFINE_TYPE(Qt,4,6,QtObject,QObject) /*! \qmlclass QtObject QObject + \since 4.7 \brief The QtObject element is the most basic element in QML The QtObject element is a non-visual element which contains only @@ -333,6 +334,7 @@ QmlWorkerScriptEngine *QmlEnginePrivate::getWorkerScriptEngine() /*! \class QmlEngine + \since 4.7 \brief The QmlEngine class provides an environment for instantiating QML components. \mainclass diff --git a/src/declarative/qml/qmlerror.cpp b/src/declarative/qml/qmlerror.cpp index 5ba7719..fc4bcd5 100644 --- a/src/declarative/qml/qmlerror.cpp +++ b/src/declarative/qml/qmlerror.cpp @@ -49,6 +49,7 @@ QT_BEGIN_NAMESPACE /*! \class QmlError + \since 4.7 \brief The QmlError class encapsulates a QML error */ class QmlErrorPrivate diff --git a/src/declarative/qml/qmlexpression.cpp b/src/declarative/qml/qmlexpression.cpp index d428377..89870f9 100644 --- a/src/declarative/qml/qmlexpression.cpp +++ b/src/declarative/qml/qmlexpression.cpp @@ -189,6 +189,7 @@ QScriptValue QmlExpressionPrivate::evalInObjectScope(QmlContext *context, QObjec /*! \class QmlExpression + \since 4.7 \brief The QmlExpression class evaluates JavaScript in a QML context. */ diff --git a/src/declarative/qml/qmlmoduleplugin.cpp b/src/declarative/qml/qmlmoduleplugin.cpp index 8019805..342074a 100644 --- a/src/declarative/qml/qmlmoduleplugin.cpp +++ b/src/declarative/qml/qmlmoduleplugin.cpp @@ -46,6 +46,7 @@ QT_BEGIN_NAMESPACE /*! \class QmlModulePlugin + \since 4.7 \brief The QmlModulePlugin class provides an abstract base for custom QML module plugins. \reentrant \ingroup plugins diff --git a/src/declarative/qml/qmlnetworkaccessmanagerfactory.cpp b/src/declarative/qml/qmlnetworkaccessmanagerfactory.cpp index 1ba0694..455d09e 100644 --- a/src/declarative/qml/qmlnetworkaccessmanagerfactory.cpp +++ b/src/declarative/qml/qmlnetworkaccessmanagerfactory.cpp @@ -45,6 +45,7 @@ QT_BEGIN_NAMESPACE /*! \class QmlNetworkAccessManagerFactory + \since 4.7 \brief The QmlNetworkAccessManagerFactory class provides a factory for QNetworkAccessManager QNetworkAccessManager is used for all network access by QML. diff --git a/src/declarative/qml/qmlparserstatus.cpp b/src/declarative/qml/qmlparserstatus.cpp index 435d620..315bc75 100644 --- a/src/declarative/qml/qmlparserstatus.cpp +++ b/src/declarative/qml/qmlparserstatus.cpp @@ -45,6 +45,7 @@ QT_BEGIN_NAMESPACE /*! \class QmlParserStatus + \since 4.7 \brief The QmlParserStatus class provides updates on the parser state. */ diff --git a/src/declarative/qml/qmlscriptstring.cpp b/src/declarative/qml/qmlscriptstring.cpp index 29118e6..a80f66b 100644 --- a/src/declarative/qml/qmlscriptstring.cpp +++ b/src/declarative/qml/qmlscriptstring.cpp @@ -55,6 +55,7 @@ public: /*! \class QmlScriptString + \since 4.7 \brief The QmlScriptString class encapsulates a script and its context. The QmlScriptString is used by properties that want to accept a script "assignment" from QML. diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index 103a50f..37c0044 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -143,6 +143,7 @@ QML_DEFINE_NOCREATE_TYPE(QmlAbstractAnimation) /*! \qmlclass Animation QmlAbstractAnimation + \since 4.7 \brief The Animation element is the base of all QML animations. The Animation element cannot be used directly in a QML file. It exists @@ -567,6 +568,7 @@ void QmlAbstractAnimation::timelineComplete() /*! \qmlclass PauseAnimation QmlPauseAnimation + \since 4.7 \inherits Animation \brief The PauseAnimation element provides a pause for an animation. @@ -640,6 +642,7 @@ QAbstractAnimation *QmlPauseAnimation::qtAnimation() /*! \qmlclass ColorAnimation QmlColorAnimation + \since 4.7 \inherits PropertyAnimation \brief The ColorAnimation element allows you to animate color changes. @@ -703,6 +706,7 @@ QML_DEFINE_TYPE(Qt,4,6,ColorAnimation,QmlColorAnimation) /*! \qmlclass ScriptAction QmlScriptAction + \since 4.7 \inherits Animation \brief The ScriptAction element allows scripts to be run during an animation. @@ -809,6 +813,7 @@ QML_DEFINE_TYPE(Qt,4,6,ScriptAction,QmlScriptAction) /*! \qmlclass PropertyAction QmlPropertyAction + \since 4.7 \inherits Animation \brief The PropertyAction element allows immediate property changes during animation. @@ -1108,6 +1113,7 @@ QML_DEFINE_TYPE(Qt,4,6,PropertyAction,QmlPropertyAction) /*! \qmlclass ParentAction QmlParentAction + \since 4.7 \inherits Animation \brief The ParentAction element allows parent changes during animation. @@ -1330,6 +1336,7 @@ QML_DEFINE_TYPE(Qt,4,6,ParentAction,QmlParentAction) /*! \qmlclass NumberAnimation QmlNumberAnimation + \since 4.7 \inherits PropertyAnimation \brief The NumberAnimation element allows you to animate changes in properties of type qreal. @@ -1393,6 +1400,7 @@ QML_DEFINE_TYPE(Qt,4,6,NumberAnimation,QmlNumberAnimation) /*! \qmlclass Vector3dAnimation QmlVector3dAnimation + \since 4.7 \inherits PropertyAnimation \brief The Vector3dAnimation element allows you to animate changes in properties of type QVector3d. */ @@ -1466,6 +1474,7 @@ QmlList *QmlAnimationGroup::animations() /*! \qmlclass SequentialAnimation QmlSequentialAnimation + \since 4.7 \inherits Animation \brief The SequentialAnimation element allows you to run animations sequentially. @@ -1541,6 +1550,7 @@ QML_DEFINE_TYPE(Qt,4,6,SequentialAnimation,QmlSequentialAnimation) /*! \qmlclass ParallelAnimation QmlParallelAnimation + \since 4.7 \inherits Animation \brief The ParallelAnimation element allows you to run animations in parallel. @@ -1665,6 +1675,7 @@ void QmlPropertyAnimationPrivate::convertVariant(QVariant &variant, int type) /*! \qmlclass PropertyAnimation QmlPropertyAnimation + \since 4.7 \inherits Animation \brief The PropertyAnimation element allows you to animate property changes. diff --git a/src/declarative/util/qmlbind.cpp b/src/declarative/util/qmlbind.cpp index fc1562b..6743edd 100644 --- a/src/declarative/util/qmlbind.cpp +++ b/src/declarative/util/qmlbind.cpp @@ -71,6 +71,7 @@ public: QML_DEFINE_TYPE(Qt,4,6,Binding,QmlBind) /*! \qmlclass Binding QmlBind + \since 4.7 \brief The Binding element allows arbitrary property bindings to be created. Sometimes it is necessary to bind to a property of an object that wasn't diff --git a/src/declarative/util/qmlconnection.cpp b/src/declarative/util/qmlconnection.cpp index 9bec3bb..c03d618 100644 --- a/src/declarative/util/qmlconnection.cpp +++ b/src/declarative/util/qmlconnection.cpp @@ -66,6 +66,7 @@ public: /*! \qmlclass Connection QmlConnection + \since 4.7 \brief A Connection object describes generalized connections to signals. When connecting to signals in QML, the usual way is to create an diff --git a/src/declarative/util/qmldatetimeformatter.cpp b/src/declarative/util/qmldatetimeformatter.cpp index c44ca5e..4b8fb00 100644 --- a/src/declarative/util/qmldatetimeformatter.cpp +++ b/src/declarative/util/qmldatetimeformatter.cpp @@ -74,6 +74,7 @@ public: /*! \qmlclass DateTimeFormatter QmlDateTimeFormatter + \since 4.7 \brief The DateTimeFormatter allows you to control the format of a date string. \code diff --git a/src/declarative/util/qmlnumberformatter.cpp b/src/declarative/util/qmlnumberformatter.cpp index f78abdf..0845d0c 100644 --- a/src/declarative/util/qmlnumberformatter.cpp +++ b/src/declarative/util/qmlnumberformatter.cpp @@ -67,6 +67,7 @@ public: }; /*! \qmlclass NumberFormatter + \since 4.7 \brief The NumberFormatter allows you to control the format of a number string. The format property documentation has more details on how the format can be manipulated. diff --git a/src/declarative/util/qmlpropertychanges.cpp b/src/declarative/util/qmlpropertychanges.cpp index 84f1e9a..b26469e 100644 --- a/src/declarative/util/qmlpropertychanges.cpp +++ b/src/declarative/util/qmlpropertychanges.cpp @@ -59,6 +59,7 @@ QT_BEGIN_NAMESPACE /*! \qmlclass PropertyChanges QmlPropertyChanges + \since 4.7 \brief The PropertyChanges element describes new property values for a state. PropertyChanges provides a state change that modifies the properties of an item. diff --git a/src/declarative/util/qmlpropertymap.cpp b/src/declarative/util/qmlpropertymap.cpp index ccbec6f..317896e 100644 --- a/src/declarative/util/qmlpropertymap.cpp +++ b/src/declarative/util/qmlpropertymap.cpp @@ -90,6 +90,7 @@ void QmlPropertyMapMetaObject::propertyWrite(int index) /*! \class QmlPropertyMap + \since 4.7 \brief The QmlPropertyMap class allows you to set key-value pairs that can be used in bindings. QmlPropertyMap provides a convenient way to expose domain data to the UI layer. diff --git a/src/declarative/util/qmlstate.cpp b/src/declarative/util/qmlstate.cpp index 7ecbd79..d550b6f 100644 --- a/src/declarative/util/qmlstate.cpp +++ b/src/declarative/util/qmlstate.cpp @@ -130,6 +130,7 @@ QmlStateOperation::QmlStateOperation(QObjectPrivate &dd, QObject *parent) /*! \qmlclass State QmlState + \since 4.7 \brief The State element defines configurations of objects and properties. A state is specified as a set of batched changes from the default configuration. diff --git a/src/declarative/util/qmltransition.cpp b/src/declarative/util/qmltransition.cpp index 22826ce..792f795 100644 --- a/src/declarative/util/qmltransition.cpp +++ b/src/declarative/util/qmltransition.cpp @@ -53,6 +53,7 @@ QT_BEGIN_NAMESPACE /*! \qmlclass Transition QmlTransition + \since 4.7 \brief The Transition element defines animated transitions that occur on state changes. \sa {qmlstates}{States}, {state-transitions}{Transitions} diff --git a/src/declarative/util/qmlview.cpp b/src/declarative/util/qmlview.cpp index 702b054..7518118 100644 --- a/src/declarative/util/qmlview.cpp +++ b/src/declarative/util/qmlview.cpp @@ -152,6 +152,7 @@ public: /*! \class QmlView + \since 4.7 \brief The QmlView class provides a widget for displaying a Qt Declarative user interface. QmlView currently provides a minimal interface for displaying QML diff --git a/src/declarative/util/qmlxmllistmodel.cpp b/src/declarative/util/qmlxmllistmodel.cpp index 7975959..f765dce 100644 --- a/src/declarative/util/qmlxmllistmodel.cpp +++ b/src/declarative/util/qmlxmllistmodel.cpp @@ -65,6 +65,7 @@ QML_DEFINE_TYPE(Qt,4,6,XmlListModel,QmlXmlListModel) /*! \qmlclass XmlRole QmlXmlListModelRole + \since 4.7 \brief The XmlRole element allows you to specify a role for an XmlListModel. */ @@ -406,6 +407,7 @@ void QmlXmlRoleList::insert(int i, QmlXmlListModelRole *role) /*! \qmlclass XmlListModel QmlXmlListModel + \since 4.7 \brief The XmlListModel element allows you to specify a model using XPath expressions. XmlListModel allows you to construct a model from XML data that can then be used as a data source -- cgit v0.12 From 09dc6df0472957d75f6c99cf81c939cb9a31602c Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Fri, 19 Feb 2010 14:24:27 +0100 Subject: Work around MSVC2008 compiler crash "e:\pulse\work\91088\src\script\api\qscriptengine.h(360) : fatal error C1001: An internal error has occurred in the compiler. (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c[0x510A0530:0x00000007]', line 243) To work around this problem, try simplifying or changing the program near the locations listed above." Apparently the compiler doesn't like that a few functions are inlined. --- src/script/api/qscriptengine.cpp | 15 +++++++++++++++ src/script/api/qscriptengine_p.h | 13 ++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 739b3fc..33104c9 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -393,6 +393,21 @@ qsreal ToInteger(qsreal n) return sign * ::floor(::fabs(n)); } +#ifdef Q_CC_MSVC +// MSVC2008 crashes if these are inlined. + +QString ToString(qsreal value) +{ + return JSC::UString::from(value); +} + +qsreal ToNumber(const QString &value) +{ + return ((JSC::UString)value).toDouble(); +} + +#endif + void GlobalClientData::mark(JSC::MarkStack& markStack) { engine->mark(markStack); diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h index eff34af..f69e537 100644 --- a/src/script/api/qscriptengine_p.h +++ b/src/script/api/qscriptengine_p.h @@ -106,12 +106,18 @@ namespace QScript inline bool ToBool(qsreal); inline bool ToBool(const QString &); - inline qsreal ToNumber(const QString &); inline qint32 ToInt32(const QString &); inline quint32 ToUInt32(const QString &); inline quint16 ToUInt16(const QString &); inline qsreal ToInteger(const QString &); +#ifdef Q_CC_MSVC + // MSVC2008 crashes if these are inlined. + qsreal ToNumber(const QString &); + QString ToString(qsreal); +#else + inline qsreal ToNumber(const QString &); inline QString ToString(qsreal); +#endif //some conversion helper functions inline QScriptEnginePrivate *scriptEngineFromExec(const JSC::ExecState *exec); @@ -463,6 +469,9 @@ inline QScriptEnginePrivate *scriptEngineFromExec(const JSC::ExecState *exec) return static_cast(exec->globalData().clientData)->engine; } +#ifndef Q_CC_MSVC +// MSVC2008 crashes if these are inlined. + inline QString ToString(qsreal value) { return JSC::UString::from(value); @@ -473,6 +482,8 @@ inline qsreal ToNumber(const QString &value) return ((JSC::UString)value).toDouble(); } +#endif + inline qint32 ToInt32(const QString &value) { return ToInt32(ToNumber(value)); -- cgit v0.12 From 85e5372c53c342f54cd489a3233c00aefa3d7ff7 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 19 Feb 2010 14:41:52 +0100 Subject: Doc: Simplified Commercial Editions for Qt 4.7. Reviewed-by: Trust Me Requested-by: Sales and Legal --- doc/src/development/qmake-manual.qdoc | 2 +- doc/src/frameworks-technologies/activeqt.qdoc | 2 +- doc/src/getting-started/installation.qdoc | 2 +- doc/src/index.qdoc | 2 +- doc/src/legal/commercialeditions.qdoc | 79 +++--------------------- doc/src/legal/editions.qdoc | 4 +- doc/src/legal/licenses.qdoc | 2 +- doc/src/legal/opensourceedition.qdoc | 1 - doc/src/modules.qdoc | 61 +++--------------- doc/src/platforms/mac-differences.qdoc | 2 +- doc/src/xml-processing/xml-patterns.qdoc | 3 +- src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc | 3 - tools/qdoc3/generator.cpp | 27 -------- tools/qdoc3/generator.h | 1 - tools/qdoc3/htmlgenerator.cpp | 1 - tools/qdoc3/test/qt-build-docs.qdocconf | 8 --- tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf | 8 --- tools/qdoc3/test/qt.qdocconf | 7 --- 18 files changed, 23 insertions(+), 192 deletions(-) diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc index 6215268..6406193 100644 --- a/doc/src/development/qmake-manual.qdoc +++ b/doc/src/development/qmake-manual.qdoc @@ -872,7 +872,7 @@ Developers using Visual Studio to write Qt applications can use the Visual Studio integration facilities provided with the - \l{Qt Commercial Editions} and do not need to worry about how + \l{Qt Commercial Edition} and do not need to worry about how project dependencies are managed. However, some developers may need to import an existing \c qmake project diff --git a/doc/src/frameworks-technologies/activeqt.qdoc b/doc/src/frameworks-technologies/activeqt.qdoc index 67b9bb3..e24959d 100644 --- a/doc/src/frameworks-technologies/activeqt.qdoc +++ b/doc/src/frameworks-technologies/activeqt.qdoc @@ -93,7 +93,7 @@ plugin that integrates the QAxContainer module into \l{Qt Designer}. - The ActiveQt modules are part of the \l{Qt Full Framework Edition} and + The ActiveQt modules are part of the \l{Qt Commercial Edition} and the \l{Open Source Versions of Qt}. \sa {QAxContainer Module}, {QAxServer Module} diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index e54774b..b23629d 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -176,7 +176,7 @@ consult the installation instructions provided instead of the ones in this document. \o \l{Open Source Versions of Qt} is not officially supported for use with any version of Visual Studio. Integration with Visual Studio is available -as part of the \l{Qt Commercial Editions}. +as part of the \l{Qt Commercial Edition}. \endlist \endtable diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index d1f5f0f..52d4488 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -142,7 +142,7 @@ diff --git a/doc/src/legal/commercialeditions.qdoc b/doc/src/legal/commercialeditions.qdoc index 4e44376..dde8d69 100644 --- a/doc/src/legal/commercialeditions.qdoc +++ b/doc/src/legal/commercialeditions.qdoc @@ -40,61 +40,19 @@ ****************************************************************************/ /*! - \page commercialeditions.html - \title Qt Commercial Editions + \page commercialedition.html + \title Qt Commercial Edition \ingroup licensing \brief Information about the license and features of the Commercial Edition. - \keyword Qt Full Framework Edition - \keyword Qt GUI Framework Edition - - Two editions of Qt are available under a commercial license: - Qt GUI Framework Edition, and Qt Full Framework Edition. + Qt can be used to develop closed source software if you obtain a commercial + license. If you want to develop Free or Open Source software for release using a recognized Open Source license, you can use the \l{Open Source Versions of Qt}. The table below summarizes the differences between the two commercial editions: - \table 75% - \header \o{1,2} Features \o{2,1} Editions - \header \o Qt GUI Framework \o Qt Full Framework - \row \o \l{QtCore}{Qt Core classes (QtCore)} \o \bold{X} \o \bold{X} - \row \o \l{QtGui}{Qt GUI classes (QtGui)} \o \bold{(X)} \o \bold{X} - \row \o \l{Graphics View Classes} (part of QtGui) \o \o \bold{X} - \row \o \l{QtNetwork}{Networking (QtNetwork)} \o \o \bold{X} - \row \o \l{QtOpenGL}{OpenGL (QtOpenGL)} \o \o \bold{X} - \row \o \l{QtScript}{Scripting (QtScript)} \o \o \bold{X} - \row \o \l{QtScriptTools}{Script Debugging (QtScriptTools)}\o \o \bold{X} - \row \o \l{QtSql}{Database/SQL (QtSql)} \o \o \bold{X} - \row \o \l{QtSvg}{SVG (QtSvg)} \o \o \bold{X} - \row \o \l{QtWebKit}{WebKit integration (QtWebKit)} \o \o \bold{X} - \row \o \l{QtXml}{XML (QtXml)} \o \o \bold{X} - \row \o \l{QtXmlPatterns}{XQuery and XPath (QtXmlPatterns)}\o \o \bold{X} - \row \o \l{Qt3Support}{Qt 3 Support (Qt3Support)} \o \bold{(X)} \o \bold{X} - \row \o \l{QtHelp}{Help system (QtHelp)} \o \o \bold{X} - \row \o \l{QtDBus}{D-Bus IPC support (QtDBus)} \o \bold{X} \o \bold{X} - \row \o \l{QtDesigner}{\QD extension classes (QtDesigner)} \o \o \bold{X} - \row \o \l{QtTest}{Unit testing framework (QtTest)} \o \bold{X} \o \bold{X} - \row \o \l{QtUiTools}{Run-time form handling (QtUiTools)} \o \o \bold{X} - \row \o \l{Phonon Module}{Phonon Multimedia Framework} \o \o \bold{X} - \row \o \l{ActiveQt} \o \o \bold{} - \endtable - - \bold{(X)} The Qt GUI Framework Edition contains selected classes from the QtGui and - Qt3Support modules corresponding to the functionality available in the Qt 3 Professional - Edition. - - \bold{} The ActiveQt module is only available on Windows. - - Lists of the classes available in each edition are available on the - following pages: - - \list - \o \l{Qt GUI Framework Edition} - \o \l{Qt Full Framework Edition} - \endlist - Please see the \l{Supported Platforms}{list of supported platforms} for up-to-date information about the various platforms and compilers that Qt supports. @@ -103,36 +61,13 @@ \l{Qt Licensing Overview} and information on \l{Qt License Pricing} for commercial editions of Qt and other Qt-related products. - To purchase, please visit the \l{How to Order}{online order - form}. + To purchase, please visit the \l{How to Order}{online order form}. - For further information and assistance, please contact Qt - sales. + For further information and assistance, please contact Qt sales. Web: http://qt.nokia.com/contact. Phone, U.S. office (for North America): \bold{1-650-813-1676}. - Phone, Norway office (for the rest of the world): \bold{+47 21 60 - 48 00}. -*/ - -/*! - \page full-framework-edition-classes.html - \title Qt Full Framework Edition - \ingroup classlists - - \brief The list of Qt classes included in the Full Framework Edition. - - \generatelist{classesbyedition Desktop} -*/ - -/*! - \page gui-framework-edition-classes.html - \title Qt GUI Framework Edition - \ingroup classlists - - \brief The list of Qt classes included in the GUI Framework Edition. - - \generatelist{classesbyedition DesktopLight} + Phone, Norway office (for the rest of the world): \bold{+47 21 60 48 00}. */ diff --git a/doc/src/legal/editions.qdoc b/doc/src/legal/editions.qdoc index 4de77c1..c7e73f2 100644 --- a/doc/src/legal/editions.qdoc +++ b/doc/src/legal/editions.qdoc @@ -53,8 +53,8 @@ In terms of license conditions, there are two main forms of Qt: \list - \o The \l{Qt Commercial Editions} are the commercial - versions of \l{About Qt}{Qt}. + \o The \l{Qt Commercial Edition} is the commercial version of + \l{About Qt}{Qt} which can be used to create closed source software. \o The \l{Open Source Versions of Qt} are freely available for download. \endlist diff --git a/doc/src/legal/licenses.qdoc b/doc/src/legal/licenses.qdoc index 344ebd4..d1bf4cf 100644 --- a/doc/src/legal/licenses.qdoc +++ b/doc/src/legal/licenses.qdoc @@ -60,7 +60,7 @@ Qt contains some code that is not provided under the \l{GNU General Public License (GPL)}, \l{GNU Lesser General Public License (LGPL)} or the - \l{Qt Commercial Editions}{Qt Commercial License Agreement}, but rather under + \l{Qt Commercial Edition}{Qt Commercial License Agreement}, but rather under specific licenses from the original authors. Some pieces of code were developed by Nokia and others originated from third parties. This page lists the licenses used, names the authors, and links diff --git a/doc/src/legal/opensourceedition.qdoc b/doc/src/legal/opensourceedition.qdoc index c199e34..d95e107 100644 --- a/doc/src/legal/opensourceedition.qdoc +++ b/doc/src/legal/opensourceedition.qdoc @@ -87,5 +87,4 @@ If you are in doubt what edition of Qt is right for your project, please contact \l{mailto:qt-info@nokia.com}{qt-info@nokia.com}. - */ diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc index 78af7eb..9e1d340 100644 --- a/doc/src/modules.qdoc +++ b/doc/src/modules.qdoc @@ -109,8 +109,6 @@ definitions of the module's classes, use the following directive: \snippet doc/src/snippets/code/doc_src_qtcore.qdoc 0 - - The QtCore module is part of all \l{Qt editions}. */ @@ -128,9 +126,6 @@ following directive: \snippet doc/src/snippets/code/doc_src_qtgui.qdoc 0 - - The QtGui module is part of the \l{Qt GUI Framework Edition}, - the \l{Qt Full Framework Edition}, and the \l{Open Source Versions of Qt}. */ /*! @@ -177,9 +172,6 @@ .pro file: \snippet doc/src/snippets/code/doc_src_qtnetwork.qdoc 0 - - The QtNetwork module is part of the \l{Qt Full Framework Edition} and the - \l{Open Source Versions of Qt}. */ /*! @@ -225,9 +217,9 @@ OpenGL module can take advantage of the whole Qt API for non-OpenGL-specific GUI functionality. - The QtOpenGL module is part of the \l{Qt Full Framework Edition} and the - \l{Open Source Versions of Qt}. It is available on Windows, X11, and Mac OS X. - \l{Qt for Embedded Linux and OpenGL} supports OpenGL ES (OpenGL for Embedded Systems). + The QtOpenGL module is available on Windows, X11 and Mac OS X. + \l{Qt for Embedded Linux and OpenGL} supports OpenGL ES (OpenGL for + Embedded Systems). \note To be able to use the OpenGL API in \l{Qt for Embedded Linux}, it must be integrated with the Q Window System (QWS). See the \l{Qt for Embedded Linux and OpenGL} documentation for details. @@ -319,9 +311,6 @@ scriptable with QtScript, see \l{Making Applications Scriptable}. - The QtScript module is part of the \l{Qt Full Framework Edition} and the - \l{Open Source Versions of Qt}. - \section1 License Information Qt Commercial Edition licensees that wish to distribute applications that @@ -379,9 +368,6 @@ To link against the module, add this line to your \l qmake \c .pro file: \snippet doc/src/snippets/code/doc.src.qtscripttools.qdoc 1 - - The QtScriptTools module is part of the \l{Qt Full Framework Edition} and - the \l{Open Source Versions of Qt}. */ /*! @@ -402,9 +388,6 @@ \snippet doc/src/snippets/code/doc_src_qtsql.qdoc 1 - The QtSql module is part of the \l{Qt Full Framework Edition} and the - \l{Open Source Versions of Qt}. - See the \l{SQL Programming} guide for information about using this module in your applications. */ @@ -430,9 +413,6 @@ \snippet doc/src/snippets/code/doc_src_qtsvg.qdoc 1 - The QtSvg module is part of the \l{Qt Full Framework Edition} and the - \l{Open Source Versions of Qt}. - \section1 License Information Some code for arc handling in this module is derived from code with @@ -488,9 +468,6 @@ Further XML support is provided by the \l{Qt Solutions} group who provide, for example, classes that support SOAP and MML with the Qt XML classes. - - This module is part of the \l{Qt Full Framework Edition} and the - \l{Open Source Versions of Qt}. */ /*! @@ -515,9 +492,6 @@ \snippet doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc 1 - This module is part of the \l{Qt Full Framework Edition} and the - \l{Open Source Versions of Qt}. - \section1 License Information The XML Schema implementation provided by this module contains the \c xml.xsd file @@ -594,9 +568,6 @@ \snippet doc/src/snippets/code/doc_src_phonon.qdoc 1 - The Phonon module is part of the \l{Qt Full Framework Edition} and the - \l{Open Source Versions of Qt}. - \section1 Qt Backends Qt Backends are currently developed for Phonon version 4.1. The Phonon @@ -672,12 +643,6 @@ diverse parts of the Qt 3 API, it has dependencies on the QtCore, QtGui, QtNetwork, QtSql, and QtXml modules. - This module is part of the \l{Qt Full Framework Edition} and the - \l{Open Source Versions of Qt}. Most classes offered by this module are - also part of the \l{Qt GUI Framework Edition}. - Classes that are not available for \l{Qt GUI Framework Edition} - users are marked as such in the class documentation. - \sa {Porting to Qt 4} */ @@ -705,10 +670,6 @@ file: \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 1 - - \note These classes are part of the \l{Open Source Versions of Qt} and - \l{Qt Commercial Editions}{Qt Full Framework Edition} for commercial - users. */ /*! @@ -745,10 +706,6 @@ \snippet doc/src/snippets/code/doc_src_qtuiloader.qdoc 1 - \note These classes are part of the \l{Open Source Versions of Qt} and - \l{Qt Commercial Editions}{Qt Full Framework Edition} for commercial - users. - \sa{Calculator Builder Example}, {World Time Clock Builder Example} */ @@ -773,10 +730,6 @@ \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 1 - These classes are part of the \l{Open Source Versions of Qt} and - \l{Qt Commercial Editions}{Qt Full Framework Edition} for commercial - users. - \section1 License Information The QtHelp module uses the CLucene indexing library to provide full-text @@ -860,7 +813,7 @@ The QAxContainer module is not covered by the \l{GNU General Public License (GPL)}, the \l{GNU Lesser General Public License (LGPL)}, or the - \l{Qt Commercial Editions}{Qt Commercial License}. Instead, it is distributed under + \l{Qt Commercial Edition}{Qt Commercial License}. Instead, it is distributed under the following license. \legalese @@ -910,7 +863,7 @@ The QAxContainer module is not covered by the \l{GNU General Public License (GPL)}, the \l{GNU Lesser General Public License (LGPL)}, or the - \l{Qt Commercial Editions}{Qt Commercial License}. Instead, it is distributed under + \l{Qt Commercial Edition}{Qt Commercial License}. Instead, it is distributed under the following license. \legalese @@ -1005,7 +958,7 @@ The QAxContainer module is not covered by the \l{GNU General Public License (GPL)}, the \l{GNU Lesser General Public License (LGPL)}, or the - \l{Qt Commercial Editions}{Qt Commercial License}. Instead, it is distributed under + \l{Qt Commercial Edition}{Qt Commercial License}. Instead, it is distributed under the following license. \legalese @@ -1043,7 +996,7 @@ located in the \c{src/s60main} directory are not covered by the \l{GNU General Public License (GPL)}, the \l{GNU Lesser General Public License (LGPL)}, or the - \l{Qt Commercial Editions}{Qt Commercial License}. Instead, they are + \l{Qt Commercial Edition}{Qt Commercial License}. Instead, they are distributed under the following license. \legalese diff --git a/doc/src/platforms/mac-differences.qdoc b/doc/src/platforms/mac-differences.qdoc index bda439d..58d64de 100644 --- a/doc/src/platforms/mac-differences.qdoc +++ b/doc/src/platforms/mac-differences.qdoc @@ -301,7 +301,7 @@ \contentspage {Other Licenses Used in Qt}{Contents} \ingroup licensing - \brief License information for contributions by Apple, Inc. to specific parts of the Qt/Mac Cocoa port. + \brief License information for contributions by Apple, Inc. to specific parts of the Qt for Mac OS X Cocoa port. \legalese diff --git a/doc/src/xml-processing/xml-patterns.qdoc b/doc/src/xml-processing/xml-patterns.qdoc index 408b2da..68056fd 100644 --- a/doc/src/xml-processing/xml-patterns.qdoc +++ b/doc/src/xml-processing/xml-patterns.qdoc @@ -65,8 +65,7 @@ \l{http://www.w3.org/TR/xpath20} {XPath 2.0} in Qt applications, for querying XML data \e{and} for querying \l{QAbstractXmlNodeModel} {non-XML data that can be modeled to - look like XML}. The QtXmlPatterns module is included in the \l{Qt - Full Framework Edition}, and the \l{Open Source Versions of Qt}. + look like XML}. Readers who are not familiar with the XQuery/XPath language can read \l {A Short Path to XQuery} for a brief introduction. diff --git a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc index 411762a..9e653e4 100644 --- a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc +++ b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc @@ -83,9 +83,6 @@ QtWebKit is based on the Open Source WebKit engine. More information about WebKit itself can be found on the \l{WebKit Open Source Project} Web site. - The QtWebKit module is part of the \l{Qt Full Framework Edition}, and the - \l{Open Source Versions of Qt}. - \note Building the QtWebKit module with debugging symbols is problematic on many platforms due to the size of the WebKit engine. We recommend building the module only in release mode for embedded platforms. diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index 9b58d7f..6a8899a 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -641,33 +641,6 @@ void Generator::generateExampleFiles(const FakeNode *fake, CodeMarker *marker) } #endif -void Generator::generateModuleWarning(const ClassNode *classe, - CodeMarker *marker) -{ - QString module = classe->moduleName(); - if (!module.isEmpty()) { - Text text; - if (!editionModuleMap["DesktopLight"].contains(module)) { - text << Atom::ParaLeft - << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD) - << "This class is not part of the Qt GUI Framework Edition." - << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD) - << Atom::ParaRight; - } - else if (module == "Qt3Support") { - text << Atom::ParaLeft - << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD) - << "Note to Qt GUI Framework Edition users:" - << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD) - << " This class is only available in the " - << Atom(Atom::AutoLink, "Qt Full Framework Edition") - << "." << Atom::ParaRight; - } - - generateText(text, classe, marker); - } -} - QString Generator::indent(int level, const QString& markedCode) { if (level == 0) diff --git a/tools/qdoc3/generator.h b/tools/qdoc3/generator.h index 06f7f88..44f56e2 100644 --- a/tools/qdoc3/generator.h +++ b/tools/qdoc3/generator.h @@ -124,7 +124,6 @@ class Generator Node::SubType subtype, const QString& tag); void generateExampleFiles(const FakeNode *fake, CodeMarker *marker); - void generateModuleWarning(const ClassNode *classe, CodeMarker *marker); virtual int skipAtoms(const Atom *atom, Atom::Type type) const; virtual QString fullName(const Node *node, diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 01e79dd..e767460 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -1261,7 +1261,6 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, generateIncludes(inner, marker); generateStatus(inner, marker); if (classe) { - generateModuleWarning(classe, marker); generateInherits(classe, marker); generateInheritedBy(classe, marker); } diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf index 555e826..fb2c3c1 100644 --- a/tools/qdoc3/test/qt-build-docs.qdocconf +++ b/tools/qdoc3/test/qt-build-docs.qdocconf @@ -12,14 +12,6 @@ sourceencoding = UTF-8 outputencoding = UTF-8 naturallanguage = en_US -edition.Desktop.modules = QtCore QtDBus QtGui QtNetwork QtOpenGL QtScript \ - QtScriptTools QtSql QtSvg QtWebKit QtXml QtXmlPatterns \ - Qt3Support QtHelp QtDesigner QtAssistant QAxContainer Phonon \ - QAxServer QtUiTools QtTest QtDBus - -edition.DesktopLight.modules = QtCore QtDBus QtGui Qt3SupportLight QtTest -edition.DesktopLight.groups = -graphicsview-api - qhp.projects = Qt qhp.Qt.file = qt.qhp diff --git a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf index 18b72a1..7a77f54 100644 --- a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf @@ -14,14 +14,6 @@ naturallanguage = zh-Hans indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index -edition.Desktop.modules = QtCore QtDBus QtGui QtNetwork QtOpenGL QtScript \ - QtScriptTools QtSql QtSvg QtWebKit QtXml QtXmlPatterns \ - Qt3Support QtHelp QtDesigner QtAssistant QAxContainer Phonon \ - QAxServer QtUiTools QtTest QtDBus - -edition.DesktopLight.modules = QtCore QtDBus QtGui Qt3SupportLight QtTest -edition.DesktopLight.groups = -graphicsview-api - qhp.projects = Qt qhp.Qt.file = qt.qhp diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf index f7757fb..d8b9136 100644 --- a/tools/qdoc3/test/qt.qdocconf +++ b/tools/qdoc3/test/qt.qdocconf @@ -14,13 +14,6 @@ sourceencoding = UTF-8 outputencoding = UTF-8 naturallanguage = en_US -edition.Desktop.modules = QtCore QtDBus QtGui QtNetwork QtOpenGL QtScript \ - QtScriptTools QtSql QtSvg QtWebKit QtXml QtXmlPatterns \ - Qt3Support QtHelp QtDesigner QtAssistant QAxContainer Phonon \ - QAxServer QtUiTools QtTest QtDBus -edition.DesktopLight.modules = QtCore QtDBus QtGui Qt3SupportLight QtTest -edition.DesktopLight.groups = -graphicsview-api - qhp.projects = Qt qhp.Qt.file = qt.qhp -- cgit v0.12 From d049509ba60b90f28c12db83c74e22649384e48c Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 19 Feb 2010 14:43:19 +0100 Subject: Doc: Collected the Declarative UI tutorials together and renamed them. Reviewed-by: Trust Me --- doc/src/declarative/advtutorial.qdoc | 317 ++++++++++++++++++++++++++++++++- doc/src/declarative/advtutorial1.qdoc | 82 --------- doc/src/declarative/advtutorial2.qdoc | 107 ----------- doc/src/declarative/advtutorial3.qdoc | 116 ------------ doc/src/declarative/advtutorial4.qdoc | 159 ----------------- doc/src/declarative/declarativeui.qdoc | 4 +- doc/src/declarative/examples.qdoc | 2 +- doc/src/declarative/qmlreference.qdoc | 4 +- doc/src/declarative/tutorial.qdoc | 189 +++++++++++++++++++- doc/src/declarative/tutorial1.qdoc | 97 ---------- doc/src/declarative/tutorial2.qdoc | 112 ------------ doc/src/declarative/tutorial3.qdoc | 86 --------- 12 files changed, 498 insertions(+), 777 deletions(-) delete mode 100644 doc/src/declarative/advtutorial1.qdoc delete mode 100644 doc/src/declarative/advtutorial2.qdoc delete mode 100644 doc/src/declarative/advtutorial3.qdoc delete mode 100644 doc/src/declarative/advtutorial4.qdoc delete mode 100644 doc/src/declarative/tutorial1.qdoc delete mode 100644 doc/src/declarative/tutorial2.qdoc delete mode 100644 doc/src/declarative/tutorial3.qdoc diff --git a/doc/src/declarative/advtutorial.qdoc b/doc/src/declarative/advtutorial.qdoc index 10c53d5..87c040e 100644 --- a/doc/src/declarative/advtutorial.qdoc +++ b/doc/src/declarative/advtutorial.qdoc @@ -40,8 +40,10 @@ ****************************************************************************/ /*! -\page advtutorial.html -\title Advanced Tutorial +\page qml-advtutorial.html +\title QML Advanced Tutorial +\brief A more advanced tutorial, showing how to use QML to create a game. +\nextpage QML Advanced Tutorial 1 - Creating the Game Canvas and Blocks This tutorial goes step-by-step through creating a full application using just QML. It is assumed that you already know basic QML (such as from doing the simple tutorial) and the focus is on showing @@ -55,10 +57,313 @@ The results of the individual steps are in the $QTDIR/examples/declarative/tutor Tutorial chapters: \list -\o \l {Advanced Tutorial 1 - Creating the Game Canvas and Blocks} -\o \l {Advanced Tutorial 2 - Populating the Game Canvas} -\o \l {Advanced Tutorial 3 - Implementing the Game Logic} -\o \l {Advanced Tutorial 4 - Finishing Touches} +\o \l {QML Advanced Tutorial 1 - Creating the Game Canvas and Blocks} +\o \l {QML Advanced Tutorial 2 - Populating the Game Canvas} +\o \l {QML Advanced Tutorial 3 - Implementing the Game Logic} +\o \l {QML Advanced Tutorial 4 - Finishing Touches} \endlist +*/ + +/*! +\page qml-advtutorial1.html +\title QML Advanced Tutorial 1 - Creating the Game Canvas and Blocks +\contentspage QML Advanced Tutorial +\previouspage QML Advanced Tutorial +\nextpage QML Advanced Tutorial 2 - Populating the Game Canvas + +The first step is to create the items in your application. In Same Game we have a main game screen and the blocks that populate it. + +\image declarative-adv-tutorial1.png + +Here is the QML code for the basic elements. The game window: + +\snippet declarative/tutorials/samegame/samegame1/samegame.qml 0 + +This gives you a basic game window, with room for the game canvas. A new game +button and room to display the score. The one thing you may not recognize here +is the \l SystemPalette item. This item provides access to the Qt system palette +and is used to make the button look more like a system button (for exact native +feel you would use a \l QPushButton). Since we want a fully QML button, and QML does +not include a button, we had to write our own. Below is the code which we wrote to do this: + +\snippet declarative/tutorials/samegame/samegame1/Button.qml 0 + +Note that this Button component was written to be fairly generic, in case we +want to use a similarly styled button later. + +And here is a simple block: + +\snippet declarative/tutorials/samegame/samegame1/Block.qml 0 + +Since it doesn't do anything yet it's very simple, just an image. As the +tutorial progresses and the block starts doing things the file will become +more than just an image. Note that we've set the image to be the size of the item. +This will be used later, when we dynamically create and size the block items the image will be scaled automatically +to the correct size. + +You should be familiar with all that goes on in these files so far. This is a +very basic start and doesn't move at all - next we will populate the game canvas +with some blocks. +*/ + + +/*! +\page qml-advtutorial2.html +\title QML Advanced Tutorial 2 - Populating the Game Canvas +\contentspage QML Advanced Tutorial +\previouspage QML Advanced Tutorial 1 - Creating the Game Canvas and Blocks +\nextpage QML Advanced Tutorial 3 - Implementing the Game Logic + +Now that we've written some basic elements, let's start writing the game. The +first thing to do is to generate all of the blocks. Now we need to dynamically +generate all of these blocks, because you have a new, random set of blocks +every time. As they are dynamically generated every time the new game button is +clicked, as opposed to on startup, we will be dynamically generating the blocks +in the JavaScript, as opposed to using a \l Repeater. + +This adds enough script to justify a new file, \c{samegame.js}, the intial version +of which is shown below + +\snippet declarative/tutorials/samegame/samegame2/samegame.js 0 + +The gist of this code is that we create the blocks dynamically, as many as will fit, and then store them in an array for future reference. +The \c initBoard function will be hooked up to the new game button soon, and should be fairly straight forward. + +The \c createBlock function is a lot bigger, and I'll explain it block by block. +First we ensure that the component has been constructed. QML elements, including composite ones like the \c Block.qml +that we've written, are never created directly in script. While there is a function to parse and create an arbitrary QML string, +in the case where you are repeatedly creating the same item you will want to use the \c createComponent function. \c createComponent is +a built-in function in the declarative JavaScript, and returns a component object. +A component object prepares and stores a QML element (usually a composite element) for easy and efficient use. +When the component is ready, you can create a new instance of the loaded QML with the \c createObject method. +If the component is loaded remotely (over HTTP for example) then you will have to wait for the component to finish loading +before calling \c createObject. Since we don't wait here (the waiting is asyncronous, the component object will send a signal to tell +you when it's done) this code will only work if the block QML is a local file. + +As we aren't waiting for the component, the next block of code creates a game block with \c{component.createObject}. +Since there could be an error in the QML file you are trying to load, success is not guaranteed. +The first bit of error checkign code comes right after \c{createObject()}, to ensure that the object loaded correctly. +If it did not load correctly the function returns false, but we don't have that hooked up to the main UI to indicate +that something has gone wrong. Instead we print out error messages to the console, because an error here means an invalid +QML file and should only happen while you are developing and testing the UI. + +Next we start to set up our dynamically created block. +Because the \c{Block.qml} file is generic it needs to be placed in the main scene, and in the right place. +This is why \c parent, \c x, \c y, \c width and \c height are set. We then store it in the board array for later use. + +Finally, we have some more error handling. You can only call \c{createObject} if the component has loaded. +If it has not loaded, either it is still loading or there was an error loading (such as a missing file). +Since we don't request remote files the problem is likely to be a missing or misplaced file. +Again we print this to the console to aid debugging. + +You now have the code to create a field of blocks dynamically, like below: + +\image declarative-adv-tutorial2.png + +To hook this code up to the \e{New Game} button, you alter it as below: + +\snippet declarative/tutorials/samegame/samegame2/samegame.qml 1 + +We have just replaced the \c{onClicked: console.log("Implement me!")} with \c{onClicked: initBoard()}. +Note that in order to have the function available, you'll need to include the script in the main file, +by adding a script element to it. + +\snippet declarative/tutorials/samegame/samegame2/samegame.qml 2 + +With those two changes, and the script file, you are now dynamically creating a field of blocks you can play with. +They don't do anything now though; the next chapter will add the game mechanics. +*/ + +/*! +\page qml-advtutorial3.html +\title QML Advanced Tutorial 3 - Implementing the Game Logic +\contentspage QML Advanced Tutorial +\previouspage QML Advanced Tutorial 2 - Populating the Game Canvas +\nextpage QML Advanced Tutorial 4 - Finishing Touches + +First we add to the \c initBoard function clearing of the board before filling it up again, so that clicking new game won't leave the previous game +lying around in the background. To the \c createComponent function we have added setting the type of the block to a number between +one and three - it's fundamental to the game logic that the blocks be different types if you want a fun game. + +The main change was adding the following game logic functions: +\list +\o function \c{handleClick(x,y)} +\o function \c{floodFill(xIdx,yIdx,type)} +\o function \c{shuffleDown()} +\o function \c{victoryCheck()} +\o function \c{floodMoveCheck(xIdx, yIdx, type)} +\endlist + +As this is a tutorial about QML, not game design, these functions will not be discussed in detail. The game logic here +was written in script, but it could have been written in C++ and had these functions exposed in the same way (except probably faster). +The interfacing of these functions and QML is what we will focus on. Of these functions, only \c handleClick and \c victoryCheck +interface closely with the QML. Those functions are shown below (the rest are still in the code for this tutorial located at +\c{$QTDIR/examples/declarative/tutorials/samegame}). + +\snippet declarative/tutorials/samegame/samegame3/samegame.js 1 +\snippet declarative/tutorials/samegame/samegame3/samegame.js 2 + +You'll notice them referring to the \c gameCanvas item. This is an item that has been added to the QML for easier interfacing with the game logic. +It is placed next to the background image and replaces the background as the item to create the blocks in. +Its code is shown below: + +\snippet declarative/tutorials/samegame/samegame3/samegame.qml 1 + +This item is the exact size of the board, contains a score property, and a mouse region for input. +The blocks are now created as its children, and its size is used to determining the board size, so as to scale to the available screen size. +Since it needs to bind its size to a multiple of \c tileSize, \c tileSize needs to be moved into a QML property and out of the script file. +Note that it can still be accessed from the script. + +The mouse region simply calls \c{handleClick()}, which deals with the input events. +Should those events cause the player to score, \c{gameCanvas.score} is updated. +The score display text item has also been changed to bind its text property to \c{gamecanvas.score}. +Note that if score was a global variable in the \c{samegame.js} file you could not bind to it. You can only bind to QML properties. + +\c victoryCheck() primarily updates the score variable. But it also pops up a dialog saying \e {Game Over} when the game is over. +In this example we wanted a pure-QML, animated dialog, and since QML doesn't contain one, we wrote our own. +Below is the code for the \c Dialog element, note how it's designed so as to be usable imperatively from within the script file (via the functions and signals): + +\snippet declarative/tutorials/samegame/samegame3/Dialog.qml 0 + +And this is how it's used in the main QML file: + +\snippet declarative/tutorials/samegame/samegame3/samegame.qml 2 + +Combined with the line of code in \c victoryCheck, this causes a dialog to appear when the game is over, informing the user of that fact. + +We now have a working game! The blocks can be clicked, the player can score, and the game can end (and then you start a new one). +Below is a screenshot of what has been accomplished so far: + +\image declarative-adv-tutorial3.png + +Here is the QML code as it is now for the main file: + +\snippet declarative/tutorials/samegame/samegame3/samegame.qml 0 + +And the code for the block: + +\snippet declarative/tutorials/samegame/samegame3/Block.qml 0 + +The game works, but it's a little boring right now. Where are the smooth animated transitions? Where are the high scores? +If you were a QML expert you could have written these in for the first iteration, but in this tutorial they've been saved +until the next chapter - where your application becomes alive! +*/ + +/*! +\page qml-advtutorial4.html +\title QML Advanced Tutorial 4 - Finishing Touches +\contentspage QML Advanced Tutorial +\previouspage QML Advanced Tutorial 3 - Implementing the Game Logic + +Now we're going to do two things to liven the game up. Animate the blocks and add a web-based high score system. + +If you compare the \c samegame3 directory with \c samegame4, you'll noticed that we've cleaned the directory structure up. +We now have a lot of files, and so they've been split up into folders - the most notable one being a content folder +which we've placed all the QML but the main file. + +\section2 Animated Blocks + +The most vital animations are that the blocks move fluidly around the board. QML has many tools for fluid behavior, +and in this case we're going to use the \l SpringFollow element. By having the script set \c targetX and \c targetY, instead of \c x +and \c y directly, we can set the \c x and \c y of the block to a follow. \l SpringFollow is a property value source, which means +that you can set a property to be one of these elements and it will automatically bind the property to the element's value. +The SpringFollow's value follows another value over time, when the value it is tracking changes the SpringFollow's +value will also change, but it will move smoothly there over time with a spring-like movement (based on the spring +parameters specified). This is shown in the below snippet of code from \c Block.qml: + +\code + property int targetX: 0 + property int targetY: 0 + + x: SpringFollow { source: targetX; spring: 2; damping: 0.2 } + y: SpringFollow { source: targetY; spring: 2; damping: 0.2 } +\endcode + +We also have to change the \c{samegame.js} code, so that wherever it was setting the \c x or \c y it now sets \c targetX and \c targetY +(including when creating the block). This simple change is all you need to get spring moving blocks that no longer teleport +around the board. If you try doing just this though, you'll notice that they now never jump from one point to another, even in +the initialization! This gives an odd effect of having them all slide out of the corner (0,0) on start up. We'd rather that they +fall down from the top in rows. To do this, we disable the \c x follow (but not the \c y follow) and only enable it after we've set +the \c x in the \c createBlock function. The above snippet now becomes: + +\snippet declarative/tutorials/samegame/samegame4/content/BoomBlock.qml 1 + +The next-most vital animation is a smooth exit. For this animation, we'll use a \l Behavior element. A Behavior is also a property +value source, and it is much like SpringFollow except that it doesn't model the behavior of a spring. You specify how a Behavior +transitions using the standard animations. As we want the blocks to smoothly fade in and out we'll set a Behavior on the block +image's opacity, like so: + +\snippet declarative/tutorials/samegame/samegame4/content/BoomBlock.qml 2 + +Note that the \c{opacity: 0} makes it start out transparent. We could set the opacity in the script file when we create and destroy the blocks, +but instead we use states (as this is useful for the next animation we'll implement). The below snippet is set on the root +element of \c{Block.qml}: +\code + property bool dying: false + states: [ + State{ name: "AliveState"; when: spawned == true && dying == false + PropertyChanges { target: img; opacity: 1 } + }, State{ name: "DeathState"; when: dying == true + PropertyChanges { target: img; opacity: 0 } + } + ] +\endcode + +Now it will automatically fade in, as we set spawned to true already when implementing the block movement animations. +To fade out, we set 'dying' to true instead of setting opacity to 0 when a block is destroyed (in the \c floodFill function). + +The least vital animations are a cool-looking particle effect when they get destroyed. First we create a \l Particles element in +the block, like so: + +\snippet declarative/tutorials/samegame/samegame4/content/BoomBlock.qml 3 + +To fully understand this you'll want to look at the Particles element documentation, but it's important to note that emissionRate is set +to zero, so that no particles are emitted normally. +We next extend the 'dying' state, which creates a burst of particles by calling the burst method on the particles element. The code for the states now look +like this: + +\snippet declarative/tutorials/samegame/samegame4/content/BoomBlock.qml 4 + +And now the game should be beautifully animated and smooth, with a subtle (or not-so-subtle) animation added for all of the +player's actions. The end result is shown below, with a different set of images to demonstrate basic themeing: + +\image declarative-adv-tutorial4.gif + +The basic theme change there is the result of simply replacing the images. This can be done at run time by setting the source property, so a further advanced feature to try on your own is to add a button which toggles between two different themes. + +\section2 Offline High Scores +Another extension we might want for the game is some way of storing and retrieving high scores. This tutorial contains both online and offline high score storage. + +For better high score data, we want the name and time of the player. The time is obtained in the script fairly simply, but we +have to ask the player for their name. We thus re-use the dialog QML file to pop up a dialog asking for the player's name (and +if they exit this dialog without entering it they have a way to opt out of posting their high score). When the dialog is closed we store the name and high score, using the code below. + +\snippet declarative/tutorials/samegame/samegame4/content/samegame.js 2 + +For offline storage, we use the HTML 5 offline storage JavaScript API to maintain a persistant SQL database unique to this application. This first line in this function calls the function for the web-based high scores, described later, if it has been setup. Next we create an offline storage database for the high scores using openDatabase and prepare the data and SQL query that we want to use to save it. The offline storage API uses SQL queries for data manipulation and retrival, and in the db.transaction call we use three SQL queries to initialize the database (if necessary), and then add to and retrieve high scores. To use the returned data, we turn it into a string with one line per row returned, and show a dialog containing that string. For a more detailed explanation of the offline storage API in QML, consult the global object documentation. + +This is one way of storing and displaying high scores locally, but not the only way. A more complex alternative would have been to create a high score dialog component, and pass the results to it for processing and display (instead of resusing the Dialog). This would allow a more themable dialog that could present the high scores better. If your QML is the UI for a C++ application, you could also have passed the score to a C++ function to store it locally in a variety of ways, including a simple format without SQL or in another SQL database. + +\section2 Web-based High Scores + +You've seen how to store high scores locally, but it is also easy to integrate a web enabled high score storage into your QML application. This tutorial also shows you how to communicate the high scores to a web server. The implementation we've done is very +simple - the high score data is posted to a php script running on a server somewhere, and that server then stores it and +displays it to visitors. You could request an XML or QML file from that same server, which contained and displayed the scores, +but that's beyond the scope of this tutorial. The php script we've used is available in the examples directory. + +if the player entered their name we can send the data to the web service in the following snippet out of the script file: + +\snippet declarative/tutorials/samegame/samegame4/content/samegame.js 1 + +This is the same \c XMLHttpRequest() as you'll find in browser JavaScript, and can be used in the same way to dynamically get XML +or QML from the web service to display the high scores. We don't worry about the response in this case, we just post the high +score data to the web server. If it had returned a QML file (or a URL to a QML file) you could instantiate it in much the same +way as you did the blocks. + +An alternate way to access and submit web-based data would be to use QML elements designed for this purpose - XmlListModel +makes it very easy to fetch and display XML based data such as RSS in a QML application (see the Flickr demo for an example). +By following this tutorial you've now ben shown how to write a fully functional application in QML, with the application logic +written in a script file and with both many fluid animations and being web-enabled. Congratulations, you should now be skilled +enough to write entire applications in QML. */ diff --git a/doc/src/declarative/advtutorial1.qdoc b/doc/src/declarative/advtutorial1.qdoc deleted file mode 100644 index 598537a..0000000 --- a/doc/src/declarative/advtutorial1.qdoc +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! -\page advtutorial1.html -\title Advanced Tutorial 1 - Creating the Game Canvas and Blocks - -The first step is to create the items in your application. In Same Game we have a main game screen and the blocks that populate it. - -\image declarative-adv-tutorial1.png - -Here is the QML code for the basic elements. The game window: - -\snippet declarative/tutorials/samegame/samegame1/samegame.qml 0 - -This gives you a basic game window, with room for the game canvas. A new game -button and room to display the score. The one thing you may not recognize here -is the \l SystemPalette item. This item provides access to the Qt system palette -and is used to make the button look more like a system button (for exact native -feel you would use a \l QPushButton). Since we want a fully QML button, and QML does -not include a button, we had to write our own. Below is the code which we wrote to do this: - -\snippet declarative/tutorials/samegame/samegame1/Button.qml 0 - -Note that this Button component was written to be fairly generic, in case we -want to use a similarly styled button later. - -And here is a simple block: - -\snippet declarative/tutorials/samegame/samegame1/Block.qml 0 - -Since it doesn't do anything yet it's very simple, just an image. As the -tutorial progresses and the block starts doing things the file will become -more than just an image. Note that we've set the image to be the size of the item. -This will be used later, when we dynamically create and size the block items the image will be scaled automatically -to the correct size. - -You should be familiar with all that goes on in these files so far. This is a -very basic start and doesn't move at all - next we will populate the game canvas -with some blocks. - -[\l {advtutorial.html}{Advanced Tutorial}] [Next: \l {Advanced Tutorial 2 - Populating the Game Canvas}] -*/ - diff --git a/doc/src/declarative/advtutorial2.qdoc b/doc/src/declarative/advtutorial2.qdoc deleted file mode 100644 index 1addf45..0000000 --- a/doc/src/declarative/advtutorial2.qdoc +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! -\page advtutorial2.html -\title Advanced Tutorial 2 - Populating the Game Canvas - -Now that we've written some basic elements, let's start writing the game. The -first thing to do is to generate all of the blocks. Now we need to dynamically -generate all of these blocks, because you have a new, random set of blocks -every time. As they are dynamically generated every time the new game button is -clicked, as opposed to on startup, we will be dynamically generating the blocks -in the JavaScript, as opposed to using a \l Repeater. - -This adds enough script to justify a new file, \c{samegame.js}, the intial version -of which is shown below - -\snippet declarative/tutorials/samegame/samegame2/samegame.js 0 - -The gist of this code is that we create the blocks dynamically, as many as will fit, and then store them in an array for future reference. -The \c initBoard function will be hooked up to the new game button soon, and should be fairly straight forward. - -The \c createBlock function is a lot bigger, and I'll explain it block by block. -First we ensure that the component has been constructed. QML elements, including composite ones like the \c Block.qml -that we've written, are never created directly in script. While there is a function to parse and create an arbitrary QML string, -in the case where you are repeatedly creating the same item you will want to use the \c createComponent function. \c createComponent is -a built-in function in the declarative JavaScript, and returns a component object. -A component object prepares and stores a QML element (usually a composite element) for easy and efficient use. -When the component is ready, you can create a new instance of the loaded QML with the \c createObject method. -If the component is loaded remotely (over HTTP for example) then you will have to wait for the component to finish loading -before calling \c createObject. Since we don't wait here (the waiting is asyncronous, the component object will send a signal to tell -you when it's done) this code will only work if the block QML is a local file. - -As we aren't waiting for the component, the next block of code creates a game block with \c{component.createObject}. -Since there could be an error in the QML file you are trying to load, success is not guaranteed. -The first bit of error checkign code comes right after \c{createObject()}, to ensure that the object loaded correctly. -If it did not load correctly the function returns false, but we don't have that hooked up to the main UI to indicate -that something has gone wrong. Instead we print out error messages to the console, because an error here means an invalid -QML file and should only happen while you are developing and testing the UI. - -Next we start to set up our dynamically created block. -Because the \c{Block.qml} file is generic it needs to be placed in the main scene, and in the right place. -This is why \c parent, \c x, \c y, \c width and \c height are set. We then store it in the board array for later use. - -Finally, we have some more error handling. You can only call \c{createObject} if the component has loaded. -If it has not loaded, either it is still loading or there was an error loading (such as a missing file). -Since we don't request remote files the problem is likely to be a missing or misplaced file. -Again we print this to the console to aid debugging. - -You now have the code to create a field of blocks dynamically, like below: - -\image declarative-adv-tutorial2.png - -To hook this code up to the \e{New Game} button, you alter it as below: - -\snippet declarative/tutorials/samegame/samegame2/samegame.qml 1 - -We have just replaced the \c{onClicked: console.log("Implement me!")} with \c{onClicked: initBoard()}. -Note that in order to have the function available, you'll need to include the script in the main file, -by adding a script element to it. - -\snippet declarative/tutorials/samegame/samegame2/samegame.qml 2 - -With those two changes, and the script file, you are now dynamically creating a field of blocks you can play with. -They don't do anything now though; the next chapter will add the game mechanics. - -[Previous: \l {Advanced Tutorial 1 - Creating the Game canvas and block}] [\l {advtutorial.html}{Advanced Tutorial}] [Next: \l {Advanced Tutorial 3 - Implementing the Game Logic}] - -*/ diff --git a/doc/src/declarative/advtutorial3.qdoc b/doc/src/declarative/advtutorial3.qdoc deleted file mode 100644 index d101a98..0000000 --- a/doc/src/declarative/advtutorial3.qdoc +++ /dev/null @@ -1,116 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! -\page advtutorial3.html -\title Advanced Tutorial 3 - Implementing the Game Logic - -First we add to the \c initBoard function clearing of the board before filling it up again, so that clicking new game won't leave the previous game -lying around in the background. To the \c createComponent function we have added setting the type of the block to a number between -one and three - it's fundamental to the game logic that the blocks be different types if you want a fun game. - -The main change was adding the following game logic functions: -\list -\o function \c{handleClick(x,y)} -\o function \c{floodFill(xIdx,yIdx,type)} -\o function \c{shuffleDown()} -\o function \c{victoryCheck()} -\o function \c{floodMoveCheck(xIdx, yIdx, type)} -\endlist - -As this is a tutorial about QML, not game design, these functions will not be discussed in detail. The game logic here -was written in script, but it could have been written in C++ and had these functions exposed in the same way (except probably faster). -The interfacing of these functions and QML is what we will focus on. Of these functions, only \c handleClick and \c victoryCheck -interface closely with the QML. Those functions are shown below (the rest are still in the code for this tutorial located at -\c{$QTDIR/examples/declarative/tutorials/samegame}). - -\snippet declarative/tutorials/samegame/samegame3/samegame.js 1 -\snippet declarative/tutorials/samegame/samegame3/samegame.js 2 - -You'll notice them referring to the \c gameCanvas item. This is an item that has been added to the QML for easier interfacing with the game logic. -It is placed next to the background image and replaces the background as the item to create the blocks in. -Its code is shown below: - -\snippet declarative/tutorials/samegame/samegame3/samegame.qml 1 - -This item is the exact size of the board, contains a score property, and a mouse region for input. -The blocks are now created as its children, and its size is used to determining the board size, so as to scale to the available screen size. -Since it needs to bind its size to a multiple of \c tileSize, \c tileSize needs to be moved into a QML property and out of the script file. -Note that it can still be accessed from the script. - -The mouse region simply calls \c{handleClick()}, which deals with the input events. -Should those events cause the player to score, \c{gameCanvas.score} is updated. -The score display text item has also been changed to bind its text property to \c{gamecanvas.score}. -Note that if score was a global variable in the \c{samegame.js} file you could not bind to it. You can only bind to QML properties. - -\c victoryCheck() primarily updates the score variable. But it also pops up a dialog saying \e {Game Over} when the game is over. -In this example we wanted a pure-QML, animated dialog, and since QML doesn't contain one, we wrote our own. -Below is the code for the \c Dialog element, note how it's designed so as to be usable imperatively from within the script file (via the functions and signals): - -\snippet declarative/tutorials/samegame/samegame3/Dialog.qml 0 - -And this is how it's used in the main QML file: - -\snippet declarative/tutorials/samegame/samegame3/samegame.qml 2 - -Combined with the line of code in \c victoryCheck, this causes a dialog to appear when the game is over, informing the user of that fact. - -We now have a working game! The blocks can be clicked, the player can score, and the game can end (and then you start a new one). -Below is a screenshot of what has been accomplished so far: - -\image declarative-adv-tutorial3.png - -Here is the QML code as it is now for the main file: - -\snippet declarative/tutorials/samegame/samegame3/samegame.qml 0 - -And the code for the block: - -\snippet declarative/tutorials/samegame/samegame3/Block.qml 0 - -The game works, but it's a little boring right now. Where are the smooth animated transitions? Where are the high scores? -If you were a QML expert you could have written these in for the first iteration, but in this tutorial they've been saved -until the next chapter - where your application becomes alive! - -[Previous: \l {Advanced Tutorial 2 - Populating the Game Canvas}] [\l {advtutorial.html}{Advanced Tutorial}] [Next: \l {Advanced Tutorial 4 - Finishing Touches}] - -*/ - diff --git a/doc/src/declarative/advtutorial4.qdoc b/doc/src/declarative/advtutorial4.qdoc deleted file mode 100644 index 059f8bf..0000000 --- a/doc/src/declarative/advtutorial4.qdoc +++ /dev/null @@ -1,159 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! -\page advtutorial4.html -\title Advanced Tutorial 4 - Finishing Touches - -Now we're going to do two things to liven the game up. Animate the blocks and add a web-based high score system. - -If you compare the \c samegame3 directory with \c samegame4, you'll noticed that we've cleaned the directory structure up. -We now have a lot of files, and so they've been split up into folders - the most notable one being a content folder -which we've placed all the QML but the main file. - -\section2 Animated Blocks - -The most vital animations are that the blocks move fluidly around the board. QML has many tools for fluid behavior, -and in this case we're going to use the \l SpringFollow element. By having the script set \c targetX and \c targetY, instead of \c x -and \c y directly, we can set the \c x and \c y of the block to a follow. \l SpringFollow is a property value source, which means -that you can set a property to be one of these elements and it will automatically bind the property to the element's value. -The SpringFollow's value follows another value over time, when the value it is tracking changes the SpringFollow's -value will also change, but it will move smoothly there over time with a spring-like movement (based on the spring -parameters specified). This is shown in the below snippet of code from \c Block.qml: - -\code - property int targetX: 0 - property int targetY: 0 - - x: SpringFollow { source: targetX; spring: 2; damping: 0.2 } - y: SpringFollow { source: targetY; spring: 2; damping: 0.2 } -\endcode - -We also have to change the \c{samegame.js} code, so that wherever it was setting the \c x or \c y it now sets \c targetX and \c targetY -(including when creating the block). This simple change is all you need to get spring moving blocks that no longer teleport -around the board. If you try doing just this though, you'll notice that they now never jump from one point to another, even in -the initialization! This gives an odd effect of having them all slide out of the corner (0,0) on start up. We'd rather that they -fall down from the top in rows. To do this, we disable the \c x follow (but not the \c y follow) and only enable it after we've set -the \c x in the \c createBlock function. The above snippet now becomes: - -\snippet declarative/tutorials/samegame/samegame4/content/BoomBlock.qml 1 - -The next-most vital animation is a smooth exit. For this animation, we'll use a \l Behavior element. A Behavior is also a property -value source, and it is much like SpringFollow except that it doesn't model the behavior of a spring. You specify how a Behavior -transitions using the standard animations. As we want the blocks to smoothly fade in and out we'll set a Behavior on the block -image's opacity, like so: - -\snippet declarative/tutorials/samegame/samegame4/content/BoomBlock.qml 2 - -Note that the \c{opacity: 0} makes it start out transparent. We could set the opacity in the script file when we create and destroy the blocks, -but instead we use states (as this is useful for the next animation we'll implement). The below snippet is set on the root -element of \c{Block.qml}: -\code - property bool dying: false - states: [ - State{ name: "AliveState"; when: spawned == true && dying == false - PropertyChanges { target: img; opacity: 1 } - }, State{ name: "DeathState"; when: dying == true - PropertyChanges { target: img; opacity: 0 } - } - ] -\endcode - -Now it will automatically fade in, as we set spawned to true already when implementing the block movement animations. -To fade out, we set 'dying' to true instead of setting opacity to 0 when a block is destroyed (in the \c floodFill function). - -The least vital animations are a cool-looking particle effect when they get destroyed. First we create a \l Particles element in -the block, like so: - -\snippet declarative/tutorials/samegame/samegame4/content/BoomBlock.qml 3 - -To fully understand this you'll want to look at the Particles element documentation, but it's important to note that emissionRate is set -to zero, so that no particles are emitted normally. -We next extend the 'dying' state, which creates a burst of particles by calling the burst method on the particles element. The code for the states now look -like this: - -\snippet declarative/tutorials/samegame/samegame4/content/BoomBlock.qml 4 - -And now the game should be beautifully animated and smooth, with a subtle (or not-so-subtle) animation added for all of the -player's actions. The end result is shown below, with a different set of images to demonstrate basic themeing: - -\image declarative-adv-tutorial4.gif - -The basic theme change there is the result of simply replacing the images. This can be done at run time by setting the source property, so a further advanced feature to try on your own is to add a button which toggles between two different themes. - -\section2 Offline High Scores -Another extension we might want for the game is some way of storing and retrieving high scores. This tutorial contains both online and offline high score storage. - -For better high score data, we want the name and time of the player. The time is obtained in the script fairly simply, but we -have to ask the player for their name. We thus re-use the dialog QML file to pop up a dialog asking for the player's name (and -if they exit this dialog without entering it they have a way to opt out of posting their high score). When the dialog is closed we store the name and high score, using the code below. - -\snippet declarative/tutorials/samegame/samegame4/content/samegame.js 2 - -For offline storage, we use the HTML 5 offline storage JavaScript API to maintain a persistant SQL database unique to this application. This first line in this function calls the function for the web-based high scores, described later, if it has been setup. Next we create an offline storage database for the high scores using openDatabase and prepare the data and SQL query that we want to use to save it. The offline storage API uses SQL queries for data manipulation and retrival, and in the db.transaction call we use three SQL queries to initialize the database (if necessary), and then add to and retrieve high scores. To use the returned data, we turn it into a string with one line per row returned, and show a dialog containing that string. For a more detailed explanation of the offline storage API in QML, consult the global object documentation. - -This is one way of storing and displaying high scores locally, but not the only way. A more complex alternative would have been to create a high score dialog component, and pass the results to it for processing and display (instead of resusing the Dialog). This would allow a more themable dialog that could present the high scores better. If your QML is the UI for a C++ application, you could also have passed the score to a C++ function to store it locally in a variety of ways, including a simple format without SQL or in another SQL database. - -\section2 Web-based High Scores - -You've seen how to store high scores locally, but it is also easy to integrate a web enabled high score storage into your QML application. This tutorial also shows you how to communicate the high scores to a web server. The implementation we've done is very -simple - the high score data is posted to a php script running on a server somewhere, and that server then stores it and -displays it to visitors. You could request an XML or QML file from that same server, which contained and displayed the scores, -but that's beyond the scope of this tutorial. The php script we've used is available in the examples directory. - -if the player entered their name we can send the data to the web service in the following snippet out of the script file: - -\snippet declarative/tutorials/samegame/samegame4/content/samegame.js 1 - -This is the same \c XMLHttpRequest() as you'll find in browser JavaScript, and can be used in the same way to dynamically get XML -or QML from the web service to display the high scores. We don't worry about the response in this case, we just post the high -score data to the web server. If it had returned a QML file (or a URL to a QML file) you could instantiate it in much the same -way as you did the blocks. - -An alternate way to access and submit web-based data would be to use QML elements designed for this purpose - XmlListModel -makes it very easy to fetch and display XML based data such as RSS in a QML application (see the Flickr demo for an example). - -By following this tutorial you've now ben shown how to write a fully functional application in QML, with the application logic -written in a script file and with both many fluid animations and being web-enabled. Congratulations, you should now be skilled -enough to write entire applications in QML. - -[Previous: \l {Advanced Tutorial 3 - Implementing the Game Logic}] [\l {advtutorial.html}{Advanced Tutorial}] -*/ diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc index 6a1b2b1..c57b73e 100644 --- a/doc/src/declarative/declarativeui.qdoc +++ b/doc/src/declarative/declarativeui.qdoc @@ -73,8 +73,8 @@ completely new applications. QML is fully \l {Extending QML}{extensible from C+ \section1 Getting Started: \list \o \l {Introduction to the QML language} -\o \l {Tutorial}{Tutorial: 'Hello World'} -\o \l {advtutorial.html}{Tutorial: 'Same Game'} +\o \l {QML Tutorial}{Tutorial: 'Hello World'} +\o \l {QML Advanced Tutorial}{Tutorial: 'Same Game'} \o \l {QML Examples and Walkthroughs} \o \l {Using QML in C++ Applications} \endlist diff --git a/doc/src/declarative/examples.qdoc b/doc/src/declarative/examples.qdoc index 46cac07..6048467 100644 --- a/doc/src/declarative/examples.qdoc +++ b/doc/src/declarative/examples.qdoc @@ -80,7 +80,7 @@ These will be documented, and demonstrate how to achieve various things in QML. \o \l{qmlexampletoggleswitch.html}{Toggle Switch} \o \image switch-example.gif \row - \o \l{Advanced Tutorial}{SameGame} + \o \l{QML Advanced Tutorial}{SameGame} \o \image declarative-adv-tutorial4.gif \endtable diff --git a/doc/src/declarative/qmlreference.qdoc b/doc/src/declarative/qmlreference.qdoc index f52ff41..c6ccbe0 100644 --- a/doc/src/declarative/qmlreference.qdoc +++ b/doc/src/declarative/qmlreference.qdoc @@ -65,8 +65,8 @@ Getting Started: \list \o \l {Introduction to the QML language} - \o \l {tutorial}{Tutorial: 'Hello World'} - \o \l {advtutorial.html}{Advanced Tutorial: 'Same Game'} + \o \l {QML Tutorial}{Tutorial: 'Hello World'} + \o \l {QML Advanced Tutorial}{Advanced Tutorial: 'Same Game'} \o \l {QML Examples and Walkthroughs} \endlist diff --git a/doc/src/declarative/tutorial.qdoc b/doc/src/declarative/tutorial.qdoc index 54b6610..e136ada 100644 --- a/doc/src/declarative/tutorial.qdoc +++ b/doc/src/declarative/tutorial.qdoc @@ -40,11 +40,13 @@ ****************************************************************************/ /*! -\page tutorial.html -\title Tutorial +\page qml-tutorial.html +\title QML Tutorial +\brief An introduction to the basic concepts and features of QML. +\nextpage QML Tutorial 1 - Basic Types -This tutorial gives an introduction to QML. It doesn't cover everything; the emphasis is on teaching the key principles, -and features are introduced as needed. +This tutorial gives an introduction to QML, the mark up language for Qt Quick. It doesn't cover everything; +the emphasis is on teaching the key principles, and features are introduced as needed. Through the different steps of this tutorial we will learn about QML basic types, we will create our own QML component with properties and signals, and we will create a simple animation with the help of states and transitions. @@ -56,9 +58,182 @@ The tutorial's source code is located in the $QTDIR/examples/declarative/tutoria Tutorial chapters: \list -\o \l {Tutorial 1 - Basic Types} -\o \l {Tutorial 2 - QML Component} -\o \l {Tutorial 3 - States and Transitions} +\o \l {QML Tutorial 1 - Basic Types} +\o \l {QML Tutorial 2 - QML Component} +\o \l {QML Tutorial 3 - States and Transitions} \endlist */ + +/*! +\page qml-tutorial1.html +\title QML Tutorial 1 - Basic Types +\contentspage QML Tutorial +\previouspage QML Tutorial +\nextpage QML Tutorial 2 - QML Component + +This first program is a very simple "Hello world" example that introduces some basic QML concepts. +The picture below is a screenshot of this program. + +\image declarative-tutorial1.png + +Here is the QML code for the application: + +\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 0 + +\section1 Walkthrough + +\section2 Import + +First, we need to import the types that we need for this example. Most QML files will import the built-in QML +types (like \l{Rectangle}, \l{Image}, ...) that come with Qt with: + +\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 3 + +\section2 Rectangle element + +\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 1 + +We declare a root element of type \l{Rectangle}. It is one of the basic building blocks you can use to create an application in QML. +We give it an \c{id} to be able to refer to it later. In this case, we call it \e page. +We also set the \c width, \c height and \c color properties. +The \l{Rectangle} element contains many other properties (such as \c x and \c y), but these are left at their default values. + +\section2 Text element + +\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 2 + +We add a \l Text element as a child of our root element that will display the text 'Hello world!'. + +The \c y property is used to position the text vertically at 30 pixels from the top of its parent. + +The \c font.pointSize and \c font.bold properties are related to fonts and use the \l{dot properties}{dot notation}. + +The \c anchors.horizontalCenter property refers to the horizontal center of an element. +In this case, we specify that our text element should be horizontally centered in the \e page element (see \l{anchor-layout}{Anchor-based Layout}). + +\section2 Viewing the example + +To view what you have created, run the qmlviewer (located in the \c bin directory) with your filename as the first argument. +For example, to run the provided completed Tutorial 1 example from the install location, you would type: + +\code +bin/qmlviewer $QTDIR/examples/declarative/tutorials/helloworld/tutorial1.qml +\endcode +*/ + +/*! +\page qml-tutorial2.html +\title QML Tutorial 2 - QML Component +\contentspage QML Tutorial +\previouspage QML Tutorial 1 - Basic Types +\nextpage QML Tutorial 3 - States and Transitions + +This chapter adds a color picker to change the color of the text. + +\image declarative-tutorial2.png + +Our color picker is made of six cells with different colors. +To avoid writing the same code multiple times, we first create a new \c Cell component. +A component provides a way of defining a new type that we can re-use in other QML files. +A QML component is like a black-box and interacts with the outside world through properties, signals and slots and is generally +defined in its own QML file (for more details, see \l {Defining new Components}). +The component's filename must always start with a capital letter. + +Here is the QML code for \c Cell.qml: + +\snippet examples/declarative/tutorials/helloworld/Cell.qml 0 + +\section1 Walkthrough + +\section2 The Cell Component + +\snippet examples/declarative/tutorials/helloworld/Cell.qml 1 + +The root element of our component is an \l Item with the \c id \e container. +An \l Item is the most basic visual element in QML and is often used as a container for other elements. + +\snippet examples/declarative/tutorials/helloworld/Cell.qml 4 + +We declare a \c color property. This property is accessible from \e outside our component, this allows us +to instantiate the cells with different colors. +This property is just an alias to an existing property - the color of the rectangle that compose the cell (see \l{intro-properties}{Properties}). + +\snippet examples/declarative/tutorials/helloworld/Cell.qml 5 + +We want our component to also have a signal that we call \e clicked with a \e color parameter. +We will use this signal to change the color of the text in the main QML file later. + +\snippet examples/declarative/tutorials/helloworld/Cell.qml 2 + +Our cell component is basically a colored rectangle with the \c id \e rectangle. + +The \c anchors.fill property is a convenient way to set the size of an element. +In this case the rectangle will have the same size as its parent (see \l{anchor-layout}{Anchor-based Layout}). + +\snippet examples/declarative/tutorials/helloworld/Cell.qml 3 + +In order to change the color of the text when clicking on a cell, we create a \l MouseRegion element with +the same size as its parent. + +A \l MouseRegion defines a signal called \e clicked. +When this signal is triggered we want to emit our own \e clicked signal with the color as parameter. + +\section2 The main QML file + +In our main QML file, we use our \c Cell component to create the color picker: + +\snippet examples/declarative/tutorials/helloworld/tutorial2.qml 0 + +We create the color picker by putting 6 cells with different colors in a grid. + +\snippet examples/declarative/tutorials/helloworld/tutorial2.qml 1 + +When the \e clicked signal of our cell is triggered, we want to set the color of the text to the color passed as a parameter. +We can react to any signal of our component through a property of the name \e 'onSignalName' (see \l{Signal Handlers}). +*/ + +/*! +\page qml-tutorial3.html +\title QML Tutorial 3 - States and Transitions +\contentspage QML Tutorial +\previouspage QML Tutorial 2 - QML Component + +In this chapter, we make this example a little bit more dynamic by introducing states and transitions. + +We want our text to move to the bottom of the screen, rotate and become red when clicked. + +\image declarative-tutorial3_animation.gif + +Here is the QML code: + +\snippet examples/declarative/tutorials/helloworld/tutorial3.qml 0 + +\section1 Walkthrough + +\snippet examples/declarative/tutorials/helloworld/tutorial3.qml 2 + +First, we create a new \e down state for our text element. +This state will be activated when the \l MouseRegion is pressed, and deactivated when it is released. + +The \e down state includes a set of property changes from our implicit \e {default state} +(the items as they were initially defined in the QML). +Specifically, we set the \c y property of the text to \c 160, the rotation to \c 180 and the \c color to red. + +\snippet examples/declarative/tutorials/helloworld/tutorial3.qml 3 + +Because we don't want the text to appear at the bottom instantly but rather move smoothly, +we add a transition between our two states. + +\c from and \c to define the states between which the transition will run. +In this case, we want a transition from the default state to our \e down state. + +Because we want the same transition to be run in reverse when changing back from the \e down state to the default state, +we set \c reversible to \c true. +This is equivalent to writing the two transitions separately. + +The \l ParallelAnimation element makes sure that the two types of animations (number and color) start at the same time. +We could also run them one after the other by using \l SequentialAnimation instead. + +For more details on states and transitions, see \l {QML States}. +*/ diff --git a/doc/src/declarative/tutorial1.qdoc b/doc/src/declarative/tutorial1.qdoc deleted file mode 100644 index b89c74a..0000000 --- a/doc/src/declarative/tutorial1.qdoc +++ /dev/null @@ -1,97 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! -\page tutorial1.html -\title Tutorial 1 - Basic Types - -This first program is a very simple "Hello world" example that introduces some basic QML concepts. -The picture below is a screenshot of this program. - -\image declarative-tutorial1.png - -Here is the QML code for the application: - -\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 0 - -\section1 Walkthrough - -\section2 Import - -First, we need to import the types that we need for this example. Most QML files will import the built-in QML -types (like \l{Rectangle}, \l{Image}, ...) that come with Qt with: - -\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 3 - -\section2 Rectangle element - -\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 1 - -We declare a root element of type \l{Rectangle}. It is one of the basic building blocks you can use to create an application in QML. -We give it an \c{id} to be able to refer to it later. In this case, we call it \e page. -We also set the \c width, \c height and \c color properties. -The \l{Rectangle} element contains many other properties (such as \c x and \c y), but these are left at their default values. - -\section2 Text element - -\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 2 - -We add a \l Text element as a child of our root element that will display the text 'Hello world!'. - -The \c y property is used to position the text vertically at 30 pixels from the top of its parent. - -The \c font.pointSize and \c font.bold properties are related to fonts and use the \l{dot properties}{dot notation}. - -The \c anchors.horizontalCenter property refers to the horizontal center of an element. -In this case, we specify that our text element should be horizontally centered in the \e page element (see \l{anchor-layout}{Anchor-based Layout}). - -\section2 Viewing the example - -To view what you have created, run the qmlviewer (located in the \c bin directory) with your filename as the first argument. -For example, to run the provided completed Tutorial 1 example from the install location, you would type: - -\code -bin/qmlviewer $QTDIR/examples/declarative/tutorials/helloworld/tutorial1.qml -\endcode - -[\l {Tutorial}] [Next: \l {Tutorial 2 - QML Component}] - -*/ diff --git a/doc/src/declarative/tutorial2.qdoc b/doc/src/declarative/tutorial2.qdoc deleted file mode 100644 index 3e92e37..0000000 --- a/doc/src/declarative/tutorial2.qdoc +++ /dev/null @@ -1,112 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! -\page tutorial2.html -\title Tutorial 2 - QML Component - -This chapter adds a color picker to change the color of the text. - -\image declarative-tutorial2.png - -Our color picker is made of six cells with different colors. -To avoid writing the same code multiple times, we first create a new \c Cell component. -A component provides a way of defining a new type that we can re-use in other QML files. -A QML component is like a black-box and interacts with the outside world through properties, signals and slots and is generally -defined in its own QML file (for more details, see \l {Defining new Components}). -The component's filename must always start with a capital letter. - -Here is the QML code for \c Cell.qml: - -\snippet examples/declarative/tutorials/helloworld/Cell.qml 0 - -\section1 Walkthrough - -\section2 The Cell Component - -\snippet examples/declarative/tutorials/helloworld/Cell.qml 1 - -The root element of our component is an \l Item with the \c id \e container. -An \l Item is the most basic visual element in QML and is often used as a container for other elements. - -\snippet examples/declarative/tutorials/helloworld/Cell.qml 4 - -We declare a \c color property. This property is accessible from \e outside our component, this allows us -to instantiate the cells with different colors. -This property is just an alias to an existing property - the color of the rectangle that compose the cell (see \l{intro-properties}{Properties}). - -\snippet examples/declarative/tutorials/helloworld/Cell.qml 5 - -We want our component to also have a signal that we call \e clicked with a \e color parameter. -We will use this signal to change the color of the text in the main QML file later. - -\snippet examples/declarative/tutorials/helloworld/Cell.qml 2 - -Our cell component is basically a colored rectangle with the \c id \e rectangle. - -The \c anchors.fill property is a convenient way to set the size of an element. -In this case the rectangle will have the same size as its parent (see \l{anchor-layout}{Anchor-based Layout}). - -\snippet examples/declarative/tutorials/helloworld/Cell.qml 3 - -In order to change the color of the text when clicking on a cell, we create a \l MouseRegion element with -the same size as its parent. - -A \l MouseRegion defines a signal called \e clicked. -When this signal is triggered we want to emit our own \e clicked signal with the color as parameter. - -\section2 The main QML file - -In our main QML file, we use our \c Cell component to create the color picker: - -\snippet examples/declarative/tutorials/helloworld/tutorial2.qml 0 - -We create the color picker by putting 6 cells with different colors in a grid. - -\snippet examples/declarative/tutorials/helloworld/tutorial2.qml 1 - -When the \e clicked signal of our cell is triggered, we want to set the color of the text to the color passed as a parameter. -We can react to any signal of our component through a property of the name \e 'onSignalName' (see \l{Signal Handlers}). - -[Previous: \l {Tutorial 1 - Basic Types}] [Next: \l {Tutorial 3 - States and Transitions}] - -*/ - diff --git a/doc/src/declarative/tutorial3.qdoc b/doc/src/declarative/tutorial3.qdoc deleted file mode 100644 index e4d7995..0000000 --- a/doc/src/declarative/tutorial3.qdoc +++ /dev/null @@ -1,86 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! -\page tutorial3.html -\title Tutorial 3 - States and Transitions - -In this chapter, we make this example a little bit more dynamic by introducing states and transitions. - -We want our text to move to the bottom of the screen, rotate and become red when clicked. - -\image declarative-tutorial3_animation.gif - -Here is the QML code: - -\snippet examples/declarative/tutorials/helloworld/tutorial3.qml 0 - -\section1 Walkthrough - -\snippet examples/declarative/tutorials/helloworld/tutorial3.qml 2 - -First, we create a new \e down state for our text element. -This state will be activated when the \l MouseRegion is pressed, and deactivated when it is released. - -The \e down state includes a set of property changes from our implicit \e {default state} -(the items as they were initially defined in the QML). -Specifically, we set the \c y property of the text to \c 160, the rotation to \c 180 and the \c color to red. - -\snippet examples/declarative/tutorials/helloworld/tutorial3.qml 3 - -Because we don't want the text to appear at the bottom instantly but rather move smoothly, -we add a transition between our two states. - -\c from and \c to define the states between which the transition will run. -In this case, we want a transition from the default state to our \e down state. - -Because we want the same transition to be run in reverse when changing back from the \e down state to the default state, -we set \c reversible to \c true. -This is equivalent to writing the two transitions separately. - -The \l ParallelAnimation element makes sure that the two types of animations (number and color) start at the same time. -We could also run them one after the other by using \l SequentialAnimation instead. - -For more details on states and transitions, see \l {QML States}. - -[Previous: \l {Tutorial 2 - QML Component}] [\l {Tutorial}] - -*/ -- cgit v0.12 From d98a1d569533891bb6def33c3233f1ebaf82d9fa Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 19 Feb 2010 16:17:26 +0100 Subject: Fix compilation on GNU/Hurd (SA_SIGINFO isn't defined) Task-number: QTBUG-7805 Patch-by: Pino Toscano Reviewed-by: Trust Me --- src/testlib/qtestcase.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 40daecb..22b59ae 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -1531,7 +1531,11 @@ FatalSignalHandler::FatalSignalHandler() #ifndef Q_WS_QWS // Don't overwrite any non-default handlers // however, we need to replace the default QWS handlers - if (oldact.sa_flags & SA_SIGINFO || oldact.sa_handler != SIG_DFL) { + if ( +#ifdef SA_SIGINFO + oldact.sa_flags & SA_SIGINFO || +#endif + oldact.sa_handler != SIG_DFL) { sigaction(fatalSignals[i], &oldact, 0); } else #endif -- cgit v0.12 From ba9c21f7a1398ddcdeee6f010b1477d79f5bb8ce Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Fri, 19 Feb 2010 16:11:19 +0100 Subject: Cocoa: calling QEventLoop::exec from mouse up causes problem If one create e.g. a modal dialog from a mouse up event handler, we qt_button_down global variable was pointing to a widget before the handler returned. This meant that you could not push another button in the window, since the qt_button_down would grab the mouse. This patch clears qt_button_down before sending mouse up events. Reviewed-by: denis --- src/gui/kernel/qt_cocoa_helpers_mac.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index b400d25..9702829 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -983,6 +983,7 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev button = Qt::RightButton; [theView qt_setLeftButtonIsRightButton: false]; } + qt_button_down = 0; break; } [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]->localPoint = localPoint; -- cgit v0.12 From a3d3f72bf571d46fc03c62b5aae51f5cc94d6999 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 20 Feb 2010 11:13:29 +0100 Subject: Fix compilation on recent Linux systems: getpid(2) is in unistd.h. Newer Linux systems (glibc 2.10, gcc 4.4) are much better at not leaking symbols, so you have to include the proper headers. --- src/multimedia/qml/qsoundeffect_pulse_p.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/multimedia/qml/qsoundeffect_pulse_p.cpp b/src/multimedia/qml/qsoundeffect_pulse_p.cpp index b1e5982..de02dac 100644 --- a/src/multimedia/qml/qsoundeffect_pulse_p.cpp +++ b/src/multimedia/qml/qsoundeffect_pulse_p.cpp @@ -67,6 +67,8 @@ #include #endif +#include + // Less than ideal #define PA_SCACHE_ENTRY_SIZE_MAX (1024*1024*16) -- cgit v0.12 From 1642c39cdc7f21cf5f183567197a19df2ab8afde Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 20 Feb 2010 11:26:02 +0100 Subject: Fix compilation: qmlviewer cannot use symbols exported with Q_AUTOTEST_EXPORT in production builds --- src/gui/graphicsview/qgraphicsview_p.h | 2 +- src/gui/widgets/qabstractscrollarea_p.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsview_p.h b/src/gui/graphicsview/qgraphicsview_p.h index 9d3edcb..729837a 100644 --- a/src/gui/graphicsview/qgraphicsview_p.h +++ b/src/gui/graphicsview/qgraphicsview_p.h @@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE -class Q_AUTOTEST_EXPORT QGraphicsViewPrivate : public QAbstractScrollAreaPrivate +class Q_GUI_EXPORT QGraphicsViewPrivate : public QAbstractScrollAreaPrivate { Q_DECLARE_PUBLIC(QGraphicsView) public: diff --git a/src/gui/widgets/qabstractscrollarea_p.h b/src/gui/widgets/qabstractscrollarea_p.h index 7c72859..9a0d66f 100644 --- a/src/gui/widgets/qabstractscrollarea_p.h +++ b/src/gui/widgets/qabstractscrollarea_p.h @@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE class QScrollBar; class QAbstractScrollAreaScrollBarContainer; -class Q_AUTOTEST_EXPORT QAbstractScrollAreaPrivate: public QFramePrivate +class Q_GUI_EXPORT QAbstractScrollAreaPrivate: public QFramePrivate { Q_DECLARE_PUBLIC(QAbstractScrollArea) -- cgit v0.12 From 4b82d6f99f7c231cbba1dd5e09ecb09d2218c8bc Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 20 Feb 2010 11:28:28 +0100 Subject: WinCE doesn't have sys/types.h --- src/3rdparty/libpng/pngconf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty/libpng/pngconf.h b/src/3rdparty/libpng/pngconf.h index 9eec6d3..5d202db 100644 --- a/src/3rdparty/libpng/pngconf.h +++ b/src/3rdparty/libpng/pngconf.h @@ -330,7 +330,7 @@ #endif /* Enough people need this for various reasons to include it here */ -#if !defined(MACOS) && !defined(RISCOS) +#if !defined(MACOS) && !defined(RISCOS) && !defined(_WIN32_WCE) # include #endif -- cgit v0.12 From 871e5b4205f08849d089454721c4e27b6b53b51e Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 20 Feb 2010 11:31:39 +0100 Subject: Fix compilation on HP-UXi: m_volume is a #define --- src/multimedia/qml/qsoundeffect.cpp | 10 +++++----- src/multimedia/qml/qsoundeffect_p.h | 2 +- src/multimedia/qml/qsoundeffect_pulse_p.cpp | 16 ++++++++-------- src/multimedia/qml/qsoundeffect_pulse_p.h | 2 +- src/multimedia/qml/qsoundeffect_qmedia_p.cpp | 8 ++++---- src/multimedia/qml/qsoundeffect_qmedia_p.h | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/multimedia/qml/qsoundeffect.cpp b/src/multimedia/qml/qsoundeffect.cpp index 1a67414..1f2c801 100644 --- a/src/multimedia/qml/qsoundeffect.cpp +++ b/src/multimedia/qml/qsoundeffect.cpp @@ -139,7 +139,7 @@ QSoundEffect::QSoundEffect(QObject *parent) : QObject(parent), m_loopCount(1), - m_volume(100), + m_vol(100), m_muted(false), m_runningCount(0) { @@ -165,7 +165,7 @@ void QSoundEffect::setSource(const QUrl &url) if (d != 0 && d->media().canonicalUrl() == url) return; - d->setVolume(m_volume); + d->setVolume(m_vol); d->setMuted(m_muted); d->setMedia(url); @@ -191,15 +191,15 @@ void QSoundEffect::setLoopCount(int loopCount) int QSoundEffect::volume() const { - return d != 0 ? d->volume() : m_volume; + return d != 0 ? d->volume() : m_vol; } void QSoundEffect::setVolume(int volume) { - if (m_volume == volume) + if (m_vol == volume) return; - m_volume = volume; + m_vol = volume; if (d != 0) d->setVolume(volume); else diff --git a/src/multimedia/qml/qsoundeffect_p.h b/src/multimedia/qml/qsoundeffect_p.h index 2610a69..5b978e5 100644 --- a/src/multimedia/qml/qsoundeffect_p.h +++ b/src/multimedia/qml/qsoundeffect_p.h @@ -109,7 +109,7 @@ private: Q_DISABLE_COPY(QSoundEffect) int m_loopCount; - int m_volume; + int m_vol; bool m_muted; int m_runningCount; diff --git a/src/multimedia/qml/qsoundeffect_pulse_p.cpp b/src/multimedia/qml/qsoundeffect_pulse_p.cpp index de02dac..36fd69d 100644 --- a/src/multimedia/qml/qsoundeffect_pulse_p.cpp +++ b/src/multimedia/qml/qsoundeffect_pulse_p.cpp @@ -130,13 +130,13 @@ public: int volume() { - return m_volume; + return m_vol; } private: void prepare() { - m_volume = 100; + m_vol = 100; m_mainLoop = pa_threaded_mainloop_new(); if (m_mainLoop == 0) { @@ -217,13 +217,13 @@ private: const unsigned str_length = 256; char str[str_length]; pa_cvolume_snprint(str, str_length, &info->volume); - self->m_volume = QString(str).replace(" ","").replace("%","").mid(2).toInt(); + self->m_vol = QString(str).replace(" ","").replace("%","").mid(2).toInt(); } } } #endif - int m_volume; + int m_vol; bool m_prepared; pa_context *m_context; pa_threaded_mainloop *m_mainLoop; @@ -238,7 +238,7 @@ QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent): QObject(parent), m_muted(false), m_playQueued(false), - m_volume(100), + m_vol(100), m_duration(0), m_dataUploaded(0), m_state(QMediaPlayer::StoppedState), @@ -262,7 +262,7 @@ qint64 QSoundEffectPrivate::duration() const int QSoundEffectPrivate::volume() const { - return m_volume; + return m_vol; } bool QSoundEffectPrivate::isMuted() const @@ -300,7 +300,7 @@ void QSoundEffectPrivate::play() daemon()->lock(); #if(Q_WS_MAEMO_5) - m_vol = PA_VOLUME_NORM/100*((daemon()->volume()+m_volume)/2); + m_vol = PA_VOLUME_NORM/100*((daemon()->volume()+m_vol)/2); #endif pa_operation_unref( pa_context_play_sample(daemon()->context(), @@ -324,7 +324,7 @@ void QSoundEffectPrivate::stop() void QSoundEffectPrivate::setVolume(int volume) { - m_volume = volume; + m_vol = volume; } void QSoundEffectPrivate::setMuted(bool muted) diff --git a/src/multimedia/qml/qsoundeffect_pulse_p.h b/src/multimedia/qml/qsoundeffect_pulse_p.h index 58a05d2..247f8a3 100644 --- a/src/multimedia/qml/qsoundeffect_pulse_p.h +++ b/src/multimedia/qml/qsoundeffect_pulse_p.h @@ -117,7 +117,7 @@ private: bool m_muted; bool m_playQueued; - int m_volume; + int m_vol; int m_duration; int m_dataUploaded; QTime m_playbackTime; diff --git a/src/multimedia/qml/qsoundeffect_qmedia_p.cpp b/src/multimedia/qml/qsoundeffect_qmedia_p.cpp index e5ac0d3..886380a 100644 --- a/src/multimedia/qml/qsoundeffect_qmedia_p.cpp +++ b/src/multimedia/qml/qsoundeffect_qmedia_p.cpp @@ -62,7 +62,7 @@ QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent): QObject(parent), m_muted(false), - m_volume(100), + m_vol(100), m_player(0) { } @@ -83,7 +83,7 @@ int QSoundEffectPrivate::volume() const { if (m_player) return m_player->volume(); - return m_volume; + return m_vol; } bool QSoundEffectPrivate::isMuted() const @@ -128,7 +128,7 @@ void QSoundEffectPrivate::stop() void QSoundEffectPrivate::setVolume(int volume) { - m_volume = volume; + m_vol = volume; if (m_player) m_player->setVolume(volume); @@ -149,7 +149,7 @@ void QSoundEffectPrivate::setMedia(const QMediaContent &media) if (m_player == 0) { m_player = new QMediaPlayer(this, QMediaPlayer::LowLatency); - m_player->setVolume(m_volume); + m_player->setVolume(m_vol); m_player->setMuted(m_muted); connect(m_player, SIGNAL(volumeChanged(int)), SIGNAL(volumeChanged(int))); diff --git a/src/multimedia/qml/qsoundeffect_qmedia_p.h b/src/multimedia/qml/qsoundeffect_qmedia_p.h index e17d720..8267f79 100644 --- a/src/multimedia/qml/qsoundeffect_qmedia_p.h +++ b/src/multimedia/qml/qsoundeffect_qmedia_p.h @@ -98,7 +98,7 @@ Q_SIGNALS: private: bool m_muted; - int m_volume; + int m_vol; QMediaPlayer *m_player; }; -- cgit v0.12 From 2c924630caf449a26d92f227152bd4e0a19138f3 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Mon, 22 Feb 2010 11:29:28 +1000 Subject: Fixed failure of tst_symbols when Qt is configured with -qtnamespace Blacklist some symbols which cannot be namespaced when Qt is configured in a namespace. --- tests/auto/symbols/tst_symbols.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/auto/symbols/tst_symbols.cpp b/tests/auto/symbols/tst_symbols.cpp index e30481a..d6fb65a 100644 --- a/tests/auto/symbols/tst_symbols.cpp +++ b/tests/auto/symbols/tst_symbols.cpp @@ -212,6 +212,10 @@ void tst_Symbols::prefix() << "winfnt_driver_class" << "pshinter_module_class" << "psnames_module_class" + // C symbols from Qt + << "qt_addObject" + << "qt_removeObject" + << "qt_startup_hook" ; QHash excusedPrefixes; @@ -279,6 +283,10 @@ void tst_Symbols::prefix() << "cti" // ctiTrampoline and ctiVMThrowTrampoline from the JIT #ifdef QT_NAMESPACE << "QWeb" // Webkit is only 'namespace aware' + << "qWeb" + << "qt" + << "QGraphicsWebView" + << "operator" #endif ; @@ -331,6 +339,8 @@ void tst_Symbols::prefix() symbol = symbol.mid(symbol.indexOf(' ') + 1); } + if (symbol.mid(symbol.indexOf(' ')+1).startsWith("std::")) + continue; if (symbol.startsWith("_") || symbol.startsWith("std::")) continue; if (symbol.startsWith("vtable ") || symbol.startsWith("VTT for ") || @@ -342,6 +352,8 @@ void tst_Symbols::prefix() continue; if (symbol.startsWith(ns + "operator")) continue; + if (symbol.startsWith("operator new") || symbol.startsWith("operator delete")) + continue; if (symbol.startsWith("guard variable for ")) continue; if (symbol.contains("(" + ns + "QTextStream")) -- cgit v0.12 From f0c374a107c6f66b9d013fd25a6ba38bda13916d Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Mon, 22 Feb 2010 11:54:06 +1000 Subject: Don't process uic3 subdir if qt3support is disabled. --- tests/auto/auto.pro | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index af9832c..3d25656 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -11,7 +11,6 @@ TEMPLATE = subdirs maketestselftest \ moc \ uic \ - uic3 \ guiapplauncher \ #atwrapper \ # These tests need significant updating, #uiloader \ # they have hardcoded machine names etc. @@ -69,6 +68,9 @@ Q3SUBDIRS += \ q3uridrag \ q3widgetstack +!cross_compile:Q3SUBDIRS += \ + uic3 + SUBDIRS += \ # exceptionsafety_objects \ shouldn't enable it languagechange \ -- cgit v0.12 From 1ab3c2f14442b474a35f20f036915f52c85bdc04 Mon Sep 17 00:00:00 2001 From: ck Date: Mon, 22 Feb 2010 09:39:11 +0100 Subject: Fix compilation with namespace. --- src/gui/text/qstatictext.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/text/qstatictext.h b/src/gui/text/qstatictext.h index 1e59944..00d42e0 100644 --- a/src/gui/text/qstatictext.h +++ b/src/gui/text/qstatictext.h @@ -97,10 +97,10 @@ private: friend class QStaticTextPrivate; }; -Q_DECLARE_METATYPE(QStaticText) - QT_END_NAMESPACE +Q_DECLARE_METATYPE(QStaticText) + QT_END_HEADER #endif // QSTATICTEXT_H -- cgit v0.12 From d8c496523647e075220244978f2554bd266944f6 Mon Sep 17 00:00:00 2001 From: ck Date: Mon, 22 Feb 2010 10:12:31 +0100 Subject: Fix compilation with namespace. --- src/declarative/qml/qml.h | 4 ++-- src/multimedia/base/qmediaserviceprovider.cpp | 4 +++- src/multimedia/playback/qmediaplayer.cpp | 7 ++++--- src/multimedia/qml/qsoundeffect.cpp | 2 ++ src/multimedia/qml/qsoundeffect_qsound_p.cpp | 2 ++ src/multimedia/qml/wavedecoder_p.cpp | 4 ++++ 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/declarative/qml/qml.h b/src/declarative/qml/qml.h index e5e7c59..a539050 100644 --- a/src/declarative/qml/qml.h +++ b/src/declarative/qml/qml.h @@ -55,8 +55,6 @@ QT_BEGIN_HEADER -QT_MODULE(Declarative) - #define QML_DECLARE_TYPE(TYPE) \ Q_DECLARE_METATYPE(TYPE *) \ Q_DECLARE_METATYPE(QList *) \ @@ -90,6 +88,8 @@ QT_END_NAMESPACE QT_BEGIN_NAMESPACE +QT_MODULE(Declarative) + #if defined(Q_OS_SYMBIAN) #define QML_DEFINE_INTERFACE(INTERFACE) \ static int defineInterface##INTERFACE = qmlRegisterInterface(#INTERFACE); diff --git a/src/multimedia/base/qmediaserviceprovider.cpp b/src/multimedia/base/qmediaserviceprovider.cpp index 8d1e0fa..eb97e16 100644 --- a/src/multimedia/base/qmediaserviceprovider.cpp +++ b/src/multimedia/base/qmediaserviceprovider.cpp @@ -48,7 +48,7 @@ #include "qmediapluginloader_p.h" #include - +QT_BEGIN_NAMESPACE class QMediaServiceProviderHintPrivate : public QSharedData { @@ -594,6 +594,8 @@ QMediaServiceProvider *QMediaServiceProvider::defaultServiceProvider() #endif } +QT_END_NAMESPACE + /*! \class QMediaServiceProviderPlugin \preliminary diff --git a/src/multimedia/playback/qmediaplayer.cpp b/src/multimedia/playback/qmediaplayer.cpp index 5f50fdb..0684bd1 100644 --- a/src/multimedia/playback/qmediaplayer.cpp +++ b/src/multimedia/playback/qmediaplayer.cpp @@ -947,9 +947,10 @@ QStringList QMediaPlayer::supportedMimeTypes(Flags flags) Such playback service can be used for beeps, ringtones, etc. */ -#include "moc_qmediaplayer.cpp" - QT_END_NAMESPACE -QT_END_NAMESPACE +QT_END_HEADER + +#include "moc_qmediaplayer.cpp" + diff --git a/src/multimedia/qml/qsoundeffect.cpp b/src/multimedia/qml/qsoundeffect.cpp index 1a67414..cee771d 100644 --- a/src/multimedia/qml/qsoundeffect.cpp +++ b/src/multimedia/qml/qsoundeffect.cpp @@ -52,6 +52,7 @@ #include "qsoundeffect_qsound_p.h" #endif +QT_BEGIN_NAMESPACE /*! \qmlclass QSoundEffect @@ -250,3 +251,4 @@ void QSoundEffect::repeat() } } +QT_END_NAMESPACE diff --git a/src/multimedia/qml/qsoundeffect_qsound_p.cpp b/src/multimedia/qml/qsoundeffect_qsound_p.cpp index 33f5bd4..0292d26 100644 --- a/src/multimedia/qml/qsoundeffect_qsound_p.cpp +++ b/src/multimedia/qml/qsoundeffect_qsound_p.cpp @@ -65,6 +65,7 @@ #include "qsoundeffect_qsound_p.h" +QT_BEGIN_NAMESPACE QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent): QObject(parent), @@ -221,3 +222,4 @@ void QSoundEffectPrivate::unloadSample() m_sound = 0; } +QT_END_NAMESPACE diff --git a/src/multimedia/qml/wavedecoder_p.cpp b/src/multimedia/qml/wavedecoder_p.cpp index 5fc5a96..b7d6101 100644 --- a/src/multimedia/qml/wavedecoder_p.cpp +++ b/src/multimedia/qml/wavedecoder_p.cpp @@ -44,6 +44,8 @@ #include #include +QT_BEGIN_NAMESPACE + WaveDecoder::WaveDecoder(QIODevice *s, QObject *parent): QIODevice(parent), haveFormat(false), @@ -134,3 +136,5 @@ void WaveDecoder::handleData() emit formatKnown(); } } + +QT_END_NAMESPACE -- cgit v0.12 From 79a53db37f76e3cc3687b0c7742a89260a736640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Mon, 22 Feb 2010 10:56:02 +0100 Subject: Don't include private headers from public headers. --- src/testlib/qbenchmark.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/testlib/qbenchmark.h b/src/testlib/qbenchmark.h index 38a0e52..46f51ca 100644 --- a/src/testlib/qbenchmark.h +++ b/src/testlib/qbenchmark.h @@ -43,7 +43,7 @@ #define QBENCHMARK_H #include -#include +#include QT_BEGIN_HEADER -- cgit v0.12 From 88259a37599cad4756299d729b9a733cf4b0e528 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 22 Feb 2010 12:06:19 +0100 Subject: doc: Fixed some qdoc errors. --- src/declarative/util/qmlanimation.cpp | 4 ++-- src/multimedia/qml/qmlaudio.cpp | 6 +++--- src/multimedia/qml/qmlgraphicsvideo.cpp | 6 +++--- src/multimedia/qml/qsoundeffect.cpp | 2 +- src/plugins/mediaservices/gstreamer/qgstreamerbushelper.cpp | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index 00299e7..6c9d13f 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -1528,7 +1528,7 @@ void QmlRotationAnimation::setTo(qreal t) Possible values are Numerical, Clockwise, Counterclockwise, or Shortest. - \list + \table \row \o Numerical \o Rotate by linearly interpolating between the two numbers. @@ -1543,7 +1543,7 @@ void QmlRotationAnimation::setTo(qreal t) \o Shortest \o Rotate in the direction that produces the shortest animation path. A rotation from 10 to 350 will rotate 20 degrees counterclockwise. - \list + \endtable The default direction is Shortest. */ diff --git a/src/multimedia/qml/qmlaudio.cpp b/src/multimedia/qml/qmlaudio.cpp index 5719050..89f045e 100644 --- a/src/multimedia/qml/qmlaudio.cpp +++ b/src/multimedia/qml/qmlaudio.cpp @@ -280,7 +280,7 @@ QmlAudio::Status QmlAudio::status() const */ /*! - \qmlproperty qreal playbackRate + \qmlproperty qreal Audio::playbackRate This property holds the rate at which audio is played at as a multiple of the normal rate. */ @@ -313,9 +313,9 @@ QmlAudio::Error QmlAudio::error() const */ /*! - \qmlproperty Audio::onError(error, errorString) + \qmlsignal Audio::onError(error, errorString) - This property is called when an \l {Error}{error} has occurred. The errorString parameter + This handler is called when an \l {Error}{error} has occurred. The errorString parameter may contain more detailed information about the error. */ diff --git a/src/multimedia/qml/qmlgraphicsvideo.cpp b/src/multimedia/qml/qmlgraphicsvideo.cpp index fde505d..7289f4d 100644 --- a/src/multimedia/qml/qmlgraphicsvideo.cpp +++ b/src/multimedia/qml/qmlgraphicsvideo.cpp @@ -280,7 +280,7 @@ bool QmlGraphicsVideo::hasVideo() const */ /*! - \qmlproperty qreal playbackRate + \qmlproperty qreal Video::playbackRate This property holds the rate at which video is played at as a multiple of the normal rate. */ @@ -314,9 +314,9 @@ QmlGraphicsVideo::Error QmlGraphicsVideo::error() const */ /*! - \qmlproperty Video::onError(error, errorString) + \qmlsignal Video::onError(error, errorString) - This property is called when an \l {Error}{error} has occurred. The errorString parameter + This handler is called when an \l {Error}{error} has occurred. The errorString parameter may contain more detailed information about the error. */ diff --git a/src/multimedia/qml/qsoundeffect.cpp b/src/multimedia/qml/qsoundeffect.cpp index 1f2c801..c2e2989 100644 --- a/src/multimedia/qml/qsoundeffect.cpp +++ b/src/multimedia/qml/qsoundeffect.cpp @@ -71,7 +71,7 @@ playSound.play() } } - \endeml + \endqml \sa SoundEffect */ diff --git a/src/plugins/mediaservices/gstreamer/qgstreamerbushelper.cpp b/src/plugins/mediaservices/gstreamer/qgstreamerbushelper.cpp index 4649c21..59ae5be 100644 --- a/src/plugins/mediaservices/gstreamer/qgstreamerbushelper.cpp +++ b/src/plugins/mediaservices/gstreamer/qgstreamerbushelper.cpp @@ -174,7 +174,7 @@ static GstBusSyncReply syncGstBusFilter(GstBus* bus, GstMessage* message, QGstre /*! - \class gstreamer::QGstreamerBusHelper + \class QGstreamerBusHelper \internal */ -- cgit v0.12 From 42a0771c161ba9aa8d5967d6bbcbea49a76425bc Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Mon, 22 Feb 2010 12:13:37 +0100 Subject: Cocoa: namespace build fix Reviewed-by: msorvig --- src/gui/kernel/qcocoaapplication_mac.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qcocoaapplication_mac.mm b/src/gui/kernel/qcocoaapplication_mac.mm index 5629940..4962863 100644 --- a/src/gui/kernel/qcocoaapplication_mac.mm +++ b/src/gui/kernel/qcocoaapplication_mac.mm @@ -79,6 +79,8 @@ #include #include +QT_USE_NAMESPACE + @implementation NSApplication (QT_MANGLE_NAMESPACE(QApplicationIntegration)) - (void)QT_MANGLE_NAMESPACE(qt_setDockMenu):(NSMenu *)newMenu @@ -107,7 +109,6 @@ | NSFontPanelStrikethroughEffectModeMask; } - - (void)qt_sendPostedMessage:(NSEvent *)event { // WARNING: data1 and data2 is truncated to from 64-bit to 32-bit on OS 10.5! -- cgit v0.12 From 991fa0beff10e53824879adbe4b52e4dacce6700 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Mon, 22 Feb 2010 13:50:34 +0100 Subject: Cocoa: Fix build with namespace Reviewed-by: MortenS --- src/gui/kernel/qcocoaview_mac.mm | 2 +- src/gui/kernel/qt_cocoa_helpers_mac.mm | 1 - src/gui/text/qstatictext.h | 4 ++-- src/gui/util/qsystemtrayicon_mac.mm | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index d5e7534..455176e 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -83,6 +83,7 @@ extern bool qt_sendSpontaneousEvent(QObject *, QEvent *); // qapplication.cpp extern OSViewRef qt_mac_nativeview_for(const QWidget *w); // qwidget_mac.mm extern QPointer qt_mouseover; //qapplication_mac.mm extern QPointer qt_button_down; //qapplication_mac.cpp +extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); struct dndenum_mapper { @@ -692,7 +693,6 @@ extern "C" { qt_button_down = 0; } -extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); - (void)otherMouseDown:(NSEvent *)theEvent { if (!qt_button_down) diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index 9702829..e9fdbda 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -138,7 +138,6 @@ void QMacWindowFader::performFade() } extern bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event); // qapplication.cpp; -extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview.mm extern QWidget * mac_mouse_grabber; extern QPointer qt_button_down; //qapplication_mac.cpp diff --git a/src/gui/text/qstatictext.h b/src/gui/text/qstatictext.h index 1e59944..00d42e0 100644 --- a/src/gui/text/qstatictext.h +++ b/src/gui/text/qstatictext.h @@ -97,10 +97,10 @@ private: friend class QStaticTextPrivate; }; -Q_DECLARE_METATYPE(QStaticText) - QT_END_NAMESPACE +Q_DECLARE_METATYPE(QStaticText) + QT_END_HEADER #endif // QSTATICTEXT_H diff --git a/src/gui/util/qsystemtrayicon_mac.mm b/src/gui/util/qsystemtrayicon_mac.mm index 5cadbbd..348657e 100644 --- a/src/gui/util/qsystemtrayicon_mac.mm +++ b/src/gui/util/qsystemtrayicon_mac.mm @@ -93,6 +93,7 @@ extern bool qt_mac_execute_apple_script(const QString &script, AEDesc *ret); //q extern void qtsystray_sendActivated(QSystemTrayIcon *i, int r); //qsystemtrayicon.cpp extern NSString *keySequenceToKeyEqivalent(const QKeySequence &accel); // qmenu_mac.mm extern NSUInteger keySequenceModifierMask(const QKeySequence &accel); // qmenu_mac.mm +extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); QT_END_NAMESPACE QT_USE_NAMESPACE @@ -382,7 +383,6 @@ QT_END_NAMESPACE [self menuTrackingDone:nil]; } -extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); - (void)otherMouseDown:(NSEvent *)mouseEvent { [self mousePressed:mouseEvent button:cocoaButton2QtButton([mouseEvent buttonNumber])]; -- cgit v0.12 From f57e848b561c3971e48c73aca778b2d664e56ba0 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Mon, 22 Feb 2010 14:21:25 +0100 Subject: Cocoa: fix namespace build added/removed namespace macros as needed --- src/multimedia/base/qmediaserviceprovider.cpp | 4 +++- src/multimedia/playback/qmediaplayer.cpp | 2 -- src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm | 5 ++--- src/plugins/mediaservices/qt7/qcvdisplaylink.mm | 3 +-- src/plugins/mediaservices/qt7/qt7movievideowidget.h | 2 +- src/plugins/mediaservices/qt7/qt7movieviewoutput.mm | 4 ---- src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm | 2 ++ 7 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/multimedia/base/qmediaserviceprovider.cpp b/src/multimedia/base/qmediaserviceprovider.cpp index 8d1e0fa..02c9b29 100644 --- a/src/multimedia/base/qmediaserviceprovider.cpp +++ b/src/multimedia/base/qmediaserviceprovider.cpp @@ -48,7 +48,7 @@ #include "qmediapluginloader_p.h" #include - +QT_BEGIN_NAMESPACE class QMediaServiceProviderHintPrivate : public QSharedData { @@ -697,5 +697,7 @@ QMediaServiceProvider *QMediaServiceProvider::defaultServiceProvider() Returns a set of features supported by a plug-in \a service. */ +QT_END_NAMESPACE + #include "moc_qmediaserviceprovider.cpp" #include "moc_qmediaserviceproviderplugin.cpp" diff --git a/src/multimedia/playback/qmediaplayer.cpp b/src/multimedia/playback/qmediaplayer.cpp index 5f50fdb..070a9f6 100644 --- a/src/multimedia/playback/qmediaplayer.cpp +++ b/src/multimedia/playback/qmediaplayer.cpp @@ -951,5 +951,3 @@ QStringList QMediaPlayer::supportedMimeTypes(Flags flags) QT_END_NAMESPACE -QT_END_NAMESPACE - diff --git a/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm b/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm index 5507633..d516a99 100644 --- a/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm +++ b/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm @@ -55,9 +55,6 @@ #include #include - -QT_BEGIN_NAMESPACE - @interface QTMovieObserver : NSObject { @private @@ -149,6 +146,8 @@ QT_BEGIN_NAMESPACE @end +QT_BEGIN_NAMESPACE + static CFStringRef qString2CFStringRef(const QString &string) { return CFStringCreateWithCharacters(0, reinterpret_cast(string.unicode()), diff --git a/src/plugins/mediaservices/qt7/qcvdisplaylink.mm b/src/plugins/mediaservices/qt7/qcvdisplaylink.mm index 98ae71d..00b4dc5 100644 --- a/src/plugins/mediaservices/qt7/qcvdisplaylink.mm +++ b/src/plugins/mediaservices/qt7/qcvdisplaylink.mm @@ -44,8 +44,7 @@ #include #include - -QT_USE_NAMESPACE +QT_BEGIN_NAMESPACE static CVReturn CVDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeStamp *inNow, diff --git a/src/plugins/mediaservices/qt7/qt7movievideowidget.h b/src/plugins/mediaservices/qt7/qt7movievideowidget.h index 3acd373..558c3d7 100644 --- a/src/plugins/mediaservices/qt7/qt7movievideowidget.h +++ b/src/plugins/mediaservices/qt7/qt7movievideowidget.h @@ -57,10 +57,10 @@ QT_BEGIN_HEADER -class GLVideoWidget; QT_BEGIN_NAMESPACE +class GLVideoWidget; class QCvDisplayLink; class QT7PlayerSession; class QT7PlayerService; diff --git a/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm b/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm index b549487..b90470c 100644 --- a/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm +++ b/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm @@ -49,8 +49,6 @@ #include -QT_BEGIN_NAMESPACE - #define VIDEO_TRANSPARENT(m) -(void)m:(NSEvent *)e{[[self superview] m:e];} @interface TransparentQTMovieView : QTMovieView @@ -308,5 +306,3 @@ void QT7MovieViewOutput::setSaturation(int saturation) { m_saturation = saturation; } - -QT_END_NAMESPACE diff --git a/src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm b/src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm index 342feb8..7271f5b 100644 --- a/src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm +++ b/src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm @@ -99,6 +99,7 @@ private: MapMode m_mode; }; +QT_END_NAMESPACE #define VIDEO_TRANSPARENT(m) -(void)m:(NSEvent *)e{[[self superview] m:e];} @@ -223,6 +224,7 @@ VIDEO_TRANSPARENT(scrollWheel) @end +QT_BEGIN_NAMESPACE QT7MovieViewRenderer::QT7MovieViewRenderer(QObject *parent) :QT7VideoRendererControl(parent), -- cgit v0.12 From d1b4e4666e4fe1a5fae0571c37535159c097f485 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 22 Feb 2010 15:24:17 +0100 Subject: qdoc: List new QML elements in \sincelist for What's New page. --- .../mediaservices/gstreamer/qgstreamermessage.cpp | 2 +- tools/qdoc3/htmlgenerator.cpp | 28 ++++++++++++++++++++-- tools/qdoc3/htmlgenerator.h | 2 ++ 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/plugins/mediaservices/gstreamer/qgstreamermessage.cpp b/src/plugins/mediaservices/gstreamer/qgstreamermessage.cpp index 13a2454..0a689d9 100644 --- a/src/plugins/mediaservices/gstreamer/qgstreamermessage.cpp +++ b/src/plugins/mediaservices/gstreamer/qgstreamermessage.cpp @@ -48,7 +48,7 @@ static int wuchi = qRegisterMetaType(); /*! - \class gstreamer::QGstreamerMessage + \class QGstreamerMessage \internal */ diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index c20f745..0477ebb 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -73,6 +73,7 @@ QString HtmlGenerator::sinceTitles[] = " New Typedefs", " New Properties", " New Variables", + " New QML Elements", " New Qml Properties", " New Qml Signals", " New Qml Methods", @@ -687,6 +688,8 @@ int HtmlGenerator::generateAtom(const Atom *atom, nsmap = newSinceMaps.find(atom->string()); NewClassMaps::const_iterator ncmap; ncmap = newClassMaps.find(atom->string()); + NewClassMaps::const_iterator nqcmap; + nqcmap = newQmlClassMaps.find(atom->string()); if ((nsmap != newSinceMaps.constEnd()) && !nsmap.value().isEmpty()) { QList
sections; QList
::ConstIterator s; @@ -697,6 +700,10 @@ int HtmlGenerator::generateAtom(const Atom *atom, while (n != nsmap.value().constEnd()) { const Node* node = n.value(); switch (node->type()) { + case Node::Fake: + if (node->subType() == Node::QmlClass) + sections[QmlClass].appendMember((Node*)node); + break; case Node::Namespace: sections[Namespace].appendMember((Node*)node); break; @@ -782,6 +789,8 @@ int HtmlGenerator::generateAtom(const Atom *atom, out() << "

" << protectEnc((*s).name) << "

\n"; if (idx == Class) generateCompactList(0, marker, ncmap.value(), QString("Q")); + else if (idx == QmlClass) + generateCompactList(0, marker, nqcmap.value(), QString("Q")); else if (idx == MemberFunction) { ParentMaps parentmaps; ParentMaps::iterator pmap; @@ -2332,7 +2341,11 @@ void HtmlGenerator::generateCompactList(const Node *relative, out() << ""; - QStringList pieces = fullName(it.value(), relative, marker).split("::"); + QStringList pieces; + if (it.value()->subType() == Node::QmlClass) + pieces << it.value()->name(); + else + pieces = fullName(it.value(), relative, marker).split("::"); out() << protectEnc(pieces.last()); out() << ""; if (pieces.size() > 1) { @@ -3723,6 +3736,9 @@ void HtmlGenerator::findAllSince(const InnerNode *node) NewClassMaps::iterator ncmap = newClassMaps.find(sinceVersion); if (ncmap == newClassMaps.end()) ncmap = newClassMaps.insert(sinceVersion,NodeMap()); + NewClassMaps::iterator nqcmap = newQmlClassMaps.find(sinceVersion); + if (nqcmap == newQmlClassMaps.end()) + nqcmap = newQmlClassMaps.insert(sinceVersion,NodeMap()); if ((*child)->type() == Node::Function) { FunctionNode *func = static_cast(*child); @@ -3742,6 +3758,15 @@ void HtmlGenerator::findAllSince(const InnerNode *node) nsmap.value().insert(className,(*child)); ncmap.value().insert(className,(*child)); } + else if ((*child)->subType() == Node::QmlClass) { + QString className = (*child)->name(); + if ((*child)->parent() && + (*child)->parent()->type() == Node::Namespace && + !(*child)->parent()->name().isEmpty()) + className = (*child)->parent()->name()+"::"+className; + nsmap.value().insert(className,(*child)); + nqcmap.value().insert(className,(*child)); + } } else { QString name = (*child)->name(); @@ -4319,7 +4344,6 @@ void HtmlGenerator::generateQmlInheritedBy(const QmlClassNode* cn, NodeList subs; QmlClassNode::subclasses(cn->name(),subs); if (!subs.isEmpty()) { - //subs.sort(); Text text; text << Atom::ParaLeft << "Inherited by "; appendSortedNames(text,cn,subs,marker); diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index 551bead..8fe0331 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -90,6 +90,7 @@ class HtmlGenerator : public PageGenerator Typedef, Property, Variable, + QmlClass, QmlProperty, QmlSignal, QmlMethod, @@ -326,6 +327,7 @@ class HtmlGenerator : public PageGenerator NewSinceMaps newSinceMaps; static QString sinceTitles[]; NewClassMaps newClassMaps; + NewClassMaps newQmlClassMaps; static int id; }; -- cgit v0.12 From 8aaa61f8ea11c6e5794b5a3f6bf14bbbcb712074 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Mon, 22 Feb 2010 14:48:38 +0100 Subject: QNativeSocketEngine: Fix some error handling related to waitFor*() Task: QTBUG-7054 Reviewed-by: Peter Hartmann --- src/network/socket/qnativesocketengine.cpp | 6 ++++++ tests/auto/qtcpsocket/tst_qtcpsocket.cpp | 25 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/src/network/socket/qnativesocketengine.cpp b/src/network/socket/qnativesocketengine.cpp index a890b3b..a169ca0 100644 --- a/src/network/socket/qnativesocketengine.cpp +++ b/src/network/socket/qnativesocketengine.cpp @@ -185,6 +185,9 @@ void QNativeSocketEnginePrivate::setError(QAbstractSocket::SocketError error, Er // socket to recreate its engine after an error. Note: There's // one exception: SocketError(11) bypasses this as it's purely // a temporary internal error condition. + // Another exception is the way the waitFor*() functions set + // an error when a timeout occurs. After the call to setError() + // they reset the hasSetSocketError to false return; } if (error != QAbstractSocket::SocketError(11)) @@ -859,6 +862,7 @@ bool QNativeSocketEngine::waitForRead(int msecs, bool *timedOut) *timedOut = true; d->setError(QAbstractSocket::SocketTimeoutError, QNativeSocketEnginePrivate::TimeOutErrorString); + d->hasSetSocketError = false; // A timeout error is temporary in waitFor functions return false; } else if (state() == QAbstractSocket::ConnectingState) { connectToHost(d->peerAddress, d->peerPort); @@ -927,6 +931,7 @@ bool QNativeSocketEngine::waitForWrite(int msecs, bool *timedOut) *timedOut = true; d->setError(QAbstractSocket::SocketTimeoutError, QNativeSocketEnginePrivate::TimeOutErrorString); + d->hasSetSocketError = false; // A timeout error is temporary in waitFor functions return false; } else if (state() == QAbstractSocket::ConnectingState) { connectToHost(d->peerAddress, d->peerPort); @@ -978,6 +983,7 @@ bool QNativeSocketEngine::waitForReadOrWrite(bool *readyToRead, bool *readyToWri *timedOut = true; d->setError(QAbstractSocket::SocketTimeoutError, QNativeSocketEnginePrivate::TimeOutErrorString); + d->hasSetSocketError = false; // A timeout error is temporary in waitFor functions return false; } else if (state() == QAbstractSocket::ConnectingState) { connectToHost(d->peerAddress, d->peerPort); diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp index e638e287..12686bb 100644 --- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp +++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp @@ -191,6 +191,7 @@ private slots: void increaseReadBufferSize(); void taskQtBug5799ConnectionErrorWaitForConnected(); void taskQtBug5799ConnectionErrorEventLoop(); + void taskQtBug7054TimeoutErrorResetting(); void invalidProxy_data(); void invalidProxy(); @@ -2236,6 +2237,30 @@ void tst_QTcpSocket::taskQtBug5799ConnectionErrorEventLoop() QString("Could not reach server: %1").arg(socket.errorString()).toLocal8Bit()); } +void tst_QTcpSocket::taskQtBug7054TimeoutErrorResetting() +{ + QTcpSocket *socket = newSocket(); + + socket->connectToHost(QtNetworkSettings::serverName(), 443); + QVERIFY(socket->waitForConnected(5*1000)); + QVERIFY(socket->error() == QAbstractSocket::UnknownSocketError); + + // We connected to the HTTPS port. Wait two seconds to receive data. We will receive + // nothing because we would need to start the SSL handshake + QVERIFY(!socket->waitForReadyRead(2*1000)); + QVERIFY(socket->error() == QAbstractSocket::SocketTimeoutError); + + // Now write some crap to make the server disconnect us. 4 lines are enough. + socket->write("a\r\nb\r\nc\r\nd\r\n"); + socket->waitForBytesWritten(2*1000); + + // we try to waitForReadyRead another time, but this time instead of a timeout we + // should get a better error since the server disconnected us + QVERIFY(!socket->waitForReadyRead(2*1000)); + // It must NOT be the SocketTimeoutError that had been set before + QVERIFY(socket->error() == QAbstractSocket::RemoteHostClosedError); +} + void tst_QTcpSocket::invalidProxy_data() { QTest::addColumn("type"); -- cgit v0.12 From cc27aa0066a4fd6641be164800942cba4fa1d73f Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Mon, 22 Feb 2010 16:04:10 +0100 Subject: Second attempt at work-around for MSVC2008 compiler crash Turn off optimizations in qscriptengine.cpp. I tried to turn it off/on for a selective few functions, but without success. --- src/script/api/qscriptengine.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 33104c9..98a24d0 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -4227,4 +4227,9 @@ Q_AUTOTEST_EXPORT bool qt_script_isJITEnabled() } #endif +#ifdef Q_CC_MSVC +// Try to prevent compiler from crashing. +#pragma optimize("", off) +#endif + QT_END_NAMESPACE -- cgit v0.12 From 422f353135dc8a6b3694a7f0994429df7695d4bf Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 18 Feb 2010 21:45:17 +0100 Subject: remove more pointless recalculations Reviewed-by: joao --- src/corelib/tools/qlist.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp index ac0dc46..1576b40 100644 --- a/src/corelib/tools/qlist.cpp +++ b/src/corelib/tools/qlist.cpp @@ -209,7 +209,7 @@ void **QListData::append(const QListData& l) int n = l.d->end - l.d->begin; if (n) { if (e + n > d->alloc) - realloc(grow(e + l.d->end - l.d->begin)); + realloc(grow(e + n)); ::memcpy(d->array + d->end, l.d->array + l.d->begin, n*sizeof(void*)); d->end += n; } @@ -253,11 +253,11 @@ void **QListData::insert(int i) Q_ASSERT(d->ref == 1); if (i <= 0) return prepend(); - if (i >= d->end - d->begin) + int size = d->end - d->begin; + if (i >= size) return append(); bool leftward = false; - int size = d->end - d->begin; if (d->begin == 0) { if (d->end == d->alloc) { -- cgit v0.12 From 4967231a9e5c39de3a60b61db9b6a71266a04829 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 18 Feb 2010 22:18:23 +0100 Subject: optimize queue-like structures a list to which we append after we took something from the beginning is most likely a queue, and it seems unlikely that we would suddenly start prepending to it. consequently, optimizing the prepending case by leaving the first third of the allocation free just increases the number of times the array needs to be shifted down. Reviewed-by: joao --- src/corelib/tools/qlist.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp index 1576b40..39c1beb 100644 --- a/src/corelib/tools/qlist.cpp +++ b/src/corelib/tools/qlist.cpp @@ -188,9 +188,9 @@ void **QListData::append() int n = d->end - d->begin; if (d->begin > 2 * d->alloc / 3) { // we have enough space. Just not at the end -> move it. - ::memcpy(d->array + n, d->array + d->begin, n * sizeof(void *)); - d->begin = n; - d->end = n * 2; + ::memcpy(d->array, d->array + d->begin, n * sizeof(void *)); + d->begin = 0; + d->end = n; } else { realloc(grow(d->alloc + 1)); } -- cgit v0.12 From e38f2b026a00acafab96b1fcc7c27a4446ec49d1 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 18 Feb 2010 22:29:52 +0100 Subject: make queues to which only lists are appended not blow the memory append2(list) didn't use the array shifting logic the append() for single elements does. this would cause the list to grow endlessly despite leading elements being removed if only lists were ever appended. Reviewed-by: joao --- src/corelib/tools/qlist.cpp | 36 ++++++++++++++++++------------------ src/corelib/tools/qlist.h | 1 + 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp index 39c1beb..249b8d1 100644 --- a/src/corelib/tools/qlist.cpp +++ b/src/corelib/tools/qlist.cpp @@ -180,22 +180,30 @@ void QListData::realloc(int alloc) d->begin = d->end = 0; } -// ensures that enough space is available to append one element -void **QListData::append() +// ensures that enough space is available to append n elements +void **QListData::append(int n) { Q_ASSERT(d->ref == 1); - if (d->end == d->alloc) { - int n = d->end - d->begin; - if (d->begin > 2 * d->alloc / 3) { + int e = d->end; + if (e + n > d->alloc) { + int b = d->begin; + if (b - n >= 2 * d->alloc / 3) { // we have enough space. Just not at the end -> move it. - ::memcpy(d->array, d->array + d->begin, n * sizeof(void *)); + e -= b; + ::memcpy(d->array, d->array + b, e * sizeof(void *)); d->begin = 0; - d->end = n; } else { - realloc(grow(d->alloc + 1)); + realloc(grow(d->alloc + n)); } } - return d->array + d->end++; + d->end = e + n; + return d->array + e; +} + +// ensures that enough space is available to append one element +void **QListData::append() +{ + return append(1); } // ensures that enough space is available to append the list @@ -219,15 +227,7 @@ void **QListData::append(const QListData& l) // ensures that enough space is available to append the list void **QListData::append2(const QListData& l) { - Q_ASSERT(d->ref == 1); - int e = d->end; - int n = l.d->end - l.d->begin; - if (n) { - if (e + n > d->alloc) - realloc(grow(e + n)); - d->end += n; - } - return d->array + e; + return append(l.d->end - l.d->begin); } void **QListData::prepend() diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index 5364e8e..fdebd7d 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -80,6 +80,7 @@ struct Q_CORE_EXPORT QListData { static Data shared_null; Data *d; void **erase(void **xi); + void **append(int n); void **append(); void **append(const QListData &l); void **append2(const QListData &l); // remove in 5.0 -- cgit v0.12 From 0eafbdd480440e413f2fd9cdf4f19354be2a0bdb Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 22 Feb 2010 14:44:20 +0100 Subject: do not protect against self-assignment in QList::replace() it's not the task of the container class to do so. Reviewed-by: joao --- src/corelib/tools/qlist.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index fdebd7d..1e0cb76 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -555,12 +555,7 @@ inline void QList::replace(int i, const T &t) { Q_ASSERT_X(i >= 0 && i < p.size(), "QList::replace", "index out of range"); detach(); - if (QTypeInfo::isLarge || QTypeInfo::isStatic) { - reinterpret_cast(p.at(i))->t() = t; - } else { - const T cpy(t); - reinterpret_cast(p.at(i))->t() = cpy; - } + reinterpret_cast(p.at(i))->t() = t; } template -- cgit v0.12 From 96a3d36a33dc5c1c7e414c873316027fab6cecf9 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 19 Feb 2010 15:19:11 +0100 Subject: create temporaries more intelligently we already know that we are dealing with a movable type, so it is safe to keep a temporary copy of the raw data instead of going through the copy c'tor. this way we save a pretty useless ref()/deref() pair for each and every insertion of an implicitly shared type into a QList. the QtPodForSize class is somewhat ugly. we should use QIntegerForSize, but that's not possible without having separate template specializations, which is not possible without some bigger changes to the qt type info system. it will be beautified in due time. :) Reviewed-by: joao --- src/corelib/tools/qlist.h | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index 1e0cb76..b79011e 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -96,6 +96,25 @@ struct Q_CORE_EXPORT QListData { inline void **end() const { return d->array + d->end; } }; +////////////////////////////////////////////////////////////////////////////////// +// +// QtPodForSize and QtPodForType are internal and may change or go away any time. +// We mean it. +// +////////////////////////////////////////////////////////////////////////////////// +template struct QtPodForSize { + // This base type is rather obviously broken and cannot be made + // working due to alignment constraints. + // This doesn't matter as far as QList is concerned, as we are + // using this type only for QTypeInfo::isLarge == false. + typedef struct { } Type; +}; +template <> struct QtPodForSize<1> { typedef quint8 Type; }; +template <> struct QtPodForSize<2> { typedef quint16 Type; }; +template <> struct QtPodForSize<4> { typedef quint32 Type; }; +template <> struct QtPodForSize<8> { typedef quint64 Type; }; +template struct QtPodForType : QtPodForSize { }; + template class QList { @@ -491,10 +510,11 @@ Q_OUTOFLINE_TEMPLATE void QList::append(const T &t) QT_RETHROW; } } else { - const T cpy(t); + typedef typename QtPodForType::Type PodNode; + PodNode cpy = *reinterpret_cast(&t); Node *n = reinterpret_cast(p.append()); QT_TRY { - node_construct(n, cpy); + node_construct(n, *reinterpret_cast(&cpy)); } QT_CATCH(...) { --d->end; QT_RETHROW; @@ -515,10 +535,11 @@ inline void QList::prepend(const T &t) QT_RETHROW; } } else { - const T cpy(t); + typedef typename QtPodForType::Type PodNode; + PodNode cpy = *reinterpret_cast(&t); Node *n = reinterpret_cast(p.prepend()); QT_TRY { - node_construct(n, cpy); + node_construct(n, *reinterpret_cast(&cpy)); } QT_CATCH(...) { ++d->begin; QT_RETHROW; @@ -539,10 +560,11 @@ inline void QList::insert(int i, const T &t) QT_RETHROW; } } else { - const T cpy(t); + typedef typename QtPodForType::Type PodNode; + PodNode cpy = *reinterpret_cast(&t); Node *n = reinterpret_cast(p.insert(i)); QT_TRY { - node_construct(n, cpy); + node_construct(n, *reinterpret_cast(&cpy)); } QT_CATCH(...) { p.remove(i); QT_RETHROW; -- cgit v0.12 From 9f08d620588752a6617d0e265c6b7137704e39c5 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 19 Feb 2010 21:02:23 +0100 Subject: avoid double reallocations in inserting operations operator+=() and co. would first detach, and then realloc if they found the reservation too small. in particular, appending anything to an empty list would trigger this double reallocation (first copy shared_null, then grow the copy). entirely rewritten take 3, this time without memory corruption or exhaustion ... :) Reviewed-by: joao --- src/corelib/tools/qlist.cpp | 47 ++++++++++++++++ src/corelib/tools/qlist.h | 131 ++++++++++++++++++++++++++++++++------------ 2 files changed, 143 insertions(+), 35 deletions(-) diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp index 249b8d1..6f5bb9b 100644 --- a/src/corelib/tools/qlist.cpp +++ b/src/corelib/tools/qlist.cpp @@ -66,6 +66,53 @@ static int grow(int size) return x; } +/*! + * Detaches the QListData by allocating new memory for a list which will be bigger + * than the copied one and is expected to grow further. + * *idx is the desired insertion point and is clamped to the actual size of the list. + * num is the number of new elements to insert at the insertion point. + * Returns the old (shared) data, it is up to the caller to deref() and free(). + * For the new data node_copy needs to be called. + * + * \internal + */ +QListData::Data *QListData::detach_grow(int *idx, int num) +{ + Data *x = d; + int l = x->end - x->begin; + int nl = l + num; + int alloc = grow(nl); + Data* t = static_cast(qMalloc(DataHeaderSize + alloc * sizeof(void *))); + Q_CHECK_PTR(t); + + t->ref = 1; + t->sharable = true; + t->alloc = alloc; + // The space reservation algorithm's optimization is biased towards appending: + // Something which looks like an append will put the data at the beginning, + // while something which looks like a prepend will put it in the middle + // instead of at the end. That's based on the assumption that prepending + // is uncommon and even an initial prepend will eventually be followed by + // at least some appends. + int bg; + if (*idx < 0) { + *idx = 0; + bg = (alloc - nl) >> 1; + } else if (*idx > l) { + *idx = l; + bg = 0; + } else if (*idx < (l >> 1)) { + bg = (alloc - nl) >> 1; + } else { + bg = 0; + } + t->begin = bg; + t->end = bg + nl; + d = t; + + return x; +} + #if QT_VERSION >= 0x050000 # error "Remove QListData::detach(), it is only required for binary compatibility for 4.0.x to 4.2.x" #endif diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index b79011e..3a29e13 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -52,6 +52,7 @@ #endif #include +#include #include QT_BEGIN_HEADER @@ -73,6 +74,7 @@ struct Q_CORE_EXPORT QListData { enum { DataHeaderSize = sizeof(Data) - sizeof(void *) }; Data *detach(int alloc); + Data *detach_grow(int *i, int n); Data *detach(); // remove in 5.0 Data *detach2(); // remove in 5.0 Data *detach3(); // remove in 5.0 @@ -353,6 +355,7 @@ public: #endif private: + Node *detach_helper_grow(int i, int n); void detach_helper(int alloc); void detach_helper(); void free(QListData::Data *d); @@ -500,9 +503,8 @@ Q_OUTOFLINE_TEMPLATE void QList::reserve(int alloc) template Q_OUTOFLINE_TEMPLATE void QList::append(const T &t) { - detach(); - if (QTypeInfo::isLarge || QTypeInfo::isStatic) { - Node *n = reinterpret_cast(p.append()); + if (d->ref != 1) { + Node *n = detach_helper_grow(INT_MAX, 1); QT_TRY { node_construct(n, t); } QT_CATCH(...) { @@ -510,14 +512,24 @@ Q_OUTOFLINE_TEMPLATE void QList::append(const T &t) QT_RETHROW; } } else { - typedef typename QtPodForType::Type PodNode; - PodNode cpy = *reinterpret_cast(&t); - Node *n = reinterpret_cast(p.append()); - QT_TRY { - node_construct(n, *reinterpret_cast(&cpy)); - } QT_CATCH(...) { - --d->end; - QT_RETHROW; + if (QTypeInfo::isLarge || QTypeInfo::isStatic) { + Node *n = reinterpret_cast(p.append()); + QT_TRY { + node_construct(n, t); + } QT_CATCH(...) { + --d->end; + QT_RETHROW; + } + } else { + typedef typename QtPodForType::Type PodNode; + PodNode cpy = *reinterpret_cast(&t); + Node *n = reinterpret_cast(p.append()); + QT_TRY { + node_construct(n, *reinterpret_cast(&cpy)); + } QT_CATCH(...) { + --d->end; + QT_RETHROW; + } } } } @@ -525,9 +537,8 @@ Q_OUTOFLINE_TEMPLATE void QList::append(const T &t) template inline void QList::prepend(const T &t) { - detach(); - if (QTypeInfo::isLarge || QTypeInfo::isStatic) { - Node *n = reinterpret_cast(p.prepend()); + if (d->ref != 1) { + Node *n = detach_helper_grow(0, 1); QT_TRY { node_construct(n, t); } QT_CATCH(...) { @@ -535,14 +546,24 @@ inline void QList::prepend(const T &t) QT_RETHROW; } } else { - typedef typename QtPodForType::Type PodNode; - PodNode cpy = *reinterpret_cast(&t); - Node *n = reinterpret_cast(p.prepend()); - QT_TRY { - node_construct(n, *reinterpret_cast(&cpy)); - } QT_CATCH(...) { - ++d->begin; - QT_RETHROW; + if (QTypeInfo::isLarge || QTypeInfo::isStatic) { + Node *n = reinterpret_cast(p.prepend()); + QT_TRY { + node_construct(n, t); + } QT_CATCH(...) { + ++d->begin; + QT_RETHROW; + } + } else { + typedef typename QtPodForType::Type PodNode; + PodNode cpy = *reinterpret_cast(&t); + Node *n = reinterpret_cast(p.prepend()); + QT_TRY { + node_construct(n, *reinterpret_cast(&cpy)); + } QT_CATCH(...) { + ++d->begin; + QT_RETHROW; + } } } } @@ -550,9 +571,8 @@ inline void QList::prepend(const T &t) template inline void QList::insert(int i, const T &t) { - detach(); - if (QTypeInfo::isLarge || QTypeInfo::isStatic) { - Node *n = reinterpret_cast(p.insert(i)); + if (d->ref != 1) { + Node *n = detach_helper_grow(i, 1); QT_TRY { node_construct(n, t); } QT_CATCH(...) { @@ -560,14 +580,24 @@ inline void QList::insert(int i, const T &t) QT_RETHROW; } } else { - typedef typename QtPodForType::Type PodNode; - PodNode cpy = *reinterpret_cast(&t); - Node *n = reinterpret_cast(p.insert(i)); - QT_TRY { - node_construct(n, *reinterpret_cast(&cpy)); - } QT_CATCH(...) { - p.remove(i); - QT_RETHROW; + if (QTypeInfo::isLarge || QTypeInfo::isStatic) { + Node *n = reinterpret_cast(p.insert(i)); + QT_TRY { + node_construct(n, t); + } QT_CATCH(...) { + p.remove(i); + QT_RETHROW; + } + } else { + typedef typename QtPodForType::Type PodNode; + PodNode cpy = *reinterpret_cast(&t); + Node *n = reinterpret_cast(p.insert(i)); + QT_TRY { + node_construct(n, *reinterpret_cast(&cpy)); + } QT_CATCH(...) { + p.remove(i); + QT_RETHROW; + } } } } @@ -640,6 +670,36 @@ Q_OUTOFLINE_TEMPLATE T QList::value(int i, const T& defaultValue) const } template +Q_OUTOFLINE_TEMPLATE typename QList::Node *QList::detach_helper_grow(int i, int c) +{ + Node *n = reinterpret_cast(p.begin()); + QListData::Data *x = p.detach_grow(&i, c); + QT_TRY { + node_copy(reinterpret_cast(p.begin()), + reinterpret_cast(p.begin() + i), n); + } QT_CATCH(...) { + qFree(d); + d = x; + QT_RETHROW; + } + QT_TRY { + node_copy(reinterpret_cast(p.begin() + i + c), + reinterpret_cast(p.end()), n + i); + } QT_CATCH(...) { + node_destruct(reinterpret_cast(p.begin()), + reinterpret_cast(p.begin() + i)); + qFree(d); + d = x; + QT_RETHROW; + } + + if (!x->ref.deref()) + free(x); + + return reinterpret_cast(p.begin() + i); +} + +template Q_OUTOFLINE_TEMPLATE void QList::detach_helper(int alloc) { Node *n = reinterpret_cast(p.begin()); @@ -748,8 +808,9 @@ Q_OUTOFLINE_TEMPLATE typename QList::iterator QList::erase(typename QList< template Q_OUTOFLINE_TEMPLATE QList &QList::operator+=(const QList &l) { - detach(); - Node *n = reinterpret_cast(p.append2(l.p)); + Node *n = (d->ref != 1) + ? detach_helper_grow(INT_MAX, l.size()) + : reinterpret_cast(p.append2(l.p)); QT_TRY{ node_copy(n, reinterpret_cast(p.end()), reinterpret_cast(l.p.begin())); } QT_CATCH(...) { -- cgit v0.12 From 57cc5c50df4fc3673c948e8a55b4bab991e9cb7f Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 22 Feb 2010 15:39:17 +0100 Subject: clean up x11 desktop detection KDE_FULL_SESSION is reliable since kde 2.x or so. DESKTOP_SESSION is not reliable, unless one uses a new gnome. GNOME_DESKTOP_SESSION_ID was temporarily unreliable. the two together should be reliable. copy the xfce4 detection from the xdg-open tool. assumed to be reliable. remove the window manager hacks, as they are redundand with the asssumedly reliable detection methods above. Reviewed-by: jbache --- src/gui/kernel/qapplication_x11.cpp | 116 ++++++++++-------------------------- src/gui/kernel/qt_x11_p.h | 5 +- 2 files changed, 31 insertions(+), 90 deletions(-) diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index 34865b5..c6e192b 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -208,11 +208,8 @@ static const char * x11_atomnames = { "_MOTIF_WM_HINTS\0" "DTWM_IS_RUNNING\0" - "KDE_FULL_SESSION\0" - "KWIN_RUNNING\0" - "KWM_RUNNING\0" - "GNOME_BACKGROUND_PROPERTIES\0" "ENLIGHTENMENT_DESKTOP\0" + "_DT_SAVE_MODE\0" "_SGI_DESKS_MANAGER\0" // EWMH (aka NETWM) @@ -626,8 +623,6 @@ static int qt_x_errhandler(Display *dpy, XErrorEvent *err) || err->resourceid == XA_RGB_DEFAULT_MAP || err->resourceid == ATOM(_NET_SUPPORTED) || err->resourceid == ATOM(_NET_SUPPORTING_WM_CHECK) - || err->resourceid == ATOM(KDE_FULL_SESSION) - || err->resourceid == ATOM(KWIN_RUNNING) || err->resourceid == ATOM(XdndProxy) || err->resourceid == ATOM(XdndAware))) { // Perhaps we're running under SECURITY reduction? :/ @@ -2222,87 +2217,36 @@ void qt_init(QApplicationPrivate *priv, int, X11->desktopEnvironment = DE_UNKNOWN; X11->desktopVersion = 0; - // See if the current window manager is using the freedesktop.org spec to give its name - Window windowManagerWindow = XNone; - Atom typeReturned; - int formatReturned; - unsigned long nitemsReturned; - unsigned long unused; - unsigned char *data = 0; - if (XGetWindowProperty(QX11Info::display(), QX11Info::appRootWindow(), - ATOM(_NET_SUPPORTING_WM_CHECK), - 0, 1024, False, XA_WINDOW, &typeReturned, - &formatReturned, &nitemsReturned, &unused, &data) - == Success) { - if (typeReturned == XA_WINDOW && formatReturned == 32) - windowManagerWindow = *((Window*) data); - if (data) - XFree(data); - - if (windowManagerWindow != XNone) { - QString wmName; - Atom utf8atom = ATOM(UTF8_STRING); - if (XGetWindowProperty(QX11Info::display(), windowManagerWindow, ATOM(_NET_WM_NAME), - 0, 1024, False, utf8atom, &typeReturned, - &formatReturned, &nitemsReturned, &unused, &data) - == Success) { - if (typeReturned == utf8atom && formatReturned == 8) - wmName = QString::fromUtf8((const char*)data); - if (data) - XFree(data); - if (wmName == QLatin1String("KWin")) - X11->desktopEnvironment = DE_KDE; - if (wmName == QLatin1String("Metacity")) - X11->desktopEnvironment = DE_GNOME; - } - } - } - - // Running a different/newer/older window manager? Try some other things - if (X11->desktopEnvironment == DE_UNKNOWN){ - Atom type; - int format; - unsigned long length, after; - uchar *data = 0; - - QString session = QString::fromLocal8Bit(qgetenv("DESKTOP_SESSION")); - if (session == QLatin1String("kde")) { - X11->desktopEnvironment = DE_KDE; - } else if (session == QLatin1String("gnome") || session == QLatin1String("xfce")) { - X11->desktopEnvironment = DE_GNOME; - } else if (XGetWindowProperty(X11->display, QX11Info::appRootWindow(), ATOM(DTWM_IS_RUNNING), - 0, 1, False, AnyPropertyType, &type, &format, &length, - &after, &data) == Success && length) { - // DTWM is running, meaning most likely CDE is running... - X11->desktopEnvironment = DE_CDE; - } else if (XGetWindowProperty(X11->display, QX11Info::appRootWindow(), - ATOM(GNOME_BACKGROUND_PROPERTIES), 0, 1, False, AnyPropertyType, - &type, &format, &length, &after, &data) == Success && length) { - X11->desktopEnvironment = DE_GNOME; - } else if (!qgetenv("GNOME_DESKTOP_SESSION_ID").isEmpty()) { - X11->desktopEnvironment = DE_GNOME; - } else if ((XGetWindowProperty(X11->display, QX11Info::appRootWindow(), ATOM(KDE_FULL_SESSION), - 0, 1, False, AnyPropertyType, &type, &format, &length, &after, &data) == Success - && length) - || (XGetWindowProperty(X11->display, QX11Info::appRootWindow(), ATOM(KWIN_RUNNING), - 0, 1, False, AnyPropertyType, &type, &format, &length, - &after, &data) == Success - && length) - || (XGetWindowProperty(X11->display, QX11Info::appRootWindow(), ATOM(KWM_RUNNING), - 0, 1, False, AnyPropertyType, &type, &format, &length, - &after, &data) == Success && length)) { - X11->desktopEnvironment = DE_KDE; - } else if (XGetWindowProperty(X11->display, QX11Info::appRootWindow(), ATOM(_SGI_DESKS_MANAGER), - 0, 1, False, XA_WINDOW, &type, &format, &length, &after, &data) == Success - && length) { - X11->desktopEnvironment = DE_4DWM; - } - if (data) - XFree((char *)data); + Atom type; + int format; + unsigned long length, after; + uchar *data = 0; + + if (!qgetenv("KDE_FULL_SESSION").isEmpty()) { + X11->desktopEnvironment = DE_KDE; + X11->desktopVersion = qgetenv("KDE_SESSION_VERSION").toInt(); + } else if (!qgetenv("GNOME_DESKTOP_SESSION_ID").isEmpty() // Deprecated for some reason. + || qgetenv("DESKTOP_SESSION") == "gnome") { // De-facto-standardized by GNOME. + X11->desktopEnvironment = DE_GNOME; + } else if (XGetWindowProperty(X11->display, QX11Info::appRootWindow(), ATOM(_DT_SAVE_MODE), + 0, 2, False, XA_STRING, &type, &format, &length, + &after, &data) == Success + && !strcmp(reinterpret_cast(data), "xfce4")) { + // Pretend that xfce4 is gnome, as it uses the same libraries. + // The detection above is stolen from xdg-open. + X11->desktopEnvironment = DE_GNOME; + } else if (XGetWindowProperty(X11->display, QX11Info::appRootWindow(), ATOM(DTWM_IS_RUNNING), + 0, 1, False, AnyPropertyType, &type, &format, &length, + &after, &data) == Success && length) { + // DTWM is running, meaning most likely CDE is running... + X11->desktopEnvironment = DE_CDE; + } else if (XGetWindowProperty(X11->display, QX11Info::appRootWindow(), ATOM(_SGI_DESKS_MANAGER), + 0, 1, False, XA_WINDOW, &type, &format, &length, &after, &data) == Success + && length) { + X11->desktopEnvironment = DE_4DWM; } - - if (X11->desktopEnvironment == DE_KDE) - X11->desktopVersion = QString::fromLocal8Bit(qgetenv("KDE_SESSION_VERSION")).toInt(); + if (data) + XFree((char *)data); #if !defined(QT_NO_STYLE_GTK) if (X11->desktopEnvironment == DE_GNOME) { diff --git a/src/gui/kernel/qt_x11_p.h b/src/gui/kernel/qt_x11_p.h index b2ce754..167557b 100644 --- a/src/gui/kernel/qt_x11_p.h +++ b/src/gui/kernel/qt_x11_p.h @@ -564,11 +564,8 @@ struct QX11Data _MOTIF_WM_HINTS, DTWM_IS_RUNNING, - KDE_FULL_SESSION, - KWIN_RUNNING, - KWM_RUNNING, - GNOME_BACKGROUND_PROPERTIES, ENLIGHTENMENT_DESKTOP, + _DT_SAVE_MODE, _SGI_DESKS_MANAGER, // EWMH (aka NETWM) -- cgit v0.12 From d1592b1d4f6f0ea0d180e6848af42b3692e7490a Mon Sep 17 00:00:00 2001 From: Zeno Albisser Date: Mon, 22 Feb 2010 14:14:22 +0100 Subject: Added function overload for QByteArray &QByteArray::replace() This overloaded function can be used to replace a specific portion of a QByteArray with an arbitary amount of characters from a char[]. Reviewed-by: Markus Goetz --- src/corelib/tools/qbytearray.cpp | 15 ++++++++++++++- src/corelib/tools/qbytearray.h | 1 + tests/auto/qbytearray/tst_qbytearray.cpp | 13 +++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index a27e488..3324796 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -1804,7 +1804,20 @@ QByteArray &QByteArray::replace(int pos, int len, const QByteArray &after) */ QByteArray &QByteArray::replace(int pos, int len, const char *after) { - int alen = qstrlen(after); + return replace(pos,len,after,qstrlen(after)); +} + +/*! \fn QByteArray &QByteArray::replace(int pos, int len, const char *after, int alen) + + \overload + + Replaces \a len bytes from index position \a pos with \a alen bytes + from the string \a after. \a after is allowed to have '\0' characters. + + \since 4.7 +*/ +QByteArray &QByteArray::replace(int pos, int len, const char *after, int alen) +{ if (len == alen && (pos + len <= d->size)) { detach(); memcpy(d->data + pos, after, len*sizeof(char)); diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h index ec592f5f..0b77512 100644 --- a/src/corelib/tools/qbytearray.h +++ b/src/corelib/tools/qbytearray.h @@ -237,6 +237,7 @@ public: QByteArray &insert(int i, const QByteArray &a); QByteArray &remove(int index, int len); QByteArray &replace(int index, int len, const char *s); + QByteArray &replace(int index, int len, const char *s, int alen); QByteArray &replace(int index, int len, const QByteArray &s); QByteArray &replace(char before, const char *after); QByteArray &replace(char before, const QByteArray &after); diff --git a/tests/auto/qbytearray/tst_qbytearray.cpp b/tests/auto/qbytearray/tst_qbytearray.cpp index 5c72c7a..07fdbc3 100644 --- a/tests/auto/qbytearray/tst_qbytearray.cpp +++ b/tests/auto/qbytearray/tst_qbytearray.cpp @@ -111,6 +111,7 @@ private slots: void remove(); void replace_data(); void replace(); + void replaceWithSpecifiedLength(); void indexOf_data(); void indexOf(); void lastIndexOf_data(); @@ -840,6 +841,18 @@ void tst_QByteArray::replace() QCOMPARE(str2.replace(pos, len, after.data()), expected); } +void tst_QByteArray::replaceWithSpecifiedLength() +{ + const char after[] = "zxc\0vbnmqwert"; + int lenAfter = 6; + QByteArray ba("abcdefghjk"); + ba.replace(0,2,after,lenAfter); + + const char _expected[] = "zxc\0vbcdefghjk"; + QByteArray expected(_expected,sizeof(_expected)-1); + QCOMPARE(ba,expected); +} + void tst_QByteArray::indexOf_data() { QTest::addColumn("haystack"); -- cgit v0.12 From 06638a4c08aaf86d606abc59f642c3c34815e8e6 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 23 Feb 2010 10:21:02 +0100 Subject: Cocoa: Sheets loose their opacity on 2nd show It turns out that setParent_sys is wiping out opacity for the window regardless of what the value is from before. This patch does the correct thing, namely look at the WA_WState_WindowOpacitySet flag. Task-number: QTBUG-5100 Reviewed-by: cduclos --- src/gui/kernel/qwidget_mac.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 9e642b9..da9e9eb 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -2853,13 +2853,14 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f) //recreate and setup flags QObjectPrivate::setParent_helper(parent); - QPoint pt = q->pos(); bool explicitlyHidden = q->testAttribute(Qt::WA_WState_Hidden) && q->testAttribute(Qt::WA_WState_ExplicitShowHide); if (wasCreated && !qt_isGenuineQWidget(q)) return; - if ((data.window_flags & Qt::Sheet) && topData && topData->opacity == 242) + if (!q->testAttribute(Qt::WA_WState_WindowOpacitySet)) { q->setWindowOpacity(1.0f); + q->setAttribute(Qt::WA_WState_WindowOpacitySet, false); + } setWinId(0); //do after the above because they may want the id -- cgit v0.12 From 53aaca8bc08150db3b446fbb70de3271fe5ea398 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Mon, 22 Feb 2010 19:33:13 +0100 Subject: Fixed cosmetic glitch in QTabBar label's rendering This seems to have appeared after commit 3baf7b981a8f40ed. Reviewed-by: Olivier --- src/gui/styles/qmacstyle_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm index 40ee31d..116b03e 100644 --- a/src/gui/styles/qmacstyle_mac.mm +++ b/src/gui/styles/qmacstyle_mac.mm @@ -3760,7 +3760,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter QPalette np = tab->palette; np.setColor(QPalette::WindowText, QColor(255, 255, 255, 75)); QRect nr = subElementRect(SE_TabBarTabText, opt, w); - nr.moveTop(+1); + nr.moveTop(-1); int alignment = Qt::AlignCenter | Qt::TextShowMnemonic | Qt::TextHideMnemonic; proxy()->drawItemText(p, nr, alignment, np, tab->state & State_Enabled, tab->text, QPalette::WindowText); -- cgit v0.12 From a419d587a666aaf55310b3a18e9f9e1993fef16e Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Tue, 23 Feb 2010 11:31:19 +0100 Subject: Use QTRY_COMPARE to give the animation a chance to finish Using duration + 100 ms is apparently not sufficient. --- tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp index d020d8f..66cfeb7 100644 --- a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp +++ b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp @@ -44,6 +44,7 @@ #include #include #include +#include "../../shared/util.h" //TESTED_CLASS=QPropertyAnimation //TESTED_FILES= @@ -1095,7 +1096,7 @@ void tst_QPropertyAnimation::valueChanged() QTest::qWait(anim.duration() + 100); - QCOMPARE(anim.state(), QAbstractAnimation::Stopped); + QTRY_COMPARE(anim.state(), QAbstractAnimation::Stopped); QCOMPARE(anim.currentTime(), anim.duration()); //let's check that the values go forward -- cgit v0.12 From 2724520fd551512138731058467c9acea0aa3951 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Tue, 23 Feb 2010 10:12:34 +0100 Subject: Add a configure test for XVideo support Reviewed-By: TrustMe --- config.tests/x11/xvideo/xvideo.cpp | 10 +++++++++ config.tests/x11/xvideo/xvideo.pro | 3 +++ configure | 43 +++++++++++++++++++++++++++++++++++++- 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 config.tests/x11/xvideo/xvideo.cpp create mode 100644 config.tests/x11/xvideo/xvideo.pro diff --git a/config.tests/x11/xvideo/xvideo.cpp b/config.tests/x11/xvideo/xvideo.cpp new file mode 100644 index 0000000..9d0eef6 --- /dev/null +++ b/config.tests/x11/xvideo/xvideo.cpp @@ -0,0 +1,10 @@ +#include +#include + +int main(int argc, char** argv) +{ + unsigned int count = 0; + XvAdaptorInfo *adaptors = 0; + XvQueryAdaptors(0, 0, &count, &adaptors); + return 0; +} diff --git a/config.tests/x11/xvideo/xvideo.pro b/config.tests/x11/xvideo/xvideo.pro new file mode 100644 index 0000000..114cbd3 --- /dev/null +++ b/config.tests/x11/xvideo/xvideo.pro @@ -0,0 +1,3 @@ +CONFIG += x11 +CONFIG -= qt +SOURCES = xvideo.cpp diff --git a/configure b/configure index cd29e95..cfff066 100755 --- a/configure +++ b/configure @@ -640,6 +640,7 @@ CFG_SHARED=yes CFG_SM=auto CFG_XSHAPE=auto CFG_XSYNC=auto +CFG_XVIDEO=auto CFG_XINERAMA=runtime CFG_XFIXES=runtime CFG_ZLIB=auto @@ -921,7 +922,7 @@ while [ "$#" -gt 0 ]; do VAL=no ;; #Qt style yes options - -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config) + -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xvideo|-xsync|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config) VAR=`echo $1 | sed "s,^-\(.*\),\1,"` VAL=yes ;; @@ -1533,6 +1534,13 @@ while [ "$#" -gt 0 ]; do UNKNOWN_OPT=yes fi ;; + xvideo) + if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then + CFG_XVIDEO="$VAL" + else + UNKNOWN_OPT=yes + fi + ;; xsync) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_XSYNC="$VAL" @@ -3624,6 +3632,13 @@ if [ "$PLATFORM_X11" = "yes" ]; then SHY="*" SHN=" " fi + if [ "$CFG_XVIDEO" = "no" ]; then + XVY=" " + XVN="*" + else + XVY="*" + XVN=" " + fi if [ "$CFG_XINERAMA" = "no" ]; then XAY=" " XAN="*" @@ -3727,6 +3742,10 @@ Qt/X11 only: $SHY -xshape ............ Compile XShape support. Requires X11/extensions/shape.h. + $XVN -no-xvideo ......... Do not compile XVideo support. + $XVY -xvideo ............ Compile XVideo support. + Requires X11/extensions/Xv.h & Xvlib.h. + $SHN -no-xsync .......... Do not compile XSync support. $SHY -xsync ............. Compile XSync support. Requires X11/extensions/sync.h. @@ -5304,6 +5323,23 @@ if [ "$PLATFORM_X11" = "yes" ]; then fi fi + # auto-detect XVideo support + if [ "$CFG_XVIDEO" != "no" ]; then + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xvideo "XVideo" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then + CFG_XVIDEO=yes + else + if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then + echo "XVideo support cannot be enabled due to functionality tests!" + echo " Turn on verbose messaging (-v) to $0 to see the final report." + echo " If you believe this message is in error you may use the continue" + echo " switch (-continue) to $0 to continue." + exit 101 + else + CFG_XVIDEO=no + fi + fi + fi + # auto-detect XSync support if [ "$CFG_XSYNC" != "no" ]; then if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xsync "XSync" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then @@ -6245,6 +6281,9 @@ if [ "$PLATFORM_X11" = "yes" ]; then if [ "$CFG_XSHAPE" = "yes" ]; then QT_CONFIG="$QT_CONFIG xshape" fi + if [ "$CFG_XVIDEO" = "yes" ]; then + QT_CONFIG="$QT_CONFIG xvideo" + fi if [ "$CFG_XSYNC" = "yes" ]; then QT_CONFIG="$QT_CONFIG xsync" fi @@ -7038,6 +7077,7 @@ fi [ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER" [ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM" [ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE" +[ "$CFG_XVIDEO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XVIDEO" [ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC" [ "$CFG_XINPUT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XINPUT QT_NO_TABLET" @@ -7516,6 +7556,7 @@ fi if [ "$PLATFORM_X11" = "yes" ]; then echo "NAS sound support ... $CFG_NAS" echo "XShape support ...... $CFG_XSHAPE" + echo "XVideo support ...... $CFG_XVIDEO" echo "XSync support ....... $CFG_XSYNC" echo "Xinerama support .... $CFG_XINERAMA" echo "Xcursor support ..... $CFG_XCURSOR" -- cgit v0.12 From 84365594ec624f3c341f443503a7e83fe627d427 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Tue, 23 Feb 2010 12:10:21 +0100 Subject: Make the XVideo configure test actually pass if XV is present Reviewed-By: TrustMe --- config.tests/x11/xvideo/xvideo.cpp | 1 + config.tests/x11/xvideo/xvideo.pro | 1 + 2 files changed, 2 insertions(+) diff --git a/config.tests/x11/xvideo/xvideo.cpp b/config.tests/x11/xvideo/xvideo.cpp index 9d0eef6..e9de2a8 100644 --- a/config.tests/x11/xvideo/xvideo.cpp +++ b/config.tests/x11/xvideo/xvideo.cpp @@ -1,3 +1,4 @@ +#include #include #include diff --git a/config.tests/x11/xvideo/xvideo.pro b/config.tests/x11/xvideo/xvideo.pro index 114cbd3..d4c63a0 100644 --- a/config.tests/x11/xvideo/xvideo.pro +++ b/config.tests/x11/xvideo/xvideo.pro @@ -1,3 +1,4 @@ CONFIG += x11 CONFIG -= qt SOURCES = xvideo.cpp +LIBS += -lXv -- cgit v0.12 From 4c2300f8f63b9abda08c015bcc8541520f1c82ba Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Tue, 23 Feb 2010 12:29:52 +0100 Subject: Fix build on systems without XVideo headers This change uses the new xvideo configure test and disables the gstreamer mediaservices backend if XVideo isn't configured. Reviewed-By: Thiago --- src/plugins/mediaservices/mediaservices.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/mediaservices/mediaservices.pro b/src/plugins/mediaservices/mediaservices.pro index 55e6aba..d90ce4b 100644 --- a/src/plugins/mediaservices/mediaservices.pro +++ b/src/plugins/mediaservices/mediaservices.pro @@ -4,7 +4,7 @@ win32:!wince: SUBDIRS += directshow mac: SUBDIRS += qt7 -unix:!mac:!symbian { +unix:!mac:!symbian:contains(QT_CONFIG, xvideo): { TMP_GST_LIBS = \ gstreamer-0.10 >= 0.10.19 \ gstreamer-base-0.10 >= 0.10.19 \ -- cgit v0.12 From 3fad8ee60949d45bbb78c92cc4cad6cfbded1aae Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Tue, 23 Feb 2010 13:10:45 +0100 Subject: Detect GStreamer even when we're not building phonon Reviewed-By: Thiago --- configure | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/configure b/configure index cfff066..f1fe686 100755 --- a/configure +++ b/configure @@ -5024,32 +5024,33 @@ if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then fi fi - if [ "$CFG_PHONON" != "no" ]; then - if [ "$CFG_PHONON_BACKEND" != "no" ]; then - if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then - if [ -n "$PKG_CONFIG" ]; then - QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null` - QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null` - fi - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/gstreamer "GStreamer" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_GSTREAMER $QT_LIBS_GSTREAMER $X11TESTS_FLAGS; then - CFG_GSTREAMER=yes - QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER" - QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER" - else - if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then - echo "Gstreamer support cannot be enabled due to functionality tests!" - echo " Turn on verbose messaging (-v) to $0 to see the final report." - echo " If you believe this message is in error you may use the continue" - echo " switch (-continue) to $0 to continue." - exit 101 - else - CFG_GSTREAMER=no - fi - fi - elif [ "$CFG_GLIB" = "no" ]; then + # Auto-detect GStreamer support (needed for both Phonon & QtMultimedia) + if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then + if [ -n "$PKG_CONFIG" ]; then + QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null` + QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null` + fi + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/gstreamer "GStreamer" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_GSTREAMER $QT_LIBS_GSTREAMER $X11TESTS_FLAGS; then + CFG_GSTREAMER=yes + QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER" + QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER" + else + if [ "$CFG_GSTREAMER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then + echo "Gstreamer support cannot be enabled due to functionality tests!" + echo " Turn on verbose messaging (-v) to $0 to see the final report." + echo " If you believe this message is in error you may use the continue" + echo " switch (-continue) to $0 to continue." + exit 101 + else CFG_GSTREAMER=no fi + fi + elif [ "$CFG_GLIB" = "no" ]; then + CFG_GSTREAMER=no + fi + if [ "$CFG_PHONON" != "no" ]; then + if [ "$CFG_PHONON_BACKEND" != "no" ]; then if [ "$CFG_GSTREAMER" = "yes" ]; then CFG_PHONON=yes else -- cgit v0.12 From bf5bf41d03d553421e87d01dadda95f4561247a9 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Tue, 23 Feb 2010 13:28:25 +0100 Subject: Make mediaservices use existing GStreamer qmake vars This should also allow building when pkg-config isn't present or doesn't work, E.g. when cross-compiling on toolchains lacking pkg-config support. Apparently this also fixes warnings on Solaris too. Reviewed-By: Thiago --- src/plugins/mediaservices/gstreamer/gstreamer.pro | 12 ++---------- src/plugins/mediaservices/mediaservices.pro | 13 ++----------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/src/plugins/mediaservices/gstreamer/gstreamer.pro b/src/plugins/mediaservices/gstreamer/gstreamer.pro index db0ee4e..22e3c16 100644 --- a/src/plugins/mediaservices/gstreamer/gstreamer.pro +++ b/src/plugins/mediaservices/gstreamer/gstreamer.pro @@ -8,16 +8,8 @@ unix:contains(QT_CONFIG, alsa) { LIBS += -lasound } -LIBS += -lXv - -CONFIG += link_pkgconfig - -PKGCONFIG += \ - gstreamer-0.10 \ - gstreamer-base-0.10 \ - gstreamer-interfaces-0.10 \ - gstreamer-audio-0.10 \ - gstreamer-video-0.10 +QMAKE_CXXFLAGS += $$QT_CFLAGS_GSTREAMER +LIBS += -lXv $$QT_LIBS_GSTREAMER -lgstinterfaces-0.10 -lgstvideo-0.10 -lgstbase-0.10 -lgstaudio-0.10 # Input HEADERS += \ diff --git a/src/plugins/mediaservices/mediaservices.pro b/src/plugins/mediaservices/mediaservices.pro index d90ce4b..a8ac39c 100644 --- a/src/plugins/mediaservices/mediaservices.pro +++ b/src/plugins/mediaservices/mediaservices.pro @@ -4,15 +4,6 @@ win32:!wince: SUBDIRS += directshow mac: SUBDIRS += qt7 -unix:!mac:!symbian:contains(QT_CONFIG, xvideo): { - TMP_GST_LIBS = \ - gstreamer-0.10 >= 0.10.19 \ - gstreamer-base-0.10 >= 0.10.19 \ - gstreamer-interfaces-0.10 >= 0.10.19 \ - gstreamer-audio-0.10 >= 0.10.19 \ - gstreamer-video-0.10 >= 0.10.19 - - system(pkg-config --exists \'$${TMP_GST_LIBS}\' --print-errors): { - SUBDIRS += gstreamer - } +unix:!mac:!symbian:contains(QT_CONFIG, xvideo):contains(QT_CONFIG, gstreamer) { + SUBDIRS += gstreamer } -- cgit v0.12 From 06db13cca01cac1ed65cb2e8cd7938ce58146fe9 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Tue, 23 Feb 2010 14:21:15 +0100 Subject: Adjust the mkdist-webkit script before the importation of WebKit. Reviewed-by: TrustMe --- util/webkit/mkdist-webkit | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/util/webkit/mkdist-webkit b/util/webkit/mkdist-webkit index ddf74bb..e8426b1 100755 --- a/util/webkit/mkdist-webkit +++ b/util/webkit/mkdist-webkit @@ -20,7 +20,7 @@ if [ -z "$repository" ]; then die "error: cannot locate webkit git repository. please run git config --global qtwebkit.url /path-or-url/to/webkit/repo" fi -excluded_directories="LayoutTests JavaScriptGlue WebKitLibraries WebKitSite WebKitTools WebCore/platform/cf WebCore/platform/gtk WebCore/platform/chromium" +excluded_directories="LayoutTests JavaScriptGlue WebKitLibraries WebKitSite WebKitTools WebCore/platform/gtk WebCore/platform/chromium" excluded_directories="$excluded_directories PageLoadTests" excluded_directories="$excluded_directories BugsSite" excluded_directories="$excluded_directories PlanetWebKit" @@ -49,6 +49,8 @@ excluded_directories="$excluded_directories JavaScriptCore/wtf/mac" excluded_directories="$excluded_directories JavaScriptCore/wtf/win" excluded_directories="$excluded_directories JavaScriptCore/wtf/chromium" excluded_directories="$excluded_directories JavaScriptCore/wtf/haiku" +excluded_directories="$excluded_directories JavaScriptCore/wtf/android" +excluded_directories="$excluded_directories JavaScriptCore/wtf/brew" excluded_directories="$excluded_directories WebCore/WebCore.vcproj" excluded_directories="$excluded_directories WebCore/WebCore.gyp" @@ -81,41 +83,52 @@ excluded_directories="$excluded_directories WebCore/page/wx" excluded_directories="$excluded_directories WebCore/page/chromium" excluded_directories="$excluded_directories WebCore/page/haiku" excluded_directories="$excluded_directories WebCore/page/wince" +excluded_directories="$excluded_directories WebCore/page/android" +excluded_directories="$excluded_directories WebCore/page/brew" excluded_directories="$excluded_directories WebCore/history/mac" +excluded_directories="$excluded_directories WebCore/history/android" excluded_directories="$excluded_directories WebCore/editing/mac" excluded_directories="$excluded_directories WebCore/editing/wx" excluded_directories="$excluded_directories WebCore/editing/haiku" +excluded_directories="$excluded_directories WebCore/editing/android" +excluded_directories="$excluded_directories WebCore/editing/chromium" +excluded_directories="$excluded_directories WebCore/editing/gtk" excluded_directories="$excluded_directories WebCore/platform/haiku" +excluded_directories="$excluded_directories WebCore/platform/android" +excluded_directories="$excluded_directories WebCore/platform/brew" excluded_directories="$excluded_directories WebCore/platform/text/wx" excluded_directories="$excluded_directories WebCore/platform/text/gtk" excluded_directories="$excluded_directories WebCore/platform/text/chromium" excluded_directories="$excluded_directories WebCore/platform/text/haiku" +excluded_directories="$excluded_directories WebCore/platform/text/android" +excluded_directories="$excluded_directories WebCore/platform/text/brew" excluded_directories="$excluded_directories WebCore/platform/sql/chromium" excluded_directories="$excluded_directories WebCore/manual-tests" -excluded_directories="$excluded_directories WebCore/platform/network/cf" excluded_directories="$excluded_directories WebCore/platform/network/curl" excluded_directories="$excluded_directories WebCore/platform/network/mac" excluded_directories="$excluded_directories WebCore/platform/network/win" excluded_directories="$excluded_directories WebCore/platform/network/soup" excluded_directories="$excluded_directories WebCore/platform/network/chromium" +excluded_directories="$excluded_directories WebCore/platform/network/android" +excluded_directories="$excluded_directories WebCore/platform/network/brew" excluded_directories="$excluded_directories WebCore/platform/graphics/cg" excluded_directories="$excluded_directories WebCore/platform/graphics/cairo" excluded_directories="$excluded_directories WebCore/platform/graphics/gtk" excluded_directories="$excluded_directories WebCore/platform/graphics/wx" excluded_directories="$excluded_directories WebCore/platform/graphics/mac" -excluded_directories="$excluded_directories WebCore/platform/graphics/win" excluded_directories="$excluded_directories WebCore/platform/graphics/skia" excluded_directories="$excluded_directories WebCore/platform/graphics/chromium" excluded_directories="$excluded_directories WebCore/platform/graphics/wince" excluded_directories="$excluded_directories WebCore/platform/graphics/haiku" +excluded_directories="$excluded_directories WebCore/platform/graphics/brew" excluded_directories="$excluded_directories WebCore/platform/image-decoders/bmp" excluded_directories="$excluded_directories WebCore/platform/image-decoders/gif" @@ -126,11 +139,13 @@ excluded_directories="$excluded_directories WebCore/platform/image-decoders/jpeg excluded_directories="$excluded_directories WebCore/platform/image-decoders/xbm" excluded_directories="$excluded_directories WebCore/platform/image-decoders/skia" excluded_directories="$excluded_directories WebCore/platform/image-decoders/haiku" +excluded_directories="$excluded_directories WebCore/platform/image-decoders/wx" excluded_directories="$excluded_directories WebCore/platform/image-encoders/skia" excluded_directories="$excluded_directories WebCore/plugins/gtk" excluded_directories="$excluded_directories WebCore/plugins/chromium" +excluded_directories="$excluded_directories WebCore/plugins/wx" excluded_directories="$excluded_directories WebCore/accessibility/chromium" excluded_directories="$excluded_directories WebCore/accessibility/gtk" @@ -139,6 +154,7 @@ excluded_directories="$excluded_directories WebCore/accessibility/win" excluded_directories="$excluded_directories WebCore/accessibility/wx" excluded_directories="$excluded_directories WebCore/storage/wince" +excluded_directories="$excluded_directories WebCore/storage/chromium" excluded_directories="$excluded_directories WebCore/platform/wx" excluded_directories="$excluded_directories WebCore/platform/wince" @@ -196,6 +212,7 @@ files_to_remove="$files_to_remove autogen.sh" files_to_remove="$files_to_remove configure.ac" files_to_remove="$files_to_remove WebKit.pro" +files_to_remove="$files_to_remove DerivedSources.pro" files_to_remove="$files_to_remove WebKit/qt/QtLauncher/QtLauncher.pro" files_to_remove="$files_to_remove WebKit/qt/QtLauncher/main.cpp" @@ -311,16 +328,11 @@ echo "generating extra sources" ( for proj in JavaScriptCore WebCore; do cd $absSrcDir/$proj && - rm -rf tmp && - mkdir tmp && - cd tmp && - mkdir -p ../generated && - qmake -o Makefile CONFIG-=QTDIR_build QT_CONFIG+=phonon GENERATED_SOURCES_DIR=`pwd`/../generated OUTPUT_DIR=`pwd` ../$proj.pro && + qmake -o Makefile DerivedSources.pro && make generated_files && - perl -pi -e "s,$absSrcDir/,,g" ../generated/*.cpp ../generated/*.h && - git add ../generated && - cd .. && - rm -rf tmp && + perl -pi -e "s,$absSrcDir/,,g" generated/*.cpp generated/*.h && + git add generated && + rm DerivedSources.pro Makefile && cd .. done ) -- cgit v0.12 From f3be69195ebe94c003755a652a9ef9e8a3a898fe Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Tue, 23 Feb 2010 14:41:16 +0100 Subject: Updated WebKit from /home/jturcott/dev/webkit to qtwebkit-4.7-merged ( 5381ceeb37d97365cfb2f037650dbb4e495bca4e ) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes in WebKit/qt since the last update: ++ b/WebKit/qt/ChangeLog 2009-10-30 Tor Arne Vestbø Reviewed by NOBODY (OOPS!). [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml() This ensures that long-running JavaScript (for example due to a modal alert() dialog), will not trigger a deferred load after only 500ms (the default tokenizer delay) while still giving a reasonable timeout (10 seconds) to prevent deadlock. https://bugs.webkit.org/show_bug.cgi?id=29381 * Api/qwebframe.cpp: Document the behaviour * WebCoreSupport/FrameLoaderClientQt.cpp: set the custom tokenizer delay for substitute loads * tests/qwebframe/tst_qwebframe.cpp: Add test 2010-02-18 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. [Qt] Minor improvement to hybrid QPixmap https://bugs.webkit.org/show_bug.cgi?id=34507 * tests/hybridPixmap/test.html: use assignToHTMLImageElement on an existing element instead of toHTMLImageElement which creates a new one 2010-02-17 Dmitry Titov Reviewed by David Levin, Darin Fisher, Simon Hausmann. When a live iframe element is moved between pages, it still depends on the old page. https://bugs.webkit.org/show_bug.cgi?id=34382 * Api/qwebframe_p.h: (QWebFramePrivate::setPage): Added. * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::didTransferChildFrameToNewDocument): The QWebFrame caches a QWebPage which should be replaced when Frame is re-parented. Also, the QWebFrame is a child (in QT terms) of QWebPage - so update that relationship as well. Emit a signal that QWebFrame moved to a different QWebPage. * WebCoreSupport/FrameLoaderClientQt.h: 2010-02-17 Kent Tamura Reviewed by Eric Seidel. Introduces new Icon loading interface in order to support asynchronous loading. https://bugs.webkit.org/show_bug.cgi?id=32054 Add an empty implementation of ChromeClient::iconForFiles(). * WebCoreSupport/ChromeClientQt.cpp: (WebCore::ChromeClientQt::iconForFiles): * WebCoreSupport/ChromeClientQt.h: 2010-02-17 Diego Gonzalez Reviewed by Ariya Hidayat. Make possible Qt DRT to get total number of pages to be printed LayoutTests: printing/numberOfPages.html [Qt] DRT: Get total number of pages to be printed https://bugs.webkit.org/show_bug.cgi?id=34955 * Api/qwebframe.cpp: (qt_drt_numberOfPages): (qt_drt_evaluateScriptInIsolatedWorld): 2010-02-16 Ariya Hidayat [Qt] Allow scrolling to an anchor programmatically. https://bugs.webkit.org/show_bug.cgi?id=29856 * Api/qwebframe.cpp: (QWebFrame::scrollToAnchor): New API function. * Api/qwebframe.h: * tests/qwebframe/tst_qwebframe.cpp: New tests for scrollToAnchor(). 2010-02-16 Ariya Hidayat Reviewed by Laszlo Gombos. Fix building with Qt < 4.6. https://bugs.webkit.org/show_bug.cgi?id=34885 * Api/qgraphicswebview.cpp: (QGraphicsWebViewPrivate::updateResizesToContentsForPage): 2010-02-16 Simon Hausmann Unreviewed Symbian build fix. Updated the def file with two new exports used by QtLauncher. * symbian/eabi/QtWebKitu.def: 2010-02-16 Ismail Donmez Reviewed by Pavel Feldman. Fix compilation with inspector disabled. https://bugs.webkit.org/show_bug.cgi?id=32724 * Api/qwebpage.cpp: (qt_drt_webinspector_executeScript): (qt_drt_webinspector_close): (qt_drt_webinspector_show): (qt_drt_setTimelineProfilingEnabled): 2010-02-16 Jocelyn Turcotte Reviewed by Simon Hausman. [Qt] Fix include paths for forwarding headers in standalone builds. * Api/DerivedSources.pro: Use relative paths for package builds and added some documentation. 2010-02-15 Noam Rosenthal Reviewed by Simon Hausmann. [Qt] QtWebkit bridge: enable passing a QWebElement to a signal/slot/property Add Q_DECLARE_METATYPE to QWebElement, add relevant tests to tst_qwebframe https://bugs.webkit.org/show_bug.cgi?id=34901 * Api/qwebelement.h: declare metatype * tests/qwebframe/tst_qwebframe.cpp: (MyQObject::webElementProperty): new test for QWebElement (MyQObject::setWebElementProperty): new test for QWebElement (MyQObject::myOverloadedSlot): new test for QWebElement 2010-02-15 Robert Hogan , Jocelyn Turcotte Reviewed by Simon Hausmann. [Qt] DRT: Support evaluateInWebInspector(), setTimelineProfilingEnabled(). Support LayoutTestController.evaluateInWebInspector(), setTimelineProfilingEnabled() in Qt DRT. https://bugs.webkit.org/show_bug.cgi?id=33096 This allows the following tests to pass: inspector/console-format-collections.html inspector/styles-iframe.html inspector/syntax-highlight-css.html inspector/syntax-highlight-javascript.html inspector/timeline-enum-stability.html inspector/timeline-layout.html inspector/timeline-mark-timeline.html inspector/timeline-paint.html inspector/timeline-parse-html.html inspector/timeline-recalculate-styles.html inspector/timeline-script-tag-1.html inspector/timeline-script-tag-2.html inspector/timeline-trivial.html inspector/cookie-resource-match.html inspector/elements-img-tooltip.html inspector/elements-panel-selection-on-refresh.html inspector/inspected-objects-not-overriden.html inspector/timeline-event-dispatch.html inspector/timeline-network-resource.html inspector/elements-panel-rewrite-href.html inspector/console-dir.html inspector/console-dirxml.html inspector/console-format.html inspector/console-tests.html inspector/elements-panel-structure.html inspector/evaluate-in-frontend.html inspector/console-clear.html * Api/qwebpage.cpp: (qt_drt_webinspector_executeScript): (qt_drt_webinspector_close): (qt_drt_webinspector_show): (qt_drt_setTimelineProfilingEnabled): * WebCoreSupport/InspectorClientQt.cpp: (InspectorClientQt::createPage) 2010-02-12 Antti Koivisto Reviewed by Kenneth Rohde Christiansen and Simon Hausmann. https://bugs.webkit.org/show_bug.cgi?id=34885 Add a QGraphicsWebView mode that makes it automatically resize itself to the size of the content. This is useful for cases where the client wants to implement page panning and zooming by manipulating the graphics item. Add a option to QGVLauncher to test this mode. * Api/qgraphicswebview.cpp: (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate): (QGraphicsWebViewPrivate::updateResizesToContentsForPage): (QGraphicsWebViewPrivate::_q_contentsSizeChanged): (QGraphicsWebView::setPage): (QGraphicsWebView::setResizesToContents): (QGraphicsWebView::resizesToContents): * Api/qgraphicswebview.h: * QGVLauncher/main.cpp: (WebView::WebView): (MainView::MainView): (MainView::setMainWidget): (MainView::resizeEvent): (main): 2010-02-12 Diego Gonzalez Reviewed by Kenneth Rohde Christiansen. Qt DRT now dump the frame loader callbacks when LayoutTestController() method is called. LayoutTests: http/tests/security/mixedContent/data-url-script-in-iframe.html http/tests/security/mixedContent/empty-url-plugin-in-frame.html http/tests/security/mixedContent/insecure-css-in-iframe.html http/tests/security/mixedContent/insecure-iframe-in-iframe.html http/tests/security/mixedContent/insecure-image-in-iframe.html http/tests/security/mixedContent/insecure-plugin-in-iframe.html http/tests/security/mixedContent/insecure-script-in-iframe.html http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe.html http/tests/security/mixedContent/redirect-https-to-http-script-in-iframe.html [Qt] Make possible Qt DRT dump frame load callbacks https://bugs.webkit.org/show_bug.cgi?id=34702 * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::didDisplayInsecureContent): (WebCore::FrameLoaderClientQt::didRunInsecureContent): 2010-02-10 Jocelyn Turcotte Reviewed by Tor Arne Vestbø. [Qt] Make qtlauncher and qgvlauncher use the generated headers path to make sure they are correctly generated. * tests/tests.pri: 2010-02-10 Jocelyn Turcotte Reviewed by Tor Arne Vestbø. [Qt] Ensure relative paths in generated .pri files to ensure that a source package with pre-generated derived sources can be compiled. - Re-add a separate headers.pri file for WEBKIT_API_HEADERS - Rename the generated headers.pri to classheaders.pri to avoid confusion with the one generated by synqt since they don't have the same content. - Remove private headers list variable from classheaders.pri - Use $$PWD in classheaders.pri - Remove classheaders.pri from the installed files * Api/DerivedSources.pro: 2010-02-10 Jocelyn Turcotte Reviewed by Tor Arne Vestbø. [Qt] Minor fixes on QtWebKit headers generation. - Adds QtWebKit to the generated headers destination path - Improve compatibility with MinGW * Api/DerivedSources.pro: 2010-02-09 Jocelyn Turcotte Reviewed by nobody, build fix. [Qt] Fix standalone build with MinGW. * tests/qwebelement/tst_qwebelement.cpp: * tests/tests.pri: 2010-02-10 Diego Gonzalez Reviewed by Kenneth Rohde Christiansen. Implement pageNumberForElementById() method in Qt DRT LayoutTestController, to make Qt DRT able to get page number. LayoutTests: printing/page-break-always.html printing/pageNumerForElementById.html printing/css2.1/page-break-before-000.html printing/css2.1/page-break-after-000.html printing/css2.1/page-break-after-004.html printing/css2.1/page-break-before-001.html printing/css2.1/page-break-after-001.html printing/css2.1/page-break-after-002.html printing/css2.1/page-break-before-002.html printing/css2.1/page-break-inside-000.html [Qt] Make possible Qt DRT get a page number for element by ID https://bugs.webkit.org/show_bug.cgi?id=34777 * Api/qwebframe.cpp: (qt_drt_pageNumberForElementById): 2010-02-09 Yael Aharon Reviewed by Adam Barth. [Qt] Unit test for window.runModalDialog https://bugs.webkit.org/show_bug.cgi?id=34755 * tests/qwebpage/tst_qwebpage.cpp: (TestModalPage::TestModalPage): (TestModalPage::createWindow): (tst_QWebPage::showModalDialog): 2010-02-09 Andreas Kling Reviewed by Kenneth Rohde Christiansen. [Qt] Sync with API changes in Maemo 5 kinetic scrolling https://bugs.webkit.org/show_bug.cgi?id=34747 This is a forward-port of http://qt.gitorious.org/+qt-developers/qt/x11-maemo/commit/08497561 * Api/qwebview.cpp: (qt_sendSpontaneousEvent): (QWebViewKineticScroller::QWebViewKineticScroller): (QWebViewKineticScroller::setWidget): (QWebViewKineticScroller::eventFilter): (QWebViewKineticScroller::cancelLeftMouseButtonPress): (QWebViewKineticScroller::currentFrame): (QWebViewKineticScroller::scrollingFrameAt): (QWebViewKineticScroller::maximumScrollPosition): (QWebViewKineticScroller::scrollPosition): (QWebViewKineticScroller::viewportSize): (QWebViewKineticScroller::setScrollPosition): (QWebViewKineticScroller::sendEvent): (QWebView::QWebView): 2010-02-09 Yael Aharon Reviewed by Kenneth Rohde Christiansen. [Qt] Webkit in Qt does not have window.showModalDialog https://bugs.webkit.org/show_bug.cgi?id=25585 Create a new eventloop when runModal() is called. Added comemnt in QWebPage::createWindow that the application is responsible for setting the modality of the appropriate window. * Api/qwebpage.cpp: * WebCoreSupport/ChromeClientQt.cpp: (WebCore::ChromeClientQt::ChromeClientQt): (WebCore::ChromeClientQt::~ChromeClientQt): (WebCore::ChromeClientQt::canRunModal): (WebCore::ChromeClientQt::runModal): * WebCoreSupport/ChromeClientQt.h: 2010-01-19 Kenneth Rohde Christiansen Reviewed by Dave Hyatt. Implement flattening of framesets https://bugs.webkit.org/show_bug.cgi?id=32717 Privately export the setFrameSetFlatteningEnabled setting for use with the Qt DRT. * Api/qwebpage.cpp: (qt_drt_setFrameSetFlatteningEnabled): (QWebPagePrivate::core): * Api/qwebpage_p.h: 2010-02-05 Tor Arne Vestbø [Qt] Fix build on Windows Reviewed by Kenneth Rohde Christiansen. DerivedSources for our API headers failed on Windows, due to Windows not accepting ; as a command separator, not needing quotes for echo, and needing < and > escaped. We now detect Windows and set these quote markers and escape markers accordingly, as well as use && for separating individual commands. * Api/DerivedSources.pro: 2010-02-05 Yury Semikhatsky Reviewed by Pavel Feldman. Remove unused inmport of ScriptFunctionCall.h https://bugs.webkit.org/show_bug.cgi?id=33592 * Api/qwebelement.cpp: 2010-02-05 Tor Arne Vestbø Reviewed by Simon Hausmann. [Qt] Generate convenience headers (QWebView, etc) using qmake In Qt this is done using syncqt, but we use a pro-file instead that generates makefile-rules for each of the extra headers. These extra headers are installed alongside the normal headers. * Api/DerivedSources.pro: Added. List of headers + pro file magic * Api/headers.pri: Removed, list of headers is now in the above file 2010-02-04 No'am Rosenthal Reviewed by Ariya Hidayat. [Qt] Tuning and optimizations to GraphicsLayerQt. Mainly reduced usage of QTimer::singleShot, and moved syncLayers() from paint() to update() https://bugs.webkit.org/show_bug.cgi?id=34062 * Api/qgraphicswebview.cpp: (QGraphicsWebViewPrivate::update): Moved the sync operation to update (QGraphicsWebView::paint): Moved the sync operation to update 2010-02-03 Andras Becsi Unreviewed build fix. [Qt] Roll-out r54281 because it broke the build on the Qt Release bot. * Api/qgraphicswebview.cpp: (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate): (QGraphicsWebViewPrivate::markForSync): (QGraphicsWebViewPrivate::update): (QGraphicsWebView::paint): 2010-02-02 Kenneth Rohde Christiansen Reviewed by Ariya Hidayat. Do not use a proxy widget for the QComboBox on Maemo 5, as it is not working properly and it is not needed at all, as the comboboxes comes up in their full width on the screen and do not depend on view. (WebCore::QtFallbackWebPopup::show): 2010-02-02 Jessie B. Rubber Stamped by Holger Freyther. [Qt] Fix style issue identified in bug: https://bugs.webkit.org/show_bug.cgi?id=34329 * WebCoreSupport/InspectorClientQt.cpp: (WebCore::InspectorClientWebPage::InspectorClientWebPage): Fix indentation. 2010-02-01 Jessie B. Reviewed by Holger Freyther. [Qt] Enable inspecting the Web Inspector in QtLauncher https://bugs.webkit.org/show_bug.cgi?id=34329 * WebCoreSupport/InspectorClientQt.cpp: (WebCore::InspectorClientWebPage::InspectorClientWebPage): Allow the DeveloperExtrasEnabled setting to default to true for the page containing the Web Inspector. 2010-02-02 Andreas Kling Reviewed by Kenneth Rohde Christiansen. [Qt] Display HTML tags verbatim in JS alert/confirm/prompt boxes https://bugs.webkit.org/show_bug.cgi?id=34429 * Api/qwebpage.cpp: (QWebPage::javaScriptAlert): (QWebPage::javaScriptConfirm): (QWebPage::javaScriptPrompt): 2010-02-02 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. [Qt] Enable a way to measure FPS in QGVLauncher run QGVLauncher with --show-fps to see ongoing fps measurements This is not meant as accurate FPS, but rather as a way to find improvements/regressions https://bugs.webkit.org/show_bug.cgi?id=34450 * QGVLauncher/main.cpp: (MainView::MainView): initialize FPS values (MainView::paintEvent): count a painted frame here (MainView::printFps): we print the fps with qDebug every 5 seconds. 2010-01-29 Ben Murdoch Reviewed by Dimitri Glazkov. [Android] Android needs functionality in the ChromeClient to be informed when touch events are and are not needed by the webpage. https://bugs.webkit.org/show_bug.cgi?id=34215 Add needTouchEvents() to the ChromeClient which is called when the page decides it needs or no longer needs to be informed of touch events. * WebCoreSupport/ChromeClientQt.h: (WebCore::ChromeClientQt::needTouchEvents): Add an empty implementation. 2010-01-29 Kenneth Rohde Christiansen Reviewed by Simon Hausmann Disable auto-uppercase and predictive text on Maemo5, just like the build-in MicroB Browser. * WebCoreSupport/EditorClientQt.cpp: (WebCore::EditorClientQt::setInputMethodState): 2010-01-28 Kenneth Rohde Christiansen Reviewed by Simon Hausmann. Do not set the combobox font on Maemo5 and S60; use the default instead. * WebCoreSupport/QtFallbackWebPopup.cpp: (WebCore::QtFallbackWebPopup::populate): 2010-01-27 Diego Gonzalez Reviewed by Kenneth Rohde Christiansen. [Qt] DRT Provide worker thread ability to track counters https://bugs.webkit.org/show_bug.cgi?id=34221 Implement workerThreadCount() in LayoutTestController of Qt DRT Tests: fast/workers/dedicated-worker-lifecycle.html fast/workers/shared-worker-frame-lifecycle.html fast/workers/shared-worker-lifecycle.html fast/workers/worker-lifecycle.html * Api/qwebpage.cpp: (qt_drt_workerThreadCount): 2010-01-27 Simon Hausmann Reviewed by Laszlo Gombos. [Qt] Update the .def files with exported symbols * symbian/eabi/QtWebKitu.def: Add two mangled missing new symbols for arm eabi. 2010-01-27 Kent Hansen Reviewed by Simon Hausmann. [Qt] Meta-methods can't be introspected using ES5 API https://bugs.webkit.org/show_bug.cgi?id=34087 Test that Object.getOwnPropertyDescriptor and Object.getOwnPropertyNames work with meta-methods. * tests/qwebframe/tst_qwebframe.cpp: 2010-01-26 Jedrzej Nowacki Reviewed by Simon Hausmann. First steps of the QtScript API. Two new classes were created; QScriptEngine and QScriptValue. The first should encapsulate a javascript context and the second a script value. This API is still in development, so it isn't compiled by default. To trigger compilation, pass --qmakearg="CONFIG+=build-qtscript" to build-webkit. https://bugs.webkit.org/show_bug.cgi?id=32565 * docs/qtwebkit.qdocconf: 2010-01-25 Simon Hausmann Reviewed by Kenneth Rohde Christiansen. [Qt] In RenderThemeQt determine the QStyle from the page client instead of the page's view https://bugs.webkit.org/show_bug.cgi?id=34053 * Api/qgraphicswebview.cpp: (QGraphicsWebViewPrivate::style): Implement QWebPageClient::style() and return the graphics widget's style. * Api/qwebpage.cpp: (QWebPageWidgetClient::style): Implement QWebPageClient::style() and return the widget's style. 2010-01-23 Girish Ramakrishnan [Qt] Fix positioning of ComboBox popup in QGraphicsWebView. Wrap the popup in a QGraphicsProxyWidget, so that the popup transforms with the item. https://bugs.webkit.org/show_bug.cgi?id=33887 * WebCoreSupport/QtFallbackWebPopup.cpp: (WebCore::QtFallbackWebPopupCombo::hidePopup): (WebCore::QtFallbackWebPopup::QtFallbackWebPopup): (WebCore::QtFallbackWebPopup::~QtFallbackWebPopup): (WebCore::QtFallbackWebPopup::show): * WebCoreSupport/QtFallbackWebPopup.h: 2010-01-22 Peter Kasting Not reviewed, backout. Back out r52673, which caused several regressions. https://bugs.webkit.org/show_bug.cgi?id=32533 * WebCoreSupport/QtFallbackWebPopup.cpp: (WebCore::QtFallbackWebPopupCombo::hidePopup): 2010-01-22 Girish Ramakrishnan Reviewed by Simon Hausmann. [Qt] Save the QWebPageClient instead of the ownerWidget in QtAbstractWebPopup The QWebPageClient is required for the QtFallbackWebPopup. QtFallbackWebPopup will need it to create a QGraphicsProxyWidget (in a future commit) for the QGraphicsWebView's web popup. * WebCoreSupport/QtFallbackWebPopup.cpp: (WebCore::QtFallbackWebPopup::show): 2010-01-22 Girish Ramakrishnan Reviewed by Kenneth Rohde Christiansen. QState::polished() was renamed to QState::propertiesAssigned() when Qt 4.6.0 was released. * QGVLauncher/main.cpp: (MainWindow::init): 2010-01-21 Diego Gonzalez Reviewed by Kenneth Rohde Christiansen. [Qt] add setDomainRelaxationForbiddenForURLScheme in Qt DRT https://bugs.webkit.org/show_bug.cgi?id=33945 * Api/qwebsecurityorigin.cpp: (qt_drt_setDomainRelaxationForbiddenForURLScheme): 2010-01-21 No'am Rosenthal Reviewed by Antti Koivisto. [Qt] Implement GraphicsLayer for accelerated layer compositing https://bugs.webkit.org/show_bug.cgi?id=33514 Here we have the QGraphicsWebView support for accelerated compositing * Api/qgraphicswebview.cpp: (QGraphicsWebViewOverlay::q): access to container object (QGraphicsWebViewOverlay::boundingRect): overlay has same rect as the webview (QGraphicsWebViewOverlay::paint): paint everything but the contents (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate): some vars needed for accelerated compositing (QGraphicsWebViewPrivate::): (QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate): (QGraphicsWebViewPrivate::setRootGraphicsLayer): make sure we have a scrollbar overlay, and that the new graphics layer is parented by the web-view (QGraphicsWebViewPrivate::markForSync): flush changes at earliest convenience or during the next draw (QGraphicsWebViewPrivate::updateCompositingScrollPosition): sync the position of the compositing layer with the scroll position (QGraphicsWebViewPrivate::syncLayers): flush changes now (QGraphicsWebViewPrivate::scroll): make sure we also move the compositing layer (QGraphicsWebViewPrivate::update): also update the overlay if needed (QGraphicsWebView::QGraphicsWebView): initialize overlay with 0 (QGraphicsWebView::paint): paint only contents if we have an overlay, sync the compositing layers now if needed (QGraphicsWebView::setPage): also clean up the compositing (QGraphicsWebView::updateGeometry): also update overlay geo (QGraphicsWebView::setGeometry): also update overlay geo * Api/qgraphicswebview.h: reimp compositing stuff from QWebPageClient * Api/qwebsettings.cpp: init new settings flag for compositing as false (QWebSettingsPrivate::apply): apply new settings flag for compositing (QWebSettings::QWebSettings): * Api/qwebsettings.h: new settings flag for compositing * Api/qwebview.cpp: (QWebView::setPage): qwebview doesn't support compositing: always false * QGVLauncher/main.cpp: (WebView::WebView): some more cmdline arguments + compositing (MainWindow::init): some more cmdline arguments (main): ditto * WebCoreSupport/ChromeClientQt.cpp: (WebCore::ChromeClientQt::attachRootGraphicsLayer): reimp for accel-compositing (WebCore::ChromeClientQt::setNeedsOneShotDrawingSynchronization): reimp for accel compositing (WebCore::ChromeClientQt::scheduleCompositingLayerSync): reimp for accel compositing * WebCoreSupport/ChromeClientQt.h: reimps for accel compositing 2010-01-21 Benjamin Poulain Reviewed by Simon Hausmann. [Qt] Improve the autotests of QtWebkit https://bugs.webkit.org/show_bug.cgi?id=32216 Remove qWait() of the test when possible. * tests/qwebpage/tst_qwebpage.cpp: (tst_QWebPage::loadFinished): (tst_QWebPage::database): (tst_QWebPage::testEnablePersistentStorage): (tst_QWebPage::errorPageExtension): (tst_QWebPage::screenshot): 2010-01-21 Simon Hausmann Prospective build fix for the Qt build. Fix compilation against Qt without WebKit support by not including QtWebKit/QWebView but widget.h instead and instantiating QWebView through a typedef, to ensure we're using our locally built WebKit. * tests/hybridPixmap/widget.h: * tests/hybridPixmap/widget.ui: 2010-01-21 No'am Rosenthal Reviewed by Simon Hausmann. [Qt] Adding QPixmap/QImage support for the Qt hybrid layer https://bugs.webkit.org/show_bug.cgi?id=32461 * tests/hybridPixmap: Added. * tests/hybridPixmap/hybridPixmap.pro: Added. * tests/hybridPixmap/resources.qrc: Added. * tests/hybridPixmap/test.html: Added. * tests/hybridPixmap/tst_hybridPixmap.cpp: Added. (tst_hybridPixmap::tst_hybridPixmap): tests most of the use cases for hybrid pixmap/image manipulation (tst_hybridPixmap::init): QTestLib initialization (tst_hybridPixmap::cleanup): QTestLib cleanup (tst_hybridPixmap::hybridPixmap): run the html file * tests/hybridPixmap/widget.cpp: Added. (Widget::Widget): (Widget::refreshJS): (Widget::start): (Widget::completeTest): (Widget::setPixmap): (Widget::pixmap): (Widget::setImage): (Widget::image): (Widget::~Widget): (Widget::changeEvent): (Widget::compare): (Widget::imageSlot): (Widget::pixmapSlot): (Widget::randomSlot): * tests/hybridPixmap/widget.h: Added. * tests/hybridPixmap/widget.ui: Added. * tests/tests.pro: 2010-01-21 Luiz Agostini Reviewed by Kenneth Rohde Christiansen. [Qt] Custom select popups. https://bugs.webkit.org/show_bug.cgi?id=33418 Adjusting QtFallbackWebPopupCombo to the changes in WebCore layer. * WebCoreSupport/ChromeClientQt.cpp: (WebCore::ChromeClientQt::createSelectPopup): * WebCoreSupport/ChromeClientQt.h: * WebCoreSupport/QtFallbackWebPopup.cpp: (WebCore::QtFallbackWebPopupCombo::QtFallbackWebPopupCombo): (WebCore::QtFallbackWebPopupCombo::showPopup): (WebCore::QtFallbackWebPopupCombo::hidePopup): (WebCore::QtFallbackWebPopup::QtFallbackWebPopup): (WebCore::QtFallbackWebPopup::~QtFallbackWebPopup): (WebCore::QtFallbackWebPopup::show): (WebCore::QtFallbackWebPopup::hide): (WebCore::QtFallbackWebPopup::populate): * WebCoreSupport/QtFallbackWebPopup.h: 2010-01-19 Steve Block Reviewed by Adam Barth. Renames WebCore/bridge/runtime.[cpp|h] to WebCore/bridge/Bridge.[cpp|h] https://bugs.webkit.org/show_bug.cgi?id=33801 * Api/qwebframe.cpp: 2010-01-14 Brian Weinstein Reviewed by Adam Roben. Drag and Drop source/destination code needs cleanup. . Update to new way of calling sourceOperation. * WebCoreSupport/DragClientQt.cpp: (WebCore::DragClientQt::startDrag): 2010-01-14 Simon Hausmann Reviewed by Tor Arne Vestbø. [Qt] Symbian build fixes. * tests/qwebpage/tst_qwebpage.cpp: Include util.h * tests/tests.pri: Don't define TESTS_SOURCE_DIR, it doesn't work. * tests/util.h: Define TESTS_SOURCE_DIR here, just like it's done in Qt. 2010-01-13 Darin Adler Reviewed by Dan Bernstein. Move more of the selection and caret painting code from Frame to SelectionController. https://bugs.webkit.org/show_bug.cgi?id=33619 * Api/qwebpage.cpp: (QWebPagePrivate::inputMethodEvent): Seems possibly wrong to be directly invoking this setCaretVisible here, but I updated it to call it in its new location. 2010-01-11 Simon Hausmann Reviewed by Holger Freyther. [Qt] Add private API for QWebFrame scrolling, to maintain binary compatibility with Qt 4.6. This is just a temporary addition until we have introduced #ifdefs to allow safely removing the private API again. (qtwebkit_webframe_scrollRecursively): 2010-01-10 Robert Hogan Reviewed by Adam Barth. [Qt] Add enableXSSAuditor support to QWebSettings and DRT. https://bugs.webkit.org/show_bug.cgi?id=33419 * Api/qwebsettings.cpp: (QWebSettingsPrivate::apply): * Api/qwebsettings.h: 2010-01-09 Daniel Bates No review, rolling out r53044. http://trac.webkit.org/changeset/53044 https://bugs.webkit.org/show_bug.cgi?id=33419 We need to look into this some more because the Qt bot is failing the XSSAuditor tests. See bug #33419 for more details. * Api/qwebsettings.cpp: * Api/qwebsettings.h: 2010-01-09 Daniel Bates Reviewed by Adam Barth. https://bugs.webkit.org/show_bug.cgi?id=33419 Adds support for the XSSAuditor to the Qt DRT. * Api/qwebsettings.cpp: Updated comment to reflect added key XSSAuditorEnabled. * Api/qwebsettings.h: Adds settings key XSSAuditorEnabled. 2010-01-08 Luiz Agostini Reviewed by Kenneth Rohde Christiansen. [Qt] Delegation client https://bugs.webkit.org/show_bug.cgi?id=32826 Added method createPopup to ChromeClientQt used to create popups. QtFallbackWebPopup moved from WebCore/platform/qt to WebKit/qt/WebCoreSupport. * WebCoreSupport/ChromeClientQt.cpp: (WebCore::ChromeClientQt::createPopup): * WebCoreSupport/ChromeClientQt.h: * WebCoreSupport/QtFallbackWebPopup.cpp: Added. (WebCore::QtFallbackWebPopup::QtFallbackWebPopup): (WebCore::QtFallbackWebPopup::show): (WebCore::QtFallbackWebPopup::populate): (WebCore::QtFallbackWebPopup::showPopup): (WebCore::QtFallbackWebPopup::hidePopup): (WebCore::QtFallbackWebPopup::activeChanged): (WebCore::QtFallbackWebPopup::setParent): * WebCoreSupport/QtFallbackWebPopup.h: Added. (WebCore::QtFallbackWebPopup::hide): 2010-01-06 Andreas Kling Reviewed by Simon Hausmann. [Qt] Return an invalid Qt::ImMicroFocus if queried while the view needs to layout. https://bugs.webkit.org/show_bug.cgi?id=33204 * Api/qwebpage.cpp: (QWebPage::inputMethodQuery): 2010-01-05 Yael Aharon Reviewed by Kenneth Rohde Christiansen. Drag & drop layout tests fail even when run manually https://bugs.webkit.org/show_bug.cgi?id=33055 No new tests. Fix 3 layout tests when run manually. fast/events/drag-and-drop.html fast/events/drag-and-drop-dataTransfer-types-nocrash.html fast/events/drag-and-drop-fire-drag-dragover.html Running these tests in DRT will be fixed in 31332. * Api/qwebpage.cpp: (dropActionToDragOp): (dragOpToDropAction): (QWebPagePrivate::dragEnterEvent): (QWebPagePrivate::dragMoveEvent): (QWebPagePrivate::dropEvent): Accept drag events even if they are not over a drop target. This is to ensure that drag events will continue to be delivered. * Api/qwebpage_p.h: * WebCoreSupport/DragClientQt.cpp: (WebCore::dragOperationToDropActions): (WebCore::dropActionToDragOperation): (WebCore::DragClientQt::startDrag): Send dragEnd event. 2010-01-04 Daniel Bates Reviewed by Eric Seidel. https://bugs.webkit.org/show_bug.cgi?id=33097 Cleans up the File menu to better conform to the File menu in Safari both in terms of options and keyboard shortcuts. Adds a "Quit" menu options to close all open windows. * QGVLauncher/main.cpp: (MainWindow::buildUI): 2009-12-31 Laszlo Gombos Reviewed by Kenneth Rohde Christiansen. [Qt] Enable all HTML5 persistent features for QGVLauncher https://bugs.webkit.org/show_bug.cgi?id=33086 * QGVLauncher/main.cpp: Call enablePersistentStorage() (main): 2009-12-30 Laszlo Gombos Reviewed by Simon Hausmann. [Qt] It should be possible to disable inspector https://bugs.webkit.org/show_bug.cgi?id=32724 This change fixes the build break. Some QtWebKit interfaces will not be fully functional (most notable QWebInspector) if INSPECTOR is disabled. * Api/qwebinspector.cpp: (QWebInspector::showEvent): (QWebInspector::closeEvent): * Api/qwebpage.cpp: (webActionForContextMenuAction): (QWebPagePrivate::getOrCreateInspector): (QWebPagePrivate::inspectorController): (QWebPage::triggerAction): (QWebPage::updatePositionDependentActions): * WebCoreSupport/InspectorClientQt.cpp: (WebCore::InspectorClientQt::showWindow): (WebCore::InspectorClientQt::closeWindow): 2009-12-29 Daniel Bates Reviewed by Ariya Hidayat. https://bugs.webkit.org/show_bug.cgi?id=32925 Adds an Open File dialog to make it convenient to open a file to view in the browser. * QGVLauncher/main.cpp: (MainWindow::load): Modified to call loadURL. (MainWindow::openFile): Added. (MainWindow::loadURL): Added. (MainWindow::buildUI): Added menu item Open File. 2009-12-29 Robert Hogan Reviewed by Eric Seidel. [Qt] Fix crash on LayoutTests/fast/loader/empty-embed-src-attribute.html Related to https://bugs.webkit.org/show_bug.cgi?id=23806 If an embedded document is loaded within a page and it has an empty URL, use a blank URL for the load request. https://bugs.webkit.org/show_bug.cgi?id=33017 * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::createFrame): 2009-12-29 Laszlo Gombos Rubber-stamped by Simon Hausmann and Holger Freyther. [Qt] Remove WebKit/qt/WebKitPart empty directory The content of the directory has been removed by r34888. * WebKitPart: Removed. 2009-12-29 Jakub Wieczorek Reviewed by Eric Seidel. [Qt] DRT: Frame loader callbacks differ from the Mac port https://bugs.webkit.org/show_bug.cgi?id=32989 Remove messages from the callbacks that should not dump them to match the expected results for the http/loading tests. Unskip some http/loading tests which succeed now. * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::dispatchDidPopStateWithinPage): (WebCore::FrameLoaderClientQt::dispatchWillClose): (WebCore::FrameLoaderClientQt::dispatchDidReceiveIcon): (WebCore::FrameLoaderClientQt::dispatchDidClearWindowObjectInWorld): 2009-12-29 Robert Hogan Reviewed by Eric Seidel. [Qt] fix fast/dom/Window/window-onFocus.html Add support for layouttestcontroller.windowIsKey to Qt DRT and fix issue where window.onblur was getting dispatched twice from QtWebKit. https://bugs.webkit.org/show_bug.cgi?id=32990 * Api/qwebpage.cpp: (QWebPagePrivate::focusOutEvent): 2009-12-24 Girish Ramakrishnan Reviewed by Gustavo Noronha. Doc : QGraphicsWebView::zoomFactor was introduced in 4.6. * Api/qgraphicswebview.cpp: 2009-12-22 Simon Hausmann Rubber-stamped by Holger Freyther. Moved QtLauncher to WebKitTools/ * QtLauncher: Removed. * QtLauncher/QtLauncher.pro: Removed. * QtLauncher/main.cpp: Removed. 2009-12-21 David Boddie Reviewed by Simon Hausmann. Doc: Minor fixes to language. * Api/qwebpage.cpp: 2009-12-21 Tor Arne Vestbø Reviewed by Simon Hausmann. [Qt] Clean up the WebKit layer unit-tests - Use tests.pri for common options - Standardize file naming - Move all resources to 'resources' subdir - Standardize how TESTS_SOURCE_DIR is used - Get rid of UID3 for symbian (autogenerated) - Don't build app bundles on Mac OS X * tests/benchmarks/loading/loading.pro: Added. * tests/benchmarks/loading/tst_loading.pro: Removed. * tests/benchmarks/painting/painting.pro: Added. * tests/benchmarks/painting/tst_painting.pro: Removed. * tests/qgraphicswebview/qgraphicswebview.pro: * tests/qwebelement/qwebelement.pro: * tests/qwebelement/qwebelement.qrc: Removed. * tests/qwebelement/resources/image.png: Renamed from WebKit/qt/tests/qwebelement/image.png. * tests/qwebelement/resources/style.css: Renamed from WebKit/qt/tests/qwebelement/style.css. * tests/qwebelement/resources/style2.css: Renamed from WebKit/qt/tests/qwebelement/style2.css. * tests/qwebelement/tst_qwebelement.qrc: Added. * tests/qwebframe/qwebframe.pro: * tests/qwebframe/qwebframe.qrc: Removed. * tests/qwebframe/resources/image.png: Renamed from WebKit/qt/tests/qwebframe/image.png. * tests/qwebframe/resources/style.css: Renamed from WebKit/qt/tests/qwebframe/style.css. * tests/qwebframe/resources/test1.html: Renamed from WebKit/qt/tests/qwebframe/test1.html. * tests/qwebframe/resources/test2.html: Renamed from WebKit/qt/tests/qwebframe/test2.html. * tests/qwebframe/resources/testiframe.html: Renamed from WebKit/qt/tests/qwebframe/testiframe.html. * tests/qwebframe/resources/testiframe2.html: Renamed from WebKit/qt/tests/qwebframe/testiframe2.html. * tests/qwebframe/tst_qwebframe.cpp: * tests/qwebframe/tst_qwebframe.qrc: Added. * tests/qwebhistory/qwebhistory.pro: * tests/qwebhistory/resources/page1.html: Renamed from WebKit/qt/tests/qwebhistory/data/page1.html. * tests/qwebhistory/resources/page2.html: Renamed from WebKit/qt/tests/qwebhistory/data/page2.html. * tests/qwebhistory/resources/page3.html: Renamed from WebKit/qt/tests/qwebhistory/data/page3.html. * tests/qwebhistory/resources/page4.html: Renamed from WebKit/qt/tests/qwebhistory/data/page4.html. * tests/qwebhistory/resources/page5.html: Renamed from WebKit/qt/tests/qwebhistory/data/page5.html. * tests/qwebhistory/resources/page6.html: Renamed from WebKit/qt/tests/qwebhistory/data/page6.html. * tests/qwebhistory/tst_qwebhistory.cpp: (tst_QWebHistory::): * tests/qwebhistory/tst_qwebhistory.qrc: * tests/qwebhistoryinterface/qwebhistoryinterface.pro: * tests/qwebinspector/qwebinspector.pro: * tests/qwebpage/qwebpage.pro: * tests/qwebpage/resources/frame_a.html: Renamed from WebKit/qt/tests/qwebpage/frametest/frame_a.html. * tests/qwebpage/resources/iframe.html: Renamed from WebKit/qt/tests/qwebpage/frametest/iframe.html. * tests/qwebpage/resources/iframe2.html: Renamed from WebKit/qt/tests/qwebpage/frametest/iframe2.html. * tests/qwebpage/resources/iframe3.html: Renamed from WebKit/qt/tests/qwebpage/frametest/iframe3.html. * tests/qwebpage/resources/index.html: Renamed from WebKit/qt/tests/qwebpage/frametest/index.html. * tests/qwebpage/tst_qwebpage.cpp: (tst_QWebPage::backActionUpdate): (tst_QWebPage::frameAt): (tst_QWebPage::errorPageExtensionInFrameset): (tst_QWebPage::screenshot): * tests/qwebpage/tst_qwebpage.qrc: * tests/qwebplugindatabase/qwebplugindatabase.pro: * tests/qwebview/qwebview.pro: * tests/qwebview/resources/frame_a.html: Renamed from WebKit/qt/tests/qwebview/data/frame_a.html. * tests/qwebview/resources/index.html: Renamed from WebKit/qt/tests/qwebview/data/index.html. * tests/qwebview/tst_qwebview.cpp: (tst_QWebView::reusePage): (tst_QWebView::crashTests): * tests/qwebview/tst_qwebview.qrc: * tests/resources/image2.png: Renamed from WebKit/qt/tests/qwebframe/resources/image2.png. * tests/tests.pri: Added. * tests/tests.pro: 2009-12-18 Ariya Hidayat Build fix, not reviewed. * QtLauncher/main.cpp: (MainWindow::setTouchMocking): Leave setTouchMocking as an empty function for Qt < 4.6 so that moc still creates a slot for that. Otherwise, it would have generated a linker error. 2009-12-18 Adam Roben Qt build fix * Api/qwebpage.cpp: Added #include. 2009-12-18 Adam Roben Qt build fix * Api/qwebpage.cpp: Added #includes. 2009-12-18 Joe Ligman Reviewed by Kenneth Rohde Christiansen. [Qt] Add new API to QWebFrame to scrollRecursively starting with any css overflow then checking current frame and then ancestors https://bugs.webkit.org/show_bug.cgi?id=32668 * Api/qwebframe.cpp: (QWebFramePrivate::scrollOverflow): (QWebFrame::scrollRecursively): * Api/qwebframe.h: * Api/qwebframe_p.h: * tests/qwebframe/qwebframe.qrc: * tests/qwebframe/testiframe.html: Added. * tests/qwebframe/testiframe2.html: Added. * tests/qwebframe/tst_qwebframe.cpp: 2009-12-18 Simon Hausmann Reviewed by Tor Arne Vestbø. [Qt] Fix infinite recursion in touch mocking. Don't send the fake touch events to the view, as that'll trigger the event filter again. * QtLauncher/main.cpp: (MainWindow::sendTouchEvent): 2009-12-17 Benjamin Poulain Reviewed by Simon Hausmann. [Qt] Add support for mocking touch events with Q(GV)Launcher https://bugs.webkit.org/show_bug.cgi?id=32434 The event delivery should go through QCoreApplication::sendEvent() * QtLauncher/main.cpp: (MainWindow::sendTouchEvent): 2009-12-17 Kim Grönholm Reviewed by Simon Hausmann. [Qt] Add support for touch events in QWebView and QGraphicsWebView https://bugs.webkit.org/show_bug.cgi?id=32432 * Api/qgraphicswebview.cpp: (QGraphicsWebView::QGraphicsWebView): (QGraphicsWebView::sceneEvent): * Api/qwebview.cpp: (QWebView::QWebView): (QWebView::event): 2009-12-17 Kim Grönholm Reviewed by Simon Hausmann. [Qt] Add support for mocking touch events with QtLauncher https://bugs.webkit.org/show_bug.cgi?id=32434 * QtLauncher/main.cpp: (MainWindow::MainWindow): (MainWindow::sendTouchEvent): (MainWindow::eventFilter): (MainWindow::setTouchMocking): (MainWindow::setupUI): 2009-11-24 Holger Hans Peter Freyther (QWebInspector::closeEvent): * Api/qwebinspector.h: 2009-12-14 Benjamin Poulain Reviewed by Kenneth Rohde Christiansen. [Qt] Improve the autotests of QtWebkit https://bugs.webkit.org/show_bug.cgi?id=32216 Refactor tst_qwebelement to remove the qWait() * tests/qwebelement/tst_qwebelement.cpp: (tst_QWebElement::style): 2009-12-14 Andreas Kling Reviewed by Simon Hausmann. Fix the QWebPage inputMethods() autotest after r51758 to compare the Qt::ImFont property's family against an explicitly previously configured family. https://bugs.webkit.org/show_bug.cgi?id=32491 * tests/qwebpage/tst_qwebpage.cpp: (tst_QWebPage::inputMethods): 2009-12-13 Sam Weinig Reviewed by Dan Bernstein. Fix for https://bugs.webkit.org/show_bug.cgi?id=32499 Add client based Geolocation provider Add first cut of a client based Geolocation provider. This is guarded by ENABLE(CLIENT_BASED_GEOLOCATION) and is off by default for now. This adds a GeolocationControllerClient interface that no-one currently implements, but will in a subsequent patch. * Api/qwebpage.cpp: (QWebPagePrivate::QWebPagePrivate): 2009-12-13 Benjamin Poulain Reviewed by Simon Hausmann. Add a test in Qt for https://bugs.webkit.org/show_bug.cgi?id=29005 https://bugs.webkit.org/show_bug.cgi?id=29008 * tests/qwebframe/tst_qwebframe.cpp: 2009-12-11 Yael Aharon Unreviewed build fix for Qt versions < 4.6. * tests/qwebframe/tst_qwebframe.cpp: * tests/qwebview/tst_qwebview.cpp: (tst_QWebView::reusePage): 2009-12-11 Girish Ramakrishnan Reviewed by Tor Arne Vestbø. [Qt] Updated QWebElement documentation findAll() returns a QWebElementCollection, not QList. * docs/webkitsnippets/webelement/main.cpp: (findAll): 2009-12-11 Simon Hausmann , Kim Grönholm Reviewed by Antti Koivisto. Forward Qt touch events to the event handler as platform touch events. https://bugs.webkit.org/show_bug.cgi?id=32114 * Api/qwebpage.cpp: (QWebPagePrivate::touchEvent): (QWebPage::event): * Api/qwebpage_p.h: 2009-12-07 Benjamin Poulain Reviewed by Kenneth Rohde Christiansen. [Qt] Improve the autotests of QtWebkit https://bugs.webkit.org/show_bug.cgi?id=32216 Remove the calls to qWait() of the autotest of QWebView * tests/qwebview/tst_qwebview.cpp: (tst_QWebView::reusePage): 2009-12-07 Benjamin Poulain Reviewed by Kenneth Rohde Christiansen. [Qt] Improve the autotests of QtWebkit https://bugs.webkit.org/show_bug.cgi?id=32216 Refactor tst_qwebframe to remove qWait() and use the function waitForSignal() from util.h * tests/qwebframe/tst_qwebframe.cpp: 2009-12-07 Benjamin Poulain Reviewed by Kenneth Rohde Christiansen. [Qt] Improve the autotests of QtWebkit https://bugs.webkit.org/show_bug.cgi?id=32216 Refactor the test of QGraphicsWebView: -make waitForSignal() available to all the tests. -remove QTest::qWait() * tests/qgraphicswebview/tst_qgraphicswebview.cpp: (tst_QGraphicsWebView::crashOnViewlessWebPages): * tests/util.h: (waitForSignal): 2009-12-07 Girish Ramakrishnan Reviewed by Simon Hausmann. [Qt] Plugins: Force windowless mode when there is no native window handle Inject wmode=opaque while instantiating the plugin for the case when the webpage is not backed by a native window handle. https://bugs.webkit.org/show_bug.cgi?id=32059 * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::createPlugin): 2009-12-04 Jocelyn Turcotte Reviewed by Kenneth Rohde Christiansen. [Qt] Corrects QtLauncher style * QtLauncher/main.cpp: (WebPage::acceptNavigationRequest): (MainWindow::MainWindow): (MainWindow::webPage): (MainWindow::webView): (MainWindow::changeLocation): (MainWindow::loadFinished): (MainWindow::showLinkHover): (MainWindow::zoomIn): (MainWindow::zoomOut): (MainWindow::print): (MainWindow::setEditable): (MainWindow::dumpHtml): (MainWindow::selectElements): (MainWindow::newWindow): (MainWindow::setupUI): (WebPage::createWindow): (WebPage::createPlugin): (main): 2009-12-04 Jocelyn Turcotte Reviewed by Kenneth Rohde Christiansen. [Qt] QtLauncher: add a menu to show or hide the web inspector. https://bugs.webkit.org/show_bug.cgi?id=32149 * QtLauncher/main.cpp: (WebInspector::WebInspector): (WebInspector::showEvent): (WebInspector::hideEvent): (MainWindow::MainWindow): (MainWindow::setupUI): 2009-12-04 Kenneth Rohde Christiansen Reviewed by Antti Koivisto. Split out the renderPrivate in two methods, one for working on relative coordinates (relative to the viewport) and one for working on absolute coordinates. The latter is more effecient for implementing tiling, as you don't need translate the coords, and because it avoid clipping to the viewport. No behaviour changes, so no new tests. * Api/qwebframe.cpp: (QWebFramePrivate::renderContentsLayerAbsoluteCoords): (QWebFramePrivate::renderRelativeCoords): (QWebFrame::render): * Api/qwebframe_p.h: 2009-12-04 Tor Arne Vestbø Reviewed by Simon Hausmann. [Qt] Allow removing 'qrc' as a local security origin scheme * tests/qwebpage/tst_qwebpage.cpp: 2009-12-04 Tor Arne Vestbø Reviewed by Simon Hausmann. [Qt] Clean up argument parsing in the QtLauncher * QtLauncher/main.cpp: 2009-12-04 Jocelyn Turcotte Reviewed by Kenneth Rohde Christiansen. [Qt] Prevent the inspector from closing its wrapping widget. This is not necessary anymore since we now hide the embedded close button. https://bugs.webkit.org/show_bug.cgi?id=32149 * WebCoreSupport/InspectorClientQt.cpp: (WebCore::InspectorClientQt::showWindow): (WebCore::InspectorClientQt::closeWindow): 2009-12-03 İsmail Dönmez Reviewed by Eric Seidel. Fix compilation when SVG is disabled. * Api/qwebframe.cpp: (qt_drt_pauseSVGAnimation): 2009-12-03 Brady Eidson Reviewed by Sam Weinig. and http://webkit.org/b/32052 - Implement HTML5 state object history API * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::dispatchDidPushStateWithinPage): (WebCore::FrameLoaderClientQt::dispatchDidReplaceStateWithinPage): (WebCore::FrameLoaderClientQt::dispatchDidPopStateWithinPage): * WebCoreSupport/FrameLoaderClientQt.h: 2009-12-03 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: Simplify the settings support in inspector controller. https://bugs.webkit.org/show_bug.cgi?id=32076 * WebCoreSupport/InspectorClientQt.cpp: (WebCore::InspectorClientQt::populateSetting): (WebCore::InspectorClientQt::storeSetting): (WebCore::variantToSetting): (WebCore::settingToVariant): * WebCoreSupport/InspectorClientQt.h: 2009-12-03 Ben Murdoch Reviewed by Brady Eidson. [Android] The FrameLoaderClient is unaware of BackForwardList changes. https://bugs.webkit.org/show_bug.cgi?id=31914 * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::dispatchDidAddBackForwardItem): Add an empty implementation. Method added to FrameLoaderClient by Android (see bug). (WebCore::FrameLoaderClientQt::dispatchDidRemoveBackForwardItem): ditto. (WebCore::FrameLoaderClientQt::dispatchDidChangeBackForwardIndex): ditto. * WebCoreSupport/FrameLoaderClientQt.h: 2009-12-01 Nikolas Zimmermann Not reviewed. Try to fix Qt build. * Api/qwebframe.cpp: (qt_drt_pauseSVGAnimation): 2009-12-01 Nikolas Zimmermann Reviewed by Simon Fraser. Add SVG animation test framework with 'snapshot' functionality https://bugs.webkit.org/show_bug.cgi?id=31897 Add API used by the new 'sampleSVGAnimationForElementAtTime' DRT method, forwarding the call to SVGDocumentExtensions, if SVG is enabled. Implemented just like the existing pauseAnimation* methods for CSS animations. * Api/qwebframe.cpp: (qt_drt_pauseSVGAnimation): 2009-12-01 Daniel Bates Reviewed by Kenneth Rohde Christiansen. https://bugs.webkit.org/show_bug.cgi?id=31898 Makes QtLauncher default to the http scheme for URLs. * QtLauncher/main.cpp: (MainWindow::MainWindow): (MainWindow::changeLocation): (main): 2009-11-30 Laszlo Gombos Reviewed by Kenneth Rohde Christiansen. [Qt] Fix minor waning in QtWebKit https://bugs.webkit.org/show_bug.cgi?id=31963 * tests/qwebpage/tst_qwebpage.cpp: (ErrorPage::extension): Remove info wariable as it is not used. 2009-11-26 Simon Hausmann Rubber-stamped by Holger Freyther. Removed unused ICO image plugin handler. * Plugins/ICOHandler.cpp: Removed. * Plugins/ICOHandler.h: Removed. * Plugins/Plugins.pro: Removed. 2009-11-12 Holger Hans Peter Freyther Reviewed by Kenneth Rohde Christiansen. [Qt] Do not show the QWidget when the WebCore::Widget is hidden https://bugs.webkit.org/show_bug.cgi?id=31203 The clipping code was making a QWidget visible even if the WebCore::Widget was hidden. Fix the bug by calling setVisible only if the WebCore::Widget Widget::isSelfVisible. * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::QtPluginWidget::show): Override WebCore::Widget::show to call handleVisibility (WebCore::QtPluginWidget::handleVisibility): New method to call setVisible when we are visible (FrameLoaderClientQt::createPlugin): Hide the QWidget by default 2009-11-19 Jocelyn Turcotte Reviewed by Kenneth Rohde Christiansen. [Qt] Add instantiation tests for QWebInspector. * tests/qwebinspector/qwebinspector.pro: Added. * tests/qwebinspector/tst_qwebinspector.cpp: Added. (tst_QWebInspector::attachAndDestroy): * tests/tests.pro: 2009-11-19 Jocelyn Turcotte Reviewed by Kenneth Rohde Christiansen. [Qt] Fix QWebInspector destruction problem. https://bugs.webkit.org/show_bug.cgi?id=31664 * Api/qwebpage.cpp: (QWebPage::~QWebPage): 2009-11-18 Laszlo Gombos Reviewed by Kenneth Rohde Christiansen. [Qt] Remove support for Qt v4.3 or older versions https://bugs.webkit.org/show_bug.cgi?id=29469 * Api/qcookiejar.cpp: Removed. * Api/qcookiejar.h: Removed. * Api/qgraphicswebview.cpp: (QGraphicsWebView::event): * Api/qwebframe.cpp: (QWebFrame::load): * Api/qwebframe.h: * Api/qwebkitglobal.h: * Api/qwebnetworkinterface.cpp: Removed. * Api/qwebnetworkinterface.h: Removed. * Api/qwebnetworkinterface_p.h: Removed. * Api/qwebpage.cpp: (QWebPagePrivate::QWebPagePrivate): (QWebPagePrivate::acceptNavigationRequest): (QWebPage::acceptNavigationRequest): (QWebPage::action): (QWebPage::userAgentForUrl): * Api/qwebpage.h: * Api/qwebpage_p.h: * Api/qwebview.cpp: (QWebView::load): (QWebView::event): * Api/qwebview.h: * QtLauncher/main.cpp: (MainWindow::print): (MainWindow::setupUI): (main): * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::download): (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNewWindowAction): (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction): (WebCore::FrameLoaderClientQt::startDownload): (WebCore::FrameLoaderClientQt::createPlugin): 2009-11-18 Shu Chang Reviewed by Eric Seidel. [Qt] Add support for displaying deleteButton. https://bugs.webkit.org/show_bug.cgi?id=31560 Test: LayoutTests/editing/deleting/5408255.html * Api/qwebsettings.cpp: (graphics): * Api/qwebsettings.h: 2009-11-18 Tor Arne Vestbø Reviewed by Simon Hausmann. [Qt] Add QtLauncher support for opening links in the default browser This can be triggered by either the context menu or by clicking a link while holding down the Alt key. Opening a link in a new windows is triggered by holding down Shift. * QtLauncher/main.cpp: 2009-11-17 Yael Aharon Reviewed by Kenneth Rohde Christiansen. [Qt] QGLLauncher does not support drag&drop of local files https://bugs.webkit.org/show_bug.cgi?id=31057 Enable accepting files in QGraphicsWebView. * Api/qgraphicswebview.cpp: (QGraphicsWebView::QGraphicsWebView): (QGraphicsWebView::dragEnterEvent): 2009-11-17 Antonio Gomes Reviewed by Kenneth Christiansen. [Qt] better test coverage for ErrorPageExtension https://bugs.webkit.org/show_bug.cgi?id=31583 Improved the coverage of current ErrorPageExtension tests by adding autotests involving frameset and iframes. (ErrorPage::extension): Make the ErrorPageExtension to work for all frames, not only the main frame. (tst_QWebPage::errorPageExtension): Stop using the 'frameset.html' resouce in this method since an autotest specific for frameset's is being added. (tst_QWebPage::errorPageExtensionInIFrames): Added. (tst_QWebPage::errorPageExtensionInFrameset): Added. 2009-11-13 Adam Roben Update for changes to FrameLoaderClient Fixes Tell the WebFrameLoadDelegate when window objects in isolated worlds are cleared Reviewed by Dave Hyatt. (WebCore::FrameLoaderClientQt::dispatchDidClearWindowObjectInWorld): * WebCoreSupport/FrameLoaderClientQt.h: Replaced windowObjectCleared with this function. Does nothing if the passed-in world is not the mainThreadNormalWorld(). 2009-11-13 Jocelyn Turcotte Reviewed by Kenneth Rohde Christiansen. [Qt] Fix initial QWebView focus behavior. focusController->setFocused(true) was not always called. https://bugs.webkit.org/show_bug.cgi?id=31466 * Api/qwebpage.cpp: (QWebPagePrivate::focusInEvent): 2009-11-12 Shinichiro Hamaji Reviewed by Darin Adler. externalRepresentation should take Frame as the argument https://bugs.webkit.org/show_bug.cgi?id=31393 No new tests as this is just a refactoring. * Api/qwebframe.cpp: (QWebFrame::renderTreeDump): 2009-11-12 Benjamin Poulain Reviewed by Kenneth Rohde Christiansen. Custom printing shrink factors https://bugs.webkit.org/show_bug.cgi?id=29042 This reverts commit r49769. The public API for this needs to be reviewed before its inclusion in Qt. * Api/qwebsettings.cpp: (QWebSettingsPrivate::apply): (QWebSettings::QWebSettings): * Api/qwebsettings.h: 2009-11-11 Kenneth Rohde Christiansen Unreviewed buildbot fix. Export a method to the DRT to know if the document has a document element. (qt_drt_hasDocumentElement): 2009-11-11 Liang QI 2009-11-11 Laszlo Gombos Reviewed by Kenneth Rohde Christiansen. https://bugs.webkit.org/show_bug.cgi?id=31323 Fix a few compiler warnings * tests/qwebframe/tst_qwebframe.cpp: Add extra brackets to make it explicit where the else case belongs 2009-11-11 Simon Hausmann Reviewed by Tor Arne Vestbø. Fix enabling of software input panel when activating editable elements in QGraphicsWebView. * Api/qgraphicswebview.cpp: (QGraphicsWebViewPrivate::inputMethodEnabled): Implement method to query for input method support. * Api/qwebpage.cpp: (QWebPageWidgetClient::inputMethodEnabled): Ditto for QWidget. (QWebPagePrivate::handleSoftwareInputPanel): Don't use view() to test for input method support. Instead query using QWebPageClient and send the SIPR event to the ownerWidget() instead of the view(). The latter is null for QGraphicsWebView. * tests/qwebpage/tst_qwebpage.cpp: (EventSpy::EventSpy): (EventSpy::eventFilter): (tst_QWebPage::inputMethods): Modify the test to verify that SIPR events are dispatched when activating focusable content. 2009-11-09 Laszlo Gombos Reviewed by Kenneth Rohde Christiansen. [Qt] Few classes have virtual functions but non-virtual destructor https://bugs.webkit.org/show_bug.cgi?id=31269 (QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate): Add virtual destructor. 2009-11-09 Benjamin Poulain Reviewed by Kenneth Rohde Christiansen. https://bugs.webkit.org/show_bug.cgi?id=30628 Add an API to get all the attributes from a QWebElement. * Api/qwebelement.cpp: (QWebElement::attributesName): * Api/qwebelement.h: * tests/qwebelement/tst_qwebelement.cpp: (tst_QWebElement::listAttributes): 2009-11-09 Laszlo Gombos Reviewed by Kenneth Rohde Christiansen. Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings https://bugs.webkit.org/show_bug.cgi?id=31040 (QWebPagePrivate::handleScrolling): 2009-11-09 Mark Mentovai Reviewed by Dan Bernstein. Track "can have scrollbar" state within FrameView independently of the individual scrollbar states in ScrollView. rdar://problem/7215132, https://bugs.webkit.org/show_bug.cgi?id=29167 REGRESSION (r48064): mint.com loses scrollbars after coming out of edit mode. rdar://problem/7314421, https://bugs.webkit.org/show_bug.cgi?id=30517 REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store. Test: fast/overflow/scrollbar-restored.html * Api/qwebframe.cpp: (QWebFrame::setScrollBarPolicy): 2009-11-05 Shu Chang Reviewed by Tor Arne Vestbø. Add support for Shift-PageUp and Shift-PageDown key events. https://bugs.webkit.org/show_bug.cgi?id=31166 Test: LayoutTests/editing/selection/shrink-selection-after-shift-pagedown.html * WebCoreSupport/EditorClientQt.cpp: (WebCore::EditorClientQt::handleKeyboardEvent): 2009-11-01 Laszlo Gombos Reviewed by Eric Seidel. Turn on warnings for QtWebKit for gcc https://bugs.webkit.org/show_bug.cgi?id=30958 * Api/qwebpage.cpp: (QWebPagePrivate::QWebPagePrivate): Reorder initialization list to fix compiler warnings. * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::FrameLoaderClientQt): Ditto. 2009-10-30 Evan Stade Reviewed by David Levin. Notify the chrome when the focused node has changed. https://bugs.webkit.org/show_bug.cgi?id=30832 Added stub implementation for new ChromeClient function. * WebCoreSupport/ChromeClientQt.cpp: (WebCore::ChromeClientQt::focusedNodeChanged): * WebCoreSupport/ChromeClientQt.h: --- src/3rdparty/webkit/.gitattributes | 273 + src/3rdparty/webkit/.gitignore | 18 + src/3rdparty/webkit/ChangeLog | 708 + src/3rdparty/webkit/JavaScriptCore/API/APICast.h | 20 +- src/3rdparty/webkit/JavaScriptCore/API/APIShims.h | 97 + src/3rdparty/webkit/JavaScriptCore/API/JSBase.cpp | 18 +- src/3rdparty/webkit/JavaScriptCore/API/JSBase.h | 20 +- .../JavaScriptCore/API/JSCallbackConstructor.cpp | 3 +- .../JavaScriptCore/API/JSCallbackConstructor.h | 2 +- .../JavaScriptCore/API/JSCallbackFunction.cpp | 3 +- .../webkit/JavaScriptCore/API/JSCallbackFunction.h | 2 +- .../webkit/JavaScriptCore/API/JSCallbackObject.h | 5 +- .../JavaScriptCore/API/JSCallbackObjectFunctions.h | 106 +- .../webkit/JavaScriptCore/API/JSClassRef.cpp | 95 +- .../webkit/JavaScriptCore/API/JSClassRef.h | 3 +- .../webkit/JavaScriptCore/API/JSContextRef.cpp | 32 +- .../webkit/JavaScriptCore/API/JSObjectRef.cpp | 64 +- .../webkit/JavaScriptCore/API/JSStringRef.h | 3 +- .../webkit/JavaScriptCore/API/JSValueRef.cpp | 83 +- .../webkit/JavaScriptCore/API/OpaqueJSString.cpp | 2 +- src/3rdparty/webkit/JavaScriptCore/ChangeLog | 8027 +- src/3rdparty/webkit/JavaScriptCore/Info.plist | 4 +- .../webkit/JavaScriptCore/JavaScriptCore.gypi | 19 +- .../webkit/JavaScriptCore/JavaScriptCore.order | 2 - .../webkit/JavaScriptCore/JavaScriptCore.pri | 223 +- .../webkit/JavaScriptCore/JavaScriptCore.pro | 6 - .../JavaScriptCore/assembler/ARMAssembler.cpp | 92 +- .../webkit/JavaScriptCore/assembler/ARMAssembler.h | 91 +- .../JavaScriptCore/assembler/ARMv7Assembler.h | 17 +- .../assembler/AbstractMacroAssembler.h | 8 +- .../JavaScriptCore/assembler/MacroAssembler.h | 23 +- .../JavaScriptCore/assembler/MacroAssemblerARM.cpp | 11 +- .../JavaScriptCore/assembler/MacroAssemblerARM.h | 139 +- .../JavaScriptCore/assembler/MacroAssemblerARMv7.h | 49 +- .../assembler/MacroAssemblerCodeRef.h | 6 +- .../JavaScriptCore/assembler/MacroAssemblerX86.h | 2 +- .../assembler/MacroAssemblerX86Common.h | 89 +- .../assembler/MacroAssemblerX86_64.h | 29 +- .../webkit/JavaScriptCore/assembler/X86Assembler.h | 64 +- .../webkit/JavaScriptCore/bytecode/CodeBlock.cpp | 336 +- .../webkit/JavaScriptCore/bytecode/CodeBlock.h | 34 +- .../webkit/JavaScriptCore/bytecode/EvalCodeCache.h | 2 +- .../webkit/JavaScriptCore/bytecode/Opcode.h | 11 + .../JavaScriptCore/bytecode/SamplingTool.cpp | 4 +- .../bytecompiler/BytecodeGenerator.cpp | 22 +- .../bytecompiler/BytecodeGenerator.h | 13 + .../JavaScriptCore/bytecompiler/NodesCodegen.cpp | 1999 + src/3rdparty/webkit/JavaScriptCore/config.h | 23 +- .../webkit/JavaScriptCore/create_jit_stubs | 69 + .../webkit/JavaScriptCore/debugger/Debugger.cpp | 7 +- .../webkit/JavaScriptCore/debugger/Debugger.h | 2 +- .../JavaScriptCore/debugger/DebuggerActivation.cpp | 8 +- .../JavaScriptCore/debugger/DebuggerActivation.h | 6 +- .../JavaScriptCore/debugger/DebuggerCallFrame.cpp | 8 +- .../JavaScriptCore/generated/ArrayPrototype.lut.h | 2 +- .../JavaScriptCore/generated/DatePrototype.lut.h | 2 +- .../generated/GeneratedJITStubs_RVCT.h | 1177 + .../webkit/JavaScriptCore/generated/Grammar.cpp | 1542 +- .../webkit/JavaScriptCore/generated/Grammar.h | 109 +- .../JavaScriptCore/generated/JSONObject.lut.h | 2 +- .../webkit/JavaScriptCore/generated/Lexer.lut.h | 2 +- .../JavaScriptCore/generated/MathObject.lut.h | 2 +- .../generated/NumberConstructor.lut.h | 2 +- .../generated/RegExpConstructor.lut.h | 2 +- .../JavaScriptCore/generated/RegExpObject.lut.h | 2 +- .../JavaScriptCore/generated/StringPrototype.lut.h | 2 +- .../webkit/JavaScriptCore/interpreter/CachedCall.h | 11 +- .../webkit/JavaScriptCore/interpreter/CallFrame.h | 23 +- .../JavaScriptCore/interpreter/Interpreter.cpp | 278 +- .../webkit/JavaScriptCore/interpreter/Register.h | 65 +- .../JavaScriptCore/interpreter/RegisterFile.cpp | 2 +- .../JavaScriptCore/interpreter/RegisterFile.h | 8 +- .../JavaScriptCore/jit/ExecutableAllocator.h | 28 +- .../jit/ExecutableAllocatorFixedVMPool.cpp | 2 +- .../jit/ExecutableAllocatorPosix.cpp | 6 +- .../jit/ExecutableAllocatorSymbian.cpp | 4 +- .../JavaScriptCore/jit/ExecutableAllocatorWin.cpp | 2 +- src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp | 14 +- src/3rdparty/webkit/JavaScriptCore/jit/JIT.h | 116 +- .../webkit/JavaScriptCore/jit/JITArithmetic.cpp | 399 +- src/3rdparty/webkit/JavaScriptCore/jit/JITCall.cpp | 6 + .../webkit/JavaScriptCore/jit/JITInlineMethods.h | 34 +- .../webkit/JavaScriptCore/jit/JITOpcodes.cpp | 377 +- .../JavaScriptCore/jit/JITPropertyAccess.cpp | 1026 +- .../JavaScriptCore/jit/JITPropertyAccess32_64.cpp | 1026 + .../webkit/JavaScriptCore/jit/JITStubCall.h | 17 +- .../webkit/JavaScriptCore/jit/JITStubs.cpp | 348 +- src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.h | 40 +- src/3rdparty/webkit/JavaScriptCore/jsc.cpp | 69 +- .../webkit/JavaScriptCore/os-win32/WinMain.cpp | 81 + .../webkit/JavaScriptCore/parser/Grammar.y | 10 +- .../webkit/JavaScriptCore/parser/Lexer.cpp | 5 +- .../JavaScriptCore/parser/NodeConstructors.h | 6 +- .../webkit/JavaScriptCore/parser/Nodes.cpp | 1891 +- src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h | 10 + .../webkit/JavaScriptCore/parser/Parser.cpp | 2 +- src/3rdparty/webkit/JavaScriptCore/pcre/dftables | 1 + src/3rdparty/webkit/JavaScriptCore/pcre/pcre.pri | 23 - .../webkit/JavaScriptCore/pcre/pcre_exec.cpp | 4 +- .../JavaScriptCore/profiler/HeavyProfile.cpp | 0 .../webkit/JavaScriptCore/profiler/HeavyProfile.h | 0 .../webkit/JavaScriptCore/profiler/Profile.cpp | 2 +- .../JavaScriptCore/profiler/ProfileGenerator.cpp | 4 +- .../webkit/JavaScriptCore/profiler/ProfileNode.cpp | 8 +- .../webkit/JavaScriptCore/profiler/Profiler.cpp | 22 +- .../webkit/JavaScriptCore/profiler/Profiler.h | 2 +- .../webkit/JavaScriptCore/profiler/TreeProfile.cpp | 0 .../webkit/JavaScriptCore/profiler/TreeProfile.h | 0 .../webkit/JavaScriptCore/qt/api/QtScript.pro | 36 + .../JavaScriptCore/qt/api/qscriptconverter_p.h | 50 + .../webkit/JavaScriptCore/qt/api/qscriptengine.cpp | 108 + .../webkit/JavaScriptCore/qt/api/qscriptengine.h | 49 + .../JavaScriptCore/qt/api/qscriptengine_p.cpp | 54 + .../webkit/JavaScriptCore/qt/api/qscriptengine_p.h | 98 + .../webkit/JavaScriptCore/qt/api/qscriptvalue.cpp | 556 + .../webkit/JavaScriptCore/qt/api/qscriptvalue.h | 99 + .../webkit/JavaScriptCore/qt/api/qscriptvalue_p.h | 744 + .../webkit/JavaScriptCore/qt/api/qtscriptglobal.h | 44 + .../qt/tests/qscriptengine/qscriptengine.pro | 7 + .../qt/tests/qscriptengine/tst_qscriptengine.cpp | 77 + .../qt/tests/qscriptvalue/qscriptvalue.pro | 11 + .../qt/tests/qscriptvalue/tst_qscriptvalue.cpp | 435 + .../qt/tests/qscriptvalue/tst_qscriptvalue.h | 189 + .../qscriptvalue/tst_qscriptvalue_generated.cpp | 1450 + .../webkit/JavaScriptCore/qt/tests/tests.pri | 28 + .../webkit/JavaScriptCore/qt/tests/tests.pro | 3 + .../webkit/JavaScriptCore/runtime/ArgList.h | 10 +- .../webkit/JavaScriptCore/runtime/Arguments.cpp | 13 + .../webkit/JavaScriptCore/runtime/Arguments.h | 3 +- .../JavaScriptCore/runtime/ArrayPrototype.cpp | 98 +- .../runtime/BatchedTransitionOptimizer.h | 2 +- .../webkit/JavaScriptCore/runtime/BooleanObject.h | 2 +- .../webkit/JavaScriptCore/runtime/Collector.cpp | 768 +- .../webkit/JavaScriptCore/runtime/Collector.h | 144 +- .../JavaScriptCore/runtime/CollectorHeapIterator.h | 126 +- .../JavaScriptCore/runtime/CommonIdentifiers.cpp | 3 +- .../JavaScriptCore/runtime/CommonIdentifiers.h | 2 +- .../webkit/JavaScriptCore/runtime/Completion.cpp | 2 + .../JavaScriptCore/runtime/DateConstructor.cpp | 23 +- .../JavaScriptCore/runtime/DateConversion.cpp | 59 +- .../webkit/JavaScriptCore/runtime/DateConversion.h | 19 +- .../webkit/JavaScriptCore/runtime/DateInstance.cpp | 42 +- .../webkit/JavaScriptCore/runtime/DateInstance.h | 19 +- .../JavaScriptCore/runtime/DateInstanceCache.h | 11 +- .../JavaScriptCore/runtime/DatePrototype.cpp | 259 +- .../webkit/JavaScriptCore/runtime/DatePrototype.h | 2 +- .../webkit/JavaScriptCore/runtime/Error.cpp | 8 +- .../JavaScriptCore/runtime/ErrorPrototype.cpp | 23 +- .../JavaScriptCore/runtime/ExceptionHelpers.cpp | 76 +- .../JavaScriptCore/runtime/ExceptionHelpers.h | 1 + .../webkit/JavaScriptCore/runtime/Executable.cpp | 12 +- .../JavaScriptCore/runtime/FunctionConstructor.cpp | 22 +- .../JavaScriptCore/runtime/FunctionPrototype.cpp | 9 +- .../JavaScriptCore/runtime/FunctionPrototype.h | 2 +- .../webkit/JavaScriptCore/runtime/GetterSetter.h | 2 +- .../JavaScriptCore/runtime/GlobalEvalFunction.h | 2 +- .../webkit/JavaScriptCore/runtime/Identifier.cpp | 82 +- .../webkit/JavaScriptCore/runtime/Identifier.h | 68 +- .../JavaScriptCore/runtime/InitializeThreading.cpp | 7 +- .../JavaScriptCore/runtime/InternalFunction.cpp | 18 +- .../JavaScriptCore/runtime/InternalFunction.h | 8 +- .../JavaScriptCore/runtime/JSAPIValueWrapper.h | 2 +- .../webkit/JavaScriptCore/runtime/JSActivation.h | 2 +- .../webkit/JavaScriptCore/runtime/JSArray.cpp | 36 +- .../webkit/JavaScriptCore/runtime/JSArray.h | 5 +- .../webkit/JavaScriptCore/runtime/JSByteArray.cpp | 16 +- .../webkit/JavaScriptCore/runtime/JSByteArray.h | 8 +- .../webkit/JavaScriptCore/runtime/JSCell.cpp | 17 +- .../webkit/JavaScriptCore/runtime/JSCell.h | 48 +- .../webkit/JavaScriptCore/runtime/JSFunction.cpp | 13 + .../webkit/JavaScriptCore/runtime/JSFunction.h | 5 +- .../webkit/JavaScriptCore/runtime/JSGlobalData.cpp | 67 +- .../webkit/JavaScriptCore/runtime/JSGlobalData.h | 49 +- .../JavaScriptCore/runtime/JSGlobalObject.cpp | 2 + .../webkit/JavaScriptCore/runtime/JSGlobalObject.h | 20 +- .../runtime/JSGlobalObjectFunctions.cpp | 48 +- .../JavaScriptCore/runtime/JSNotAnObject.cpp | 2 +- .../webkit/JavaScriptCore/runtime/JSNotAnObject.h | 4 +- .../webkit/JavaScriptCore/runtime/JSNumberCell.h | 12 +- .../webkit/JavaScriptCore/runtime/JSONObject.cpp | 23 +- .../webkit/JavaScriptCore/runtime/JSONObject.h | 2 +- .../webkit/JavaScriptCore/runtime/JSObject.cpp | 61 +- .../webkit/JavaScriptCore/runtime/JSObject.h | 34 +- .../runtime/JSPropertyNameIterator.cpp | 23 +- .../runtime/JSPropertyNameIterator.h | 36 +- .../JavaScriptCore/runtime/JSStaticScopeObject.h | 2 +- .../webkit/JavaScriptCore/runtime/JSString.cpp | 93 +- .../webkit/JavaScriptCore/runtime/JSString.h | 324 +- .../JavaScriptCore/runtime/JSStringBuilder.h | 105 + .../webkit/JavaScriptCore/runtime/JSValue.cpp | 2 +- .../webkit/JavaScriptCore/runtime/JSValue.h | 44 +- .../JavaScriptCore/runtime/JSVariableObject.cpp | 16 +- .../JavaScriptCore/runtime/JSVariableObject.h | 6 +- .../JavaScriptCore/runtime/JSWrapperObject.h | 6 +- .../webkit/JavaScriptCore/runtime/JSZombie.cpp | 48 + .../webkit/JavaScriptCore/runtime/JSZombie.h | 78 + .../JavaScriptCore/runtime/LiteralParser.cpp | 24 +- .../webkit/JavaScriptCore/runtime/Lookup.cpp | 2 +- .../webkit/JavaScriptCore/runtime/Lookup.h | 2 +- .../webkit/JavaScriptCore/runtime/MarkStack.h | 2 +- .../JavaScriptCore/runtime/MarkStackNone.cpp | 49 + .../JavaScriptCore/runtime/MarkStackPosix.cpp | 6 +- .../JavaScriptCore/runtime/MarkStackSymbian.cpp | 4 + .../webkit/JavaScriptCore/runtime/MarkStackWin.cpp | 6 +- .../webkit/JavaScriptCore/runtime/MathObject.cpp | 26 +- .../webkit/JavaScriptCore/runtime/MathObject.h | 2 +- .../runtime/NativeErrorConstructor.cpp | 2 +- .../JavaScriptCore/runtime/NumberConstructor.h | 2 +- .../webkit/JavaScriptCore/runtime/NumberObject.h | 2 +- .../JavaScriptCore/runtime/NumberPrototype.cpp | 59 +- .../JavaScriptCore/runtime/ObjectConstructor.cpp | 28 +- .../JavaScriptCore/runtime/ObjectPrototype.cpp | 3 +- .../webkit/JavaScriptCore/runtime/Operations.cpp | 26 +- .../webkit/JavaScriptCore/runtime/Operations.h | 271 +- .../JavaScriptCore/runtime/PropertyDescriptor.cpp | 8 +- .../JavaScriptCore/runtime/PropertyDescriptor.h | 2 +- .../JavaScriptCore/runtime/PropertyMapHashTable.h | 1 - .../JavaScriptCore/runtime/PropertyNameArray.cpp | 2 +- .../webkit/JavaScriptCore/runtime/PropertySlot.cpp | 4 +- .../webkit/JavaScriptCore/runtime/PropertySlot.h | 32 +- .../webkit/JavaScriptCore/runtime/RegExp.cpp | 11 +- .../webkit/JavaScriptCore/runtime/RegExp.h | 2 - .../JavaScriptCore/runtime/RegExpConstructor.cpp | 4 +- .../JavaScriptCore/runtime/RegExpConstructor.h | 2 +- .../JavaScriptCore/runtime/RegExpMatchesArray.h | 4 +- .../webkit/JavaScriptCore/runtime/RegExpObject.cpp | 2 +- .../webkit/JavaScriptCore/runtime/RegExpObject.h | 2 +- .../JavaScriptCore/runtime/RegExpPrototype.cpp | 17 +- .../webkit/JavaScriptCore/runtime/SmallStrings.cpp | 59 +- .../webkit/JavaScriptCore/runtime/SmallStrings.h | 1 + .../webkit/JavaScriptCore/runtime/StringBuilder.h | 83 + .../JavaScriptCore/runtime/StringConstructor.cpp | 12 +- .../webkit/JavaScriptCore/runtime/StringObject.cpp | 12 +- .../webkit/JavaScriptCore/runtime/StringObject.h | 4 +- .../StringObjectThatMasqueradesAsUndefined.h | 2 +- .../JavaScriptCore/runtime/StringPrototype.cpp | 231 +- .../webkit/JavaScriptCore/runtime/Structure.cpp | 350 +- .../webkit/JavaScriptCore/runtime/Structure.h | 119 +- .../runtime/StructureTransitionTable.h | 145 +- .../JavaScriptCore/runtime/TimeoutChecker.cpp | 17 +- .../webkit/JavaScriptCore/runtime/Tracing.h | 2 +- .../webkit/JavaScriptCore/runtime/UString.cpp | 1185 +- .../webkit/JavaScriptCore/runtime/UString.h | 710 +- .../webkit/JavaScriptCore/runtime/UStringImpl.cpp | 172 + .../webkit/JavaScriptCore/runtime/UStringImpl.h | 364 + .../webkit/JavaScriptCore/runtime/WeakGCMap.h | 122 + .../webkit/JavaScriptCore/runtime/WeakGCPtr.h | 132 + .../webkit/JavaScriptCore/runtime/WeakRandom.h | 86 + src/3rdparty/webkit/JavaScriptCore/wrec/WREC.h | 2 +- .../webkit/JavaScriptCore/wrec/WRECGenerator.cpp | 6 +- .../webkit/JavaScriptCore/wrec/WRECGenerator.h | 4 +- src/3rdparty/webkit/JavaScriptCore/wscript | 9 +- .../webkit/JavaScriptCore/wtf/AlwaysInline.h | 6 +- .../webkit/JavaScriptCore/wtf/Assertions.cpp | 10 +- .../webkit/JavaScriptCore/wtf/Assertions.h | 102 +- src/3rdparty/webkit/JavaScriptCore/wtf/Complex.h | 46 + .../webkit/JavaScriptCore/wtf/CurrentTime.cpp | 24 +- .../webkit/JavaScriptCore/wtf/CurrentTime.h | 24 +- .../webkit/JavaScriptCore/wtf/DateMath.cpp | 361 +- src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.h | 65 +- .../webkit/JavaScriptCore/wtf/FastMalloc.cpp | 193 +- .../webkit/JavaScriptCore/wtf/FastMalloc.h | 35 +- src/3rdparty/webkit/JavaScriptCore/wtf/GOwnPtr.cpp | 65 - src/3rdparty/webkit/JavaScriptCore/wtf/GOwnPtr.h | 98 - .../webkit/JavaScriptCore/wtf/HashFunctions.h | 3 - src/3rdparty/webkit/JavaScriptCore/wtf/HashMap.h | 77 +- src/3rdparty/webkit/JavaScriptCore/wtf/HashSet.h | 4 +- src/3rdparty/webkit/JavaScriptCore/wtf/HashTable.h | 39 +- .../webkit/JavaScriptCore/wtf/ListHashSet.h | 2 +- .../webkit/JavaScriptCore/wtf/MainThread.cpp | 24 +- .../webkit/JavaScriptCore/wtf/MainThread.h | 4 + .../webkit/JavaScriptCore/wtf/MathExtras.h | 54 +- .../webkit/JavaScriptCore/wtf/MessageQueue.h | 90 +- .../webkit/JavaScriptCore/wtf/PassRefPtr.h | 25 +- src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h | 824 +- .../webkit/JavaScriptCore/wtf/PtrAndFlags.h | 79 - .../webkit/JavaScriptCore/wtf/RandomNumber.cpp | 30 +- .../webkit/JavaScriptCore/wtf/RandomNumberSeed.h | 10 +- src/3rdparty/webkit/JavaScriptCore/wtf/RefPtr.h | 19 +- .../webkit/JavaScriptCore/wtf/RefPtrHashMap.h | 2 +- .../webkit/JavaScriptCore/wtf/StdLibExtras.h | 12 + .../webkit/JavaScriptCore/wtf/StringExtras.cpp | 62 + .../webkit/JavaScriptCore/wtf/StringExtras.h | 15 +- .../JavaScriptCore/wtf/StringHashFunctions.h | 157 + .../webkit/JavaScriptCore/wtf/TCSpinLock.h | 14 +- .../webkit/JavaScriptCore/wtf/TCSystemAlloc.cpp | 2 +- .../wtf/ThreadIdentifierDataPthreads.cpp | 97 + .../wtf/ThreadIdentifierDataPthreads.h | 77 + .../webkit/JavaScriptCore/wtf/ThreadSpecific.h | 57 +- .../webkit/JavaScriptCore/wtf/Threading.cpp | 9 +- src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h | 27 +- .../webkit/JavaScriptCore/wtf/ThreadingNone.cpp | 6 +- .../JavaScriptCore/wtf/ThreadingPthreads.cpp | 47 +- .../webkit/JavaScriptCore/wtf/ThreadingWin.cpp | 14 +- .../webkit/JavaScriptCore/wtf/TypeTraits.cpp | 16 +- .../webkit/JavaScriptCore/wtf/TypeTraits.h | 36 +- src/3rdparty/webkit/JavaScriptCore/wtf/VMTags.h | 6 +- .../webkit/JavaScriptCore/wtf/ValueCheck.h | 64 + src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h | 33 +- src/3rdparty/webkit/JavaScriptCore/wtf/Vector3.h | 138 + .../webkit/JavaScriptCore/wtf/VectorTraits.h | 2 +- src/3rdparty/webkit/JavaScriptCore/wtf/dtoa.cpp | 103 +- src/3rdparty/webkit/JavaScriptCore/wtf/dtoa.h | 12 +- .../webkit/JavaScriptCore/wtf/qt/ThreadingQt.cpp | 30 +- .../webkit/JavaScriptCore/wtf/unicode/UTF8.cpp | 1 + .../wtf/unicode/glib/UnicodeGLib.cpp | 1 + .../JavaScriptCore/wtf/unicode/glib/UnicodeGLib.h | 7 +- .../JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp | 6 +- .../JavaScriptCore/wtf/unicode/icu/UnicodeIcu.h | 5 + .../JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h | 138 +- .../wtf/unicode/wince/UnicodeWince.cpp | 1 + .../JavaScriptCore/wtf/wince/FastMallocWince.h | 1 - .../JavaScriptCore/wtf/wince/MemoryManager.cpp | 8 +- .../webkit/JavaScriptCore/yarr/RegexCompiler.cpp | 2 +- .../webkit/JavaScriptCore/yarr/RegexJIT.cpp | 18 +- src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.h | 2 +- .../webkit/JavaScriptCore/yarr/RegexPattern.h | 2 +- src/3rdparty/webkit/VERSION | 4 +- src/3rdparty/webkit/WebCore/ChangeLog | 65277 ++---------- src/3rdparty/webkit/WebCore/ChangeLog-2010-01-29 | 98486 +++++++++++++++++++ src/3rdparty/webkit/WebCore/DerivedSources.cpp | 9 +- .../ForwardingHeaders/runtime/StringBuilder.h | 4 + .../ForwardingHeaders/runtime/UStringImpl.h | 4 + .../WebCore/ForwardingHeaders/runtime/WeakGCMap.h | 4 + .../WebCore/ForwardingHeaders/runtime/WeakGCPtr.h | 4 + .../WebCore/ForwardingHeaders/wtf/PtrAndFlags.h | 5 - .../ForwardingHeaders/wtf/StringHashFunctions.h | 4 + .../WebCore/ForwardingHeaders/wtf/ValueCheck.h | 4 + src/3rdparty/webkit/WebCore/Info.plist | 4 +- .../WebCore/WebCore.ClientBasedGeolocation.exp | 2 + src/3rdparty/webkit/WebCore/WebCore.Video.exp | 23 +- src/3rdparty/webkit/WebCore/WebCore.gypi | 419 +- src/3rdparty/webkit/WebCore/WebCore.order | 2 - src/3rdparty/webkit/WebCore/WebCore.pri | 698 + src/3rdparty/webkit/WebCore/WebCore.pro | 1059 +- src/3rdparty/webkit/WebCore/WebCore.qrc | 1 + src/3rdparty/webkit/WebCore/WebCorePrefix.cpp | 3 +- src/3rdparty/webkit/WebCore/WebCorePrefix.h | 20 +- .../webkit/WebCore/accessibility/AXObjectCache.cpp | 157 +- .../webkit/WebCore/accessibility/AXObjectCache.h | 203 +- .../accessibility/AccessibilityARIAGrid.cpp | 4 +- .../WebCore/accessibility/AccessibilityARIAGrid.h | 3 + .../accessibility/AccessibilityARIAGridRow.cpp | 66 + .../accessibility/AccessibilityARIAGridRow.h | 6 + .../accessibility/AccessibilityAllInOne.cpp | 89 +- .../accessibility/AccessibilityImageMapLink.cpp | 26 +- .../accessibility/AccessibilityImageMapLink.h | 16 +- .../WebCore/accessibility/AccessibilityList.cpp | 10 +- .../WebCore/accessibility/AccessibilityList.h | 2 +- .../WebCore/accessibility/AccessibilityListBox.cpp | 6 +- .../WebCore/accessibility/AccessibilityListBox.h | 2 +- .../accessibility/AccessibilityListBoxOption.cpp | 4 +- .../accessibility/AccessibilityListBoxOption.h | 2 +- .../accessibility/AccessibilityMediaControls.cpp | 8 + .../accessibility/AccessibilityMediaControls.h | 98 +- .../accessibility/AccessibilityMenuList.cpp | 86 + .../WebCore/accessibility/AccessibilityMenuList.h | 59 + .../accessibility/AccessibilityMenuListOption.cpp | 113 + .../accessibility/AccessibilityMenuListOption.h | 69 + .../accessibility/AccessibilityMenuListPopup.cpp | 126 + .../accessibility/AccessibilityMenuListPopup.h | 68 + .../WebCore/accessibility/AccessibilityObject.cpp | 210 +- .../WebCore/accessibility/AccessibilityObject.h | 182 +- .../accessibility/AccessibilityRenderObject.cpp | 1015 +- .../accessibility/AccessibilityRenderObject.h | 63 +- .../accessibility/AccessibilityScrollbar.cpp | 53 + .../WebCore/accessibility/AccessibilityScrollbar.h | 64 + .../WebCore/accessibility/AccessibilitySlider.cpp | 22 +- .../WebCore/accessibility/AccessibilitySlider.h | 76 +- .../WebCore/accessibility/AccessibilityTable.cpp | 16 +- .../WebCore/accessibility/AccessibilityTable.h | 1 + .../accessibility/AccessibilityTableColumn.cpp | 4 +- .../AccessibilityTableHeaderContainer.cpp | 5 +- .../accessibility/AccessibilityTableRow.cpp | 2 +- .../accessibility/qt/AccessibilityObjectQt.cpp | 7 +- .../WebCore/bindings/ScriptControllerBase.cpp | 20 +- .../WebCore/bindings/generic/BindingDOMWindow.h | 126 + .../WebCore/bindings/generic/BindingElement.h | 102 + .../WebCore/bindings/generic/BindingSecurity.h | 132 + .../bindings/generic/BindingSecurityBase.cpp | 108 + .../WebCore/bindings/generic/BindingSecurityBase.h | 52 + .../WebCore/bindings/generic/GenericBinding.h | 52 + .../bindings/generic/RuntimeEnabledFeatures.cpp | 98 + .../bindings/generic/RuntimeEnabledFeatures.h | 94 + .../WebCore/bindings/js/DOMObjectWithSVGContext.h | 57 - .../webkit/WebCore/bindings/js/GCController.cpp | 12 +- .../WebCore/bindings/js/JSAbstractWorkerCustom.cpp | 4 +- .../webkit/WebCore/bindings/js/JSAttrCustom.cpp | 6 +- .../WebCore/bindings/js/JSAudioConstructor.cpp | 35 +- .../WebCore/bindings/js/JSBindingsAllInOne.cpp | 9 +- .../webkit/WebCore/bindings/js/JSCSSRuleCustom.cpp | 2 +- .../WebCore/bindings/js/JSCSSValueCustom.cpp | 2 +- .../webkit/WebCore/bindings/js/JSCallbackData.cpp | 11 +- .../webkit/WebCore/bindings/js/JSCallbackData.h | 2 - .../bindings/js/JSCanvasArrayBufferConstructor.cpp | 70 - .../bindings/js/JSCanvasArrayBufferConstructor.h | 97 - .../WebCore/bindings/js/JSCanvasArrayCustom.cpp | 67 - .../bindings/js/JSCanvasByteArrayConstructor.cpp | 67 - .../bindings/js/JSCanvasByteArrayConstructor.h | 46 - .../bindings/js/JSCanvasByteArrayCustom.cpp | 50 - .../bindings/js/JSCanvasFloatArrayConstructor.cpp | 67 - .../bindings/js/JSCanvasFloatArrayConstructor.h | 46 - .../bindings/js/JSCanvasFloatArrayCustom.cpp | 50 - .../bindings/js/JSCanvasIntArrayConstructor.cpp | 67 - .../bindings/js/JSCanvasIntArrayConstructor.h | 46 - .../WebCore/bindings/js/JSCanvasIntArrayCustom.cpp | 50 - .../js/JSCanvasRenderingContext2DCustom.cpp | 16 +- .../js/JSCanvasRenderingContext3DCustom.cpp | 443 - .../bindings/js/JSCanvasRenderingContextCustom.cpp | 6 +- .../bindings/js/JSCanvasShortArrayConstructor.cpp | 68 - .../bindings/js/JSCanvasShortArrayConstructor.h | 46 - .../bindings/js/JSCanvasShortArrayCustom.cpp | 50 - .../js/JSCanvasUnsignedByteArrayConstructor.cpp | 67 - .../js/JSCanvasUnsignedByteArrayConstructor.h | 46 - .../js/JSCanvasUnsignedByteArrayCustom.cpp | 50 - .../js/JSCanvasUnsignedIntArrayConstructor.cpp | 67 - .../js/JSCanvasUnsignedIntArrayConstructor.h | 46 - .../bindings/js/JSCanvasUnsignedIntArrayCustom.cpp | 50 - .../js/JSCanvasUnsignedShortArrayConstructor.cpp | 67 - .../js/JSCanvasUnsignedShortArrayConstructor.h | 46 - .../js/JSCanvasUnsignedShortArrayCustom.cpp | 50 - .../webkit/WebCore/bindings/js/JSConsoleCustom.cpp | 6 +- .../js/JSCustomSQLStatementErrorCallback.cpp | 2 +- .../bindings/js/JSCustomXPathNSResolver.cpp | 2 +- .../bindings/js/JSDOMApplicationCacheCustom.cpp | 4 +- .../webkit/WebCore/bindings/js/JSDOMBinding.cpp | 342 +- .../webkit/WebCore/bindings/js/JSDOMBinding.h | 163 +- .../WebCore/bindings/js/JSDOMGlobalObject.cpp | 21 +- .../webkit/WebCore/bindings/js/JSDOMGlobalObject.h | 24 +- .../webkit/WebCore/bindings/js/JSDOMWindowBase.cpp | 17 +- .../webkit/WebCore/bindings/js/JSDOMWindowBase.h | 11 +- .../WebCore/bindings/js/JSDOMWindowCustom.cpp | 202 +- .../WebCore/bindings/js/JSDOMWindowShell.cpp | 16 +- .../webkit/WebCore/bindings/js/JSDOMWindowShell.h | 12 +- .../WebCore/bindings/js/JSDocumentCustom.cpp | 16 +- .../webkit/WebCore/bindings/js/JSElementCustom.cpp | 2 +- .../webkit/WebCore/bindings/js/JSEventCustom.cpp | 19 +- .../webkit/WebCore/bindings/js/JSEventListener.cpp | 23 +- .../webkit/WebCore/bindings/js/JSEventListener.h | 53 +- .../WebCore/bindings/js/JSEventSourceCustom.cpp | 4 +- .../webkit/WebCore/bindings/js/JSExceptionBase.cpp | 128 +- .../webkit/WebCore/bindings/js/JSExceptionBase.h | 86 +- .../bindings/js/JSHTMLCanvasElementCustom.cpp | 36 +- .../WebCore/bindings/js/JSHTMLCollectionCustom.cpp | 2 +- .../WebCore/bindings/js/JSHTMLDocumentCustom.cpp | 2 +- .../bindings/js/JSHTMLFormElementCustom.cpp | 2 +- .../webkit/WebCore/bindings/js/JSHistoryCustom.cpp | 73 +- .../WebCore/bindings/js/JSImageConstructor.cpp | 40 +- .../WebCore/bindings/js/JSImageDataCustom.cpp | 2 +- .../bindings/js/JSInjectedScriptHostCustom.cpp | 237 + .../bindings/js/JSInspectedObjectWrapper.cpp | 131 - .../WebCore/bindings/js/JSInspectedObjectWrapper.h | 59 - .../bindings/js/JSInspectorBackendCustom.cpp | 346 - .../bindings/js/JSInspectorCallbackWrapper.cpp | 111 - .../bindings/js/JSInspectorCallbackWrapper.h | 53 - .../bindings/js/JSInspectorFrontendHostCustom.cpp | 80 + .../bindings/js/JSJavaScriptCallFrameCustom.cpp | 4 +- .../WebCore/bindings/js/JSLazyEventListener.cpp | 75 +- .../WebCore/bindings/js/JSLazyEventListener.h | 11 +- .../WebCore/bindings/js/JSLocationCustom.cpp | 29 +- .../WebCore/bindings/js/JSMessagePortCustom.cpp | 6 +- .../WebCore/bindings/js/JSNamedNodeMapCustom.cpp | 6 +- .../webkit/WebCore/bindings/js/JSNodeCustom.cpp | 41 +- .../WebCore/bindings/js/JSNodeFilterCondition.cpp | 2 +- .../WebCore/bindings/js/JSOptionConstructor.cpp | 23 +- .../bindings/js/JSPluginElementFunctions.cpp | 2 +- .../WebCore/bindings/js/JSPopStateEventCustom.cpp | 48 + .../bindings/js/JSQuarantinedObjectWrapper.cpp | 336 - .../bindings/js/JSQuarantinedObjectWrapper.h | 106 - .../webkit/WebCore/bindings/js/JSSVGContextCache.h | 97 + .../bindings/js/JSSVGElementInstanceCustom.cpp | 8 +- .../WebCore/bindings/js/JSSVGLengthCustom.cpp | 16 +- .../WebCore/bindings/js/JSSVGMatrixCustom.cpp | 32 +- .../WebCore/bindings/js/JSSVGPODListCustom.h | 199 + .../WebCore/bindings/js/JSSVGPODTypeWrapper.h | 108 +- .../WebCore/bindings/js/JSSVGPathSegCustom.cpp | 11 +- .../WebCore/bindings/js/JSSVGPathSegListCustom.cpp | 53 +- .../WebCore/bindings/js/JSSVGPointListCustom.cpp | 153 - .../bindings/js/JSSVGTransformListCustom.cpp | 153 - .../webkit/WebCore/bindings/js/JSStorageCustom.cpp | 4 +- .../WebCore/bindings/js/JSStyleSheetCustom.cpp | 8 +- .../bindings/js/JSWebGLArrayBufferConstructor.cpp | 70 + .../bindings/js/JSWebGLArrayBufferConstructor.h | 97 + .../WebCore/bindings/js/JSWebGLArrayCustom.cpp | 72 + .../WebCore/bindings/js/JSWebGLArrayHelper.h | 69 + .../bindings/js/JSWebGLByteArrayConstructor.cpp | 67 + .../bindings/js/JSWebGLByteArrayConstructor.h | 46 + .../WebCore/bindings/js/JSWebGLByteArrayCustom.cpp | 80 + .../bindings/js/JSWebGLFloatArrayConstructor.cpp | 67 + .../bindings/js/JSWebGLFloatArrayConstructor.h | 46 + .../bindings/js/JSWebGLFloatArrayCustom.cpp | 78 + .../bindings/js/JSWebGLIntArrayConstructor.cpp | 67 + .../bindings/js/JSWebGLIntArrayConstructor.h | 46 + .../WebCore/bindings/js/JSWebGLIntArrayCustom.cpp | 78 + .../bindings/js/JSWebGLRenderingContextCustom.cpp | 835 + .../bindings/js/JSWebGLShortArrayConstructor.cpp | 68 + .../bindings/js/JSWebGLShortArrayConstructor.h | 46 + .../bindings/js/JSWebGLShortArrayCustom.cpp | 78 + .../js/JSWebGLUnsignedByteArrayConstructor.cpp | 67 + .../js/JSWebGLUnsignedByteArrayConstructor.h | 46 + .../bindings/js/JSWebGLUnsignedByteArrayCustom.cpp | 78 + .../js/JSWebGLUnsignedIntArrayConstructor.cpp | 67 + .../js/JSWebGLUnsignedIntArrayConstructor.h | 46 + .../bindings/js/JSWebGLUnsignedIntArrayCustom.cpp | 78 + .../js/JSWebGLUnsignedShortArrayConstructor.cpp | 67 + .../js/JSWebGLUnsignedShortArrayConstructor.h | 46 + .../js/JSWebGLUnsignedShortArrayCustom.cpp | 78 + .../WebCore/bindings/js/JSWebSocketConstructor.h | 8 +- .../WebCore/bindings/js/JSWebSocketCustom.cpp | 5 +- .../WebCore/bindings/js/JSWorkerContextBase.cpp | 4 +- .../WebCore/bindings/js/JSWorkerContextCustom.cpp | 27 +- .../WebCore/bindings/js/JSXMLHttpRequestCustom.cpp | 14 +- .../bindings/js/JSXMLHttpRequestUploadCustom.cpp | 6 +- .../WebCore/bindings/js/JavaScriptProfile.cpp | 183 + .../webkit/WebCore/bindings/js/JavaScriptProfile.h | 46 + .../WebCore/bindings/js/JavaScriptProfileNode.cpp | 236 + .../WebCore/bindings/js/JavaScriptProfileNode.h | 48 + .../webkit/WebCore/bindings/js/ScheduledAction.cpp | 8 +- .../webkit/WebCore/bindings/js/ScheduledAction.h | 7 +- .../webkit/WebCore/bindings/js/ScriptArray.cpp | 4 + .../WebCore/bindings/js/ScriptCachedFrameData.cpp | 51 +- .../WebCore/bindings/js/ScriptCachedFrameData.h | 8 +- .../webkit/WebCore/bindings/js/ScriptCallStack.cpp | 9 +- .../webkit/WebCore/bindings/js/ScriptCallStack.h | 1 + .../WebCore/bindings/js/ScriptController.cpp | 172 +- .../webkit/WebCore/bindings/js/ScriptController.h | 26 +- .../WebCore/bindings/js/ScriptControllerGtk.cpp | 2 +- .../WebCore/bindings/js/ScriptControllerHaiku.cpp | 2 +- .../WebCore/bindings/js/ScriptControllerMac.mm | 11 +- .../WebCore/bindings/js/ScriptControllerQt.cpp | 2 +- .../WebCore/bindings/js/ScriptControllerWin.cpp | 2 +- .../WebCore/bindings/js/ScriptControllerWx.cpp | 2 +- .../WebCore/bindings/js/ScriptDebugServer.cpp | 49 + .../webkit/WebCore/bindings/js/ScriptDebugServer.h | 46 + .../WebCore/bindings/js/ScriptEventListener.cpp | 31 +- .../WebCore/bindings/js/ScriptFunctionCall.cpp | 33 +- .../WebCore/bindings/js/ScriptFunctionCall.h | 11 +- .../webkit/WebCore/bindings/js/ScriptInstance.h | 2 +- .../webkit/WebCore/bindings/js/ScriptObject.cpp | 43 +- .../webkit/WebCore/bindings/js/ScriptObject.h | 7 + .../WebCore/bindings/js/ScriptObjectQuarantine.cpp | 131 - .../WebCore/bindings/js/ScriptObjectQuarantine.h | 58 - .../webkit/WebCore/bindings/js/ScriptProfile.h | 41 + .../webkit/WebCore/bindings/js/ScriptProfiler.cpp | 49 + .../webkit/WebCore/bindings/js/ScriptProfiler.h | 48 + .../webkit/WebCore/bindings/js/ScriptState.cpp | 16 +- .../webkit/WebCore/bindings/js/ScriptState.h | 7 +- .../webkit/WebCore/bindings/js/ScriptString.h | 6 +- .../webkit/WebCore/bindings/js/ScriptValue.cpp | 16 +- .../webkit/WebCore/bindings/js/ScriptValue.h | 7 +- .../webkit/WebCore/bindings/js/ScriptWrappable.h | 43 + .../WebCore/bindings/js/SerializedScriptValue.cpp | 192 +- .../WebCore/bindings/js/SerializedScriptValue.h | 48 +- .../WebCore/bindings/js/WorkerScriptController.cpp | 5 +- .../WebCore/bindings/scripts/CodeGenerator.pm | 28 +- .../WebCore/bindings/scripts/CodeGeneratorCOM.pm | 1319 - .../WebCore/bindings/scripts/CodeGeneratorJS.pm | 293 +- .../WebCore/bindings/scripts/CodeGeneratorObjC.pm | 16 +- .../WebCore/bindings/scripts/CodeGeneratorV8.pm | 1425 +- .../webkit/WebCore/bindings/scripts/IDLParser.pm | 7 +- .../WebCore/bindings/scripts/IDLStructure.pm | 2 - .../WebCore/bindings/scripts/generate-bindings.pl | 1 - src/3rdparty/webkit/WebCore/bridge/Bridge.h | 48 + src/3rdparty/webkit/WebCore/bridge/IdentifierRep.h | 3 +- src/3rdparty/webkit/WebCore/bridge/NP_jsobject.cpp | 87 +- src/3rdparty/webkit/WebCore/bridge/c/c_class.h | 2 +- .../webkit/WebCore/bridge/c/c_instance.cpp | 6 +- src/3rdparty/webkit/WebCore/bridge/c/c_instance.h | 6 +- src/3rdparty/webkit/WebCore/bridge/c/c_runtime.cpp | 2 + src/3rdparty/webkit/WebCore/bridge/c/c_runtime.h | 2 +- .../webkit/WebCore/bridge/jni/JNIBridge.cpp | 181 + src/3rdparty/webkit/WebCore/bridge/jni/JNIBridge.h | 123 + .../webkit/WebCore/bridge/jni/JNIUtility.cpp | 343 + .../webkit/WebCore/bridge/jni/JNIUtility.h | 275 + .../webkit/WebCore/bridge/jni/jni_class.cpp | 141 - src/3rdparty/webkit/WebCore/bridge/jni/jni_class.h | 62 - .../webkit/WebCore/bridge/jni/jni_instance.cpp | 330 - .../webkit/WebCore/bridge/jni/jni_instance.h | 108 - .../webkit/WebCore/bridge/jni/jni_jsobject.mm | 104 +- src/3rdparty/webkit/WebCore/bridge/jni/jni_objc.mm | 3 +- .../webkit/WebCore/bridge/jni/jni_runtime.cpp | 547 - .../webkit/WebCore/bridge/jni/jni_runtime.h | 191 - .../webkit/WebCore/bridge/jni/jni_utility.cpp | 584 - .../webkit/WebCore/bridge/jni/jni_utility.h | 288 - .../webkit/WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp | 442 + .../webkit/WebCore/bridge/jni/jsc/JNIBridgeJSC.h | 89 + .../WebCore/bridge/jni/jsc/JNIUtilityPrivate.cpp | 291 + .../WebCore/bridge/jni/jsc/JNIUtilityPrivate.h | 51 + .../webkit/WebCore/bridge/jni/jsc/JavaClassJSC.cpp | 150 + .../webkit/WebCore/bridge/jni/jsc/JavaClassJSC.h | 62 + .../WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp | 335 + .../WebCore/bridge/jni/jsc/JavaInstanceJSC.h | 108 + .../webkit/WebCore/bridge/jni/jsc/JavaStringJSC.h | 84 + .../webkit/WebCore/bridge/jni/v8/JNIBridgeV8.cpp | 44 + .../webkit/WebCore/bridge/jni/v8/JNIBridgeV8.h | 56 + .../WebCore/bridge/jni/v8/JNIUtilityPrivate.cpp | 255 + .../WebCore/bridge/jni/v8/JNIUtilityPrivate.h | 43 + .../webkit/WebCore/bridge/jni/v8/JavaClassV8.cpp | 111 + .../webkit/WebCore/bridge/jni/v8/JavaClassV8.h | 61 + .../WebCore/bridge/jni/v8/JavaInstanceV8.cpp | 169 + .../webkit/WebCore/bridge/jni/v8/JavaInstanceV8.h | 100 + .../WebCore/bridge/jni/v8/JavaNPObjectV8.cpp | 168 + .../webkit/WebCore/bridge/jni/v8/JavaNPObjectV8.h | 56 + .../webkit/WebCore/bridge/jni/v8/JavaStringV8.h | 61 + .../webkit/WebCore/bridge/jsc/BridgeJSC.cpp | 126 + src/3rdparty/webkit/WebCore/bridge/jsc/BridgeJSC.h | 151 + src/3rdparty/webkit/WebCore/bridge/qt/qt_class.h | 3 +- .../webkit/WebCore/bridge/qt/qt_instance.cpp | 8 + .../webkit/WebCore/bridge/qt/qt_instance.h | 6 +- .../webkit/WebCore/bridge/qt/qt_pixmapruntime.cpp | 353 + .../webkit/WebCore/bridge/qt/qt_pixmapruntime.h | 52 + .../webkit/WebCore/bridge/qt/qt_runtime.cpp | 114 +- src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.h | 10 +- src/3rdparty/webkit/WebCore/bridge/runtime.cpp | 121 - src/3rdparty/webkit/WebCore/bridge/runtime.h | 153 - .../webkit/WebCore/bridge/runtime_array.cpp | 13 + src/3rdparty/webkit/WebCore/bridge/runtime_array.h | 7 +- .../webkit/WebCore/bridge/runtime_method.h | 4 +- .../webkit/WebCore/bridge/runtime_object.cpp | 7 +- .../webkit/WebCore/bridge/runtime_object.h | 7 +- .../webkit/WebCore/bridge/runtime_root.cpp | 14 +- src/3rdparty/webkit/WebCore/bridge/runtime_root.h | 11 +- .../webkit/WebCore/bridge/testbindings.cpp | 14 +- src/3rdparty/webkit/WebCore/bridge/testbindings.mm | 14 +- .../webkit/WebCore/bridge/testqtbindings.cpp | 17 +- src/3rdparty/webkit/WebCore/config.h | 43 +- src/3rdparty/webkit/WebCore/css/CSSCharsetRule.idl | 6 +- .../WebCore/css/CSSComputedStyleDeclaration.cpp | 16 +- .../webkit/WebCore/css/CSSCursorImageValue.cpp | 1 - src/3rdparty/webkit/WebCore/css/CSSFontFace.cpp | 22 +- src/3rdparty/webkit/WebCore/css/CSSFontFace.h | 2 + .../webkit/WebCore/css/CSSFontFaceRule.idl | 6 +- .../webkit/WebCore/css/CSSFontFaceSource.cpp | 8 +- .../webkit/WebCore/css/CSSFontSelector.cpp | 3 +- .../webkit/WebCore/css/CSSGradientValue.cpp | 2 - src/3rdparty/webkit/WebCore/css/CSSGrammar.y | 119 +- src/3rdparty/webkit/WebCore/css/CSSImageValue.cpp | 1 - src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp | 38 +- src/3rdparty/webkit/WebCore/css/CSSImportRule.h | 2 +- src/3rdparty/webkit/WebCore/css/CSSImportRule.idl | 6 +- .../webkit/WebCore/css/CSSInheritedValue.cpp | 2 - .../webkit/WebCore/css/CSSInitialValue.cpp | 2 - src/3rdparty/webkit/WebCore/css/CSSMediaRule.cpp | 2 - src/3rdparty/webkit/WebCore/css/CSSMediaRule.idl | 6 +- .../WebCore/css/CSSMutableStyleDeclaration.cpp | 37 +- src/3rdparty/webkit/WebCore/css/CSSNamespace.h | 4 +- src/3rdparty/webkit/WebCore/css/CSSPageRule.idl | 6 +- src/3rdparty/webkit/WebCore/css/CSSParser.cpp | 371 +- src/3rdparty/webkit/WebCore/css/CSSParser.h | 14 +- .../webkit/WebCore/css/CSSPrimitiveValue.cpp | 105 +- .../webkit/WebCore/css/CSSPrimitiveValue.idl | 9 +- .../webkit/WebCore/css/CSSPrimitiveValueMappings.h | 334 +- src/3rdparty/webkit/WebCore/css/CSSProperty.cpp | 2 - src/3rdparty/webkit/WebCore/css/CSSProperty.h | 2 - .../webkit/WebCore/css/CSSPropertyNames.in | 1 + src/3rdparty/webkit/WebCore/css/CSSRule.cpp | 1 - src/3rdparty/webkit/WebCore/css/CSSRule.idl | 5 +- src/3rdparty/webkit/WebCore/css/CSSRuleList.cpp | 2 - src/3rdparty/webkit/WebCore/css/CSSRuleList.h | 2 - src/3rdparty/webkit/WebCore/css/CSSRuleList.idl | 5 +- src/3rdparty/webkit/WebCore/css/CSSSelector.cpp | 16 +- src/3rdparty/webkit/WebCore/css/CSSSelector.h | 9 +- .../webkit/WebCore/css/CSSStyleDeclaration.idl | 7 +- src/3rdparty/webkit/WebCore/css/CSSStyleRule.idl | 6 +- .../webkit/WebCore/css/CSSStyleSelector.cpp | 175 +- src/3rdparty/webkit/WebCore/css/CSSStyleSelector.h | 16 +- src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp | 36 +- src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h | 35 +- src/3rdparty/webkit/WebCore/css/CSSStyleSheet.idl | 6 +- src/3rdparty/webkit/WebCore/css/CSSUnknownRule.idl | 3 +- src/3rdparty/webkit/WebCore/css/CSSValue.idl | 5 +- .../webkit/WebCore/css/CSSValueKeywords.in | 63 + src/3rdparty/webkit/WebCore/css/CSSValueList.cpp | 2 - src/3rdparty/webkit/WebCore/css/CSSValueList.idl | 5 +- .../webkit/WebCore/css/CSSVariablesDeclaration.idl | 1 - .../webkit/WebCore/css/CSSVariablesRule.idl | 4 +- src/3rdparty/webkit/WebCore/css/Counter.idl | 6 +- src/3rdparty/webkit/WebCore/css/FontValue.cpp | 2 - src/3rdparty/webkit/WebCore/css/Media.cpp | 23 +- src/3rdparty/webkit/WebCore/css/Media.h | 12 +- src/3rdparty/webkit/WebCore/css/Media.idl | 4 +- .../webkit/WebCore/css/MediaFeatureNames.cpp | 2 - .../webkit/WebCore/css/MediaFeatureNames.h | 2 - src/3rdparty/webkit/WebCore/css/MediaList.idl | 5 +- src/3rdparty/webkit/WebCore/css/MediaQuery.h | 2 +- .../webkit/WebCore/css/MediaQueryEvaluator.h | 2 +- src/3rdparty/webkit/WebCore/css/MediaQueryExp.h | 2 +- src/3rdparty/webkit/WebCore/css/Pair.h | 2 - src/3rdparty/webkit/WebCore/css/RGBColor.idl | 6 +- src/3rdparty/webkit/WebCore/css/Rect.idl | 6 +- .../WebCore/css/SVGCSSComputedStyleDeclaration.cpp | 2 +- src/3rdparty/webkit/WebCore/css/SVGCSSParser.cpp | 2 +- .../webkit/WebCore/css/SVGCSSPropertyNames.in | 2 +- .../webkit/WebCore/css/SVGCSSStyleSelector.cpp | 17 +- .../webkit/WebCore/css/SVGCSSValueKeywords.in | 2 +- src/3rdparty/webkit/WebCore/css/ShadowValue.cpp | 2 - src/3rdparty/webkit/WebCore/css/StyleBase.cpp | 6 +- src/3rdparty/webkit/WebCore/css/StyleSheet.cpp | 18 +- src/3rdparty/webkit/WebCore/css/StyleSheet.h | 20 +- src/3rdparty/webkit/WebCore/css/StyleSheet.idl | 5 +- src/3rdparty/webkit/WebCore/css/StyleSheetList.cpp | 2 - src/3rdparty/webkit/WebCore/css/StyleSheetList.idl | 5 +- .../webkit/WebCore/css/WebKitCSSKeyframeRule.idl | 6 +- .../webkit/WebCore/css/WebKitCSSKeyframesRule.cpp | 10 +- .../webkit/WebCore/css/WebKitCSSKeyframesRule.h | 2 +- .../webkit/WebCore/css/WebKitCSSKeyframesRule.idl | 5 +- .../webkit/WebCore/css/WebKitCSSMatrix.idl | 2 +- .../webkit/WebCore/css/WebKitCSSTransformValue.idl | 3 - src/3rdparty/webkit/WebCore/css/html.css | 30 +- src/3rdparty/webkit/WebCore/css/maketokenizer | 2 - src/3rdparty/webkit/WebCore/css/mathml.css | 100 +- src/3rdparty/webkit/WebCore/css/mediaControls.css | 7 + .../webkit/WebCore/css/mediaControlsGtk.css | 65 + .../webkit/WebCore/css/mediaControlsQuickTime.css | 12 +- src/3rdparty/webkit/WebCore/css/svg.css | 17 +- src/3rdparty/webkit/WebCore/css/view-source.css | 2 +- src/3rdparty/webkit/WebCore/dom/Attr.cpp | 16 +- src/3rdparty/webkit/WebCore/dom/Attr.h | 2 + src/3rdparty/webkit/WebCore/dom/Attr.idl | 13 +- .../webkit/WebCore/dom/BeforeLoadEvent.idl | 4 +- .../webkit/WebCore/dom/BeforeUnloadEvent.cpp | 2 - .../webkit/WebCore/dom/BeforeUnloadEvent.h | 2 - src/3rdparty/webkit/WebCore/dom/CDATASection.idl | 6 +- .../WebCore/dom/CSSMappedAttributeDeclaration.cpp | 2 - src/3rdparty/webkit/WebCore/dom/CharacterData.idl | 6 +- .../webkit/WebCore/dom/CheckedRadioButtons.cpp | 4 + src/3rdparty/webkit/WebCore/dom/ClassNames.cpp | 92 - src/3rdparty/webkit/WebCore/dom/ClassNames.h | 89 - src/3rdparty/webkit/WebCore/dom/ClassNodeList.h | 4 +- src/3rdparty/webkit/WebCore/dom/ClientRect.idl | 4 +- src/3rdparty/webkit/WebCore/dom/ClientRectList.idl | 1 - src/3rdparty/webkit/WebCore/dom/Clipboard.cpp | 43 +- src/3rdparty/webkit/WebCore/dom/Clipboard.h | 5 +- src/3rdparty/webkit/WebCore/dom/Clipboard.idl | 4 +- src/3rdparty/webkit/WebCore/dom/Comment.idl | 6 +- .../webkit/WebCore/dom/CompositionEvent.cpp | 63 + src/3rdparty/webkit/WebCore/dom/CompositionEvent.h | 61 + .../webkit/WebCore/dom/CompositionEvent.idl | 41 + src/3rdparty/webkit/WebCore/dom/ContainerNode.cpp | 15 + .../webkit/WebCore/dom/DOMCoreException.idl | 4 +- .../webkit/WebCore/dom/DOMImplementation.cpp | 3 +- .../webkit/WebCore/dom/DOMImplementation.idl | 8 +- src/3rdparty/webkit/WebCore/dom/Document.cpp | 543 +- src/3rdparty/webkit/WebCore/dom/Document.h | 142 +- src/3rdparty/webkit/WebCore/dom/Document.idl | 30 +- .../webkit/WebCore/dom/DocumentFragment.idl | 6 +- src/3rdparty/webkit/WebCore/dom/DocumentType.idl | 5 +- .../webkit/WebCore/dom/DynamicNodeList.cpp | 4 +- src/3rdparty/webkit/WebCore/dom/Element.cpp | 192 +- src/3rdparty/webkit/WebCore/dom/Element.h | 59 +- src/3rdparty/webkit/WebCore/dom/Element.idl | 15 +- src/3rdparty/webkit/WebCore/dom/ElementRareData.h | 4 + src/3rdparty/webkit/WebCore/dom/Entity.idl | 6 +- .../webkit/WebCore/dom/EntityReference.idl | 6 +- src/3rdparty/webkit/WebCore/dom/ErrorEvent.idl | 1 - src/3rdparty/webkit/WebCore/dom/Event.cpp | 43 +- src/3rdparty/webkit/WebCore/dom/Event.h | 6 + src/3rdparty/webkit/WebCore/dom/Event.idl | 8 +- src/3rdparty/webkit/WebCore/dom/EventException.idl | 1 - src/3rdparty/webkit/WebCore/dom/EventListener.h | 2 +- src/3rdparty/webkit/WebCore/dom/EventListener.idl | 2 +- src/3rdparty/webkit/WebCore/dom/EventNames.cpp | 2 - src/3rdparty/webkit/WebCore/dom/EventNames.h | 21 +- src/3rdparty/webkit/WebCore/dom/EventTarget.cpp | 35 +- src/3rdparty/webkit/WebCore/dom/EventTarget.h | 24 +- src/3rdparty/webkit/WebCore/dom/EventTarget.idl | 2 +- src/3rdparty/webkit/WebCore/dom/InputElement.cpp | 1 + src/3rdparty/webkit/WebCore/dom/InputElement.h | 8 +- src/3rdparty/webkit/WebCore/dom/KeyboardEvent.cpp | 1 - src/3rdparty/webkit/WebCore/dom/KeyboardEvent.h | 4 +- src/3rdparty/webkit/WebCore/dom/KeyboardEvent.idl | 4 +- .../webkit/WebCore/dom/MappedAttributeEntry.h | 6 +- src/3rdparty/webkit/WebCore/dom/MessageChannel.idl | 2 +- src/3rdparty/webkit/WebCore/dom/MessageEvent.idl | 3 +- src/3rdparty/webkit/WebCore/dom/MessagePort.cpp | 4 +- src/3rdparty/webkit/WebCore/dom/MessagePort.h | 6 +- src/3rdparty/webkit/WebCore/dom/MessagePort.idl | 1 - .../webkit/WebCore/dom/MessagePortChannel.h | 4 +- src/3rdparty/webkit/WebCore/dom/MouseEvent.idl | 4 +- .../webkit/WebCore/dom/MouseRelatedEvent.cpp | 2 +- .../webkit/WebCore/dom/MouseRelatedEvent.h | 2 - src/3rdparty/webkit/WebCore/dom/MutationEvent.idl | 4 +- src/3rdparty/webkit/WebCore/dom/NamedAttrMap.cpp | 39 +- src/3rdparty/webkit/WebCore/dom/NamedAttrMap.h | 33 + .../webkit/WebCore/dom/NamedMappedAttrMap.h | 6 +- src/3rdparty/webkit/WebCore/dom/NamedNodeMap.idl | 5 +- src/3rdparty/webkit/WebCore/dom/Node.cpp | 319 +- src/3rdparty/webkit/WebCore/dom/Node.h | 27 +- src/3rdparty/webkit/WebCore/dom/Node.idl | 7 +- src/3rdparty/webkit/WebCore/dom/NodeFilter.h | 5 +- src/3rdparty/webkit/WebCore/dom/NodeFilter.idl | 2 +- src/3rdparty/webkit/WebCore/dom/NodeIterator.h | 7 +- src/3rdparty/webkit/WebCore/dom/NodeIterator.idl | 3 +- src/3rdparty/webkit/WebCore/dom/NodeList.idl | 5 +- src/3rdparty/webkit/WebCore/dom/NodeRareData.h | 4 +- src/3rdparty/webkit/WebCore/dom/Notation.idl | 6 +- src/3rdparty/webkit/WebCore/dom/OverflowEvent.idl | 4 +- .../webkit/WebCore/dom/PageTransitionEvent.idl | 4 +- src/3rdparty/webkit/WebCore/dom/PopStateEvent.cpp | 50 + src/3rdparty/webkit/WebCore/dom/PopStateEvent.h | 57 + src/3rdparty/webkit/WebCore/dom/PopStateEvent.idl | 38 + src/3rdparty/webkit/WebCore/dom/Position.cpp | 102 +- src/3rdparty/webkit/WebCore/dom/Position.h | 12 +- .../webkit/WebCore/dom/PositionIterator.cpp | 12 +- .../webkit/WebCore/dom/ProcessingInstruction.cpp | 17 +- .../webkit/WebCore/dom/ProcessingInstruction.h | 4 +- .../webkit/WebCore/dom/ProcessingInstruction.idl | 9 +- src/3rdparty/webkit/WebCore/dom/ProgressEvent.idl | 4 +- src/3rdparty/webkit/WebCore/dom/QualifiedName.cpp | 12 +- src/3rdparty/webkit/WebCore/dom/QualifiedName.h | 6 +- src/3rdparty/webkit/WebCore/dom/Range.cpp | 44 +- src/3rdparty/webkit/WebCore/dom/Range.h | 8 + src/3rdparty/webkit/WebCore/dom/Range.idl | 2 +- src/3rdparty/webkit/WebCore/dom/RangeException.h | 2 - src/3rdparty/webkit/WebCore/dom/RangeException.idl | 4 +- src/3rdparty/webkit/WebCore/dom/ScriptElement.cpp | 16 +- .../webkit/WebCore/dom/ScriptExecutionContext.cpp | 72 +- .../webkit/WebCore/dom/ScriptExecutionContext.h | 33 +- src/3rdparty/webkit/WebCore/dom/SelectElement.cpp | 35 +- src/3rdparty/webkit/WebCore/dom/SelectElement.h | 2 +- .../webkit/WebCore/dom/SelectorNodeList.cpp | 1 - .../webkit/WebCore/dom/SpaceSplitString.cpp | 92 + src/3rdparty/webkit/WebCore/dom/SpaceSplitString.h | 89 + src/3rdparty/webkit/WebCore/dom/StyleElement.cpp | 2 +- src/3rdparty/webkit/WebCore/dom/StyleElement.h | 2 - src/3rdparty/webkit/WebCore/dom/StyledElement.cpp | 4 +- src/3rdparty/webkit/WebCore/dom/StyledElement.h | 2 +- src/3rdparty/webkit/WebCore/dom/Text.idl | 6 +- src/3rdparty/webkit/WebCore/dom/TextEvent.idl | 4 +- src/3rdparty/webkit/WebCore/dom/Tokenizer.h | 4 +- src/3rdparty/webkit/WebCore/dom/Touch.cpp | 72 + src/3rdparty/webkit/WebCore/dom/Touch.h | 75 + src/3rdparty/webkit/WebCore/dom/Touch.idl | 40 + src/3rdparty/webkit/WebCore/dom/TouchEvent.cpp | 67 + src/3rdparty/webkit/WebCore/dom/TouchEvent.h | 82 + src/3rdparty/webkit/WebCore/dom/TouchEvent.idl | 53 + src/3rdparty/webkit/WebCore/dom/TouchList.cpp | 43 + src/3rdparty/webkit/WebCore/dom/TouchList.h | 60 + src/3rdparty/webkit/WebCore/dom/TouchList.idl | 36 + .../webkit/WebCore/dom/TransformSourceLibxslt.cpp | 4 + src/3rdparty/webkit/WebCore/dom/TreeWalker.h | 17 +- src/3rdparty/webkit/WebCore/dom/TreeWalker.idl | 3 +- src/3rdparty/webkit/WebCore/dom/UIEvent.idl | 4 +- .../webkit/WebCore/dom/WebKitAnimationEvent.idl | 4 +- .../webkit/WebCore/dom/WebKitTransitionEvent.idl | 4 +- src/3rdparty/webkit/WebCore/dom/WheelEvent.idl | 4 +- src/3rdparty/webkit/WebCore/dom/XMLTokenizer.cpp | 7 +- src/3rdparty/webkit/WebCore/dom/XMLTokenizer.h | 28 +- .../webkit/WebCore/dom/XMLTokenizerLibxml2.cpp | 113 +- src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp | 145 +- .../dom/default/PlatformMessagePortChannel.cpp | 3 +- .../dom/default/PlatformMessagePortChannel.h | 21 +- src/3rdparty/webkit/WebCore/dom/make_names.pl | 197 +- .../webkit/WebCore/editing/AppendNodeCommand.cpp | 6 + .../webkit/WebCore/editing/ApplyStyleCommand.cpp | 12 +- .../WebCore/editing/CompositeEditCommand.cpp | 24 +- .../WebCore/editing/DeleteButtonController.cpp | 8 +- .../WebCore/editing/DeleteButtonController.h | 2 +- .../WebCore/editing/DeleteFromTextNodeCommand.cpp | 6 + .../WebCore/editing/DeleteSelectionCommand.cpp | 17 +- src/3rdparty/webkit/WebCore/editing/Editor.cpp | 89 +- .../webkit/WebCore/editing/EditorCommand.cpp | 5 +- .../WebCore/editing/IndentOutdentCommand.cpp | 82 +- .../webkit/WebCore/editing/IndentOutdentCommand.h | 4 +- .../WebCore/editing/InsertIntoTextNodeCommand.cpp | 6 + .../WebCore/editing/InsertNodeBeforeCommand.cpp | 5 +- .../editing/InsertParagraphSeparatorCommand.cpp | 24 +- .../WebCore/editing/JoinTextNodesCommand.cpp | 6 +- .../editing/MergeIdenticalElementsCommand.cpp | 4 +- .../webkit/WebCore/editing/RemoveNodeCommand.cpp | 4 +- .../WebCore/editing/ReplaceSelectionCommand.cpp | 114 +- .../WebCore/editing/ReplaceSelectionCommand.h | 2 + .../webkit/WebCore/editing/SelectionController.cpp | 347 +- .../webkit/WebCore/editing/SelectionController.h | 86 +- .../webkit/WebCore/editing/SplitElementCommand.cpp | 35 +- .../webkit/WebCore/editing/SplitElementCommand.h | 2 + .../WebCore/editing/SplitTextNodeCommand.cpp | 9 +- .../webkit/WebCore/editing/TextIterator.cpp | 319 +- .../webkit/WebCore/editing/TypingCommand.cpp | 8 +- .../webkit/WebCore/editing/VisibleSelection.cpp | 4 +- .../webkit/WebCore/editing/VisibleSelection.h | 6 +- .../editing/WrapContentsInDummySpanCommand.cpp | 40 +- .../editing/WrapContentsInDummySpanCommand.h | 2 + .../WebCore/editing/android/EditorAndroid.cpp | 39 - .../WebCore/editing/chromium/EditorChromium.cpp | 44 - .../WebCore/editing/gtk/SelectionControllerGtk.cpp | 45 - .../webkit/WebCore/editing/htmlediting.cpp | 43 +- src/3rdparty/webkit/WebCore/editing/htmlediting.h | 5 +- src/3rdparty/webkit/WebCore/editing/markup.cpp | 31 +- src/3rdparty/webkit/WebCore/editing/markup.h | 5 +- .../webkit/WebCore/editing/visible_units.cpp | 11 +- .../webkit/WebCore/generated/ArrayPrototype.lut.h | 34 - .../webkit/WebCore/generated/CSSGrammar.cpp | 3043 +- src/3rdparty/webkit/WebCore/generated/CSSGrammar.h | 110 +- .../webkit/WebCore/generated/CSSPropertyNames.cpp | 1216 +- .../webkit/WebCore/generated/CSSPropertyNames.h | 224 +- .../webkit/WebCore/generated/CSSValueKeywords.c | 2854 +- .../webkit/WebCore/generated/CSSValueKeywords.h | 847 +- src/3rdparty/webkit/WebCore/generated/ColorData.c | 5 +- .../webkit/WebCore/generated/DatePrototype.lut.h | 59 - .../webkit/WebCore/generated/DocTypeStrings.cpp | 5 +- src/3rdparty/webkit/WebCore/generated/Grammar.cpp | 5607 -- src/3rdparty/webkit/WebCore/generated/Grammar.h | 173 - .../webkit/WebCore/generated/HTMLEntityNames.c | 5 +- .../webkit/WebCore/generated/HTMLNames.cpp | 1181 +- src/3rdparty/webkit/WebCore/generated/HTMLNames.h | 29 +- .../webkit/WebCore/generated/JSAbstractWorker.cpp | 19 +- .../webkit/WebCore/generated/JSAbstractWorker.h | 5 +- src/3rdparty/webkit/WebCore/generated/JSAttr.cpp | 29 +- src/3rdparty/webkit/WebCore/generated/JSAttr.h | 5 +- .../webkit/WebCore/generated/JSBarInfo.cpp | 3 +- src/3rdparty/webkit/WebCore/generated/JSBarInfo.h | 5 +- .../webkit/WebCore/generated/JSBeforeLoadEvent.cpp | 5 +- .../webkit/WebCore/generated/JSBeforeLoadEvent.h | 4 +- src/3rdparty/webkit/WebCore/generated/JSBlob.cpp | 174 + src/3rdparty/webkit/WebCore/generated/JSBlob.h | 82 + .../webkit/WebCore/generated/JSCDATASection.cpp | 2 +- .../webkit/WebCore/generated/JSCDATASection.h | 4 +- .../webkit/WebCore/generated/JSCSSCharsetRule.cpp | 8 +- .../webkit/WebCore/generated/JSCSSCharsetRule.h | 4 +- .../webkit/WebCore/generated/JSCSSFontFaceRule.cpp | 5 +- .../webkit/WebCore/generated/JSCSSFontFaceRule.h | 4 +- .../webkit/WebCore/generated/JSCSSImportRule.cpp | 11 +- .../webkit/WebCore/generated/JSCSSImportRule.h | 4 +- .../webkit/WebCore/generated/JSCSSMediaRule.cpp | 8 +- .../webkit/WebCore/generated/JSCSSMediaRule.h | 4 +- .../webkit/WebCore/generated/JSCSSPageRule.cpp | 11 +- .../webkit/WebCore/generated/JSCSSPageRule.h | 4 +- .../WebCore/generated/JSCSSPrimitiveValue.cpp | 5 +- .../webkit/WebCore/generated/JSCSSPrimitiveValue.h | 4 +- .../webkit/WebCore/generated/JSCSSRule.cpp | 17 +- src/3rdparty/webkit/WebCore/generated/JSCSSRule.h | 5 +- .../webkit/WebCore/generated/JSCSSRuleList.cpp | 9 +- .../webkit/WebCore/generated/JSCSSRuleList.h | 7 +- .../WebCore/generated/JSCSSStyleDeclaration.cpp | 23 +- .../WebCore/generated/JSCSSStyleDeclaration.h | 7 +- .../webkit/WebCore/generated/JSCSSStyleRule.cpp | 11 +- .../webkit/WebCore/generated/JSCSSStyleRule.h | 4 +- .../webkit/WebCore/generated/JSCSSStyleSheet.cpp | 11 +- .../webkit/WebCore/generated/JSCSSStyleSheet.h | 4 +- .../webkit/WebCore/generated/JSCSSValue.cpp | 11 +- src/3rdparty/webkit/WebCore/generated/JSCSSValue.h | 5 +- .../webkit/WebCore/generated/JSCSSValueList.cpp | 9 +- .../webkit/WebCore/generated/JSCSSValueList.h | 6 +- .../generated/JSCSSVariablesDeclaration.cpp | 20 +- .../WebCore/generated/JSCSSVariablesDeclaration.h | 7 +- .../WebCore/generated/JSCSSVariablesRule.cpp | 8 +- .../webkit/WebCore/generated/JSCSSVariablesRule.h | 4 +- .../webkit/WebCore/generated/JSCanvasArray.cpp | 155 - .../webkit/WebCore/generated/JSCanvasArray.h | 91 - .../WebCore/generated/JSCanvasArrayBuffer.cpp | 120 - .../webkit/WebCore/generated/JSCanvasArrayBuffer.h | 85 - .../webkit/WebCore/generated/JSCanvasByteArray.cpp | 137 - .../webkit/WebCore/generated/JSCanvasByteArray.h | 85 - .../WebCore/generated/JSCanvasFloatArray.cpp | 137 - .../webkit/WebCore/generated/JSCanvasFloatArray.h | 85 - .../webkit/WebCore/generated/JSCanvasGradient.h | 5 +- .../webkit/WebCore/generated/JSCanvasIntArray.cpp | 137 - .../webkit/WebCore/generated/JSCanvasIntArray.h | 85 - .../webkit/WebCore/generated/JSCanvasPattern.h | 5 +- .../WebCore/generated/JSCanvasRenderingContext.cpp | 5 +- .../WebCore/generated/JSCanvasRenderingContext.h | 5 +- .../generated/JSCanvasRenderingContext2D.cpp | 80 +- .../WebCore/generated/JSCanvasRenderingContext2D.h | 4 +- .../generated/JSCanvasRenderingContext3D.cpp | 4528 - .../WebCore/generated/JSCanvasRenderingContext3D.h | 555 - .../WebCore/generated/JSCanvasShortArray.cpp | 137 - .../webkit/WebCore/generated/JSCanvasShortArray.h | 85 - .../generated/JSCanvasUnsignedByteArray.cpp | 137 - .../WebCore/generated/JSCanvasUnsignedByteArray.h | 85 - .../WebCore/generated/JSCanvasUnsignedIntArray.cpp | 137 - .../WebCore/generated/JSCanvasUnsignedIntArray.h | 85 - .../generated/JSCanvasUnsignedShortArray.cpp | 137 - .../WebCore/generated/JSCanvasUnsignedShortArray.h | 85 - .../webkit/WebCore/generated/JSCharacterData.cpp | 11 +- .../webkit/WebCore/generated/JSCharacterData.h | 4 +- .../webkit/WebCore/generated/JSClientRect.cpp | 20 +- .../webkit/WebCore/generated/JSClientRect.h | 5 +- .../webkit/WebCore/generated/JSClientRectList.cpp | 9 +- .../webkit/WebCore/generated/JSClientRectList.h | 7 +- .../webkit/WebCore/generated/JSClipboard.cpp | 17 +- .../webkit/WebCore/generated/JSClipboard.h | 5 +- .../webkit/WebCore/generated/JSComment.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSComment.h | 4 +- .../WebCore/generated/JSCompositionEvent.cpp | 191 + .../webkit/WebCore/generated/JSCompositionEvent.h | 78 + .../webkit/WebCore/generated/JSConsole.cpp | 18 +- src/3rdparty/webkit/WebCore/generated/JSConsole.h | 6 +- .../webkit/WebCore/generated/JSCoordinates.cpp | 9 +- .../webkit/WebCore/generated/JSCoordinates.h | 5 +- .../webkit/WebCore/generated/JSCounter.cpp | 11 +- src/3rdparty/webkit/WebCore/generated/JSCounter.h | 5 +- .../WebCore/generated/JSDOMApplicationCache.cpp | 97 +- .../WebCore/generated/JSDOMApplicationCache.h | 5 +- .../WebCore/generated/JSDOMCoreException.cpp | 11 +- .../webkit/WebCore/generated/JSDOMCoreException.h | 5 +- .../WebCore/generated/JSDOMImplementation.cpp | 2 +- .../webkit/WebCore/generated/JSDOMImplementation.h | 5 +- .../webkit/WebCore/generated/JSDOMParser.cpp | 2 +- .../webkit/WebCore/generated/JSDOMParser.h | 5 +- .../webkit/WebCore/generated/JSDOMSelection.cpp | 33 +- .../webkit/WebCore/generated/JSDOMSelection.h | 5 +- .../webkit/WebCore/generated/JSDOMWindow.cpp | 4283 +- .../webkit/WebCore/generated/JSDOMWindow.h | 286 +- .../webkit/WebCore/generated/JSDOMWindowBase.lut.h | 0 .../webkit/WebCore/generated/JSDataGridColumn.cpp | 38 +- .../webkit/WebCore/generated/JSDataGridColumn.h | 5 +- .../WebCore/generated/JSDataGridColumnList.cpp | 15 +- .../WebCore/generated/JSDataGridColumnList.h | 7 +- .../webkit/WebCore/generated/JSDatabase.cpp | 3 +- src/3rdparty/webkit/WebCore/generated/JSDatabase.h | 5 +- .../WebCore/generated/JSDedicatedWorkerContext.cpp | 9 +- .../WebCore/generated/JSDedicatedWorkerContext.h | 4 +- .../webkit/WebCore/generated/JSDocument.cpp | 653 +- src/3rdparty/webkit/WebCore/generated/JSDocument.h | 13 +- .../WebCore/generated/JSDocumentFragment.cpp | 2 +- .../webkit/WebCore/generated/JSDocumentFragment.h | 4 +- .../webkit/WebCore/generated/JSDocumentType.cpp | 20 +- .../webkit/WebCore/generated/JSDocumentType.h | 4 +- .../webkit/WebCore/generated/JSElement.cpp | 591 +- src/3rdparty/webkit/WebCore/generated/JSElement.h | 12 +- src/3rdparty/webkit/WebCore/generated/JSEntity.cpp | 11 +- src/3rdparty/webkit/WebCore/generated/JSEntity.h | 4 +- .../webkit/WebCore/generated/JSEntityReference.cpp | 2 +- .../webkit/WebCore/generated/JSEntityReference.h | 4 +- .../webkit/WebCore/generated/JSErrorEvent.cpp | 11 +- .../webkit/WebCore/generated/JSErrorEvent.h | 4 +- src/3rdparty/webkit/WebCore/generated/JSEvent.cpp | 38 +- src/3rdparty/webkit/WebCore/generated/JSEvent.h | 5 +- .../webkit/WebCore/generated/JSEventException.cpp | 11 +- .../webkit/WebCore/generated/JSEventException.h | 5 +- .../webkit/WebCore/generated/JSEventSource.cpp | 45 +- .../webkit/WebCore/generated/JSEventSource.h | 5 +- src/3rdparty/webkit/WebCore/generated/JSFile.cpp | 36 +- src/3rdparty/webkit/WebCore/generated/JSFile.h | 24 +- .../webkit/WebCore/generated/JSFileList.cpp | 9 +- src/3rdparty/webkit/WebCore/generated/JSFileList.h | 7 +- .../webkit/WebCore/generated/JSGeolocation.cpp | 3 +- .../webkit/WebCore/generated/JSGeolocation.h | 5 +- .../webkit/WebCore/generated/JSGeoposition.cpp | 6 +- .../webkit/WebCore/generated/JSGeoposition.h | 5 +- .../WebCore/generated/JSHTMLAllCollection.cpp | 9 +- .../webkit/WebCore/generated/JSHTMLAllCollection.h | 7 +- .../WebCore/generated/JSHTMLAnchorElement.cpp | 155 +- .../webkit/WebCore/generated/JSHTMLAnchorElement.h | 11 +- .../WebCore/generated/JSHTMLAppletElement.cpp | 68 +- .../webkit/WebCore/generated/JSHTMLAppletElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLAreaElement.cpp | 65 +- .../webkit/WebCore/generated/JSHTMLAreaElement.h | 4 +- .../WebCore/generated/JSHTMLAudioElement.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLAudioElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLBRElement.cpp | 8 +- .../webkit/WebCore/generated/JSHTMLBRElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLBaseElement.cpp | 14 +- .../webkit/WebCore/generated/JSHTMLBaseElement.h | 4 +- .../WebCore/generated/JSHTMLBaseFontElement.cpp | 20 +- .../WebCore/generated/JSHTMLBaseFontElement.h | 4 +- .../WebCore/generated/JSHTMLBlockquoteElement.cpp | 8 +- .../WebCore/generated/JSHTMLBlockquoteElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLBodyElement.cpp | 152 +- .../webkit/WebCore/generated/JSHTMLBodyElement.h | 6 +- .../WebCore/generated/JSHTMLButtonElement.cpp | 62 +- .../webkit/WebCore/generated/JSHTMLButtonElement.h | 5 +- .../WebCore/generated/JSHTMLCanvasElement.cpp | 22 +- .../webkit/WebCore/generated/JSHTMLCanvasElement.h | 7 +- .../webkit/WebCore/generated/JSHTMLCollection.cpp | 9 +- .../webkit/WebCore/generated/JSHTMLCollection.h | 7 +- .../WebCore/generated/JSHTMLDListElement.cpp | 8 +- .../webkit/WebCore/generated/JSHTMLDListElement.h | 4 +- .../generated/JSHTMLDataGridCellElement.cpp | 32 +- .../WebCore/generated/JSHTMLDataGridCellElement.h | 4 +- .../WebCore/generated/JSHTMLDataGridColElement.cpp | 32 +- .../WebCore/generated/JSHTMLDataGridColElement.h | 4 +- .../WebCore/generated/JSHTMLDataGridElement.cpp | 23 +- .../WebCore/generated/JSHTMLDataGridElement.h | 4 +- .../WebCore/generated/JSHTMLDataGridRowElement.cpp | 20 +- .../WebCore/generated/JSHTMLDataGridRowElement.h | 4 +- .../WebCore/generated/JSHTMLDataListElement.cpp | 5 +- .../WebCore/generated/JSHTMLDataListElement.h | 4 +- .../WebCore/generated/JSHTMLDirectoryElement.cpp | 8 +- .../WebCore/generated/JSHTMLDirectoryElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLDivElement.cpp | 8 +- .../webkit/WebCore/generated/JSHTMLDivElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLDocument.cpp | 65 +- .../webkit/WebCore/generated/JSHTMLDocument.h | 4 +- .../webkit/WebCore/generated/JSHTMLElement.cpp | 80 +- .../webkit/WebCore/generated/JSHTMLElement.h | 4 +- .../generated/JSHTMLElementWrapperFactory.cpp | 2 +- .../WebCore/generated/JSHTMLEmbedElement.cpp | 38 +- .../webkit/WebCore/generated/JSHTMLEmbedElement.h | 4 +- .../WebCore/generated/JSHTMLFieldSetElement.cpp | 27 +- .../WebCore/generated/JSHTMLFieldSetElement.h | 5 +- .../webkit/WebCore/generated/JSHTMLFontElement.cpp | 20 +- .../webkit/WebCore/generated/JSHTMLFontElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLFormElement.cpp | 60 +- .../webkit/WebCore/generated/JSHTMLFormElement.h | 6 +- .../WebCore/generated/JSHTMLFrameElement.cpp | 59 +- .../webkit/WebCore/generated/JSHTMLFrameElement.h | 4 +- .../WebCore/generated/JSHTMLFrameSetElement.cpp | 128 +- .../WebCore/generated/JSHTMLFrameSetElement.h | 6 +- .../webkit/WebCore/generated/JSHTMLHRElement.cpp | 26 +- .../webkit/WebCore/generated/JSHTMLHRElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLHeadElement.cpp | 8 +- .../webkit/WebCore/generated/JSHTMLHeadElement.h | 4 +- .../WebCore/generated/JSHTMLHeadingElement.cpp | 8 +- .../WebCore/generated/JSHTMLHeadingElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLHtmlElement.cpp | 8 +- .../webkit/WebCore/generated/JSHTMLHtmlElement.h | 4 +- .../WebCore/generated/JSHTMLIFrameElement.cpp | 81 +- .../webkit/WebCore/generated/JSHTMLIFrameElement.h | 6 +- .../WebCore/generated/JSHTMLImageElement.cpp | 95 +- .../webkit/WebCore/generated/JSHTMLImageElement.h | 4 +- .../WebCore/generated/JSHTMLInputElement.cpp | 290 +- .../webkit/WebCore/generated/JSHTMLInputElement.h | 13 +- .../WebCore/generated/JSHTMLIsIndexElement.cpp | 11 +- .../WebCore/generated/JSHTMLIsIndexElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLLIElement.cpp | 14 +- .../webkit/WebCore/generated/JSHTMLLIElement.h | 4 +- .../WebCore/generated/JSHTMLLabelElement.cpp | 17 +- .../webkit/WebCore/generated/JSHTMLLabelElement.h | 4 +- .../WebCore/generated/JSHTMLLegendElement.cpp | 17 +- .../webkit/WebCore/generated/JSHTMLLegendElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLLinkElement.cpp | 59 +- .../webkit/WebCore/generated/JSHTMLLinkElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLMapElement.cpp | 11 +- .../webkit/WebCore/generated/JSHTMLMapElement.h | 4 +- .../WebCore/generated/JSHTMLMarqueeElement.cpp | 2 +- .../WebCore/generated/JSHTMLMarqueeElement.h | 4 +- .../WebCore/generated/JSHTMLMediaElement.cpp | 141 +- .../webkit/WebCore/generated/JSHTMLMediaElement.h | 7 +- .../webkit/WebCore/generated/JSHTMLMenuElement.cpp | 8 +- .../webkit/WebCore/generated/JSHTMLMenuElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLMetaElement.cpp | 26 +- .../webkit/WebCore/generated/JSHTMLMetaElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLModElement.cpp | 14 +- .../webkit/WebCore/generated/JSHTMLModElement.h | 4 +- .../WebCore/generated/JSHTMLOListElement.cpp | 20 +- .../webkit/WebCore/generated/JSHTMLOListElement.h | 4 +- .../WebCore/generated/JSHTMLObjectElement.cpp | 104 +- .../webkit/WebCore/generated/JSHTMLObjectElement.h | 4 +- .../WebCore/generated/JSHTMLOptGroupElement.cpp | 14 +- .../WebCore/generated/JSHTMLOptGroupElement.h | 4 +- .../WebCore/generated/JSHTMLOptionElement.cpp | 44 +- .../webkit/WebCore/generated/JSHTMLOptionElement.h | 4 +- .../WebCore/generated/JSHTMLOptionsCollection.cpp | 70 +- .../WebCore/generated/JSHTMLOptionsCollection.h | 6 +- .../WebCore/generated/JSHTMLParagraphElement.cpp | 8 +- .../WebCore/generated/JSHTMLParagraphElement.h | 4 +- .../WebCore/generated/JSHTMLParamElement.cpp | 26 +- .../webkit/WebCore/generated/JSHTMLParamElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLPreElement.cpp | 14 +- .../webkit/WebCore/generated/JSHTMLPreElement.h | 4 +- .../WebCore/generated/JSHTMLQuoteElement.cpp | 8 +- .../webkit/WebCore/generated/JSHTMLQuoteElement.h | 4 +- .../WebCore/generated/JSHTMLScriptElement.cpp | 44 +- .../webkit/WebCore/generated/JSHTMLScriptElement.h | 4 +- .../WebCore/generated/JSHTMLSelectElement.cpp | 81 +- .../webkit/WebCore/generated/JSHTMLSelectElement.h | 7 +- .../WebCore/generated/JSHTMLSourceElement.cpp | 20 +- .../webkit/WebCore/generated/JSHTMLSourceElement.h | 4 +- .../WebCore/generated/JSHTMLStyleElement.cpp | 23 +- .../webkit/WebCore/generated/JSHTMLStyleElement.h | 4 +- .../generated/JSHTMLTableCaptionElement.cpp | 8 +- .../WebCore/generated/JSHTMLTableCaptionElement.h | 4 +- .../WebCore/generated/JSHTMLTableCellElement.cpp | 89 +- .../WebCore/generated/JSHTMLTableCellElement.h | 4 +- .../WebCore/generated/JSHTMLTableColElement.cpp | 38 +- .../WebCore/generated/JSHTMLTableColElement.h | 4 +- .../WebCore/generated/JSHTMLTableElement.cpp | 80 +- .../webkit/WebCore/generated/JSHTMLTableElement.h | 4 +- .../WebCore/generated/JSHTMLTableRowElement.cpp | 41 +- .../WebCore/generated/JSHTMLTableRowElement.h | 4 +- .../generated/JSHTMLTableSectionElement.cpp | 29 +- .../WebCore/generated/JSHTMLTableSectionElement.h | 4 +- .../WebCore/generated/JSHTMLTextAreaElement.cpp | 117 +- .../WebCore/generated/JSHTMLTextAreaElement.h | 5 +- .../WebCore/generated/JSHTMLTitleElement.cpp | 8 +- .../webkit/WebCore/generated/JSHTMLTitleElement.h | 4 +- .../WebCore/generated/JSHTMLUListElement.cpp | 14 +- .../webkit/WebCore/generated/JSHTMLUListElement.h | 4 +- .../WebCore/generated/JSHTMLVideoElement.cpp | 95 +- .../webkit/WebCore/generated/JSHTMLVideoElement.h | 14 +- .../webkit/WebCore/generated/JSHistory.cpp | 27 +- src/3rdparty/webkit/WebCore/generated/JSHistory.h | 13 +- .../webkit/WebCore/generated/JSImageData.cpp | 8 +- .../webkit/WebCore/generated/JSImageData.h | 5 +- .../WebCore/generated/JSInjectedScriptHost.cpp | 316 + .../WebCore/generated/JSInjectedScriptHost.h | 111 + .../WebCore/generated/JSInspectorBackend.cpp | 528 +- .../webkit/WebCore/generated/JSInspectorBackend.h | 77 +- .../WebCore/generated/JSInspectorFrontendHost.cpp | 355 + .../WebCore/generated/JSInspectorFrontendHost.h | 105 + .../WebCore/generated/JSJavaScriptCallFrame.cpp | 12 +- .../WebCore/generated/JSJavaScriptCallFrame.h | 5 +- .../webkit/WebCore/generated/JSKeyboardEvent.cpp | 23 +- .../webkit/WebCore/generated/JSKeyboardEvent.h | 4 +- .../webkit/WebCore/generated/JSLocation.cpp | 24 +- src/3rdparty/webkit/WebCore/generated/JSLocation.h | 7 +- src/3rdparty/webkit/WebCore/generated/JSMedia.cpp | 5 +- src/3rdparty/webkit/WebCore/generated/JSMedia.h | 5 +- .../webkit/WebCore/generated/JSMediaError.cpp | 5 +- .../webkit/WebCore/generated/JSMediaError.h | 5 +- .../webkit/WebCore/generated/JSMediaList.cpp | 17 +- .../webkit/WebCore/generated/JSMediaList.h | 7 +- .../webkit/WebCore/generated/JSMessageChannel.cpp | 6 +- .../webkit/WebCore/generated/JSMessageChannel.h | 5 +- .../webkit/WebCore/generated/JSMessageEvent.cpp | 19 +- .../webkit/WebCore/generated/JSMessageEvent.h | 9 +- .../webkit/WebCore/generated/JSMessagePort.cpp | 17 +- .../webkit/WebCore/generated/JSMessagePort.h | 5 +- .../webkit/WebCore/generated/JSMimeType.cpp | 14 +- src/3rdparty/webkit/WebCore/generated/JSMimeType.h | 5 +- .../webkit/WebCore/generated/JSMimeTypeArray.cpp | 9 +- .../webkit/WebCore/generated/JSMimeTypeArray.h | 7 +- .../webkit/WebCore/generated/JSMouseEvent.cpp | 53 +- .../webkit/WebCore/generated/JSMouseEvent.h | 4 +- .../webkit/WebCore/generated/JSMutationEvent.cpp | 17 +- .../webkit/WebCore/generated/JSMutationEvent.h | 4 +- .../webkit/WebCore/generated/JSNamedNodeMap.cpp | 9 +- .../webkit/WebCore/generated/JSNamedNodeMap.h | 7 +- .../webkit/WebCore/generated/JSNavigator.cpp | 84 +- .../webkit/WebCore/generated/JSNavigator.h | 7 +- src/3rdparty/webkit/WebCore/generated/JSNode.cpp | 64 +- src/3rdparty/webkit/WebCore/generated/JSNode.h | 5 +- .../webkit/WebCore/generated/JSNodeFilter.cpp | 2 +- .../webkit/WebCore/generated/JSNodeFilter.h | 5 +- .../webkit/WebCore/generated/JSNodeIterator.cpp | 20 +- .../webkit/WebCore/generated/JSNodeIterator.h | 5 +- .../webkit/WebCore/generated/JSNodeList.cpp | 9 +- src/3rdparty/webkit/WebCore/generated/JSNodeList.h | 7 +- .../webkit/WebCore/generated/JSNotation.cpp | 8 +- src/3rdparty/webkit/WebCore/generated/JSNotation.h | 4 +- .../webkit/WebCore/generated/JSONObject.lut.h | 15 - .../webkit/WebCore/generated/JSOverflowEvent.cpp | 11 +- .../webkit/WebCore/generated/JSOverflowEvent.h | 4 +- .../WebCore/generated/JSPageTransitionEvent.cpp | 5 +- .../WebCore/generated/JSPageTransitionEvent.h | 4 +- src/3rdparty/webkit/WebCore/generated/JSPlugin.cpp | 18 +- src/3rdparty/webkit/WebCore/generated/JSPlugin.h | 7 +- .../webkit/WebCore/generated/JSPluginArray.cpp | 9 +- .../webkit/WebCore/generated/JSPluginArray.h | 7 +- .../webkit/WebCore/generated/JSPopStateEvent.cpp | 181 + .../webkit/WebCore/generated/JSPopStateEvent.h | 81 + .../webkit/WebCore/generated/JSPositionError.cpp | 23 +- .../webkit/WebCore/generated/JSPositionError.h | 6 +- .../WebCore/generated/JSProcessingInstruction.cpp | 14 +- .../WebCore/generated/JSProcessingInstruction.h | 4 +- .../webkit/WebCore/generated/JSProgressEvent.cpp | 11 +- .../webkit/WebCore/generated/JSProgressEvent.h | 4 +- .../webkit/WebCore/generated/JSRGBColor.cpp | 11 +- src/3rdparty/webkit/WebCore/generated/JSRGBColor.h | 5 +- src/3rdparty/webkit/WebCore/generated/JSRange.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSRange.h | 5 +- .../webkit/WebCore/generated/JSRangeException.cpp | 11 +- .../webkit/WebCore/generated/JSRangeException.h | 5 +- src/3rdparty/webkit/WebCore/generated/JSRect.cpp | 14 +- src/3rdparty/webkit/WebCore/generated/JSRect.h | 5 +- .../webkit/WebCore/generated/JSSQLError.cpp | 6 +- src/3rdparty/webkit/WebCore/generated/JSSQLError.h | 5 +- .../webkit/WebCore/generated/JSSQLResultSet.cpp | 6 +- .../webkit/WebCore/generated/JSSQLResultSet.h | 5 +- .../WebCore/generated/JSSQLResultSetRowList.cpp | 3 +- .../WebCore/generated/JSSQLResultSetRowList.h | 5 +- .../webkit/WebCore/generated/JSSQLTransaction.h | 5 +- .../webkit/WebCore/generated/JSSVGAElement.cpp | 115 +- .../webkit/WebCore/generated/JSSVGAElement.h | 6 +- .../WebCore/generated/JSSVGAltGlyphElement.cpp | 77 +- .../WebCore/generated/JSSVGAltGlyphElement.h | 6 +- .../webkit/WebCore/generated/JSSVGAngle.cpp | 78 +- src/3rdparty/webkit/WebCore/generated/JSSVGAngle.h | 23 +- .../WebCore/generated/JSSVGAnimateColorElement.cpp | 84 +- .../WebCore/generated/JSSVGAnimateColorElement.h | 12 +- .../WebCore/generated/JSSVGAnimateElement.cpp | 84 +- .../webkit/WebCore/generated/JSSVGAnimateElement.h | 12 +- .../generated/JSSVGAnimateTransformElement.cpp | 84 +- .../generated/JSSVGAnimateTransformElement.h | 12 +- .../WebCore/generated/JSSVGAnimatedAngle.cpp | 76 +- .../webkit/WebCore/generated/JSSVGAnimatedAngle.h | 13 +- .../WebCore/generated/JSSVGAnimatedBoolean.cpp | 81 +- .../WebCore/generated/JSSVGAnimatedBoolean.h | 13 +- .../WebCore/generated/JSSVGAnimatedEnumeration.cpp | 81 +- .../WebCore/generated/JSSVGAnimatedEnumeration.h | 13 +- .../WebCore/generated/JSSVGAnimatedInteger.cpp | 81 +- .../WebCore/generated/JSSVGAnimatedInteger.h | 13 +- .../WebCore/generated/JSSVGAnimatedLength.cpp | 75 +- .../webkit/WebCore/generated/JSSVGAnimatedLength.h | 13 +- .../WebCore/generated/JSSVGAnimatedLengthList.cpp | 75 +- .../WebCore/generated/JSSVGAnimatedLengthList.h | 13 +- .../WebCore/generated/JSSVGAnimatedNumber.cpp | 81 +- .../webkit/WebCore/generated/JSSVGAnimatedNumber.h | 13 +- .../WebCore/generated/JSSVGAnimatedNumberList.cpp | 75 +- .../WebCore/generated/JSSVGAnimatedNumberList.h | 13 +- .../generated/JSSVGAnimatedPreserveAspectRatio.cpp | 76 +- .../generated/JSSVGAnimatedPreserveAspectRatio.h | 13 +- .../webkit/WebCore/generated/JSSVGAnimatedRect.cpp | 75 +- .../webkit/WebCore/generated/JSSVGAnimatedRect.h | 13 +- .../WebCore/generated/JSSVGAnimatedString.cpp | 81 +- .../webkit/WebCore/generated/JSSVGAnimatedString.h | 13 +- .../generated/JSSVGAnimatedTransformList.cpp | 75 +- .../WebCore/generated/JSSVGAnimatedTransformList.h | 13 +- .../WebCore/generated/JSSVGAnimationElement.cpp | 15 +- .../WebCore/generated/JSSVGAnimationElement.h | 4 +- .../WebCore/generated/JSSVGCircleElement.cpp | 118 +- .../webkit/WebCore/generated/JSSVGCircleElement.h | 6 +- .../WebCore/generated/JSSVGClipPathElement.cpp | 112 +- .../WebCore/generated/JSSVGClipPathElement.h | 6 +- .../webkit/WebCore/generated/JSSVGColor.cpp | 8 +- src/3rdparty/webkit/WebCore/generated/JSSVGColor.h | 4 +- .../JSSVGComponentTransferFunctionElement.cpp | 23 +- .../JSSVGComponentTransferFunctionElement.h | 4 +- .../WebCore/generated/JSSVGCursorElement.cpp | 85 +- .../webkit/WebCore/generated/JSSVGCursorElement.h | 6 +- .../webkit/WebCore/generated/JSSVGDefsElement.cpp | 109 +- .../webkit/WebCore/generated/JSSVGDefsElement.h | 6 +- .../webkit/WebCore/generated/JSSVGDescElement.cpp | 80 +- .../webkit/WebCore/generated/JSSVGDescElement.h | 6 +- .../webkit/WebCore/generated/JSSVGDocument.cpp | 67 +- .../webkit/WebCore/generated/JSSVGDocument.h | 6 +- .../webkit/WebCore/generated/JSSVGElement.cpp | 80 +- .../webkit/WebCore/generated/JSSVGElement.h | 6 +- .../WebCore/generated/JSSVGElementInstance.cpp | 526 +- .../WebCore/generated/JSSVGElementInstance.h | 7 +- .../WebCore/generated/JSSVGElementInstanceList.cpp | 67 +- .../WebCore/generated/JSSVGElementInstanceList.h | 7 +- .../generated/JSSVGElementWrapperFactory.cpp | 194 +- .../WebCore/generated/JSSVGEllipseElement.cpp | 121 +- .../webkit/WebCore/generated/JSSVGEllipseElement.h | 6 +- .../webkit/WebCore/generated/JSSVGException.cpp | 20 +- .../webkit/WebCore/generated/JSSVGException.h | 11 +- .../WebCore/generated/JSSVGFEBlendElement.cpp | 32 +- .../webkit/WebCore/generated/JSSVGFEBlendElement.h | 4 +- .../generated/JSSVGFEColorMatrixElement.cpp | 32 +- .../WebCore/generated/JSSVGFEColorMatrixElement.h | 4 +- .../generated/JSSVGFEComponentTransferElement.cpp | 86 +- .../generated/JSSVGFEComponentTransferElement.h | 6 +- .../WebCore/generated/JSSVGFECompositeElement.cpp | 44 +- .../WebCore/generated/JSSVGFECompositeElement.h | 4 +- .../generated/JSSVGFEDiffuseLightingElement.cpp | 98 +- .../generated/JSSVGFEDiffuseLightingElement.h | 6 +- .../generated/JSSVGFEDisplacementMapElement.cpp | 38 +- .../generated/JSSVGFEDisplacementMapElement.h | 4 +- .../generated/JSSVGFEDistantLightElement.cpp | 68 +- .../WebCore/generated/JSSVGFEDistantLightElement.h | 6 +- .../WebCore/generated/JSSVGFEFloodElement.cpp | 23 +- .../webkit/WebCore/generated/JSSVGFEFloodElement.h | 4 +- .../WebCore/generated/JSSVGFEFuncAElement.cpp | 84 +- .../webkit/WebCore/generated/JSSVGFEFuncAElement.h | 12 +- .../WebCore/generated/JSSVGFEFuncBElement.cpp | 84 +- .../webkit/WebCore/generated/JSSVGFEFuncBElement.h | 12 +- .../WebCore/generated/JSSVGFEFuncGElement.cpp | 84 +- .../webkit/WebCore/generated/JSSVGFEFuncGElement.h | 12 +- .../WebCore/generated/JSSVGFEFuncRElement.cpp | 84 +- .../webkit/WebCore/generated/JSSVGFEFuncRElement.h | 12 +- .../generated/JSSVGFEGaussianBlurElement.cpp | 90 +- .../WebCore/generated/JSSVGFEGaussianBlurElement.h | 6 +- .../WebCore/generated/JSSVGFEImageElement.cpp | 111 +- .../webkit/WebCore/generated/JSSVGFEImageElement.h | 7 +- .../WebCore/generated/JSSVGFEMergeElement.cpp | 83 +- .../webkit/WebCore/generated/JSSVGFEMergeElement.h | 6 +- .../WebCore/generated/JSSVGFEMergeNodeElement.cpp | 67 +- .../WebCore/generated/JSSVGFEMergeNodeElement.h | 6 +- .../WebCore/generated/JSSVGFEMorphologyElement.cpp | 35 +- .../WebCore/generated/JSSVGFEMorphologyElement.h | 4 +- .../WebCore/generated/JSSVGFEOffsetElement.cpp | 90 +- .../WebCore/generated/JSSVGFEOffsetElement.h | 6 +- .../WebCore/generated/JSSVGFEPointLightElement.cpp | 73 +- .../WebCore/generated/JSSVGFEPointLightElement.h | 6 +- .../generated/JSSVGFESpecularLightingElement.cpp | 93 +- .../generated/JSSVGFESpecularLightingElement.h | 6 +- .../WebCore/generated/JSSVGFESpotLightElement.cpp | 86 +- .../WebCore/generated/JSSVGFESpotLightElement.h | 6 +- .../WebCore/generated/JSSVGFETileElement.cpp | 86 +- .../webkit/WebCore/generated/JSSVGFETileElement.h | 6 +- .../WebCore/generated/JSSVGFETurbulenceElement.cpp | 41 +- .../WebCore/generated/JSSVGFETurbulenceElement.h | 4 +- .../WebCore/generated/JSSVGFilterElement.cpp | 108 +- .../webkit/WebCore/generated/JSSVGFilterElement.h | 6 +- .../webkit/WebCore/generated/JSSVGFontElement.cpp | 84 +- .../webkit/WebCore/generated/JSSVGFontElement.h | 12 +- .../WebCore/generated/JSSVGFontFaceElement.cpp | 84 +- .../WebCore/generated/JSSVGFontFaceElement.h | 12 +- .../generated/JSSVGFontFaceFormatElement.cpp | 84 +- .../WebCore/generated/JSSVGFontFaceFormatElement.h | 12 +- .../WebCore/generated/JSSVGFontFaceNameElement.cpp | 84 +- .../WebCore/generated/JSSVGFontFaceNameElement.h | 12 +- .../WebCore/generated/JSSVGFontFaceSrcElement.cpp | 84 +- .../WebCore/generated/JSSVGFontFaceSrcElement.h | 12 +- .../WebCore/generated/JSSVGFontFaceUriElement.cpp | 84 +- .../WebCore/generated/JSSVGFontFaceUriElement.h | 12 +- .../generated/JSSVGForeignObjectElement.cpp | 121 +- .../WebCore/generated/JSSVGForeignObjectElement.h | 6 +- .../webkit/WebCore/generated/JSSVGGElement.cpp | 109 +- .../webkit/WebCore/generated/JSSVGGElement.h | 6 +- .../webkit/WebCore/generated/JSSVGGlyphElement.cpp | 84 +- .../webkit/WebCore/generated/JSSVGGlyphElement.h | 12 +- .../WebCore/generated/JSSVGGradientElement.cpp | 23 +- .../WebCore/generated/JSSVGGradientElement.h | 4 +- .../webkit/WebCore/generated/JSSVGHKernElement.cpp | 84 +- .../webkit/WebCore/generated/JSSVGHKernElement.h | 12 +- .../webkit/WebCore/generated/JSSVGImageElement.cpp | 125 +- .../webkit/WebCore/generated/JSSVGImageElement.h | 6 +- .../webkit/WebCore/generated/JSSVGLength.cpp | 53 +- .../webkit/WebCore/generated/JSSVGLength.h | 13 +- .../webkit/WebCore/generated/JSSVGLengthList.cpp | 136 +- .../webkit/WebCore/generated/JSSVGLengthList.h | 13 +- .../webkit/WebCore/generated/JSSVGLineElement.cpp | 121 +- .../webkit/WebCore/generated/JSSVGLineElement.h | 6 +- .../generated/JSSVGLinearGradientElement.cpp | 74 +- .../WebCore/generated/JSSVGLinearGradientElement.h | 6 +- .../WebCore/generated/JSSVGMarkerElement.cpp | 52 +- .../webkit/WebCore/generated/JSSVGMarkerElement.h | 4 +- .../webkit/WebCore/generated/JSSVGMaskElement.cpp | 110 +- .../webkit/WebCore/generated/JSSVGMaskElement.h | 6 +- .../webkit/WebCore/generated/JSSVGMatrix.cpp | 211 +- .../webkit/WebCore/generated/JSSVGMatrix.h | 24 +- .../WebCore/generated/JSSVGMetadataElement.cpp | 84 +- .../WebCore/generated/JSSVGMetadataElement.h | 12 +- .../WebCore/generated/JSSVGMissingGlyphElement.cpp | 84 +- .../WebCore/generated/JSSVGMissingGlyphElement.h | 12 +- .../webkit/WebCore/generated/JSSVGNumber.cpp | 80 +- .../webkit/WebCore/generated/JSSVGNumber.h | 15 +- .../webkit/WebCore/generated/JSSVGNumberList.cpp | 136 +- .../webkit/WebCore/generated/JSSVGNumberList.h | 13 +- .../webkit/WebCore/generated/JSSVGPaint.cpp | 8 +- src/3rdparty/webkit/WebCore/generated/JSSVGPaint.h | 4 +- .../webkit/WebCore/generated/JSSVGPathElement.cpp | 130 +- .../webkit/WebCore/generated/JSSVGPathElement.h | 6 +- .../webkit/WebCore/generated/JSSVGPathSeg.cpp | 17 +- .../webkit/WebCore/generated/JSSVGPathSeg.h | 11 +- .../WebCore/generated/JSSVGPathSegArcAbs.cpp | 131 +- .../webkit/WebCore/generated/JSSVGPathSegArcAbs.h | 8 +- .../WebCore/generated/JSSVGPathSegArcRel.cpp | 131 +- .../webkit/WebCore/generated/JSSVGPathSegArcRel.h | 8 +- .../WebCore/generated/JSSVGPathSegClosePath.cpp | 88 +- .../WebCore/generated/JSSVGPathSegClosePath.h | 14 +- .../generated/JSSVGPathSegCurvetoCubicAbs.cpp | 120 +- .../generated/JSSVGPathSegCurvetoCubicAbs.h | 8 +- .../generated/JSSVGPathSegCurvetoCubicRel.cpp | 120 +- .../generated/JSSVGPathSegCurvetoCubicRel.h | 8 +- .../JSSVGPathSegCurvetoCubicSmoothAbs.cpp | 104 +- .../generated/JSSVGPathSegCurvetoCubicSmoothAbs.h | 8 +- .../JSSVGPathSegCurvetoCubicSmoothRel.cpp | 104 +- .../generated/JSSVGPathSegCurvetoCubicSmoothRel.h | 8 +- .../generated/JSSVGPathSegCurvetoQuadraticAbs.cpp | 104 +- .../generated/JSSVGPathSegCurvetoQuadraticAbs.h | 8 +- .../generated/JSSVGPathSegCurvetoQuadraticRel.cpp | 104 +- .../generated/JSSVGPathSegCurvetoQuadraticRel.h | 8 +- .../JSSVGPathSegCurvetoQuadraticSmoothAbs.cpp | 86 +- .../JSSVGPathSegCurvetoQuadraticSmoothAbs.h | 8 +- .../JSSVGPathSegCurvetoQuadraticSmoothRel.cpp | 86 +- .../JSSVGPathSegCurvetoQuadraticSmoothRel.h | 8 +- .../WebCore/generated/JSSVGPathSegLinetoAbs.cpp | 86 +- .../WebCore/generated/JSSVGPathSegLinetoAbs.h | 8 +- .../generated/JSSVGPathSegLinetoHorizontalAbs.cpp | 77 +- .../generated/JSSVGPathSegLinetoHorizontalAbs.h | 8 +- .../generated/JSSVGPathSegLinetoHorizontalRel.cpp | 77 +- .../generated/JSSVGPathSegLinetoHorizontalRel.h | 8 +- .../WebCore/generated/JSSVGPathSegLinetoRel.cpp | 86 +- .../WebCore/generated/JSSVGPathSegLinetoRel.h | 8 +- .../generated/JSSVGPathSegLinetoVerticalAbs.cpp | 77 +- .../generated/JSSVGPathSegLinetoVerticalAbs.h | 8 +- .../generated/JSSVGPathSegLinetoVerticalRel.cpp | 77 +- .../generated/JSSVGPathSegLinetoVerticalRel.h | 8 +- .../webkit/WebCore/generated/JSSVGPathSegList.cpp | 72 +- .../webkit/WebCore/generated/JSSVGPathSegList.h | 13 +- .../WebCore/generated/JSSVGPathSegMovetoAbs.cpp | 86 +- .../WebCore/generated/JSSVGPathSegMovetoAbs.h | 8 +- .../WebCore/generated/JSSVGPathSegMovetoRel.cpp | 86 +- .../WebCore/generated/JSSVGPathSegMovetoRel.h | 8 +- .../WebCore/generated/JSSVGPatternElement.cpp | 120 +- .../webkit/WebCore/generated/JSSVGPatternElement.h | 6 +- .../webkit/WebCore/generated/JSSVGPoint.cpp | 101 +- src/3rdparty/webkit/WebCore/generated/JSSVGPoint.h | 15 +- .../webkit/WebCore/generated/JSSVGPointList.cpp | 88 +- .../webkit/WebCore/generated/JSSVGPointList.h | 22 +- .../WebCore/generated/JSSVGPolygonElement.cpp | 115 +- .../webkit/WebCore/generated/JSSVGPolygonElement.h | 6 +- .../WebCore/generated/JSSVGPolylineElement.cpp | 115 +- .../WebCore/generated/JSSVGPolylineElement.h | 6 +- .../WebCore/generated/JSSVGPreserveAspectRatio.cpp | 47 +- .../WebCore/generated/JSSVGPreserveAspectRatio.h | 23 +- .../generated/JSSVGRadialGradientElement.cpp | 75 +- .../WebCore/generated/JSSVGRadialGradientElement.h | 6 +- .../webkit/WebCore/generated/JSSVGRect.cpp | 114 +- src/3rdparty/webkit/WebCore/generated/JSSVGRect.h | 15 +- .../webkit/WebCore/generated/JSSVGRectElement.cpp | 125 +- .../webkit/WebCore/generated/JSSVGRectElement.h | 6 +- .../WebCore/generated/JSSVGRenderingIntent.cpp | 11 +- .../WebCore/generated/JSSVGRenderingIntent.h | 11 +- .../webkit/WebCore/generated/JSSVGSVGElement.cpp | 191 +- .../webkit/WebCore/generated/JSSVGSVGElement.h | 6 +- .../WebCore/generated/JSSVGScriptElement.cpp | 76 +- .../webkit/WebCore/generated/JSSVGScriptElement.h | 6 +- .../webkit/WebCore/generated/JSSVGSetElement.cpp | 84 +- .../webkit/WebCore/generated/JSSVGSetElement.h | 12 +- .../webkit/WebCore/generated/JSSVGStopElement.cpp | 69 +- .../webkit/WebCore/generated/JSSVGStopElement.h | 6 +- .../webkit/WebCore/generated/JSSVGStringList.cpp | 72 +- .../webkit/WebCore/generated/JSSVGStringList.h | 13 +- .../webkit/WebCore/generated/JSSVGStyleElement.cpp | 90 +- .../webkit/WebCore/generated/JSSVGStyleElement.h | 6 +- .../WebCore/generated/JSSVGSwitchElement.cpp | 109 +- .../webkit/WebCore/generated/JSSVGSwitchElement.h | 6 +- .../WebCore/generated/JSSVGSymbolElement.cpp | 87 +- .../webkit/WebCore/generated/JSSVGSymbolElement.h | 6 +- .../webkit/WebCore/generated/JSSVGTRefElement.cpp | 67 +- .../webkit/WebCore/generated/JSSVGTRefElement.h | 6 +- .../webkit/WebCore/generated/JSSVGTSpanElement.cpp | 84 +- .../webkit/WebCore/generated/JSSVGTSpanElement.h | 12 +- .../WebCore/generated/JSSVGTextContentElement.cpp | 44 +- .../WebCore/generated/JSSVGTextContentElement.h | 4 +- .../webkit/WebCore/generated/JSSVGTextElement.cpp | 81 +- .../webkit/WebCore/generated/JSSVGTextElement.h | 6 +- .../WebCore/generated/JSSVGTextPathElement.cpp | 14 +- .../WebCore/generated/JSSVGTextPathElement.h | 4 +- .../generated/JSSVGTextPositioningElement.cpp | 79 +- .../generated/JSSVGTextPositioningElement.h | 6 +- .../webkit/WebCore/generated/JSSVGTitleElement.cpp | 80 +- .../webkit/WebCore/generated/JSSVGTitleElement.h | 6 +- .../webkit/WebCore/generated/JSSVGTransform.cpp | 70 +- .../webkit/WebCore/generated/JSSVGTransform.h | 13 +- .../WebCore/generated/JSSVGTransformList.cpp | 93 +- .../webkit/WebCore/generated/JSSVGTransformList.h | 22 +- .../webkit/WebCore/generated/JSSVGUnitTypes.cpp | 11 +- .../webkit/WebCore/generated/JSSVGUnitTypes.h | 11 +- .../webkit/WebCore/generated/JSSVGUseElement.cpp | 128 +- .../webkit/WebCore/generated/JSSVGUseElement.h | 6 +- .../webkit/WebCore/generated/JSSVGViewElement.cpp | 81 +- .../webkit/WebCore/generated/JSSVGViewElement.h | 6 +- .../webkit/WebCore/generated/JSSVGZoomEvent.cpp | 75 +- .../webkit/WebCore/generated/JSSVGZoomEvent.h | 6 +- src/3rdparty/webkit/WebCore/generated/JSScreen.cpp | 24 +- src/3rdparty/webkit/WebCore/generated/JSScreen.h | 5 +- .../webkit/WebCore/generated/JSSharedWorker.cpp | 3 +- .../webkit/WebCore/generated/JSSharedWorker.h | 4 +- .../WebCore/generated/JSSharedWorkerContext.cpp | 12 +- .../WebCore/generated/JSSharedWorkerContext.h | 4 +- .../webkit/WebCore/generated/JSStorage.cpp | 5 +- src/3rdparty/webkit/WebCore/generated/JSStorage.h | 7 +- .../webkit/WebCore/generated/JSStorageEvent.cpp | 17 +- .../webkit/WebCore/generated/JSStorageEvent.h | 4 +- .../webkit/WebCore/generated/JSStyleSheet.cpp | 26 +- .../webkit/WebCore/generated/JSStyleSheet.h | 5 +- .../webkit/WebCore/generated/JSStyleSheetList.cpp | 9 +- .../webkit/WebCore/generated/JSStyleSheetList.h | 7 +- src/3rdparty/webkit/WebCore/generated/JSText.cpp | 5 +- src/3rdparty/webkit/WebCore/generated/JSText.h | 4 +- .../webkit/WebCore/generated/JSTextEvent.cpp | 5 +- .../webkit/WebCore/generated/JSTextEvent.h | 4 +- .../webkit/WebCore/generated/JSTextMetrics.cpp | 5 +- .../webkit/WebCore/generated/JSTextMetrics.h | 5 +- .../webkit/WebCore/generated/JSTimeRanges.cpp | 3 +- .../webkit/WebCore/generated/JSTimeRanges.h | 5 +- src/3rdparty/webkit/WebCore/generated/JSTouch.cpp | 251 + src/3rdparty/webkit/WebCore/generated/JSTouch.h | 93 + .../webkit/WebCore/generated/JSTouchEvent.cpp | 264 + .../webkit/WebCore/generated/JSTouchEvent.h | 88 + .../webkit/WebCore/generated/JSTouchList.cpp | 256 + .../webkit/WebCore/generated/JSTouchList.h | 94 + .../webkit/WebCore/generated/JSTreeWalker.cpp | 20 +- .../webkit/WebCore/generated/JSTreeWalker.h | 5 +- .../webkit/WebCore/generated/JSUIEvent.cpp | 29 +- src/3rdparty/webkit/WebCore/generated/JSUIEvent.h | 4 +- .../webkit/WebCore/generated/JSValidityState.cpp | 27 +- .../webkit/WebCore/generated/JSValidityState.h | 5 +- .../webkit/WebCore/generated/JSVoidCallback.h | 5 +- .../webkit/WebCore/generated/JSWebGLArray.cpp | 177 + .../webkit/WebCore/generated/JSWebGLArray.h | 92 + .../WebCore/generated/JSWebGLArrayBuffer.cpp | 121 + .../webkit/WebCore/generated/JSWebGLArrayBuffer.h | 84 + .../webkit/WebCore/generated/JSWebGLByteArray.cpp | 174 + .../webkit/WebCore/generated/JSWebGLByteArray.h | 94 + .../webkit/WebCore/generated/JSWebGLFloatArray.cpp | 174 + .../webkit/WebCore/generated/JSWebGLFloatArray.h | 94 + .../webkit/WebCore/generated/JSWebGLIntArray.cpp | 174 + .../webkit/WebCore/generated/JSWebGLIntArray.h | 94 + .../WebCore/generated/JSWebGLRenderingContext.cpp | 4252 + .../WebCore/generated/JSWebGLRenderingContext.h | 546 + .../webkit/WebCore/generated/JSWebGLShortArray.cpp | 174 + .../webkit/WebCore/generated/JSWebGLShortArray.h | 94 + .../WebCore/generated/JSWebGLUnsignedByteArray.cpp | 174 + .../WebCore/generated/JSWebGLUnsignedByteArray.h | 94 + .../WebCore/generated/JSWebGLUnsignedIntArray.cpp | 174 + .../WebCore/generated/JSWebGLUnsignedIntArray.h | 94 + .../generated/JSWebGLUnsignedShortArray.cpp | 174 + .../WebCore/generated/JSWebGLUnsignedShortArray.h | 94 + .../WebCore/generated/JSWebKitAnimationEvent.cpp | 8 +- .../WebCore/generated/JSWebKitAnimationEvent.h | 4 +- .../WebCore/generated/JSWebKitCSSKeyframeRule.cpp | 11 +- .../WebCore/generated/JSWebKitCSSKeyframeRule.h | 4 +- .../WebCore/generated/JSWebKitCSSKeyframesRule.cpp | 15 +- .../WebCore/generated/JSWebKitCSSKeyframesRule.h | 6 +- .../webkit/WebCore/generated/JSWebKitCSSMatrix.cpp | 132 +- .../webkit/WebCore/generated/JSWebKitCSSMatrix.h | 5 +- .../generated/JSWebKitCSSTransformValue.cpp | 54 +- .../WebCore/generated/JSWebKitCSSTransformValue.h | 9 +- .../webkit/WebCore/generated/JSWebKitPoint.cpp | 12 +- .../webkit/WebCore/generated/JSWebKitPoint.h | 5 +- .../WebCore/generated/JSWebKitTransitionEvent.cpp | 8 +- .../WebCore/generated/JSWebKitTransitionEvent.h | 4 +- .../webkit/WebCore/generated/JSWebSocket.cpp | 48 +- .../webkit/WebCore/generated/JSWebSocket.h | 5 +- .../webkit/WebCore/generated/JSWheelEvent.cpp | 47 +- .../webkit/WebCore/generated/JSWheelEvent.h | 4 +- src/3rdparty/webkit/WebCore/generated/JSWorker.cpp | 13 +- src/3rdparty/webkit/WebCore/generated/JSWorker.h | 4 +- .../webkit/WebCore/generated/JSWorkerContext.cpp | 36 +- .../webkit/WebCore/generated/JSWorkerContext.h | 7 +- .../WebCore/generated/JSWorkerContextBase.lut.h | 0 .../webkit/WebCore/generated/JSWorkerLocation.cpp | 26 +- .../webkit/WebCore/generated/JSWorkerLocation.h | 5 +- .../webkit/WebCore/generated/JSWorkerNavigator.cpp | 15 +- .../webkit/WebCore/generated/JSWorkerNavigator.h | 5 +- .../webkit/WebCore/generated/JSXMLHttpRequest.cpp | 85 +- .../webkit/WebCore/generated/JSXMLHttpRequest.h | 5 +- .../generated/JSXMLHttpRequestException.cpp | 11 +- .../WebCore/generated/JSXMLHttpRequestException.h | 5 +- .../generated/JSXMLHttpRequestProgressEvent.cpp | 8 +- .../generated/JSXMLHttpRequestProgressEvent.h | 4 +- .../WebCore/generated/JSXMLHttpRequestUpload.cpp | 61 +- .../WebCore/generated/JSXMLHttpRequestUpload.h | 5 +- .../webkit/WebCore/generated/JSXMLSerializer.cpp | 2 +- .../webkit/WebCore/generated/JSXMLSerializer.h | 5 +- .../webkit/WebCore/generated/JSXPathEvaluator.cpp | 2 +- .../webkit/WebCore/generated/JSXPathEvaluator.h | 5 +- .../webkit/WebCore/generated/JSXPathException.cpp | 11 +- .../webkit/WebCore/generated/JSXPathException.h | 5 +- .../webkit/WebCore/generated/JSXPathExpression.cpp | 2 +- .../webkit/WebCore/generated/JSXPathExpression.h | 5 +- .../webkit/WebCore/generated/JSXPathNSResolver.h | 5 +- .../webkit/WebCore/generated/JSXPathResult.cpp | 8 +- .../webkit/WebCore/generated/JSXPathResult.h | 5 +- .../webkit/WebCore/generated/JSXSLTProcessor.h | 5 +- src/3rdparty/webkit/WebCore/generated/Lexer.lut.h | 49 - .../webkit/WebCore/generated/MathObject.lut.h | 31 - .../WebCore/generated/NumberConstructor.lut.h | 18 - .../WebCore/generated/RegExpConstructor.lut.h | 34 - .../webkit/WebCore/generated/RegExpObject.lut.h | 18 - .../webkit/WebCore/generated/SVGElementFactory.cpp | 168 + src/3rdparty/webkit/WebCore/generated/SVGNames.cpp | 969 +- src/3rdparty/webkit/WebCore/generated/SVGNames.h | 321 +- .../webkit/WebCore/generated/StringPrototype.lut.h | 48 - .../WebCore/generated/UserAgentStyleSheets.h | 8 +- .../WebCore/generated/UserAgentStyleSheetsData.cpp | 1144 +- .../webkit/WebCore/generated/WebKitVersion.h | 4 +- .../webkit/WebCore/generated/XLinkNames.cpp | 23 +- src/3rdparty/webkit/WebCore/generated/XLinkNames.h | 7 - .../webkit/WebCore/generated/XMLNSNames.cpp | 81 + src/3rdparty/webkit/WebCore/generated/XMLNSNames.h | 54 + src/3rdparty/webkit/WebCore/generated/XMLNames.cpp | 11 +- .../webkit/WebCore/generated/XPathGrammar.cpp | 514 +- .../webkit/WebCore/generated/XPathGrammar.h | 64 +- src/3rdparty/webkit/WebCore/generated/chartables.c | 96 - .../webkit/WebCore/generated/tokenizer.cpp | 4 +- .../webkit/WebCore/history/BackForwardList.cpp | 44 +- .../webkit/WebCore/history/BackForwardList.h | 7 +- .../WebCore/history/BackForwardListChromium.cpp | 10 + .../webkit/WebCore/history/CachedFrame.cpp | 23 +- src/3rdparty/webkit/WebCore/history/CachedFrame.h | 16 +- src/3rdparty/webkit/WebCore/history/CachedPage.cpp | 1 + src/3rdparty/webkit/WebCore/history/CachedPage.h | 11 +- .../webkit/WebCore/history/HistoryItem.cpp | 56 +- src/3rdparty/webkit/WebCore/history/HistoryItem.h | 29 +- src/3rdparty/webkit/WebCore/html/Blob.cpp | 53 + src/3rdparty/webkit/WebCore/html/Blob.h | 62 + src/3rdparty/webkit/WebCore/html/Blob.idl | 37 + .../webkit/WebCore/html/CollectionCache.cpp | 8 + src/3rdparty/webkit/WebCore/html/CollectionCache.h | 8 +- .../webkit/WebCore/html/DataGridColumn.idl | 1 - .../webkit/WebCore/html/DataGridColumnList.idl | 1 - .../webkit/WebCore/html/DateComponents.cpp | 681 + src/3rdparty/webkit/WebCore/html/DateComponents.h | 190 + src/3rdparty/webkit/WebCore/html/File.cpp | 16 +- src/3rdparty/webkit/WebCore/html/File.h | 30 +- src/3rdparty/webkit/WebCore/html/File.idl | 8 +- src/3rdparty/webkit/WebCore/html/FileList.idl | 1 - .../webkit/WebCore/html/HTMLAllCollection.idl | 1 - .../webkit/WebCore/html/HTMLAnchorElement.cpp | 132 +- .../webkit/WebCore/html/HTMLAnchorElement.h | 14 + .../webkit/WebCore/html/HTMLAnchorElement.idl | 18 +- .../webkit/WebCore/html/HTMLAppletElement.cpp | 21 +- .../webkit/WebCore/html/HTMLAppletElement.h | 1 + .../webkit/WebCore/html/HTMLAppletElement.idl | 5 +- .../webkit/WebCore/html/HTMLAreaElement.cpp | 73 +- src/3rdparty/webkit/WebCore/html/HTMLAreaElement.h | 13 +- .../webkit/WebCore/html/HTMLAreaElement.idl | 6 +- .../webkit/WebCore/html/HTMLAttributeNames.in | 25 +- .../webkit/WebCore/html/HTMLAudioElement.cpp | 20 +- .../webkit/WebCore/html/HTMLAudioElement.h | 10 +- .../webkit/WebCore/html/HTMLAudioElement.idl | 2 +- src/3rdparty/webkit/WebCore/html/HTMLBRElement.idl | 6 +- .../webkit/WebCore/html/HTMLBaseElement.idl | 6 +- .../webkit/WebCore/html/HTMLBaseFontElement.idl | 6 +- .../webkit/WebCore/html/HTMLBlockquoteElement.idl | 6 +- .../webkit/WebCore/html/HTMLBodyElement.cpp | 2 + src/3rdparty/webkit/WebCore/html/HTMLBodyElement.h | 4 +- .../webkit/WebCore/html/HTMLBodyElement.idl | 10 +- .../webkit/WebCore/html/HTMLButtonElement.idl | 9 +- .../webkit/WebCore/html/HTMLCanvasElement.cpp | 39 +- .../webkit/WebCore/html/HTMLCanvasElement.h | 7 +- .../webkit/WebCore/html/HTMLCanvasElement.idl | 8 +- .../webkit/WebCore/html/HTMLCollection.cpp | 10 +- .../webkit/WebCore/html/HTMLCollection.idl | 5 +- .../webkit/WebCore/html/HTMLDListElement.idl | 6 +- .../WebCore/html/HTMLDataGridCellElement.idl | 1 - .../webkit/WebCore/html/HTMLDataGridColElement.cpp | 6 +- .../webkit/WebCore/html/HTMLDataGridColElement.idl | 1 - .../webkit/WebCore/html/HTMLDataGridElement.idl | 1 - .../webkit/WebCore/html/HTMLDataGridRowElement.idl | 1 - .../webkit/WebCore/html/HTMLDataListElement.idl | 1 - .../webkit/WebCore/html/HTMLDirectoryElement.idl | 6 +- .../webkit/WebCore/html/HTMLDivElement.idl | 6 +- src/3rdparty/webkit/WebCore/html/HTMLDocument.cpp | 7 +- src/3rdparty/webkit/WebCore/html/HTMLDocument.h | 1 - src/3rdparty/webkit/WebCore/html/HTMLDocument.idl | 5 +- src/3rdparty/webkit/WebCore/html/HTMLElement.cpp | 79 +- src/3rdparty/webkit/WebCore/html/HTMLElement.h | 3 +- src/3rdparty/webkit/WebCore/html/HTMLElement.idl | 5 +- .../webkit/WebCore/html/HTMLEmbedElement.cpp | 14 +- .../webkit/WebCore/html/HTMLEmbedElement.idl | 7 +- .../webkit/WebCore/html/HTMLFieldSetElement.idl | 9 +- .../webkit/WebCore/html/HTMLFontElement.idl | 6 +- .../webkit/WebCore/html/HTMLFormCollection.cpp | 14 +- .../webkit/WebCore/html/HTMLFormControlElement.cpp | 56 +- .../webkit/WebCore/html/HTMLFormControlElement.h | 15 +- .../webkit/WebCore/html/HTMLFormElement.cpp | 17 +- src/3rdparty/webkit/WebCore/html/HTMLFormElement.h | 5 +- .../webkit/WebCore/html/HTMLFormElement.idl | 5 +- .../webkit/WebCore/html/HTMLFrameElement.idl | 8 +- .../webkit/WebCore/html/HTMLFrameElementBase.cpp | 59 +- .../webkit/WebCore/html/HTMLFrameElementBase.h | 12 + .../webkit/WebCore/html/HTMLFrameOwnerElement.cpp | 12 + .../webkit/WebCore/html/HTMLFrameOwnerElement.h | 11 +- .../webkit/WebCore/html/HTMLFrameSetElement.cpp | 2 + .../webkit/WebCore/html/HTMLFrameSetElement.h | 1 + .../webkit/WebCore/html/HTMLFrameSetElement.idl | 9 +- src/3rdparty/webkit/WebCore/html/HTMLHRElement.idl | 6 +- src/3rdparty/webkit/WebCore/html/HTMLHeadElement.h | 2 - .../webkit/WebCore/html/HTMLHeadElement.idl | 6 +- .../webkit/WebCore/html/HTMLHeadingElement.cpp | 2 - .../webkit/WebCore/html/HTMLHeadingElement.h | 2 - .../webkit/WebCore/html/HTMLHeadingElement.idl | 6 +- src/3rdparty/webkit/WebCore/html/HTMLHtmlElement.h | 2 - .../webkit/WebCore/html/HTMLHtmlElement.idl | 6 +- .../webkit/WebCore/html/HTMLIFrameElement.cpp | 52 +- .../webkit/WebCore/html/HTMLIFrameElement.h | 2 - .../webkit/WebCore/html/HTMLIFrameElement.idl | 9 +- .../webkit/WebCore/html/HTMLImageElement.cpp | 53 +- .../webkit/WebCore/html/HTMLImageElement.h | 14 +- .../webkit/WebCore/html/HTMLImageElement.idl | 6 +- src/3rdparty/webkit/WebCore/html/HTMLImageLoader.h | 2 - .../webkit/WebCore/html/HTMLInputElement.cpp | 1303 +- .../webkit/WebCore/html/HTMLInputElement.h | 78 +- .../webkit/WebCore/html/HTMLInputElement.idl | 36 +- .../webkit/WebCore/html/HTMLIsIndexElement.idl | 6 +- src/3rdparty/webkit/WebCore/html/HTMLLIElement.idl | 6 +- .../webkit/WebCore/html/HTMLLabelElement.idl | 6 +- .../webkit/WebCore/html/HTMLLegendElement.idl | 6 +- .../webkit/WebCore/html/HTMLLinkElement.cpp | 35 +- src/3rdparty/webkit/WebCore/html/HTMLLinkElement.h | 2 +- .../webkit/WebCore/html/HTMLLinkElement.idl | 8 +- .../webkit/WebCore/html/HTMLMapElement.cpp | 24 +- src/3rdparty/webkit/WebCore/html/HTMLMapElement.h | 6 +- .../webkit/WebCore/html/HTMLMapElement.idl | 6 +- .../webkit/WebCore/html/HTMLMarqueeElement.cpp | 25 +- .../webkit/WebCore/html/HTMLMarqueeElement.h | 4 + .../webkit/WebCore/html/HTMLMarqueeElement.idl | 6 +- .../webkit/WebCore/html/HTMLMediaElement.cpp | 338 +- .../webkit/WebCore/html/HTMLMediaElement.h | 43 +- .../webkit/WebCore/html/HTMLMediaElement.idl | 13 +- .../webkit/WebCore/html/HTMLMenuElement.idl | 6 +- src/3rdparty/webkit/WebCore/html/HTMLMetaElement.h | 2 - .../webkit/WebCore/html/HTMLMetaElement.idl | 6 +- .../webkit/WebCore/html/HTMLModElement.cpp | 2 - src/3rdparty/webkit/WebCore/html/HTMLModElement.h | 2 - .../webkit/WebCore/html/HTMLModElement.idl | 6 +- .../webkit/WebCore/html/HTMLNameCollection.cpp | 8 +- .../webkit/WebCore/html/HTMLOListElement.idl | 6 +- .../webkit/WebCore/html/HTMLObjectElement.cpp | 18 +- .../webkit/WebCore/html/HTMLObjectElement.idl | 7 +- .../webkit/WebCore/html/HTMLOptGroupElement.idl | 6 +- .../webkit/WebCore/html/HTMLOptionElement.cpp | 46 +- .../webkit/WebCore/html/HTMLOptionElement.h | 11 +- .../webkit/WebCore/html/HTMLOptionElement.idl | 5 +- .../webkit/WebCore/html/HTMLOptionsCollection.cpp | 2 - .../webkit/WebCore/html/HTMLOptionsCollection.idl | 4 +- .../webkit/WebCore/html/HTMLParagraphElement.idl | 6 +- .../webkit/WebCore/html/HTMLParamElement.cpp | 2 +- .../webkit/WebCore/html/HTMLParamElement.idl | 6 +- src/3rdparty/webkit/WebCore/html/HTMLParser.cpp | 77 +- src/3rdparty/webkit/WebCore/html/HTMLParser.h | 10 +- .../webkit/WebCore/html/HTMLPlugInElement.cpp | 9 +- .../webkit/WebCore/html/HTMLPreElement.cpp | 2 - src/3rdparty/webkit/WebCore/html/HTMLPreElement.h | 2 - .../webkit/WebCore/html/HTMLPreElement.idl | 6 +- .../webkit/WebCore/html/HTMLQuoteElement.idl | 6 +- .../webkit/WebCore/html/HTMLScriptElement.idl | 6 +- .../webkit/WebCore/html/HTMLSelectElement.cpp | 8 +- .../webkit/WebCore/html/HTMLSelectElement.h | 4 +- .../webkit/WebCore/html/HTMLSelectElement.idl | 8 +- .../webkit/WebCore/html/HTMLSourceElement.idl | 2 +- .../webkit/WebCore/html/HTMLStyleElement.idl | 8 +- .../WebCore/html/HTMLTableCaptionElement.idl | 5 +- .../webkit/WebCore/html/HTMLTableCellElement.cpp | 2 - .../webkit/WebCore/html/HTMLTableCellElement.h | 2 - .../webkit/WebCore/html/HTMLTableCellElement.idl | 6 +- .../webkit/WebCore/html/HTMLTableColElement.cpp | 2 - .../webkit/WebCore/html/HTMLTableColElement.h | 2 - .../webkit/WebCore/html/HTMLTableColElement.idl | 6 +- .../webkit/WebCore/html/HTMLTableElement.idl | 6 +- .../webkit/WebCore/html/HTMLTablePartElement.cpp | 2 - .../webkit/WebCore/html/HTMLTablePartElement.h | 2 - .../webkit/WebCore/html/HTMLTableRowElement.idl | 6 +- .../WebCore/html/HTMLTableSectionElement.idl | 5 +- src/3rdparty/webkit/WebCore/html/HTMLTagNames.in | 11 +- .../webkit/WebCore/html/HTMLTextAreaElement.cpp | 26 +- .../webkit/WebCore/html/HTMLTextAreaElement.h | 1 + .../webkit/WebCore/html/HTMLTextAreaElement.idl | 9 +- .../webkit/WebCore/html/HTMLTitleElement.h | 2 - .../webkit/WebCore/html/HTMLTitleElement.idl | 6 +- src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp | 86 +- src/3rdparty/webkit/WebCore/html/HTMLTokenizer.h | 13 +- .../webkit/WebCore/html/HTMLUListElement.idl | 6 +- .../webkit/WebCore/html/HTMLVideoElement.cpp | 85 +- .../webkit/WebCore/html/HTMLVideoElement.h | 20 +- .../webkit/WebCore/html/HTMLVideoElement.idl | 10 +- src/3rdparty/webkit/WebCore/html/ImageData.idl | 3 +- src/3rdparty/webkit/WebCore/html/MediaError.idl | 2 +- src/3rdparty/webkit/WebCore/html/TextMetrics.idl | 4 +- src/3rdparty/webkit/WebCore/html/TimeRanges.idl | 2 +- src/3rdparty/webkit/WebCore/html/ValidityState.cpp | 122 +- src/3rdparty/webkit/WebCore/html/ValidityState.h | 56 +- src/3rdparty/webkit/WebCore/html/ValidityState.idl | 2 +- src/3rdparty/webkit/WebCore/html/VoidCallback.idl | 2 +- .../webkit/WebCore/html/canvas/CanvasActiveInfo.h | 62 - .../WebCore/html/canvas/CanvasActiveInfo.idl | 36 - .../webkit/WebCore/html/canvas/CanvasArray.cpp | 52 - .../webkit/WebCore/html/canvas/CanvasArray.h | 75 - .../webkit/WebCore/html/canvas/CanvasArray.idl | 32 - .../WebCore/html/canvas/CanvasArrayBuffer.cpp | 57 - .../webkit/WebCore/html/canvas/CanvasArrayBuffer.h | 51 - .../WebCore/html/canvas/CanvasArrayBuffer.idl | 30 - .../webkit/WebCore/html/canvas/CanvasBuffer.cpp | 53 - .../webkit/WebCore/html/canvas/CanvasBuffer.h | 50 - .../webkit/WebCore/html/canvas/CanvasBuffer.idl | 29 - .../webkit/WebCore/html/canvas/CanvasByteArray.cpp | 77 - .../webkit/WebCore/html/canvas/CanvasByteArray.h | 90 - .../webkit/WebCore/html/canvas/CanvasByteArray.idl | 36 - .../html/canvas/CanvasContextAttributes.cpp | 41 + .../WebCore/html/canvas/CanvasContextAttributes.h | 48 + .../WebCore/html/canvas/CanvasFloatArray.cpp | 78 - .../webkit/WebCore/html/canvas/CanvasFloatArray.h | 86 - .../WebCore/html/canvas/CanvasFloatArray.idl | 36 - .../WebCore/html/canvas/CanvasFramebuffer.cpp | 53 - .../webkit/WebCore/html/canvas/CanvasFramebuffer.h | 50 - .../WebCore/html/canvas/CanvasFramebuffer.idl | 29 - .../webkit/WebCore/html/canvas/CanvasGradient.idl | 3 +- .../webkit/WebCore/html/canvas/CanvasIntArray.cpp | 82 - .../webkit/WebCore/html/canvas/CanvasIntArray.h | 88 - .../webkit/WebCore/html/canvas/CanvasIntArray.idl | 36 - .../WebCore/html/canvas/CanvasNumberArray.idl | 1 - .../webkit/WebCore/html/canvas/CanvasObject.cpp | 18 +- .../webkit/WebCore/html/canvas/CanvasObject.h | 17 +- .../webkit/WebCore/html/canvas/CanvasPattern.idl | 3 +- .../webkit/WebCore/html/canvas/CanvasPixelArray.h | 1 + .../WebCore/html/canvas/CanvasPixelArray.idl | 1 + .../webkit/WebCore/html/canvas/CanvasProgram.cpp | 53 - .../webkit/WebCore/html/canvas/CanvasProgram.h | 50 - .../webkit/WebCore/html/canvas/CanvasProgram.idl | 29 - .../WebCore/html/canvas/CanvasRenderbuffer.cpp | 53 - .../WebCore/html/canvas/CanvasRenderbuffer.h | 50 - .../WebCore/html/canvas/CanvasRenderbuffer.idl | 29 - .../WebCore/html/canvas/CanvasRenderingContext.idl | 1 - .../html/canvas/CanvasRenderingContext2D.cpp | 59 +- .../WebCore/html/canvas/CanvasRenderingContext2D.h | 4 +- .../html/canvas/CanvasRenderingContext2D.idl | 1 - .../html/canvas/CanvasRenderingContext3D.cpp | 1441 - .../WebCore/html/canvas/CanvasRenderingContext3D.h | 327 - .../html/canvas/CanvasRenderingContext3D.idl | 689 - .../webkit/WebCore/html/canvas/CanvasShader.cpp | 53 - .../webkit/WebCore/html/canvas/CanvasShader.h | 50 - .../webkit/WebCore/html/canvas/CanvasShader.idl | 29 - .../WebCore/html/canvas/CanvasShortArray.cpp | 82 - .../webkit/WebCore/html/canvas/CanvasShortArray.h | 86 - .../WebCore/html/canvas/CanvasShortArray.idl | 36 - .../webkit/WebCore/html/canvas/CanvasStyle.cpp | 28 +- .../webkit/WebCore/html/canvas/CanvasTexture.cpp | 54 - .../webkit/WebCore/html/canvas/CanvasTexture.h | 61 - .../webkit/WebCore/html/canvas/CanvasTexture.idl | 29 - .../html/canvas/CanvasUnsignedByteArray.cpp | 78 - .../WebCore/html/canvas/CanvasUnsignedByteArray.h | 86 - .../html/canvas/CanvasUnsignedByteArray.idl | 36 - .../WebCore/html/canvas/CanvasUnsignedIntArray.cpp | 83 - .../WebCore/html/canvas/CanvasUnsignedIntArray.h | 86 - .../WebCore/html/canvas/CanvasUnsignedIntArray.idl | 36 - .../html/canvas/CanvasUnsignedShortArray.cpp | 85 - .../WebCore/html/canvas/CanvasUnsignedShortArray.h | 87 - .../html/canvas/CanvasUnsignedShortArray.idl | 36 - .../webkit/WebCore/html/canvas/WebGLActiveInfo.h | 62 + .../webkit/WebCore/html/canvas/WebGLActiveInfo.idl | 37 + .../webkit/WebCore/html/canvas/WebGLArray.cpp | 60 + .../webkit/WebCore/html/canvas/WebGLArray.h | 81 + .../webkit/WebCore/html/canvas/WebGLArray.idl | 35 + .../WebCore/html/canvas/WebGLArrayBuffer.cpp | 71 + .../webkit/WebCore/html/canvas/WebGLArrayBuffer.h | 53 + .../WebCore/html/canvas/WebGLArrayBuffer.idl | 30 + .../webkit/WebCore/html/canvas/WebGLBuffer.cpp | 166 + .../webkit/WebCore/html/canvas/WebGLBuffer.h | 94 + .../webkit/WebCore/html/canvas/WebGLBuffer.idl | 29 + .../webkit/WebCore/html/canvas/WebGLByteArray.cpp | 93 + .../webkit/WebCore/html/canvas/WebGLByteArray.h | 100 + .../webkit/WebCore/html/canvas/WebGLByteArray.idl | 42 + .../WebCore/html/canvas/WebGLContextAttributes.cpp | 117 + .../WebCore/html/canvas/WebGLContextAttributes.h | 82 + .../WebCore/html/canvas/WebGLContextAttributes.idl | 38 + .../webkit/WebCore/html/canvas/WebGLFloatArray.cpp | 95 + .../webkit/WebCore/html/canvas/WebGLFloatArray.h | 95 + .../webkit/WebCore/html/canvas/WebGLFloatArray.idl | 42 + .../WebCore/html/canvas/WebGLFramebuffer.cpp | 53 + .../webkit/WebCore/html/canvas/WebGLFramebuffer.h | 50 + .../WebCore/html/canvas/WebGLFramebuffer.idl | 29 + .../webkit/WebCore/html/canvas/WebGLGetInfo.cpp | 215 + .../webkit/WebCore/html/canvas/WebGLGetInfo.h | 131 + .../webkit/WebCore/html/canvas/WebGLIntArray.cpp | 99 + .../webkit/WebCore/html/canvas/WebGLIntArray.h | 97 + .../webkit/WebCore/html/canvas/WebGLIntArray.idl | 42 + .../webkit/WebCore/html/canvas/WebGLProgram.cpp | 53 + .../webkit/WebCore/html/canvas/WebGLProgram.h | 50 + .../webkit/WebCore/html/canvas/WebGLProgram.idl | 29 + .../WebCore/html/canvas/WebGLRenderbuffer.cpp | 64 + .../webkit/WebCore/html/canvas/WebGLRenderbuffer.h | 55 + .../WebCore/html/canvas/WebGLRenderbuffer.idl | 29 + .../WebCore/html/canvas/WebGLRenderingContext.cpp | 2531 + .../WebCore/html/canvas/WebGLRenderingContext.h | 360 + .../WebCore/html/canvas/WebGLRenderingContext.idl | 676 + .../webkit/WebCore/html/canvas/WebGLShader.cpp | 53 + .../webkit/WebCore/html/canvas/WebGLShader.h | 50 + .../webkit/WebCore/html/canvas/WebGLShader.idl | 29 + .../webkit/WebCore/html/canvas/WebGLShortArray.cpp | 98 + .../webkit/WebCore/html/canvas/WebGLShortArray.h | 94 + .../webkit/WebCore/html/canvas/WebGLShortArray.idl | 41 + .../webkit/WebCore/html/canvas/WebGLTexture.cpp | 66 + .../webkit/WebCore/html/canvas/WebGLTexture.h | 66 + .../webkit/WebCore/html/canvas/WebGLTexture.idl | 29 + .../WebCore/html/canvas/WebGLUniformLocation.cpp | 48 + .../WebCore/html/canvas/WebGLUniformLocation.h | 58 + .../WebCore/html/canvas/WebGLUniformLocation.idl | 30 + .../WebCore/html/canvas/WebGLUnsignedByteArray.cpp | 95 + .../WebCore/html/canvas/WebGLUnsignedByteArray.h | 95 + .../WebCore/html/canvas/WebGLUnsignedByteArray.idl | 42 + .../WebCore/html/canvas/WebGLUnsignedIntArray.cpp | 100 + .../WebCore/html/canvas/WebGLUnsignedIntArray.h | 95 + .../WebCore/html/canvas/WebGLUnsignedIntArray.idl | 42 + .../html/canvas/WebGLUnsignedShortArray.cpp | 102 + .../WebCore/html/canvas/WebGLUnsignedShortArray.h | 96 + .../html/canvas/WebGLUnsignedShortArray.idl | 42 + .../webkit/WebCore/inspector/ConsoleMessage.cpp | 18 +- .../webkit/WebCore/inspector/ConsoleMessage.h | 5 +- .../webkit/WebCore/inspector/InjectedScript.cpp | 91 + .../webkit/WebCore/inspector/InjectedScript.h | 66 + .../WebCore/inspector/InjectedScriptHost.cpp | 208 + .../webkit/WebCore/inspector/InjectedScriptHost.h | 107 + .../WebCore/inspector/InjectedScriptHost.idl | 60 + .../webkit/WebCore/inspector/InspectorBackend.cpp | 419 +- .../webkit/WebCore/inspector/InspectorBackend.h | 101 +- .../webkit/WebCore/inspector/InspectorBackend.idl | 81 +- .../webkit/WebCore/inspector/InspectorClient.h | 5 +- .../WebCore/inspector/InspectorController.cpp | 569 +- .../webkit/WebCore/inspector/InspectorController.h | 177 +- .../webkit/WebCore/inspector/InspectorDOMAgent.cpp | 218 +- .../webkit/WebCore/inspector/InspectorDOMAgent.h | 14 +- .../inspector/InspectorDatabaseResource.cpp | 4 - .../webkit/WebCore/inspector/InspectorFrontend.cpp | 472 +- .../webkit/WebCore/inspector/InspectorFrontend.h | 47 +- .../WebCore/inspector/InspectorFrontendHost.cpp | 185 + .../WebCore/inspector/InspectorFrontendHost.h | 139 + .../WebCore/inspector/InspectorFrontendHost.idl | 53 + .../webkit/WebCore/inspector/InspectorResource.cpp | 121 +- .../webkit/WebCore/inspector/InspectorResource.h | 33 +- .../WebCore/inspector/InspectorTimelineAgent.cpp | 112 +- .../WebCore/inspector/InspectorTimelineAgent.h | 43 +- .../WebCore/inspector/JavaScriptCallFrame.cpp | 4 +- .../webkit/WebCore/inspector/JavaScriptCallFrame.h | 2 +- .../WebCore/inspector/JavaScriptCallFrame.idl | 2 +- .../WebCore/inspector/JavaScriptDebugListener.h | 2 +- .../WebCore/inspector/JavaScriptDebugServer.cpp | 14 +- .../WebCore/inspector/JavaScriptDebugServer.h | 17 +- .../webkit/WebCore/inspector/JavaScriptProfile.cpp | 183 - .../webkit/WebCore/inspector/JavaScriptProfile.h | 46 - .../WebCore/inspector/JavaScriptProfileNode.cpp | 236 - .../WebCore/inspector/JavaScriptProfileNode.h | 48 - .../WebCore/inspector/TimelineRecordFactory.cpp | 101 +- .../WebCore/inspector/TimelineRecordFactory.h | 29 +- .../inspector/front-end/AbstractTimelinePanel.js | 152 +- .../WebCore/inspector/front-end/AuditCategories.js | 70 + .../inspector/front-end/AuditLauncherView.js | 224 + .../WebCore/inspector/front-end/AuditResultView.js | 138 + .../WebCore/inspector/front-end/AuditRules.js | 1213 + .../WebCore/inspector/front-end/AuditsPanel.js | 480 + .../front-end/BottomUpProfileDataGridTree.js | 22 +- .../WebCore/inspector/front-end/Breakpoint.js | 2 +- .../inspector/front-end/BreakpointsSidebarPane.js | 28 +- .../inspector/front-end/CallStackSidebarPane.js | 3 +- .../WebCore/inspector/front-end/ConsolePanel.js | 88 + .../WebCore/inspector/front-end/ConsoleView.js | 341 +- .../WebCore/inspector/front-end/ContextMenu.js | 83 + .../WebCore/inspector/front-end/CookieItemsView.js | 318 +- .../webkit/WebCore/inspector/front-end/DOMAgent.js | 83 +- .../WebCore/inspector/front-end/DOMStorage.js | 6 +- .../inspector/front-end/DOMStorageDataGrid.js | 161 - .../inspector/front-end/DOMStorageItemsView.js | 76 +- .../inspector/front-end/DOMSyntaxHighlighter.js | 79 + .../webkit/WebCore/inspector/front-end/DataGrid.js | 283 +- .../webkit/WebCore/inspector/front-end/Database.js | 5 +- .../inspector/front-end/DatabaseQueryView.js | 6 +- .../inspector/front-end/DatabaseTableView.js | 1 + .../webkit/WebCore/inspector/front-end/Drawer.js | 144 +- .../WebCore/inspector/front-end/ElementsPanel.js | 189 +- .../inspector/front-end/ElementsTreeOutline.js | 519 +- .../front-end/EventListenersSidebarPane.js | 22 +- .../webkit/WebCore/inspector/front-end/FontView.js | 2 +- .../inspector/front-end/Images/consoleIcon.png | Bin 0 -> 2930 bytes .../inspector/front-end/Images/gearButtonGlyph.png | Bin 0 -> 323 bytes .../inspector/front-end/Images/popoverArrows.png | Bin 0 -> 784 bytes .../front-end/Images/popoverBackground.png | Bin 0 -> 2233 bytes .../front-end/Images/thumbActiveHoriz.png | Bin 0 -> 647 bytes .../inspector/front-end/Images/thumbActiveVert.png | Bin 0 -> 599 bytes .../inspector/front-end/Images/thumbHoriz.png | Bin 0 -> 657 bytes .../inspector/front-end/Images/thumbHoverHoriz.png | Bin 0 -> 667 bytes .../inspector/front-end/Images/thumbHoverVert.png | Bin 0 -> 583 bytes .../inspector/front-end/Images/thumbVert.png | Bin 0 -> 568 bytes .../inspector/front-end/Images/tipBalloon.png | Bin 3689 -> 0 bytes .../front-end/Images/tipBalloonBottom.png | Bin 3139 -> 0 bytes .../WebCore/inspector/front-end/Images/tipIcon.png | Bin 1212 -> 0 bytes .../inspector/front-end/Images/tipIconPressed.png | Bin 1224 -> 0 bytes .../inspector/front-end/Images/trackHoriz.png | Bin 0 -> 520 bytes .../inspector/front-end/Images/trackVert.png | Bin 0 -> 523 bytes .../WebCore/inspector/front-end/InjectedScript.js | 467 +- .../inspector/front-end/InjectedScriptAccess.js | 30 +- .../inspector/front-end/InspectorBackendStub.js | 266 + .../inspector/front-end/InspectorControllerStub.js | 296 - .../front-end/InspectorFrontendHostStub.js | 101 + .../inspector/front-end/KeyboardShortcut.js | 16 +- .../inspector/front-end/MetricsSidebarPane.js | 26 +- .../inspector/front-end/ObjectPropertiesSection.js | 21 +- .../WebCore/inspector/front-end/ObjectProxy.js | 22 +- .../webkit/WebCore/inspector/front-end/Panel.js | 68 +- .../inspector/front-end/PanelEnablerView.js | 11 +- .../webkit/WebCore/inspector/front-end/Popover.js | 147 + .../webkit/WebCore/inspector/front-end/Popup.js | 168 - .../inspector/front-end/ProfileDataGridTree.js | 1 + .../WebCore/inspector/front-end/ProfileView.js | 40 +- .../WebCore/inspector/front-end/ProfilesPanel.js | 78 +- .../inspector/front-end/PropertiesSection.js | 112 +- .../inspector/front-end/PropertiesSidebarPane.js | 15 +- .../webkit/WebCore/inspector/front-end/Resource.js | 145 +- .../WebCore/inspector/front-end/ResourceView.js | 164 +- .../WebCore/inspector/front-end/ResourcesPanel.js | 129 +- .../WebCore/inspector/front-end/ScriptView.js | 25 +- .../WebCore/inspector/front-end/ScriptsPanel.js | 201 +- .../webkit/WebCore/inspector/front-end/Section.js | 140 + .../webkit/WebCore/inspector/front-end/Settings.js | 99 + .../WebCore/inspector/front-end/SidebarPane.js | 8 + .../inspector/front-end/SourceCSSTokenizer.js | 1473 + .../inspector/front-end/SourceCSSTokenizer.re2js | 318 + .../WebCore/inspector/front-end/SourceFrame.js | 1578 +- .../inspector/front-end/SourceHTMLTokenizer.js | 658 + .../inspector/front-end/SourceHTMLTokenizer.re2js | 274 + .../front-end/SourceJavaScriptTokenizer.js | 2416 + .../front-end/SourceJavaScriptTokenizer.re2js | 177 + .../WebCore/inspector/front-end/SourceTokenizer.js | 105 + .../WebCore/inspector/front-end/SourceView.js | 132 +- .../WebCore/inspector/front-end/StatusBarButton.js | 54 +- .../WebCore/inspector/front-end/StoragePanel.js | 70 +- .../inspector/front-end/StylesSidebarPane.js | 78 +- .../WebCore/inspector/front-end/TestController.js | 29 +- .../inspector/front-end/TextEditorHighlighter.js | 169 + .../WebCore/inspector/front-end/TextEditorModel.js | 309 + .../WebCore/inspector/front-end/TextPrompt.js | 138 +- .../WebCore/inspector/front-end/TextViewer.js | 688 + .../WebCore/inspector/front-end/TimelineAgent.js | 24 +- .../WebCore/inspector/front-end/TimelineGrid.js | 144 + .../inspector/front-end/TimelineOverviewPane.js | 388 + .../WebCore/inspector/front-end/TimelinePanel.js | 561 +- .../front-end/TopDownProfileDataGridTree.js | 11 + .../front-end/WatchExpressionsSidebarPane.js | 98 +- .../webkit/WebCore/inspector/front-end/WebKit.qrc | 45 +- .../WebCore/inspector/front-end/WelcomeView.js | 73 + .../webkit/WebCore/inspector/front-end/audits.css | 272 + .../WebCore/inspector/front-end/inspector.css | 596 +- .../WebCore/inspector/front-end/inspector.html | 35 +- .../WebCore/inspector/front-end/inspector.js | 755 +- .../front-end/inspectorSyntaxHighlight.css | 58 +- .../webkit/WebCore/inspector/front-end/popover.css | 200 + .../WebCore/inspector/front-end/textViewer.css | 148 + .../WebCore/inspector/front-end/treeoutline.js | 28 +- .../WebCore/inspector/front-end/utilities.js | 135 +- src/3rdparty/webkit/WebCore/loader/Cache.cpp | 27 +- src/3rdparty/webkit/WebCore/loader/Cache.h | 2 +- src/3rdparty/webkit/WebCore/loader/CachePolicy.h | 3 +- .../webkit/WebCore/loader/CachedCSSStyleSheet.cpp | 21 +- .../webkit/WebCore/loader/CachedCSSStyleSheet.h | 4 +- src/3rdparty/webkit/WebCore/loader/CachedFont.cpp | 4 +- src/3rdparty/webkit/WebCore/loader/CachedImage.cpp | 3 +- .../webkit/WebCore/loader/CachedResource.cpp | 6 +- .../webkit/WebCore/loader/CachedResource.h | 9 +- .../webkit/WebCore/loader/CachedResourceClient.h | 5 +- .../webkit/WebCore/loader/CachedResourceHandle.h | 2 +- .../webkit/WebCore/loader/CachedXSLStyleSheet.cpp | 5 +- .../WebCore/loader/CrossOriginAccessControl.cpp | 3 + .../loader/CrossOriginPreflightResultCache.h | 2 + src/3rdparty/webkit/WebCore/loader/DocLoader.cpp | 10 +- src/3rdparty/webkit/WebCore/loader/DocLoader.h | 2 +- .../webkit/WebCore/loader/DocumentLoader.cpp | 69 +- .../webkit/WebCore/loader/DocumentLoader.h | 4 +- .../WebCore/loader/DocumentThreadableLoader.cpp | 17 +- .../WebCore/loader/DocumentThreadableLoader.h | 5 +- src/3rdparty/webkit/WebCore/loader/EmptyClients.h | 38 +- .../webkit/WebCore/loader/FTPDirectoryDocument.cpp | 53 +- .../webkit/WebCore/loader/FTPDirectoryParser.cpp | 29 +- src/3rdparty/webkit/WebCore/loader/FormState.cpp | 7 +- src/3rdparty/webkit/WebCore/loader/FormState.h | 11 +- src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp | 519 +- src/3rdparty/webkit/WebCore/loader/FrameLoader.h | 23 +- .../webkit/WebCore/loader/FrameLoaderClient.h | 18 +- .../webkit/WebCore/loader/FrameLoaderTypes.h | 17 + .../webkit/WebCore/loader/HistoryController.cpp | 45 +- .../webkit/WebCore/loader/HistoryController.h | 6 +- .../webkit/WebCore/loader/ImageDocument.cpp | 8 +- src/3rdparty/webkit/WebCore/loader/ImageLoader.cpp | 76 +- src/3rdparty/webkit/WebCore/loader/ImageLoader.h | 7 +- .../webkit/WebCore/loader/MainResourceLoader.cpp | 31 + .../webkit/WebCore/loader/MainResourceLoader.h | 6 +- .../webkit/WebCore/loader/MediaDocument.cpp | 8 +- .../webkit/WebCore/loader/PlaceholderDocument.cpp | 5 - .../webkit/WebCore/loader/PlaceholderDocument.h | 2 +- .../webkit/WebCore/loader/ProgressTracker.cpp | 14 +- .../webkit/WebCore/loader/RedirectScheduler.cpp | 38 +- src/3rdparty/webkit/WebCore/loader/Request.cpp | 4 +- src/3rdparty/webkit/WebCore/loader/Request.h | 9 +- .../webkit/WebCore/loader/ResourceLoadNotifier.cpp | 13 +- .../webkit/WebCore/loader/ResourceLoadNotifier.h | 2 +- .../webkit/WebCore/loader/ResourceLoader.cpp | 2 +- .../webkit/WebCore/loader/SubresourceLoader.cpp | 6 +- .../webkit/WebCore/loader/SubresourceLoader.h | 7 +- .../WebCore/loader/SubresourceLoaderClient.h | 2 +- .../webkit/WebCore/loader/ThreadableLoader.h | 2 +- .../webkit/WebCore/loader/ThreadableLoaderClient.h | 2 +- .../WebCore/loader/WorkerThreadableLoader.cpp | 6 +- .../webkit/WebCore/loader/WorkerThreadableLoader.h | 8 +- .../WebCore/loader/appcache/ApplicationCache.h | 2 +- .../loader/appcache/ApplicationCacheGroup.cpp | 7 +- .../loader/appcache/ApplicationCacheHost.cpp | 21 + .../WebCore/loader/appcache/ApplicationCacheHost.h | 9 +- .../loader/appcache/ApplicationCacheStorage.cpp | 2 +- .../loader/appcache/ApplicationCacheStorage.h | 2 +- .../loader/appcache/DOMApplicationCache.cpp | 6 +- .../loader/appcache/DOMApplicationCache.idl | 3 +- .../WebCore/loader/archive/ArchiveFactory.cpp | 15 +- .../WebCore/loader/icon/IconDatabaseClient.h | 4 +- src/3rdparty/webkit/WebCore/loader/loader.cpp | 38 +- src/3rdparty/webkit/WebCore/loader/loader.h | 3 +- .../webkit/WebCore/mathml/MathMLElement.cpp | 39 +- src/3rdparty/webkit/WebCore/mathml/MathMLElement.h | 39 +- .../mathml/MathMLInlineContainerElement.cpp | 47 +- .../WebCore/mathml/MathMLInlineContainerElement.h | 39 +- .../webkit/WebCore/mathml/MathMLMathElement.cpp | 39 +- .../webkit/WebCore/mathml/MathMLMathElement.h | 39 +- .../webkit/WebCore/mathml/MathMLTextElement.cpp | 58 + .../webkit/WebCore/mathml/MathMLTextElement.h | 48 + .../webkit/WebCore/mathml/RenderMathMLBlock.cpp | 113 + .../webkit/WebCore/mathml/RenderMathMLBlock.h | 75 + src/3rdparty/webkit/WebCore/mathml/mathattrs.in | 13 + src/3rdparty/webkit/WebCore/mathml/mathtags.in | 1 - .../webkit/WebCore/notifications/Notification.cpp | 12 +- .../webkit/WebCore/notifications/Notification.idl | 3 +- .../WebCore/notifications/NotificationCenter.cpp | 26 +- .../WebCore/notifications/NotificationCenter.h | 14 +- .../WebCore/notifications/NotificationCenter.idl | 3 +- .../WebCore/notifications/NotificationPresenter.h | 30 +- src/3rdparty/webkit/WebCore/page/AbstractView.idl | 3 +- src/3rdparty/webkit/WebCore/page/BarInfo.cpp | 22 +- src/3rdparty/webkit/WebCore/page/BarInfo.idl | 2 +- src/3rdparty/webkit/WebCore/page/Chrome.cpp | 25 +- src/3rdparty/webkit/WebCore/page/Chrome.h | 7 + src/3rdparty/webkit/WebCore/page/ChromeClient.h | 12 + src/3rdparty/webkit/WebCore/page/Console.cpp | 41 +- src/3rdparty/webkit/WebCore/page/Console.h | 145 +- src/3rdparty/webkit/WebCore/page/Console.idl | 6 +- .../webkit/WebCore/page/ContextMenuController.cpp | 46 +- .../webkit/WebCore/page/ContextMenuController.h | 9 + .../webkit/WebCore/page/ContextMenuProvider.h | 52 + src/3rdparty/webkit/WebCore/page/Coordinates.idl | 2 +- src/3rdparty/webkit/WebCore/page/DOMSelection.idl | 2 +- src/3rdparty/webkit/WebCore/page/DOMTimer.cpp | 11 +- src/3rdparty/webkit/WebCore/page/DOMTimer.h | 7 +- src/3rdparty/webkit/WebCore/page/DOMWindow.cpp | 104 +- src/3rdparty/webkit/WebCore/page/DOMWindow.h | 69 +- src/3rdparty/webkit/WebCore/page/DOMWindow.idl | 175 +- .../webkit/WebCore/page/DragController.cpp | 46 +- src/3rdparty/webkit/WebCore/page/DragController.h | 2 +- src/3rdparty/webkit/WebCore/page/EventHandler.cpp | 311 +- src/3rdparty/webkit/WebCore/page/EventHandler.h | 28 +- src/3rdparty/webkit/WebCore/page/EventSource.cpp | 18 +- src/3rdparty/webkit/WebCore/page/EventSource.h | 2 +- src/3rdparty/webkit/WebCore/page/EventSource.idl | 1 + .../webkit/WebCore/page/FocusController.cpp | 9 +- src/3rdparty/webkit/WebCore/page/FocusController.h | 48 +- src/3rdparty/webkit/WebCore/page/Frame.cpp | 356 +- src/3rdparty/webkit/WebCore/page/Frame.h | 49 +- src/3rdparty/webkit/WebCore/page/FrameView.cpp | 192 +- src/3rdparty/webkit/WebCore/page/FrameView.h | 25 +- src/3rdparty/webkit/WebCore/page/Geolocation.cpp | 213 +- src/3rdparty/webkit/WebCore/page/Geolocation.h | 41 +- src/3rdparty/webkit/WebCore/page/Geolocation.idl | 2 +- .../webkit/WebCore/page/GeolocationController.cpp | 93 + .../webkit/WebCore/page/GeolocationController.h | 67 + .../WebCore/page/GeolocationControllerClient.h | 47 + .../webkit/WebCore/page/GeolocationError.h | 65 + .../webkit/WebCore/page/GeolocationPosition.h | 111 + src/3rdparty/webkit/WebCore/page/Geoposition.h | 7 +- src/3rdparty/webkit/WebCore/page/Geoposition.idl | 2 +- src/3rdparty/webkit/WebCore/page/HaltablePlugin.h | 2 + src/3rdparty/webkit/WebCore/page/History.cpp | 45 + src/3rdparty/webkit/WebCore/page/History.h | 42 +- src/3rdparty/webkit/WebCore/page/History.idl | 8 +- src/3rdparty/webkit/WebCore/page/Location.idl | 3 +- .../webkit/WebCore/page/MediaCanStartListener.h | 40 + .../WebCore/page/MouseEventWithHitTestResults.h | 2 +- src/3rdparty/webkit/WebCore/page/Navigator.cpp | 92 + src/3rdparty/webkit/WebCore/page/Navigator.h | 5 + src/3rdparty/webkit/WebCore/page/Navigator.idl | 10 +- src/3rdparty/webkit/WebCore/page/NavigatorBase.cpp | 12 +- src/3rdparty/webkit/WebCore/page/Page.cpp | 104 +- src/3rdparty/webkit/WebCore/page/Page.h | 58 +- src/3rdparty/webkit/WebCore/page/PageGroup.cpp | 47 +- src/3rdparty/webkit/WebCore/page/PageGroup.h | 12 +- src/3rdparty/webkit/WebCore/page/PluginHalter.cpp | 3 +- src/3rdparty/webkit/WebCore/page/PluginHalter.h | 2 +- .../webkit/WebCore/page/PluginHalterClient.h | 3 +- src/3rdparty/webkit/WebCore/page/PositionError.h | 1 - src/3rdparty/webkit/WebCore/page/PositionError.idl | 5 +- src/3rdparty/webkit/WebCore/page/PrintContext.cpp | 84 +- src/3rdparty/webkit/WebCore/page/PrintContext.h | 10 + src/3rdparty/webkit/WebCore/page/Screen.idl | 2 +- .../webkit/WebCore/page/SecurityOrigin.cpp | 122 +- src/3rdparty/webkit/WebCore/page/SecurityOrigin.h | 305 +- src/3rdparty/webkit/WebCore/page/Settings.cpp | 63 +- src/3rdparty/webkit/WebCore/page/Settings.h | 42 +- src/3rdparty/webkit/WebCore/page/UserScript.h | 7 +- src/3rdparty/webkit/WebCore/page/UserScriptTypes.h | 3 +- src/3rdparty/webkit/WebCore/page/UserStyleSheet.h | 8 +- .../webkit/WebCore/page/UserStyleSheetTypes.h | 3 +- src/3rdparty/webkit/WebCore/page/WebKitPoint.idl | 2 +- .../webkit/WebCore/page/WorkerNavigator.idl | 3 +- src/3rdparty/webkit/WebCore/page/XSSAuditor.cpp | 156 +- src/3rdparty/webkit/WebCore/page/XSSAuditor.h | 45 +- .../WebCore/page/android/DragControllerAndroid.cpp | 58 - .../WebCore/page/android/EventHandlerAndroid.cpp | 128 - .../page/android/InspectorControllerAndroid.cpp | 106 - .../WebCore/page/animation/AnimationBase.cpp | 50 +- .../webkit/WebCore/page/animation/AnimationBase.h | 9 +- .../WebCore/page/animation/AnimationController.cpp | 2 +- .../page/animation/AnimationControllerPrivate.h | 2 +- .../WebCore/page/animation/CompositeAnimation.cpp | 15 + .../WebCore/page/animation/ImplicitAnimation.cpp | 14 +- .../WebCore/page/animation/ImplicitAnimation.h | 5 +- .../WebCore/page/animation/KeyframeAnimation.cpp | 57 +- .../WebCore/page/animation/KeyframeAnimation.h | 8 +- .../webkit/WebCore/page/qt/DragControllerQt.cpp | 1 + .../webkit/WebCore/page/win/EventHandlerWin.cpp | 2 +- .../webkit/WebCore/page/win/FrameCGWin.cpp | 11 +- .../webkit/WebCore/page/win/FrameCairoWin.cpp | 1 + src/3rdparty/webkit/WebCore/page/win/FrameWin.cpp | 64 +- src/3rdparty/webkit/WebCore/page/win/FrameWin.h | 7 +- src/3rdparty/webkit/WebCore/page/win/PageWin.cpp | 31 +- .../webkit/WebCore/platform/ContextMenu.cpp | 25 +- src/3rdparty/webkit/WebCore/platform/ContextMenu.h | 2 + .../webkit/WebCore/platform/ContextMenuItem.h | 19 +- src/3rdparty/webkit/WebCore/platform/CookieJar.h | 2 + .../webkit/WebCore/platform/CrossThreadCopier.cpp | 14 +- .../webkit/WebCore/platform/CrossThreadCopier.h | 43 +- src/3rdparty/webkit/WebCore/platform/Cursor.h | 7 +- .../webkit/WebCore/platform/DeprecatedPtrList.h | 3 +- .../WebCore/platform/DeprecatedPtrListImpl.cpp | 3 +- src/3rdparty/webkit/WebCore/platform/DragImage.h | 4 + .../webkit/WebCore/platform/FileChooser.cpp | 39 +- src/3rdparty/webkit/WebCore/platform/FileChooser.h | 16 +- src/3rdparty/webkit/WebCore/platform/FileSystem.h | 15 +- .../webkit/WebCore/platform/GeolocationService.cpp | 7 +- .../webkit/WebCore/platform/GeolocationService.h | 7 +- src/3rdparty/webkit/WebCore/platform/KURL.cpp | 198 +- src/3rdparty/webkit/WebCore/platform/KURL.h | 24 +- .../webkit/WebCore/platform/KURLGoogle.cpp | 179 +- .../webkit/WebCore/platform/KeyboardCodes.h | 18 +- src/3rdparty/webkit/WebCore/platform/Length.h | 3 +- src/3rdparty/webkit/WebCore/platform/LinkHash.cpp | 6 +- .../webkit/WebCore/platform/LocalizedStrings.h | 11 + src/3rdparty/webkit/WebCore/platform/Logging.cpp | 10 +- src/3rdparty/webkit/WebCore/platform/Logging.h | 3 +- .../webkit/WebCore/platform/MIMETypeRegistry.cpp | 2 +- src/3rdparty/webkit/WebCore/platform/Pasteboard.h | 1 + .../WebCore/platform/PlatformKeyboardEvent.h | 13 +- .../webkit/WebCore/platform/PlatformMouseEvent.h | 17 +- .../webkit/WebCore/platform/PlatformTouchEvent.h | 83 + .../webkit/WebCore/platform/PlatformTouchPoint.h | 69 + .../webkit/WebCore/platform/PlatformWheelEvent.h | 14 + src/3rdparty/webkit/WebCore/platform/PopupMenu.h | 13 +- .../webkit/WebCore/platform/PurgeableBuffer.h | 2 +- .../webkit/WebCore/platform/ScrollView.cpp | 35 +- src/3rdparty/webkit/WebCore/platform/ScrollView.h | 11 +- src/3rdparty/webkit/WebCore/platform/Scrollbar.cpp | 23 +- src/3rdparty/webkit/WebCore/platform/Scrollbar.h | 15 +- .../webkit/WebCore/platform/ScrollbarTheme.h | 8 +- .../WebCore/platform/ScrollbarThemeComposite.cpp | 3 +- .../webkit/WebCore/platform/SharedBuffer.cpp | 139 +- .../webkit/WebCore/platform/SharedBuffer.h | 37 +- src/3rdparty/webkit/WebCore/platform/SharedTimer.h | 4 +- .../webkit/WebCore/platform/StaticConstructors.h | 2 - src/3rdparty/webkit/WebCore/platform/ThemeTypes.h | 7 +- .../webkit/WebCore/platform/ThreadGlobalData.cpp | 24 +- .../webkit/WebCore/platform/ThreadGlobalData.h | 34 +- src/3rdparty/webkit/WebCore/platform/Timer.cpp | 7 - src/3rdparty/webkit/WebCore/platform/Timer.h | 6 + src/3rdparty/webkit/WebCore/platform/TreeShared.h | 22 +- src/3rdparty/webkit/WebCore/platform/Widget.h | 4 +- .../WebCore/platform/android/ClipboardAndroid.cpp | 105 - .../WebCore/platform/android/ClipboardAndroid.h | 64 - .../WebCore/platform/android/CursorAndroid.cpp | 298 - .../WebCore/platform/android/DragDataAndroid.cpp | 96 - .../WebCore/platform/android/EventLoopAndroid.cpp | 38 - .../platform/android/FileChooserAndroid.cpp | 60 - .../WebCore/platform/android/FileSystemAndroid.cpp | 131 - .../WebCore/platform/android/KeyEventAndroid.cpp | 273 - .../WebCore/platform/android/KeyboardCodes.h | 545 - .../platform/android/LocalizedStringsAndroid.cpp | 54 - .../WebCore/platform/android/PopupMenuAndroid.cpp | 57 - .../platform/android/RenderThemeAndroid.cpp | 334 - .../WebCore/platform/android/RenderThemeAndroid.h | 109 - .../WebCore/platform/android/ScreenAndroid.cpp | 107 - .../WebCore/platform/android/ScrollViewAndroid.cpp | 105 - .../platform/android/SearchPopupMenuAndroid.cpp | 52 - .../WebCore/platform/android/SystemTimeAndroid.cpp | 37 - .../platform/android/TemporaryLinkStubs.cpp | 677 - .../WebCore/platform/android/WidgetAndroid.cpp | 128 - .../WebCore/platform/animation/AnimationList.h | 2 +- .../WebCore/platform/cf/BinaryPropertyList.cpp | 832 + .../WebCore/platform/cf/BinaryPropertyList.h | 110 + .../webkit/WebCore/platform/cf/FileSystemCF.cpp | 57 + .../webkit/WebCore/platform/cf/KURLCFNet.cpp | 95 + .../webkit/WebCore/platform/cf/RunLoopTimerCF.cpp | 84 + .../webkit/WebCore/platform/cf/SchedulePair.cpp | 52 + .../webkit/WebCore/platform/cf/SchedulePair.h | 88 + .../webkit/WebCore/platform/cf/SharedBufferCF.cpp | 92 + .../WebCore/platform/graphics/BitmapImage.cpp | 34 +- .../webkit/WebCore/platform/graphics/BitmapImage.h | 12 +- .../webkit/WebCore/platform/graphics/Color.h | 3 +- .../webkit/WebCore/platform/graphics/ColorSpace.h | 35 + .../WebCore/platform/graphics/FloatPoint.cpp | 7 + .../webkit/WebCore/platform/graphics/FloatPoint.h | 6 +- .../webkit/WebCore/platform/graphics/FloatQuad.cpp | 6 + .../webkit/WebCore/platform/graphics/FloatQuad.h | 6 + .../webkit/WebCore/platform/graphics/FloatRect.cpp | 10 +- .../webkit/WebCore/platform/graphics/FloatRect.h | 17 +- .../webkit/WebCore/platform/graphics/FloatSize.h | 11 +- .../webkit/WebCore/platform/graphics/Font.cpp | 17 +- .../webkit/WebCore/platform/graphics/Font.h | 22 + .../webkit/WebCore/platform/graphics/FontCache.cpp | 23 +- .../webkit/WebCore/platform/graphics/FontCache.h | 19 +- .../WebCore/platform/graphics/FontFastPath.cpp | 15 +- .../WebCore/platform/graphics/GeneratedImage.cpp | 47 +- .../WebCore/platform/graphics/GeneratedImage.h | 6 +- .../webkit/WebCore/platform/graphics/Generator.h | 1 + .../webkit/WebCore/platform/graphics/GlyphBuffer.h | 10 +- .../webkit/WebCore/platform/graphics/Gradient.cpp | 40 +- .../webkit/WebCore/platform/graphics/Gradient.h | 29 +- .../WebCore/platform/graphics/GraphicsContext.cpp | 182 +- .../WebCore/platform/graphics/GraphicsContext.h | 98 +- .../platform/graphics/GraphicsContext3D.cpp | 130 + .../WebCore/platform/graphics/GraphicsContext3D.h | 601 +- .../platform/graphics/GraphicsContextPrivate.h | 37 +- .../WebCore/platform/graphics/GraphicsLayer.cpp | 52 +- .../WebCore/platform/graphics/GraphicsLayer.h | 45 +- .../platform/graphics/GraphicsLayerClient.h | 3 + .../webkit/WebCore/platform/graphics/Icon.h | 3 +- .../webkit/WebCore/platform/graphics/Image.cpp | 24 +- .../webkit/WebCore/platform/graphics/Image.h | 19 +- .../webkit/WebCore/platform/graphics/ImageBuffer.h | 6 +- .../WebCore/platform/graphics/ImageSource.cpp | 9 +- .../webkit/WebCore/platform/graphics/ImageSource.h | 4 +- .../webkit/WebCore/platform/graphics/IntPoint.h | 9 + .../webkit/WebCore/platform/graphics/IntRect.cpp | 35 +- .../webkit/WebCore/platform/graphics/IntRect.h | 33 +- .../webkit/WebCore/platform/graphics/IntSize.h | 12 +- .../WebCore/platform/graphics/MediaPlayer.cpp | 92 +- .../webkit/WebCore/platform/graphics/MediaPlayer.h | 51 +- .../WebCore/platform/graphics/MediaPlayerPrivate.h | 21 +- .../webkit/WebCore/platform/graphics/Path.h | 25 +- .../webkit/WebCore/platform/graphics/Pattern.cpp | 20 + .../webkit/WebCore/platform/graphics/Pattern.h | 54 +- .../WebCore/platform/graphics/SimpleFontData.h | 29 +- .../platform/graphics/TypesettingFeatures.h | 38 + .../WebCore/platform/graphics/filters/FEBlend.cpp | 4 +- .../platform/graphics/filters/FEColorMatrix.cpp | 3 +- .../graphics/filters/FEComponentTransfer.cpp | 6 +- .../graphics/filters/FEComponentTransfer.h | 1 - .../platform/graphics/filters/FEComposite.cpp | 28 +- .../platform/graphics/filters/FEGaussianBlur.cpp | 10 +- .../WebCore/platform/graphics/filters/Filter.h | 15 +- .../platform/graphics/filters/FilterEffect.cpp | 8 +- .../platform/graphics/filters/FilterEffect.h | 8 + .../graphics/filters/ImageBufferFilter.cpp | 43 + .../platform/graphics/filters/ImageBufferFilter.h | 57 + .../platform/graphics/filters/SourceAlpha.cpp | 4 +- .../platform/graphics/filters/SourceGraphic.cpp | 4 +- .../graphics/opentype/OpenTypeSanitizer.cpp | 68 + .../platform/graphics/opentype/OpenTypeSanitizer.h | 57 + .../graphics/opentype/OpenTypeUtilities.cpp | 4 +- .../platform/graphics/opentype/OpenTypeUtilities.h | 2 +- .../platform/graphics/openvg/EGLDisplayOpenVG.cpp | 431 + .../platform/graphics/openvg/EGLDisplayOpenVG.h | 89 + .../WebCore/platform/graphics/openvg/EGLUtils.h | 71 + .../graphics/openvg/GraphicsContextOpenVG.cpp | 566 + .../platform/graphics/openvg/PainterOpenVG.cpp | 957 + .../platform/graphics/openvg/PainterOpenVG.h | 121 + .../platform/graphics/openvg/SurfaceOpenVG.cpp | 243 + .../platform/graphics/openvg/SurfaceOpenVG.h | 137 + .../WebCore/platform/graphics/openvg/VGUtils.cpp | 100 + .../WebCore/platform/graphics/openvg/VGUtils.h | 87 + .../WebCore/platform/graphics/qt/FontCacheQt.cpp | 250 +- .../graphics/qt/FontCustomPlatformData.cpp | 65 - .../graphics/qt/FontCustomPlatformDataQt.cpp | 65 + .../platform/graphics/qt/FontFallbackListQt.cpp | 138 - .../platform/graphics/qt/FontPlatformData.h | 120 +- .../platform/graphics/qt/FontPlatformDataQt.cpp | 111 +- .../webkit/WebCore/platform/graphics/qt/FontQt.cpp | 48 +- .../WebCore/platform/graphics/qt/FontQt43.cpp | 354 - .../platform/graphics/qt/GraphicsContextQt.cpp | 290 +- .../platform/graphics/qt/GraphicsLayerQt.cpp | 1240 + .../WebCore/platform/graphics/qt/GraphicsLayerQt.h | 85 + .../webkit/WebCore/platform/graphics/qt/IconQt.cpp | 17 +- .../WebCore/platform/graphics/qt/ImageBufferQt.cpp | 2 +- .../platform/graphics/qt/ImageDecoderQt.cpp | 39 +- .../WebCore/platform/graphics/qt/ImageDecoderQt.h | 5 +- .../WebCore/platform/graphics/qt/ImageQt.cpp | 16 +- .../graphics/qt/MediaPlayerPrivatePhonon.cpp | 25 +- .../graphics/qt/MediaPlayerPrivatePhonon.h | 4 - .../webkit/WebCore/platform/graphics/qt/PathQt.cpp | 97 +- .../WebCore/platform/graphics/qt/PatternQt.cpp | 4 +- .../WebCore/platform/graphics/qt/StillImageQt.cpp | 2 +- .../WebCore/platform/graphics/qt/StillImageQt.h | 2 +- .../graphics/qt/TransformationMatrixQt.cpp | 6 + .../graphics/transforms/AffineTransform.cpp | 364 + .../platform/graphics/transforms/AffineTransform.h | 177 + .../graphics/transforms/TransformOperations.h | 2 +- .../graphics/transforms/TransformationMatrix.cpp | 6 + .../graphics/transforms/TransformationMatrix.h | 43 +- .../WebCore/platform/graphics/win/FontCGWin.cpp | 389 + .../WebCore/platform/graphics/win/FontCacheWin.cpp | 562 + .../graphics/win/FontCustomPlatformData.cpp | 242 + .../platform/graphics/win/FontCustomPlatformData.h | 56 + .../graphics/win/FontCustomPlatformDataCairo.cpp | 61 + .../graphics/win/FontCustomPlatformDataCairo.h | 49 + .../WebCore/platform/graphics/win/FontDatabase.cpp | 217 + .../WebCore/platform/graphics/win/FontDatabase.h | 38 + .../platform/graphics/win/FontPlatformData.h | 155 + .../graphics/win/FontPlatformDataCGWin.cpp | 151 + .../graphics/win/FontPlatformDataCairoWin.cpp | 133 + .../platform/graphics/win/FontPlatformDataWin.cpp | 95 + .../WebCore/platform/graphics/win/FontWin.cpp | 105 + .../graphics/win/GlyphPageTreeNodeCGWin.cpp | 59 + .../graphics/win/GlyphPageTreeNodeCairoWin.cpp | 72 + .../platform/graphics/win/GraphicsContextCGWin.cpp | 253 + .../graphics/win/GraphicsContextCairoWin.cpp | 147 + .../platform/graphics/win/GraphicsContextWin.cpp | 211 + .../platform/graphics/win/GraphicsLayerCACF.cpp | 722 + .../platform/graphics/win/GraphicsLayerCACF.h | 144 + .../WebCore/platform/graphics/win/IconWin.cpp | 101 + .../WebCore/platform/graphics/win/ImageCGWin.cpp | 110 + .../platform/graphics/win/ImageCairoWin.cpp | 114 + .../WebCore/platform/graphics/win/ImageWin.cpp | 58 + .../WebCore/platform/graphics/win/IntPointWin.cpp | 57 + .../WebCore/platform/graphics/win/IntRectWin.cpp | 45 + .../WebCore/platform/graphics/win/IntSizeWin.cpp | 45 + .../win/MediaPlayerPrivateQuickTimeWin.cpp | 877 + .../graphics/win/MediaPlayerPrivateQuickTimeWin.h | 188 + .../WebCore/platform/graphics/win/QTMovieWin.cpp | 1178 + .../WebCore/platform/graphics/win/QTMovieWin.h | 127 + .../platform/graphics/win/QTMovieWinTimer.cpp | 137 + .../platform/graphics/win/QTMovieWinTimer.h | 39 + .../platform/graphics/win/SimpleFontDataCGWin.cpp | 146 + .../graphics/win/SimpleFontDataCairoWin.cpp | 122 + .../platform/graphics/win/SimpleFontDataWin.cpp | 213 + .../graphics/win/TransformationMatrixWin.cpp | 46 + .../platform/graphics/win/UniscribeController.cpp | 441 + .../platform/graphics/win/UniscribeController.h | 83 + .../platform/graphics/win/WKCACFContextFlusher.cpp | 88 + .../platform/graphics/win/WKCACFContextFlusher.h | 60 + .../WebCore/platform/graphics/win/WKCACFLayer.cpp | 644 + .../WebCore/platform/graphics/win/WKCACFLayer.h | 265 + .../platform/graphics/win/WKCACFLayerRenderer.cpp | 456 + .../platform/graphics/win/WKCACFLayerRenderer.h | 110 + .../platform/image-decoders/ImageDecoder.cpp | 132 +- .../WebCore/platform/image-decoders/ImageDecoder.h | 143 +- .../platform/image-decoders/qt/RGBA32BufferQt.cpp | 39 +- .../platform/image-decoders/wx/ImageDecoderWx.cpp | 83 - .../webkit/WebCore/platform/mac/ClipboardMac.h | 1 + .../webkit/WebCore/platform/mac/ClipboardMac.mm | 7 +- .../webkit/WebCore/platform/mac/CookieJar.mm | 12 + .../WebCore/platform/mac/GeolocationServiceMac.mm | 2 +- .../webkit/WebCore/platform/mac/KeyEventMac.mm | 16 + .../WebCore/platform/mac/LocalizedStringsMac.mm | 72 + .../webkit/WebCore/platform/mac/LoggingMac.mm | 2 +- .../webkit/WebCore/platform/mac/PasteboardMac.mm | 20 +- .../WebCore/platform/mac/PlatformMouseEventMac.mm | 18 + .../webkit/WebCore/platform/mac/PopupMenuMac.mm | 21 +- .../platform/mac/RuntimeApplicationChecks.h | 1 + .../platform/mac/RuntimeApplicationChecks.mm | 6 + .../webkit/WebCore/platform/mac/ScrollViewMac.mm | 15 +- .../WebCore/platform/mac/ScrollbarThemeMac.h | 2 + .../WebCore/platform/mac/ScrollbarThemeMac.mm | 4 +- .../webkit/WebCore/platform/mac/ThemeMac.mm | 46 +- .../WebCore/platform/mac/WebCoreObjCExtras.mm | 5 + .../WebCore/platform/mac/WebCoreSystemInterface.h | 15 + .../WebCore/platform/mac/WebCoreSystemInterface.mm | 13 + .../webkit/WebCore/platform/mac/WheelEventMac.mm | 8 +- .../webkit/WebCore/platform/mac/WidgetMac.mm | 11 +- .../platform/network/AuthenticationClient.h | 53 + .../webkit/WebCore/platform/network/Credential.cpp | 80 +- .../webkit/WebCore/platform/network/Credential.h | 31 +- .../WebCore/platform/network/CredentialStorage.cpp | 21 +- .../WebCore/platform/network/CredentialStorage.h | 4 + .../WebCore/platform/network/FormDataBuilder.cpp | 21 +- .../WebCore/platform/network/HTTPHeaderMap.cpp | 36 + .../WebCore/platform/network/HTTPHeaderMap.h | 16 + .../platform/network/NetworkStateNotifier.h | 8 +- .../WebCore/platform/network/ProtectionSpace.cpp | 3 +- .../WebCore/platform/network/ProtectionSpaceHash.h | 11 +- .../WebCore/platform/network/ResourceHandle.cpp | 95 +- .../WebCore/platform/network/ResourceHandle.h | 26 +- .../platform/network/ResourceHandleClient.h | 2 +- .../platform/network/ResourceHandleInternal.h | 17 +- .../platform/network/ResourceRequestBase.cpp | 14 +- .../WebCore/platform/network/ResourceRequestBase.h | 28 +- .../platform/network/ResourceResponseBase.cpp | 7 + .../platform/network/ResourceResponseBase.h | 5 +- .../platform/network/SocketStreamHandleBase.cpp | 5 +- .../platform/network/SocketStreamHandleClient.h | 5 +- .../platform/network/cf/AuthenticationCF.cpp | 266 + .../WebCore/platform/network/cf/AuthenticationCF.h | 48 + .../platform/network/cf/AuthenticationChallenge.h | 57 + .../platform/network/cf/CredentialStorageCFNet.cpp | 44 + .../WebCore/platform/network/cf/DNSCFNet.cpp | 155 + .../platform/network/cf/FormDataStreamCFNet.cpp | 384 + .../platform/network/cf/FormDataStreamCFNet.h | 44 + .../platform/network/cf/LoaderRunLoopCF.cpp | 66 + .../WebCore/platform/network/cf/LoaderRunLoopCF.h | 39 + .../WebCore/platform/network/cf/ResourceError.h | 73 + .../platform/network/cf/ResourceErrorCF.cpp | 164 + .../platform/network/cf/ResourceHandleCFNet.cpp | 783 + .../WebCore/platform/network/cf/ResourceRequest.h | 77 + .../platform/network/cf/ResourceRequestCFNet.cpp | 191 + .../platform/network/cf/ResourceRequestCFNet.h | 39 + .../WebCore/platform/network/cf/ResourceResponse.h | 81 + .../platform/network/cf/ResourceResponseCFNet.cpp | 117 + .../platform/network/cf/SocketStreamError.h | 50 + .../platform/network/cf/SocketStreamHandle.h | 112 + .../network/cf/SocketStreamHandleCFNet.cpp | 639 + .../platform/network/qt/QNetworkReplyHandler.cpp | 53 +- .../platform/network/qt/QNetworkReplyHandler.h | 5 +- .../platform/network/qt/ResourceHandleQt.cpp | 22 - .../WebCore/platform/network/qt/ResourceRequest.h | 6 +- .../platform/network/qt/ResourceRequestQt.cpp | 18 +- .../platform/network/qt/SocketStreamHandle.h | 4 + .../network/qt/SocketStreamHandlePrivate.h | 72 + .../platform/network/qt/SocketStreamHandleQt.cpp | 208 + .../platform/network/qt/SocketStreamHandleSoup.cpp | 88 - .../webkit/WebCore/platform/qt/ClipboardQt.cpp | 27 +- .../webkit/WebCore/platform/qt/ClipboardQt.h | 1 + .../webkit/WebCore/platform/qt/CookieJarQt.cpp | 42 +- .../webkit/WebCore/platform/qt/CursorQt.cpp | 2 +- .../webkit/WebCore/platform/qt/DragDataQt.cpp | 2 +- src/3rdparty/webkit/WebCore/platform/qt/KURLQt.cpp | 3 +- .../webkit/WebCore/platform/qt/Localizations.cpp | 54 + .../webkit/WebCore/platform/qt/PasteboardQt.cpp | 5 +- .../platform/qt/PlatformKeyboardEventQt.cpp | 20 +- .../WebCore/platform/qt/PlatformTouchEventQt.cpp | 49 + .../WebCore/platform/qt/PlatformTouchPointQt.cpp | 45 + .../webkit/WebCore/platform/qt/PopupMenuQt.cpp | 96 +- .../webkit/WebCore/platform/qt/QWebPageClient.h | 21 + .../webkit/WebCore/platform/qt/QWebPopup.cpp | 101 - .../webkit/WebCore/platform/qt/QWebPopup.h | 49 - .../WebCore/platform/qt/QtAbstractWebPopup.cpp | 60 + .../WebCore/platform/qt/QtAbstractWebPopup.h | 69 + .../webkit/WebCore/platform/qt/RenderThemeQt.cpp | 184 +- .../webkit/WebCore/platform/qt/RenderThemeQt.h | 13 +- .../WebCore/platform/qt/ScrollbarThemeQt.cpp | 4 +- .../webkit/WebCore/platform/qt/SharedBufferQt.cpp | 2 + .../webkit/WebCore/platform/qt/WheelEventQt.cpp | 2 + .../webkit/WebCore/platform/qt/WidgetQt.cpp | 8 +- .../webkit/WebCore/platform/sql/SQLiteDatabase.cpp | 7 +- .../webkit/WebCore/platform/sql/SQLiteDatabase.h | 1 + .../WebCore/platform/sql/SQLiteTransaction.cpp | 28 +- .../WebCore/platform/sql/SQLiteTransaction.h | 1 + .../webkit/WebCore/platform/text/AtomicString.cpp | 18 +- .../webkit/WebCore/platform/text/AtomicString.h | 16 +- .../WebCore/platform/text/AtomicStringImpl.h | 2 - .../webkit/WebCore/platform/text/Base64.cpp | 11 +- src/3rdparty/webkit/WebCore/platform/text/Base64.h | 1 + .../webkit/WebCore/platform/text/BidiContext.cpp | 2 +- .../webkit/WebCore/platform/text/CharacterNames.h | 3 + .../webkit/WebCore/platform/text/PlatformString.h | 26 +- .../WebCore/platform/text/RegularExpression.h | 2 +- .../webkit/WebCore/platform/text/String.cpp | 11 +- .../webkit/WebCore/platform/text/StringBuilder.cpp | 13 + .../webkit/WebCore/platform/text/StringBuilder.h | 3 + .../webkit/WebCore/platform/text/StringHash.h | 20 +- .../webkit/WebCore/platform/text/StringImpl.cpp | 118 +- .../webkit/WebCore/platform/text/StringImpl.h | 162 +- .../WebCore/platform/text/TextBoundaries.cpp | 79 + .../WebCore/platform/text/TextBoundariesICU.cpp | 77 - .../WebCore/platform/text/TextBreakIterator.h | 2 + .../WebCore/platform/text/TextBreakIteratorICU.cpp | 10 + .../webkit/WebCore/platform/text/TextCodecICU.cpp | 2 +- .../webkit/WebCore/platform/text/TextEncoding.cpp | 21 +- .../platform/text/TextEncodingDetectorICU.cpp | 2 +- .../WebCore/platform/text/TextEncodingRegistry.cpp | 25 +- .../webkit/WebCore/platform/text/TextStream.cpp | 9 +- .../webkit/WebCore/platform/text/TextStream.h | 3 +- .../text/android/TextBreakIteratorInternalICU.cpp | 43 - .../webkit/WebCore/platform/text/cf/StringCF.cpp | 4 +- .../WebCore/platform/text/cf/StringImplCF.cpp | 4 +- .../WebCore/platform/text/qt/TextBoundaries.cpp | 123 - .../WebCore/platform/text/qt/TextBoundariesQt.cpp | 77 + .../platform/text/qt/TextBreakIteratorQt.cpp | 183 - .../WebCore/platform/text/qt/TextCodecQt.cpp | 2 +- .../platform/text/wince/TextBoundariesWince.cpp | 75 + .../platform/text/wince/TextBreakIteratorWince.cpp | 312 + .../webkit/WebCore/platform/win/SystemTimeWin.cpp | 2 +- src/3rdparty/webkit/WebCore/plugins/MimeType.idl | 4 +- .../webkit/WebCore/plugins/MimeTypeArray.idl | 1 - src/3rdparty/webkit/WebCore/plugins/Plugin.idl | 1 - .../webkit/WebCore/plugins/PluginArray.idl | 1 - src/3rdparty/webkit/WebCore/plugins/PluginData.h | 4 +- .../webkit/WebCore/plugins/PluginDatabase.cpp | 9 +- .../webkit/WebCore/plugins/PluginDatabase.h | 6 +- .../webkit/WebCore/plugins/PluginInfoStore.cpp | 7 +- .../WebCore/plugins/PluginMainThreadScheduler.h | 2 +- .../webkit/WebCore/plugins/PluginPackage.cpp | 10 +- .../webkit/WebCore/plugins/PluginPackage.h | 11 +- .../webkit/WebCore/plugins/PluginStream.cpp | 10 +- src/3rdparty/webkit/WebCore/plugins/PluginView.cpp | 129 +- src/3rdparty/webkit/WebCore/plugins/PluginView.h | 60 +- .../webkit/WebCore/plugins/PluginViewNone.cpp | 6 +- src/3rdparty/webkit/WebCore/plugins/PluginWidget.h | 55 + .../WebCore/plugins/mac/PluginPackageMac.cpp | 6 +- .../webkit/WebCore/plugins/mac/PluginViewMac.cpp | 190 +- .../webkit/WebCore/plugins/mac/PluginWidgetMac.mm | 49 + .../webkit/WebCore/plugins/qt/PluginDataQt.cpp | 5 +- .../webkit/WebCore/plugins/qt/PluginPackageQt.cpp | 4 + .../webkit/WebCore/plugins/qt/PluginViewQt.cpp | 40 +- .../plugins/symbian/PluginPackageSymbian.cpp | 5 + .../WebCore/plugins/symbian/PluginViewSymbian.cpp | 11 +- .../WebCore/plugins/win/PluginDatabaseWin.cpp | 6 +- .../WebCore/plugins/win/PluginPackageWin.cpp | 8 +- .../webkit/WebCore/plugins/win/PluginViewWin.cpp | 80 +- .../webkit/WebCore/rendering/AutoTableLayout.cpp | 6 +- .../webkit/WebCore/rendering/AutoTableLayout.h | 2 - src/3rdparty/webkit/WebCore/rendering/BidiRun.cpp | 74 + src/3rdparty/webkit/WebCore/rendering/BidiRun.h | 65 + .../webkit/WebCore/rendering/CounterNode.cpp | 221 +- .../webkit/WebCore/rendering/CounterNode.h | 27 +- .../webkit/WebCore/rendering/EllipsisBox.cpp | 49 +- .../webkit/WebCore/rendering/EllipsisBox.h | 8 +- .../webkit/WebCore/rendering/FixedTableLayout.cpp | 2 - .../webkit/WebCore/rendering/FixedTableLayout.h | 2 - .../webkit/WebCore/rendering/HitTestRequest.h | 2 - .../webkit/WebCore/rendering/HitTestResult.h | 2 - .../webkit/WebCore/rendering/InlineFlowBox.cpp | 52 +- .../webkit/WebCore/rendering/InlineIterator.h | 266 + .../webkit/WebCore/rendering/InlineRunBox.h | 2 - .../webkit/WebCore/rendering/InlineTextBox.cpp | 115 +- .../webkit/WebCore/rendering/InlineTextBox.h | 10 +- .../WebCore/rendering/MediaControlElements.cpp | 55 +- .../WebCore/rendering/MediaControlElements.h | 13 +- .../WebCore/rendering/PointerEventsHitRules.cpp | 2 - .../WebCore/rendering/PointerEventsHitRules.h | 2 - .../webkit/WebCore/rendering/RenderArena.cpp | 2 +- .../webkit/WebCore/rendering/RenderArena.h | 3 +- src/3rdparty/webkit/WebCore/rendering/RenderBR.cpp | 4 +- src/3rdparty/webkit/WebCore/rendering/RenderBR.h | 2 - .../webkit/WebCore/rendering/RenderBlock.cpp | 283 +- .../webkit/WebCore/rendering/RenderBlock.h | 26 +- .../WebCore/rendering/RenderBlockLineLayout.cpp | 365 +- .../webkit/WebCore/rendering/RenderBox.cpp | 113 +- src/3rdparty/webkit/WebCore/rendering/RenderBox.h | 10 +- .../WebCore/rendering/RenderBoxModelObject.cpp | 210 +- .../WebCore/rendering/RenderBoxModelObject.h | 4 +- .../webkit/WebCore/rendering/RenderButton.cpp | 2 - .../webkit/WebCore/rendering/RenderButton.h | 2 - .../webkit/WebCore/rendering/RenderCounter.cpp | 378 +- .../webkit/WebCore/rendering/RenderCounter.h | 9 +- .../WebCore/rendering/RenderEmbeddedObject.cpp | 352 + .../WebCore/rendering/RenderEmbeddedObject.h | 64 + .../webkit/WebCore/rendering/RenderFieldset.cpp | 5 +- .../WebCore/rendering/RenderFileUploadControl.cpp | 37 +- .../WebCore/rendering/RenderFileUploadControl.h | 25 +- .../webkit/WebCore/rendering/RenderFlexibleBox.cpp | 50 +- .../WebCore/rendering/RenderForeignObject.cpp | 89 +- .../webkit/WebCore/rendering/RenderForeignObject.h | 32 +- .../webkit/WebCore/rendering/RenderFrame.cpp | 53 + .../webkit/WebCore/rendering/RenderFrame.h | 1 + .../webkit/WebCore/rendering/RenderFrameSet.cpp | 138 +- .../webkit/WebCore/rendering/RenderFrameSet.h | 3 + .../webkit/WebCore/rendering/RenderImage.cpp | 84 +- .../webkit/WebCore/rendering/RenderImage.h | 18 +- .../webkit/WebCore/rendering/RenderInline.cpp | 36 +- .../webkit/WebCore/rendering/RenderInline.h | 4 +- .../webkit/WebCore/rendering/RenderLayer.cpp | 337 +- .../webkit/WebCore/rendering/RenderLayer.h | 34 +- .../WebCore/rendering/RenderLayerBacking.cpp | 250 +- .../webkit/WebCore/rendering/RenderLayerBacking.h | 22 +- .../WebCore/rendering/RenderLayerCompositor.cpp | 238 +- .../WebCore/rendering/RenderLayerCompositor.h | 26 +- .../webkit/WebCore/rendering/RenderLineBoxList.cpp | 1 + .../webkit/WebCore/rendering/RenderListBox.cpp | 6 +- .../webkit/WebCore/rendering/RenderListItem.cpp | 51 +- .../webkit/WebCore/rendering/RenderListMarker.cpp | 884 +- .../webkit/WebCore/rendering/RenderListMarker.h | 1 + .../webkit/WebCore/rendering/RenderMarquee.h | 2 +- .../webkit/WebCore/rendering/RenderMedia.cpp | 51 +- .../webkit/WebCore/rendering/RenderMedia.h | 12 +- .../WebCore/rendering/RenderMediaControls.cpp | 9 + .../rendering/RenderMediaControlsChromium.cpp | 18 +- .../webkit/WebCore/rendering/RenderMenuList.cpp | 76 +- .../webkit/WebCore/rendering/RenderMenuList.h | 6 +- .../webkit/WebCore/rendering/RenderObject.cpp | 285 +- .../webkit/WebCore/rendering/RenderObject.h | 65 +- .../WebCore/rendering/RenderObjectChildList.cpp | 23 +- .../WebCore/rendering/RenderObjectChildList.h | 3 +- .../webkit/WebCore/rendering/RenderOverflow.h | 2 +- .../webkit/WebCore/rendering/RenderPart.cpp | 1 + src/3rdparty/webkit/WebCore/rendering/RenderPart.h | 4 + .../webkit/WebCore/rendering/RenderPartObject.cpp | 268 - .../webkit/WebCore/rendering/RenderPartObject.h | 4 +- .../webkit/WebCore/rendering/RenderPath.cpp | 278 +- src/3rdparty/webkit/WebCore/rendering/RenderPath.h | 24 +- .../webkit/WebCore/rendering/RenderReplaced.cpp | 2 +- .../webkit/WebCore/rendering/RenderReplaced.h | 2 +- .../webkit/WebCore/rendering/RenderReplica.cpp | 2 +- .../webkit/WebCore/rendering/RenderReplica.h | 4 + .../webkit/WebCore/rendering/RenderRuby.cpp | 197 + src/3rdparty/webkit/WebCore/rendering/RenderRuby.h | 91 + .../webkit/WebCore/rendering/RenderRubyBase.cpp | 190 + .../webkit/WebCore/rendering/RenderRubyBase.h | 67 + .../webkit/WebCore/rendering/RenderRubyRun.cpp | 228 + .../webkit/WebCore/rendering/RenderRubyRun.h | 85 + .../webkit/WebCore/rendering/RenderRubyText.cpp | 54 + .../webkit/WebCore/rendering/RenderRubyText.h | 56 + .../webkit/WebCore/rendering/RenderSVGBlock.cpp | 32 +- .../webkit/WebCore/rendering/RenderSVGBlock.h | 11 +- .../WebCore/rendering/RenderSVGContainer.cpp | 59 +- .../webkit/WebCore/rendering/RenderSVGContainer.h | 11 +- .../WebCore/rendering/RenderSVGGradientStop.cpp | 2 +- .../WebCore/rendering/RenderSVGHiddenContainer.cpp | 12 +- .../WebCore/rendering/RenderSVGHiddenContainer.h | 3 - .../webkit/WebCore/rendering/RenderSVGImage.cpp | 132 +- .../webkit/WebCore/rendering/RenderSVGImage.h | 65 +- .../webkit/WebCore/rendering/RenderSVGInline.h | 5 + .../webkit/WebCore/rendering/RenderSVGInlineText.h | 4 + .../WebCore/rendering/RenderSVGModelObject.cpp | 10 +- .../WebCore/rendering/RenderSVGModelObject.h | 4 + .../webkit/WebCore/rendering/RenderSVGResource.h | 84 + .../WebCore/rendering/RenderSVGResourceMasker.cpp | 196 + .../WebCore/rendering/RenderSVGResourceMasker.h | 79 + .../webkit/WebCore/rendering/RenderSVGRoot.cpp | 145 +- .../webkit/WebCore/rendering/RenderSVGRoot.h | 23 +- .../rendering/RenderSVGShadowTreeRootContainer.cpp | 101 + .../rendering/RenderSVGShadowTreeRootContainer.h | 50 + .../webkit/WebCore/rendering/RenderSVGText.cpp | 38 +- .../webkit/WebCore/rendering/RenderSVGText.h | 13 +- .../rendering/RenderSVGTransformableContainer.cpp | 18 +- .../rendering/RenderSVGTransformableContainer.h | 6 +- .../rendering/RenderSVGViewportContainer.cpp | 63 +- .../WebCore/rendering/RenderSVGViewportContainer.h | 18 +- .../WebCore/rendering/RenderScrollbarTheme.cpp | 2 +- .../webkit/WebCore/rendering/RenderSelectionInfo.h | 2 +- .../webkit/WebCore/rendering/RenderSlider.cpp | 37 +- .../webkit/WebCore/rendering/RenderTable.cpp | 3 + .../webkit/WebCore/rendering/RenderTableCell.cpp | 48 +- .../webkit/WebCore/rendering/RenderTableCell.h | 6 +- .../webkit/WebCore/rendering/RenderTableRow.cpp | 2 - .../WebCore/rendering/RenderTableSection.cpp | 21 +- .../webkit/WebCore/rendering/RenderText.cpp | 71 +- src/3rdparty/webkit/WebCore/rendering/RenderText.h | 3 +- .../webkit/WebCore/rendering/RenderTextControl.cpp | 99 +- .../webkit/WebCore/rendering/RenderTextControl.h | 18 +- .../rendering/RenderTextControlMultiLine.cpp | 17 +- .../WebCore/rendering/RenderTextControlMultiLine.h | 1 + .../rendering/RenderTextControlSingleLine.cpp | 38 +- .../rendering/RenderTextControlSingleLine.h | 1 + .../webkit/WebCore/rendering/RenderTheme.cpp | 61 +- .../webkit/WebCore/rendering/RenderTheme.h | 11 + .../WebCore/rendering/RenderThemeChromiumLinux.cpp | 56 +- .../WebCore/rendering/RenderThemeChromiumLinux.h | 30 +- .../WebCore/rendering/RenderThemeChromiumMac.h | 1 - .../WebCore/rendering/RenderThemeChromiumMac.mm | 103 +- .../WebCore/rendering/RenderThemeChromiumSkia.cpp | 43 +- .../WebCore/rendering/RenderThemeChromiumSkia.h | 2 + .../WebCore/rendering/RenderThemeChromiumWin.cpp | 2 +- .../WebCore/rendering/RenderThemeChromiumWin.h | 2 +- .../webkit/WebCore/rendering/RenderThemeMac.h | 1 + .../webkit/WebCore/rendering/RenderThemeSafari.cpp | 8 +- .../webkit/WebCore/rendering/RenderThemeWin.cpp | 29 +- .../webkit/WebCore/rendering/RenderThemeWin.h | 2 + .../webkit/WebCore/rendering/RenderThemeWince.cpp | 23 +- .../webkit/WebCore/rendering/RenderTreeAsText.cpp | 123 +- .../webkit/WebCore/rendering/RenderTreeAsText.h | 11 +- .../webkit/WebCore/rendering/RenderVideo.cpp | 166 +- .../webkit/WebCore/rendering/RenderVideo.h | 21 +- .../webkit/WebCore/rendering/RenderView.cpp | 29 +- src/3rdparty/webkit/WebCore/rendering/RenderView.h | 11 +- .../webkit/WebCore/rendering/RenderWidget.cpp | 181 +- .../webkit/WebCore/rendering/RenderWidget.h | 5 +- .../webkit/WebCore/rendering/RootInlineBox.cpp | 1 + .../webkit/WebCore/rendering/RootInlineBox.h | 2 - .../WebCore/rendering/SVGCharacterLayoutInfo.cpp | 4 +- .../WebCore/rendering/SVGCharacterLayoutInfo.h | 54 +- .../webkit/WebCore/rendering/SVGInlineTextBox.cpp | 105 +- .../webkit/WebCore/rendering/SVGInlineTextBox.h | 21 +- .../webkit/WebCore/rendering/SVGMarkerData.h | 134 + .../WebCore/rendering/SVGMarkerLayoutInfo.cpp | 124 + .../webkit/WebCore/rendering/SVGMarkerLayoutInfo.h | 74 + .../webkit/WebCore/rendering/SVGRenderSupport.cpp | 133 +- .../webkit/WebCore/rendering/SVGRenderSupport.h | 77 +- .../WebCore/rendering/SVGRenderTreeAsText.cpp | 78 +- .../webkit/WebCore/rendering/SVGRenderTreeAsText.h | 7 +- .../webkit/WebCore/rendering/SVGRootInlineBox.cpp | 178 +- .../webkit/WebCore/rendering/SVGRootInlineBox.h | 7 +- .../WebCore/rendering/SVGShadowTreeElements.cpp | 80 + .../WebCore/rendering/SVGShadowTreeElements.h | 67 + .../webkit/WebCore/rendering/TableLayout.h | 6 +- .../rendering/TrailingFloatsRootInlineBox.h | 48 + .../webkit/WebCore/rendering/TransformState.cpp | 8 +- .../webkit/WebCore/rendering/TransformState.h | 2 + .../webkit/WebCore/rendering/break_lines.cpp | 62 +- .../webkit/WebCore/rendering/break_lines.h | 2 - .../webkit/WebCore/rendering/style/ContentData.h | 6 +- .../WebCore/rendering/style/CounterContent.h | 2 +- .../webkit/WebCore/rendering/style/FillLayer.cpp | 11 + .../webkit/WebCore/rendering/style/FillLayer.h | 3 +- .../WebCore/rendering/style/LineClampValue.h | 69 + .../webkit/WebCore/rendering/style/RenderStyle.cpp | 11 +- .../webkit/WebCore/rendering/style/RenderStyle.h | 68 +- .../WebCore/rendering/style/RenderStyleConstants.h | 99 +- .../WebCore/rendering/style/SVGRenderStyle.cpp | 55 +- .../WebCore/rendering/style/SVGRenderStyle.h | 342 +- .../WebCore/rendering/style/SVGRenderStyleDefs.cpp | 2 - .../WebCore/rendering/style/SVGRenderStyleDefs.h | 2 - .../webkit/WebCore/rendering/style/ShadowData.h | 3 +- .../WebCore/rendering/style/StyleInheritedData.cpp | 5 +- .../WebCore/rendering/style/StyleInheritedData.h | 1 - .../rendering/style/StyleRareInheritedData.cpp | 5 +- .../rendering/style/StyleRareInheritedData.h | 1 + .../rendering/style/StyleRareNonInheritedData.h | 3 +- src/3rdparty/webkit/WebCore/storage/Database.cpp | 301 +- src/3rdparty/webkit/WebCore/storage/Database.h | 20 +- src/3rdparty/webkit/WebCore/storage/Database.idl | 3 +- .../webkit/WebCore/storage/DatabaseAuthorizer.cpp | 88 +- .../webkit/WebCore/storage/DatabaseAuthorizer.h | 5 + .../webkit/WebCore/storage/DatabaseTask.cpp | 76 +- src/3rdparty/webkit/WebCore/storage/DatabaseTask.h | 78 +- .../webkit/WebCore/storage/DatabaseThread.cpp | 25 +- .../webkit/WebCore/storage/DatabaseThread.h | 11 +- .../webkit/WebCore/storage/DatabaseTracker.cpp | 34 +- .../webkit/WebCore/storage/DatabaseTracker.h | 65 +- .../webkit/WebCore/storage/IDBDatabaseError.h | 64 + .../webkit/WebCore/storage/IDBDatabaseError.idl | 37 + .../webkit/WebCore/storage/IDBDatabaseException.h | 64 + .../WebCore/storage/IDBDatabaseException.idl | 48 + src/3rdparty/webkit/WebCore/storage/IDBRequest.cpp | 64 + src/3rdparty/webkit/WebCore/storage/IDBRequest.h | 88 + src/3rdparty/webkit/WebCore/storage/IDBRequest.idl | 45 + .../WebCore/storage/IndexedDatabaseRequest.cpp | 53 + .../WebCore/storage/IndexedDatabaseRequest.h | 65 + .../WebCore/storage/IndexedDatabaseRequest.idl | 38 + .../webkit/WebCore/storage/LocalStorageTask.h | 11 +- .../webkit/WebCore/storage/LocalStorageThread.cpp | 74 +- .../webkit/WebCore/storage/LocalStorageThread.h | 28 +- .../webkit/WebCore/storage/OriginUsageRecord.cpp | 6 +- .../webkit/WebCore/storage/OriginUsageRecord.h | 2 +- src/3rdparty/webkit/WebCore/storage/SQLError.idl | 3 +- .../webkit/WebCore/storage/SQLResultSet.idl | 3 +- .../webkit/WebCore/storage/SQLResultSetRowList.idl | 3 +- .../webkit/WebCore/storage/SQLTransaction.cpp | 24 +- .../webkit/WebCore/storage/SQLTransaction.h | 1 + .../webkit/WebCore/storage/SQLTransaction.idl | 3 +- .../WebCore/storage/SQLTransactionClient.cpp | 15 +- .../webkit/WebCore/storage/SQLTransactionClient.h | 8 +- .../WebCore/storage/SQLTransactionCoordinator.cpp | 20 +- .../WebCore/storage/SQLTransactionCoordinator.h | 6 +- src/3rdparty/webkit/WebCore/storage/Storage.idl | 1 - src/3rdparty/webkit/WebCore/storage/StorageArea.h | 6 +- .../webkit/WebCore/storage/StorageAreaImpl.cpp | 58 +- .../webkit/WebCore/storage/StorageAreaImpl.h | 9 +- .../webkit/WebCore/storage/StorageAreaSync.cpp | 32 +- .../webkit/WebCore/storage/StorageAreaSync.h | 8 +- .../webkit/WebCore/storage/StorageEvent.cpp | 2 +- .../webkit/WebCore/storage/StorageEvent.idl | 3 +- .../WebCore/storage/StorageEventDispatcher.cpp | 8 +- src/3rdparty/webkit/WebCore/storage/StorageMap.cpp | 34 +- .../webkit/WebCore/storage/StorageNamespace.cpp | 3 +- .../webkit/WebCore/storage/StorageNamespace.h | 31 +- .../webkit/WebCore/storage/StorageSyncManager.cpp | 20 +- .../webkit/WebCore/storage/StorageSyncManager.h | 6 +- .../webkit/WebCore/svg/ElementTimeControl.idl | 2 +- .../webkit/WebCore/svg/GradientAttributes.h | 8 +- .../webkit/WebCore/svg/LinearGradientAttributes.h | 2 - .../webkit/WebCore/svg/PatternAttributes.h | 8 +- .../webkit/WebCore/svg/RadialGradientAttributes.h | 2 - src/3rdparty/webkit/WebCore/svg/SVGAElement.cpp | 24 +- src/3rdparty/webkit/WebCore/svg/SVGAElement.h | 9 +- src/3rdparty/webkit/WebCore/svg/SVGAllInOne.cpp | 13 +- .../webkit/WebCore/svg/SVGAltGlyphElement.cpp | 9 +- .../webkit/WebCore/svg/SVGAltGlyphElement.h | 6 +- src/3rdparty/webkit/WebCore/svg/SVGAngle.h | 16 +- src/3rdparty/webkit/WebCore/svg/SVGAngle.idl | 4 +- .../webkit/WebCore/svg/SVGAnimateColorElement.cpp | 2 - .../webkit/WebCore/svg/SVGAnimateColorElement.h | 2 - .../webkit/WebCore/svg/SVGAnimateElement.cpp | 4 +- .../webkit/WebCore/svg/SVGAnimateElement.h | 2 - .../webkit/WebCore/svg/SVGAnimateMotionElement.cpp | 14 +- .../webkit/WebCore/svg/SVGAnimateMotionElement.h | 5 +- .../WebCore/svg/SVGAnimateTransformElement.cpp | 12 +- .../WebCore/svg/SVGAnimateTransformElement.h | 48 +- .../webkit/WebCore/svg/SVGAnimatedPathData.cpp | 2 - .../webkit/WebCore/svg/SVGAnimatedPathData.h | 2 - .../webkit/WebCore/svg/SVGAnimatedPathData.idl | 2 +- .../webkit/WebCore/svg/SVGAnimatedPoints.cpp | 2 - .../webkit/WebCore/svg/SVGAnimatedPoints.h | 2 - .../webkit/WebCore/svg/SVGAnimatedPoints.idl | 2 +- .../webkit/WebCore/svg/SVGAnimatedProperty.h | 597 +- .../WebCore/svg/SVGAnimatedPropertySynchronizer.h | 96 + .../webkit/WebCore/svg/SVGAnimatedPropertyTraits.h | 186 + .../webkit/WebCore/svg/SVGAnimatedTemplate.h | 133 +- .../webkit/WebCore/svg/SVGAnimationElement.cpp | 23 +- .../webkit/WebCore/svg/SVGAnimationElement.h | 7 +- .../webkit/WebCore/svg/SVGAnimationElement.idl | 2 +- .../webkit/WebCore/svg/SVGCircleElement.cpp | 31 +- src/3rdparty/webkit/WebCore/svg/SVGCircleElement.h | 11 +- .../webkit/WebCore/svg/SVGClipPathElement.cpp | 51 +- .../webkit/WebCore/svg/SVGClipPathElement.h | 12 +- src/3rdparty/webkit/WebCore/svg/SVGColor.cpp | 2 - src/3rdparty/webkit/WebCore/svg/SVGColor.idl | 4 +- .../svg/SVGComponentTransferFunctionElement.cpp | 52 +- .../svg/SVGComponentTransferFunctionElement.h | 21 +- .../svg/SVGComponentTransferFunctionElement.idl | 2 +- .../webkit/WebCore/svg/SVGCursorElement.cpp | 30 +- src/3rdparty/webkit/WebCore/svg/SVGCursorElement.h | 11 +- src/3rdparty/webkit/WebCore/svg/SVGDefsElement.cpp | 11 +- src/3rdparty/webkit/WebCore/svg/SVGDefsElement.h | 5 +- src/3rdparty/webkit/WebCore/svg/SVGDescElement.cpp | 2 - src/3rdparty/webkit/WebCore/svg/SVGDescElement.h | 2 - src/3rdparty/webkit/WebCore/svg/SVGDocument.cpp | 2 +- src/3rdparty/webkit/WebCore/svg/SVGDocument.idl | 2 - .../webkit/WebCore/svg/SVGDocumentExtensions.cpp | 12 + .../webkit/WebCore/svg/SVGDocumentExtensions.h | 60 +- src/3rdparty/webkit/WebCore/svg/SVGElement.cpp | 100 +- src/3rdparty/webkit/WebCore/svg/SVGElement.h | 50 +- src/3rdparty/webkit/WebCore/svg/SVGElement.idl | 2 - .../webkit/WebCore/svg/SVGElementInstance.cpp | 79 +- .../webkit/WebCore/svg/SVGElementInstance.h | 6 - .../webkit/WebCore/svg/SVGElementInstanceList.cpp | 2 - .../webkit/WebCore/svg/SVGElementInstanceList.h | 2 - .../webkit/WebCore/svg/SVGElementRareData.h | 78 + .../webkit/WebCore/svg/SVGEllipseElement.cpp | 36 +- .../webkit/WebCore/svg/SVGEllipseElement.h | 13 +- src/3rdparty/webkit/WebCore/svg/SVGException.idl | 3 +- .../WebCore/svg/SVGExternalResourcesRequired.cpp | 4 - .../WebCore/svg/SVGExternalResourcesRequired.h | 3 +- .../WebCore/svg/SVGExternalResourcesRequired.idl | 2 +- .../webkit/WebCore/svg/SVGFEBlendElement.cpp | 25 +- .../webkit/WebCore/svg/SVGFEBlendElement.h | 9 +- .../webkit/WebCore/svg/SVGFEBlendElement.idl | 2 +- .../webkit/WebCore/svg/SVGFEColorMatrixElement.cpp | 26 +- .../webkit/WebCore/svg/SVGFEColorMatrixElement.h | 9 +- .../webkit/WebCore/svg/SVGFEColorMatrixElement.idl | 2 +- .../WebCore/svg/SVGFEComponentTransferElement.cpp | 11 +- .../WebCore/svg/SVGFEComponentTransferElement.h | 5 +- .../webkit/WebCore/svg/SVGFECompositeElement.cpp | 44 +- .../webkit/WebCore/svg/SVGFECompositeElement.h | 17 +- .../webkit/WebCore/svg/SVGFECompositeElement.idl | 2 +- .../WebCore/svg/SVGFEDiffuseLightingElement.cpp | 40 +- .../WebCore/svg/SVGFEDiffuseLightingElement.h | 13 +- .../WebCore/svg/SVGFEDisplacementMapElement.cpp | 32 +- .../WebCore/svg/SVGFEDisplacementMapElement.h | 11 +- .../WebCore/svg/SVGFEDisplacementMapElement.idl | 2 +- .../WebCore/svg/SVGFEDistantLightElement.cpp | 4 +- .../webkit/WebCore/svg/SVGFEDistantLightElement.h | 2 +- .../webkit/WebCore/svg/SVGFEFloodElement.cpp | 2 - .../webkit/WebCore/svg/SVGFEFloodElement.h | 2 - .../webkit/WebCore/svg/SVGFEFloodElement.idl | 2 +- .../webkit/WebCore/svg/SVGFEFuncAElement.cpp | 2 - .../webkit/WebCore/svg/SVGFEFuncAElement.h | 2 - .../webkit/WebCore/svg/SVGFEFuncBElement.cpp | 2 - .../webkit/WebCore/svg/SVGFEFuncBElement.h | 2 - .../webkit/WebCore/svg/SVGFEFuncGElement.cpp | 2 - .../webkit/WebCore/svg/SVGFEFuncGElement.h | 2 - .../webkit/WebCore/svg/SVGFEFuncRElement.cpp | 2 - .../webkit/WebCore/svg/SVGFEFuncRElement.h | 2 - .../WebCore/svg/SVGFEGaussianBlurElement.cpp | 23 +- .../webkit/WebCore/svg/SVGFEGaussianBlurElement.h | 9 +- .../webkit/WebCore/svg/SVGFEImageElement.cpp | 79 +- .../webkit/WebCore/svg/SVGFEImageElement.h | 19 +- .../webkit/WebCore/svg/SVGFEImageElement.idl | 9 +- .../webkit/WebCore/svg/SVGFELightElement.cpp | 55 +- .../webkit/WebCore/svg/SVGFELightElement.h | 25 +- .../webkit/WebCore/svg/SVGFEMergeElement.cpp | 4 +- .../webkit/WebCore/svg/SVGFEMergeElement.h | 2 - .../webkit/WebCore/svg/SVGFEMergeNodeElement.cpp | 11 +- .../webkit/WebCore/svg/SVGFEMergeNodeElement.h | 3 +- .../webkit/WebCore/svg/SVGFEMorphologyElement.cpp | 27 +- .../webkit/WebCore/svg/SVGFEMorphologyElement.h | 9 +- .../webkit/WebCore/svg/SVGFEMorphologyElement.idl | 2 +- .../webkit/WebCore/svg/SVGFEOffsetElement.cpp | 24 +- .../webkit/WebCore/svg/SVGFEOffsetElement.h | 9 +- .../webkit/WebCore/svg/SVGFEPointLightElement.cpp | 4 +- .../webkit/WebCore/svg/SVGFEPointLightElement.h | 2 +- .../WebCore/svg/SVGFESpecularLightingElement.cpp | 45 +- .../WebCore/svg/SVGFESpecularLightingElement.h | 19 +- .../webkit/WebCore/svg/SVGFESpotLightElement.cpp | 4 +- .../webkit/WebCore/svg/SVGFESpotLightElement.h | 2 +- .../webkit/WebCore/svg/SVGFETileElement.cpp | 11 +- src/3rdparty/webkit/WebCore/svg/SVGFETileElement.h | 5 +- .../webkit/WebCore/svg/SVGFETurbulenceElement.cpp | 38 +- .../webkit/WebCore/svg/SVGFETurbulenceElement.h | 15 +- .../webkit/WebCore/svg/SVGFETurbulenceElement.idl | 2 +- .../webkit/WebCore/svg/SVGFilterElement.cpp | 93 +- src/3rdparty/webkit/WebCore/svg/SVGFilterElement.h | 29 +- .../svg/SVGFilterPrimitiveStandardAttributes.cpp | 38 +- .../svg/SVGFilterPrimitiveStandardAttributes.h | 13 +- .../webkit/WebCore/svg/SVGFitToViewBox.cpp | 15 +- src/3rdparty/webkit/WebCore/svg/SVGFitToViewBox.h | 29 +- .../webkit/WebCore/svg/SVGFitToViewBox.idl | 2 +- src/3rdparty/webkit/WebCore/svg/SVGFont.cpp | 9 +- src/3rdparty/webkit/WebCore/svg/SVGFontData.h | 2 +- src/3rdparty/webkit/WebCore/svg/SVGFontElement.cpp | 9 +- src/3rdparty/webkit/WebCore/svg/SVGFontElement.h | 5 +- .../webkit/WebCore/svg/SVGFontFaceElement.cpp | 9 +- .../webkit/WebCore/svg/SVGFontFaceUriElement.cpp | 8 +- .../webkit/WebCore/svg/SVGForeignObjectElement.cpp | 115 +- .../webkit/WebCore/svg/SVGForeignObjectElement.h | 15 +- src/3rdparty/webkit/WebCore/svg/SVGGElement.cpp | 11 +- src/3rdparty/webkit/WebCore/svg/SVGGElement.h | 9 +- .../webkit/WebCore/svg/SVGGlyphElement.cpp | 4 +- .../webkit/WebCore/svg/SVGGradientElement.cpp | 38 +- .../webkit/WebCore/svg/SVGGradientElement.h | 18 +- .../webkit/WebCore/svg/SVGGradientElement.idl | 2 +- .../webkit/WebCore/svg/SVGHKernElement.cpp | 4 +- .../webkit/WebCore/svg/SVGHKernElement.idl | 2 - .../webkit/WebCore/svg/SVGImageElement.cpp | 50 +- src/3rdparty/webkit/WebCore/svg/SVGImageElement.h | 17 +- src/3rdparty/webkit/WebCore/svg/SVGLangSpace.cpp | 2 - src/3rdparty/webkit/WebCore/svg/SVGLangSpace.h | 2 - src/3rdparty/webkit/WebCore/svg/SVGLangSpace.idl | 2 +- src/3rdparty/webkit/WebCore/svg/SVGLength.cpp | 18 +- src/3rdparty/webkit/WebCore/svg/SVGLength.h | 2 - src/3rdparty/webkit/WebCore/svg/SVGLength.idl | 4 +- src/3rdparty/webkit/WebCore/svg/SVGLengthList.cpp | 2 - src/3rdparty/webkit/WebCore/svg/SVGLengthList.h | 2 - src/3rdparty/webkit/WebCore/svg/SVGLineElement.cpp | 36 +- src/3rdparty/webkit/WebCore/svg/SVGLineElement.h | 13 +- .../WebCore/svg/SVGLinearGradientElement.cpp | 30 +- .../webkit/WebCore/svg/SVGLinearGradientElement.h | 11 +- src/3rdparty/webkit/WebCore/svg/SVGList.h | 31 +- src/3rdparty/webkit/WebCore/svg/SVGListTraits.h | 28 +- src/3rdparty/webkit/WebCore/svg/SVGLocatable.cpp | 20 +- src/3rdparty/webkit/WebCore/svg/SVGLocatable.h | 44 +- src/3rdparty/webkit/WebCore/svg/SVGLocatable.idl | 2 +- .../webkit/WebCore/svg/SVGMPathElement.cpp | 18 +- src/3rdparty/webkit/WebCore/svg/SVGMPathElement.h | 7 +- .../webkit/WebCore/svg/SVGMarkerElement.cpp | 91 +- src/3rdparty/webkit/WebCore/svg/SVGMarkerElement.h | 32 +- .../webkit/WebCore/svg/SVGMarkerElement.idl | 2 +- src/3rdparty/webkit/WebCore/svg/SVGMaskElement.cpp | 155 +- src/3rdparty/webkit/WebCore/svg/SVGMaskElement.h | 32 +- src/3rdparty/webkit/WebCore/svg/SVGMatrix.idl | 8 +- .../webkit/WebCore/svg/SVGMetadataElement.cpp | 2 - .../webkit/WebCore/svg/SVGMetadataElement.h | 2 - .../webkit/WebCore/svg/SVGMetadataElement.idl | 2 - src/3rdparty/webkit/WebCore/svg/SVGNumber.idl | 2 - src/3rdparty/webkit/WebCore/svg/SVGNumberList.cpp | 4 +- src/3rdparty/webkit/WebCore/svg/SVGNumberList.h | 4 +- src/3rdparty/webkit/WebCore/svg/SVGPaint.cpp | 2 - src/3rdparty/webkit/WebCore/svg/SVGPaint.idl | 2 +- src/3rdparty/webkit/WebCore/svg/SVGPathElement.cpp | 24 +- src/3rdparty/webkit/WebCore/svg/SVGPathElement.h | 9 +- src/3rdparty/webkit/WebCore/svg/SVGPathElement.idl | 3 +- src/3rdparty/webkit/WebCore/svg/SVGPathSeg.h | 2 - src/3rdparty/webkit/WebCore/svg/SVGPathSeg.idl | 2 +- src/3rdparty/webkit/WebCore/svg/SVGPathSegArc.cpp | 2 - src/3rdparty/webkit/WebCore/svg/SVGPathSegArc.h | 2 - .../webkit/WebCore/svg/SVGPathSegClosePath.cpp | 2 - .../webkit/WebCore/svg/SVGPathSegClosePath.h | 2 - .../webkit/WebCore/svg/SVGPathSegCurvetoCubic.cpp | 2 - .../webkit/WebCore/svg/SVGPathSegCurvetoCubic.h | 2 - .../WebCore/svg/SVGPathSegCurvetoCubicSmooth.cpp | 2 - .../WebCore/svg/SVGPathSegCurvetoCubicSmooth.h | 2 - .../WebCore/svg/SVGPathSegCurvetoQuadratic.cpp | 2 - .../WebCore/svg/SVGPathSegCurvetoQuadratic.h | 2 - .../svg/SVGPathSegCurvetoQuadraticSmooth.cpp | 2 - .../WebCore/svg/SVGPathSegCurvetoQuadraticSmooth.h | 2 - .../webkit/WebCore/svg/SVGPathSegLineto.cpp | 2 - src/3rdparty/webkit/WebCore/svg/SVGPathSegLineto.h | 2 - .../WebCore/svg/SVGPathSegLinetoHorizontal.cpp | 2 - .../WebCore/svg/SVGPathSegLinetoHorizontal.h | 2 - .../WebCore/svg/SVGPathSegLinetoVertical.cpp | 2 - .../webkit/WebCore/svg/SVGPathSegLinetoVertical.h | 2 - src/3rdparty/webkit/WebCore/svg/SVGPathSegList.cpp | 17 +- src/3rdparty/webkit/WebCore/svg/SVGPathSegList.h | 2 +- .../webkit/WebCore/svg/SVGPathSegMoveto.cpp | 2 - src/3rdparty/webkit/WebCore/svg/SVGPathSegMoveto.h | 2 - .../webkit/WebCore/svg/SVGPatternElement.cpp | 75 +- .../webkit/WebCore/svg/SVGPatternElement.h | 28 +- src/3rdparty/webkit/WebCore/svg/SVGPoint.idl | 2 - src/3rdparty/webkit/WebCore/svg/SVGPointList.cpp | 2 - src/3rdparty/webkit/WebCore/svg/SVGPointList.h | 2 - src/3rdparty/webkit/WebCore/svg/SVGPointList.idl | 14 +- src/3rdparty/webkit/WebCore/svg/SVGPolyElement.cpp | 46 +- src/3rdparty/webkit/WebCore/svg/SVGPolyElement.h | 7 +- .../webkit/WebCore/svg/SVGPolygonElement.cpp | 2 - .../webkit/WebCore/svg/SVGPolygonElement.h | 2 - .../webkit/WebCore/svg/SVGPolylineElement.cpp | 2 - .../webkit/WebCore/svg/SVGPolylineElement.h | 2 - .../webkit/WebCore/svg/SVGPreserveAspectRatio.cpp | 131 +- .../webkit/WebCore/svg/SVGPreserveAspectRatio.h | 39 +- .../webkit/WebCore/svg/SVGPreserveAspectRatio.idl | 2 +- .../WebCore/svg/SVGRadialGradientElement.cpp | 57 +- .../webkit/WebCore/svg/SVGRadialGradientElement.h | 13 +- src/3rdparty/webkit/WebCore/svg/SVGRect.idl | 2 - src/3rdparty/webkit/WebCore/svg/SVGRectElement.cpp | 46 +- src/3rdparty/webkit/WebCore/svg/SVGRectElement.h | 17 +- .../webkit/WebCore/svg/SVGRenderingIntent.h | 2 - .../webkit/WebCore/svg/SVGRenderingIntent.idl | 2 +- src/3rdparty/webkit/WebCore/svg/SVGSVGElement.cpp | 114 +- src/3rdparty/webkit/WebCore/svg/SVGSVGElement.h | 37 +- src/3rdparty/webkit/WebCore/svg/SVGSVGElement.idl | 2 - .../webkit/WebCore/svg/SVGScriptElement.cpp | 20 +- src/3rdparty/webkit/WebCore/svg/SVGScriptElement.h | 7 +- src/3rdparty/webkit/WebCore/svg/SVGSetElement.cpp | 2 - src/3rdparty/webkit/WebCore/svg/SVGSetElement.h | 2 - src/3rdparty/webkit/WebCore/svg/SVGStopElement.cpp | 12 +- src/3rdparty/webkit/WebCore/svg/SVGStopElement.h | 4 +- src/3rdparty/webkit/WebCore/svg/SVGStringList.cpp | 2 - src/3rdparty/webkit/WebCore/svg/SVGStringList.h | 2 - src/3rdparty/webkit/WebCore/svg/SVGStylable.cpp | 2 - src/3rdparty/webkit/WebCore/svg/SVGStylable.h | 2 - src/3rdparty/webkit/WebCore/svg/SVGStylable.idl | 2 +- .../webkit/WebCore/svg/SVGStyleElement.cpp | 16 +- src/3rdparty/webkit/WebCore/svg/SVGStyleElement.h | 2 - .../webkit/WebCore/svg/SVGStyledElement.cpp | 109 +- src/3rdparty/webkit/WebCore/svg/SVGStyledElement.h | 31 +- .../WebCore/svg/SVGStyledLocatableElement.cpp | 8 +- .../webkit/WebCore/svg/SVGStyledLocatableElement.h | 6 +- .../WebCore/svg/SVGStyledTransformableElement.cpp | 40 +- .../WebCore/svg/SVGStyledTransformableElement.h | 76 +- .../webkit/WebCore/svg/SVGSwitchElement.cpp | 15 +- src/3rdparty/webkit/WebCore/svg/SVGSwitchElement.h | 5 +- .../webkit/WebCore/svg/SVGSymbolElement.cpp | 34 +- src/3rdparty/webkit/WebCore/svg/SVGSymbolElement.h | 11 +- src/3rdparty/webkit/WebCore/svg/SVGTRefElement.cpp | 27 +- src/3rdparty/webkit/WebCore/svg/SVGTRefElement.h | 4 +- .../webkit/WebCore/svg/SVGTSpanElement.cpp | 2 - src/3rdparty/webkit/WebCore/svg/SVGTSpanElement.h | 2 - src/3rdparty/webkit/WebCore/svg/SVGTests.h | 2 - src/3rdparty/webkit/WebCore/svg/SVGTests.idl | 2 +- .../webkit/WebCore/svg/SVGTextContentElement.cpp | 28 +- .../webkit/WebCore/svg/SVGTextContentElement.h | 11 +- .../webkit/WebCore/svg/SVGTextContentElement.idl | 2 +- src/3rdparty/webkit/WebCore/svg/SVGTextElement.cpp | 49 +- src/3rdparty/webkit/WebCore/svg/SVGTextElement.h | 16 +- .../webkit/WebCore/svg/SVGTextPathElement.cpp | 35 +- .../webkit/WebCore/svg/SVGTextPathElement.h | 9 +- .../webkit/WebCore/svg/SVGTextPathElement.idl | 2 +- .../WebCore/svg/SVGTextPositioningElement.cpp | 51 +- .../webkit/WebCore/svg/SVGTextPositioningElement.h | 16 +- .../webkit/WebCore/svg/SVGTitleElement.cpp | 2 - src/3rdparty/webkit/WebCore/svg/SVGTitleElement.h | 2 - src/3rdparty/webkit/WebCore/svg/SVGTransform.cpp | 11 +- src/3rdparty/webkit/WebCore/svg/SVGTransform.h | 18 +- src/3rdparty/webkit/WebCore/svg/SVGTransform.idl | 4 +- .../webkit/WebCore/svg/SVGTransformDistance.cpp | 12 +- .../webkit/WebCore/svg/SVGTransformDistance.h | 48 +- .../webkit/WebCore/svg/SVGTransformList.cpp | 15 +- src/3rdparty/webkit/WebCore/svg/SVGTransformList.h | 4 +- .../webkit/WebCore/svg/SVGTransformList.idl | 14 +- .../webkit/WebCore/svg/SVGTransformable.cpp | 28 +- src/3rdparty/webkit/WebCore/svg/SVGTransformable.h | 47 +- .../webkit/WebCore/svg/SVGTransformable.idl | 2 +- .../webkit/WebCore/svg/SVGURIReference.cpp | 2 - src/3rdparty/webkit/WebCore/svg/SVGURIReference.h | 5 +- .../webkit/WebCore/svg/SVGURIReference.idl | 2 +- src/3rdparty/webkit/WebCore/svg/SVGUnitTypes.h | 10 +- src/3rdparty/webkit/WebCore/svg/SVGUnitTypes.idl | 2 +- src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp | 514 +- src/3rdparty/webkit/WebCore/svg/SVGUseElement.h | 50 +- src/3rdparty/webkit/WebCore/svg/SVGViewElement.cpp | 24 +- src/3rdparty/webkit/WebCore/svg/SVGViewElement.h | 9 +- src/3rdparty/webkit/WebCore/svg/SVGViewSpec.cpp | 12 +- src/3rdparty/webkit/WebCore/svg/SVGViewSpec.h | 9 +- src/3rdparty/webkit/WebCore/svg/SVGZoomAndPan.cpp | 2 - src/3rdparty/webkit/WebCore/svg/SVGZoomAndPan.h | 2 - src/3rdparty/webkit/WebCore/svg/SVGZoomAndPan.idl | 2 +- src/3rdparty/webkit/WebCore/svg/SVGZoomEvent.cpp | 2 - .../svg/SynchronizablePropertyController.cpp | 145 - .../WebCore/svg/SynchronizablePropertyController.h | 84 - .../webkit/WebCore/svg/SynchronizableTypeWrapper.h | 180 - .../WebCore/svg/animation/SMILTimeContainer.cpp | 36 +- .../WebCore/svg/animation/SMILTimeContainer.h | 8 +- .../webkit/WebCore/svg/graphics/SVGImage.cpp | 11 +- .../webkit/WebCore/svg/graphics/SVGImage.h | 2 +- .../webkit/WebCore/svg/graphics/SVGPaintServer.cpp | 15 +- .../webkit/WebCore/svg/graphics/SVGPaintServer.h | 9 +- .../svg/graphics/SVGPaintServerGradient.cpp | 96 +- .../WebCore/svg/graphics/SVGPaintServerGradient.h | 10 +- .../WebCore/svg/graphics/SVGPaintServerPattern.cpp | 28 +- .../WebCore/svg/graphics/SVGPaintServerPattern.h | 10 +- .../WebCore/svg/graphics/SVGPaintServerSolid.cpp | 8 +- .../WebCore/svg/graphics/SVGPaintServerSolid.h | 2 +- .../webkit/WebCore/svg/graphics/SVGResource.cpp | 93 +- .../webkit/WebCore/svg/graphics/SVGResource.h | 7 +- .../WebCore/svg/graphics/SVGResourceClipper.cpp | 39 +- .../WebCore/svg/graphics/SVGResourceClipper.h | 13 +- .../WebCore/svg/graphics/SVGResourceFilter.cpp | 96 +- .../WebCore/svg/graphics/SVGResourceFilter.h | 18 +- .../WebCore/svg/graphics/SVGResourceMarker.cpp | 73 +- .../WebCore/svg/graphics/SVGResourceMarker.h | 27 +- .../WebCore/svg/graphics/SVGResourceMasker.cpp | 118 - .../WebCore/svg/graphics/SVGResourceMasker.h | 73 - .../svg/graphics/filters/SVGDistantLightSource.h | 16 +- .../svg/graphics/filters/SVGFEDiffuseLighting.cpp | 6 +- .../svg/graphics/filters/SVGFEDiffuseLighting.h | 6 +- .../svg/graphics/filters/SVGFEDisplacementMap.cpp | 54 +- .../WebCore/svg/graphics/filters/SVGFEFlood.cpp | 2 +- .../WebCore/svg/graphics/filters/SVGFEImage.cpp | 47 +- .../WebCore/svg/graphics/filters/SVGFEImage.h | 22 +- .../WebCore/svg/graphics/filters/SVGFEMerge.cpp | 12 +- .../WebCore/svg/graphics/filters/SVGFEMerge.h | 10 +- .../svg/graphics/filters/SVGFEMorphology.cpp | 80 +- .../WebCore/svg/graphics/filters/SVGFEOffset.cpp | 21 +- .../svg/graphics/filters/SVGFESpecularLighting.cpp | 6 +- .../svg/graphics/filters/SVGFESpecularLighting.h | 6 +- .../WebCore/svg/graphics/filters/SVGFETile.cpp | 21 +- .../WebCore/svg/graphics/filters/SVGFilter.cpp | 5 +- .../WebCore/svg/graphics/filters/SVGFilter.h | 12 +- .../svg/graphics/filters/SVGFilterBuilder.cpp | 4 +- .../WebCore/svg/graphics/filters/SVGLightSource.h | 1 + .../svg/graphics/filters/SVGPointLightSource.h | 14 +- .../svg/graphics/filters/SVGSpotLightSource.h | 22 +- src/3rdparty/webkit/WebCore/svg/svgattrs.in | 1 - src/3rdparty/webkit/WebCore/svg/svgtags.in | 3 +- src/3rdparty/webkit/WebCore/svg/xlinkattrs.in | 1 - .../websockets/ThreadableWebSocketChannel.cpp | 74 + .../websockets/ThreadableWebSocketChannel.h | 69 + .../ThreadableWebSocketChannelClientWrapper.h | 127 + .../webkit/WebCore/websockets/WebSocket.cpp | 118 +- src/3rdparty/webkit/WebCore/websockets/WebSocket.h | 25 +- .../webkit/WebCore/websockets/WebSocket.idl | 1 + .../webkit/WebCore/websockets/WebSocketChannel.cpp | 74 +- .../webkit/WebCore/websockets/WebSocketChannel.h | 30 +- .../WebCore/websockets/WebSocketChannelClient.h | 8 +- .../WebCore/websockets/WebSocketHandshake.cpp | 76 +- .../webkit/WebCore/websockets/WebSocketHandshake.h | 6 +- .../WorkerThreadableWebSocketChannel.cpp | 362 + .../websockets/WorkerThreadableWebSocketChannel.h | 155 + src/3rdparty/webkit/WebCore/wml/WMLAElement.cpp | 4 +- src/3rdparty/webkit/WebCore/wml/WMLCardElement.cpp | 2 +- src/3rdparty/webkit/WebCore/wml/WMLDocument.cpp | 3 +- src/3rdparty/webkit/WebCore/wml/WMLElement.cpp | 2 +- .../webkit/WebCore/wml/WMLInputElement.cpp | 20 +- src/3rdparty/webkit/WebCore/wml/WMLInputElement.h | 4 +- src/3rdparty/webkit/WebCore/wml/WMLPageState.cpp | 1 + src/3rdparty/webkit/WebCore/wml/WMLPageState.h | 1 + .../webkit/WebCore/wml/WMLSelectElement.cpp | 1 - .../webkit/WebCore/workers/AbstractWorker.idl | 3 +- .../WebCore/workers/DedicatedWorkerContext.idl | 3 +- .../workers/DefaultSharedWorkerRepository.cpp | 31 +- .../webkit/WebCore/workers/GenericWorkerTask.h | 48 +- .../webkit/WebCore/workers/SharedWorker.idl | 1 + .../webkit/WebCore/workers/SharedWorkerContext.idl | 3 +- src/3rdparty/webkit/WebCore/workers/Worker.idl | 1 + .../webkit/WebCore/workers/WorkerContext.cpp | 24 +- .../webkit/WebCore/workers/WorkerContext.h | 20 +- .../webkit/WebCore/workers/WorkerContext.idl | 6 +- .../webkit/WebCore/workers/WorkerLoaderProxy.h | 6 +- .../webkit/WebCore/workers/WorkerLocation.idl | 1 - .../WebCore/workers/WorkerMessagingProxy.cpp | 30 +- .../webkit/WebCore/workers/WorkerMessagingProxy.h | 6 +- .../webkit/WebCore/workers/WorkerRunLoop.cpp | 59 +- .../webkit/WebCore/workers/WorkerRunLoop.h | 24 +- .../WebCore/workers/WorkerScriptLoaderClient.h | 4 +- .../webkit/WebCore/workers/WorkerThread.cpp | 65 +- src/3rdparty/webkit/WebCore/xml/DOMParser.idl | 2 +- src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp | 22 +- src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.h | 6 +- src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.idl | 1 + .../webkit/WebCore/xml/XMLHttpRequestException.idl | 1 - .../WebCore/xml/XMLHttpRequestProgressEvent.idl | 1 - .../webkit/WebCore/xml/XMLHttpRequestUpload.idl | 1 - src/3rdparty/webkit/WebCore/xml/XMLSerializer.idl | 2 +- src/3rdparty/webkit/WebCore/xml/XPathEvaluator.idl | 2 +- src/3rdparty/webkit/WebCore/xml/XPathException.idl | 1 - .../webkit/WebCore/xml/XPathExpression.idl | 3 +- .../webkit/WebCore/xml/XPathExpressionNode.h | 2 +- .../webkit/WebCore/xml/XPathNSResolver.idl | 2 +- src/3rdparty/webkit/WebCore/xml/XPathNodeSet.h | 2 +- src/3rdparty/webkit/WebCore/xml/XPathResult.idl | 2 +- src/3rdparty/webkit/WebCore/xml/XPathStep.cpp | 15 +- src/3rdparty/webkit/WebCore/xml/XPathStep.h | 2 +- src/3rdparty/webkit/WebCore/xml/XSLImportRule.cpp | 14 +- src/3rdparty/webkit/WebCore/xml/XSLImportRule.h | 2 +- src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.h | 16 +- .../webkit/WebCore/xml/XSLStyleSheetLibxslt.cpp | 12 +- .../webkit/WebCore/xml/XSLStyleSheetQt.cpp | 4 +- src/3rdparty/webkit/WebCore/xml/XSLTProcessor.idl | 3 +- .../webkit/WebCore/xml/XSLTProcessorLibxslt.cpp | 11 +- .../webkit/WebCore/xml/XSLTProcessorQt.cpp | 4 +- src/3rdparty/webkit/WebCore/xml/xmlnsattrs.in | 4 + src/3rdparty/webkit/WebKit.pri | 96 +- src/3rdparty/webkit/WebKit/ChangeLog | 214 + .../webkit/WebKit/StringsNotToBeLocalized.txt | 45 +- .../webkit/WebKit/mac/ChangeLog-2010-01-29 | 23230 +++++ .../WebKit/mac/Configurations/Version.xcconfig | 4 +- .../webkit/WebKit/qt/Api/DerivedSources.pro | 108 + .../webkit/WebKit/qt/Api/qgraphicswebview.cpp | 267 +- .../webkit/WebKit/qt/Api/qgraphicswebview.h | 8 + src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp | 1 - src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h | 9 + src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp | 237 +- src/3rdparty/webkit/WebKit/qt/Api/qwebframe.h | 11 +- src/3rdparty/webkit/WebKit/qt/Api/qwebframe_p.h | 5 +- .../webkit/WebKit/qt/Api/qwebinspector.cpp | 14 +- src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.h | 1 + src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h | 11 - src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp | 219 +- src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h | 18 - src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h | 18 +- .../webkit/WebKit/qt/Api/qwebsecurityorigin.cpp | 5 + src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp | 20 +- src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h | 8 +- src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp | 169 +- src/3rdparty/webkit/WebKit/qt/Api/qwebview.h | 6 - src/3rdparty/webkit/WebKit/qt/ChangeLog | 2227 +- .../WebKit/qt/WebCoreSupport/ChromeClientQt.cpp | 68 +- .../WebKit/qt/WebCoreSupport/ChromeClientQt.h | 21 + .../WebKit/qt/WebCoreSupport/DragClientQt.cpp | 39 +- .../WebKit/qt/WebCoreSupport/EditorClientQt.cpp | 22 +- .../qt/WebCoreSupport/FrameLoaderClientQt.cpp | 143 +- .../WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h | 10 +- .../WebKit/qt/WebCoreSupport/InspectorClientQt.cpp | 101 +- .../WebKit/qt/WebCoreSupport/InspectorClientQt.h | 5 +- .../qt/WebCoreSupport/QtFallbackWebPopup.cpp | 169 + .../WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h | 65 + .../webkit/WebKit/qt/docs/qtwebkit.qdocconf | 2 +- .../qt/docs/webkitsnippets/webelement/main.cpp | 4 +- .../webkit/WebKit/qt/symbian/eabi/QtWebKitu.def | 4 + .../WebKit/qt/tests/benchmarks/loading/loading.pro | 1 + .../qt/tests/benchmarks/loading/tst_loading.pro | 11 - .../qt/tests/benchmarks/painting/painting.pro | 1 + .../qt/tests/benchmarks/painting/tst_painting.pro | 11 - .../WebKit/qt/tests/hybridPixmap/hybridPixmap.pro | 10 + .../WebKit/qt/tests/hybridPixmap/resources.qrc | 5 + .../webkit/WebKit/qt/tests/hybridPixmap/test.html | 65 + .../qt/tests/hybridPixmap/tst_hybridPixmap.cpp | 52 + .../webkit/WebKit/qt/tests/hybridPixmap/widget.cpp | 119 + .../webkit/WebKit/qt/tests/hybridPixmap/widget.h | 70 + .../webkit/WebKit/qt/tests/hybridPixmap/widget.ui | 95 + .../qt/tests/qgraphicswebview/qgraphicswebview.pro | 11 +- .../qgraphicswebview/tst_qgraphicswebview.cpp | 29 +- .../webkit/WebKit/qt/tests/qwebelement/image.png | Bin 14743 -> 0 bytes .../WebKit/qt/tests/qwebelement/qwebelement.pro | 13 +- .../WebKit/qt/tests/qwebelement/qwebelement.qrc | 7 - .../qt/tests/qwebelement/resources/image.png | Bin 0 -> 14743 bytes .../qt/tests/qwebelement/resources/style.css | 1 + .../qt/tests/qwebelement/resources/style2.css | 1 + .../webkit/WebKit/qt/tests/qwebelement/style.css | 1 - .../webkit/WebKit/qt/tests/qwebelement/style2.css | 1 - .../qt/tests/qwebelement/tst_qwebelement.cpp | 30 +- .../qt/tests/qwebelement/tst_qwebelement.qrc | 7 + .../webkit/WebKit/qt/tests/qwebframe/image.png | Bin 14743 -> 0 bytes .../webkit/WebKit/qt/tests/qwebframe/qwebframe.pro | 14 +- .../webkit/WebKit/qt/tests/qwebframe/qwebframe.qrc | 10 - .../WebKit/qt/tests/qwebframe/resources/image.png | Bin 0 -> 14743 bytes .../WebKit/qt/tests/qwebframe/resources/image2.png | Bin 14743 -> 0 bytes .../WebKit/qt/tests/qwebframe/resources/style.css | 1 + .../WebKit/qt/tests/qwebframe/resources/test1.html | 1 + .../WebKit/qt/tests/qwebframe/resources/test2.html | 1 + .../qt/tests/qwebframe/resources/testiframe.html | 54 + .../qt/tests/qwebframe/resources/testiframe2.html | 21 + .../webkit/WebKit/qt/tests/qwebframe/style.css | 1 - .../webkit/WebKit/qt/tests/qwebframe/test1.html | 1 - .../webkit/WebKit/qt/tests/qwebframe/test2.html | 1 - .../WebKit/qt/tests/qwebframe/testiframe.html | 54 - .../WebKit/qt/tests/qwebframe/testiframe2.html | 21 - .../WebKit/qt/tests/qwebframe/tst_qwebframe.cpp | 216 +- .../WebKit/qt/tests/qwebframe/tst_qwebframe.qrc | 10 + .../WebKit/qt/tests/qwebhistory/data/page1.html | 1 - .../WebKit/qt/tests/qwebhistory/data/page2.html | 1 - .../WebKit/qt/tests/qwebhistory/data/page3.html | 1 - .../WebKit/qt/tests/qwebhistory/data/page4.html | 1 - .../WebKit/qt/tests/qwebhistory/data/page5.html | 1 - .../WebKit/qt/tests/qwebhistory/data/page6.html | 1 - .../WebKit/qt/tests/qwebhistory/qwebhistory.pro | 13 +- .../qt/tests/qwebhistory/resources/page1.html | 1 + .../qt/tests/qwebhistory/resources/page2.html | 1 + .../qt/tests/qwebhistory/resources/page3.html | 1 + .../qt/tests/qwebhistory/resources/page4.html | 1 + .../qt/tests/qwebhistory/resources/page5.html | 1 + .../qt/tests/qwebhistory/resources/page6.html | 1 + .../qt/tests/qwebhistory/tst_qwebhistory.cpp | 2 +- .../qt/tests/qwebhistory/tst_qwebhistory.qrc | 12 +- .../qwebhistoryinterface/qwebhistoryinterface.pro | 12 +- .../qt/tests/qwebinspector/qwebinspector.pro | 1 + .../qt/tests/qwebinspector/tst_qwebinspector.cpp | 68 + .../qt/tests/qwebpage/frametest/frame_a.html | 2 - .../WebKit/qt/tests/qwebpage/frametest/iframe.html | 6 - .../qt/tests/qwebpage/frametest/iframe2.html | 7 - .../qt/tests/qwebpage/frametest/iframe3.html | 5 - .../WebKit/qt/tests/qwebpage/frametest/index.html | 4 - .../webkit/WebKit/qt/tests/qwebpage/qwebpage.pro | 14 +- .../qt/tests/qwebpage/resources/frame_a.html | 2 + .../WebKit/qt/tests/qwebpage/resources/iframe.html | 6 + .../qt/tests/qwebpage/resources/iframe2.html | 7 + .../qt/tests/qwebpage/resources/iframe3.html | 5 + .../WebKit/qt/tests/qwebpage/resources/index.html | 4 + .../WebKit/qt/tests/qwebpage/tst_qwebpage.cpp | 196 +- .../WebKit/qt/tests/qwebpage/tst_qwebpage.qrc | 10 +- .../qwebplugindatabase/qwebplugindatabase.pro | 12 +- .../WebKit/qt/tests/qwebview/data/frame_a.html | 2 - .../WebKit/qt/tests/qwebview/data/index.html | 4 - .../webkit/WebKit/qt/tests/qwebview/qwebview.pro | 14 +- .../qt/tests/qwebview/resources/frame_a.html | 2 + .../WebKit/qt/tests/qwebview/resources/index.html | 4 + .../WebKit/qt/tests/qwebview/tst_qwebview.cpp | 25 +- .../WebKit/qt/tests/qwebview/tst_qwebview.qrc | 4 +- .../webkit/WebKit/qt/tests/resources/image2.png | Bin 0 -> 14743 bytes src/3rdparty/webkit/WebKit/qt/tests/tests.pri | 23 + src/3rdparty/webkit/WebKit/qt/tests/tests.pro | 4 +- src/3rdparty/webkit/WebKit/qt/tests/util.h | 32 +- 3449 files changed, 290823 insertions(+), 137835 deletions(-) create mode 100644 src/3rdparty/webkit/.gitattributes create mode 100644 src/3rdparty/webkit/JavaScriptCore/API/APIShims.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/bytecompiler/NodesCodegen.cpp create mode 100644 src/3rdparty/webkit/JavaScriptCore/create_jit_stubs create mode 100644 src/3rdparty/webkit/JavaScriptCore/generated/GeneratedJITStubs_RVCT.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/jit/JITPropertyAccess32_64.cpp create mode 100644 src/3rdparty/webkit/JavaScriptCore/os-win32/WinMain.cpp delete mode 100644 src/3rdparty/webkit/JavaScriptCore/profiler/HeavyProfile.cpp delete mode 100644 src/3rdparty/webkit/JavaScriptCore/profiler/HeavyProfile.h delete mode 100644 src/3rdparty/webkit/JavaScriptCore/profiler/TreeProfile.cpp delete mode 100644 src/3rdparty/webkit/JavaScriptCore/profiler/TreeProfile.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/qt/api/QtScript.pro create mode 100644 src/3rdparty/webkit/JavaScriptCore/qt/api/qscriptconverter_p.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/qt/api/qscriptengine.cpp create mode 100644 src/3rdparty/webkit/JavaScriptCore/qt/api/qscriptengine.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/qt/api/qscriptengine_p.cpp create mode 100644 src/3rdparty/webkit/JavaScriptCore/qt/api/qscriptengine_p.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/qt/api/qscriptvalue.cpp create mode 100644 src/3rdparty/webkit/JavaScriptCore/qt/api/qscriptvalue.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/qt/api/qscriptvalue_p.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/qt/api/qtscriptglobal.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/qt/tests/qscriptengine/qscriptengine.pro create mode 100644 src/3rdparty/webkit/JavaScriptCore/qt/tests/qscriptengine/tst_qscriptengine.cpp create mode 100644 src/3rdparty/webkit/JavaScriptCore/qt/tests/qscriptvalue/qscriptvalue.pro create mode 100644 src/3rdparty/webkit/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.cpp create mode 100644 src/3rdparty/webkit/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp create mode 100644 src/3rdparty/webkit/JavaScriptCore/qt/tests/tests.pri create mode 100644 src/3rdparty/webkit/JavaScriptCore/qt/tests/tests.pro create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/JSStringBuilder.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/JSZombie.cpp create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/JSZombie.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/MarkStackNone.cpp create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/StringBuilder.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/UStringImpl.cpp create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/UStringImpl.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/WeakGCMap.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/WeakGCPtr.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/WeakRandom.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/wtf/Complex.h delete mode 100644 src/3rdparty/webkit/JavaScriptCore/wtf/GOwnPtr.cpp delete mode 100644 src/3rdparty/webkit/JavaScriptCore/wtf/GOwnPtr.h delete mode 100644 src/3rdparty/webkit/JavaScriptCore/wtf/PtrAndFlags.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/wtf/StringExtras.cpp create mode 100644 src/3rdparty/webkit/JavaScriptCore/wtf/StringHashFunctions.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/wtf/ThreadIdentifierDataPthreads.cpp create mode 100644 src/3rdparty/webkit/JavaScriptCore/wtf/ThreadIdentifierDataPthreads.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/wtf/ValueCheck.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/wtf/Vector3.h create mode 100644 src/3rdparty/webkit/WebCore/ChangeLog-2010-01-29 create mode 100644 src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/StringBuilder.h create mode 100644 src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/UStringImpl.h create mode 100644 src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/WeakGCMap.h create mode 100644 src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/WeakGCPtr.h delete mode 100644 src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/PtrAndFlags.h create mode 100644 src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/StringHashFunctions.h create mode 100644 src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/ValueCheck.h create mode 100644 src/3rdparty/webkit/WebCore/WebCore.ClientBasedGeolocation.exp create mode 100644 src/3rdparty/webkit/WebCore/WebCore.pri create mode 100644 src/3rdparty/webkit/WebCore/accessibility/AccessibilityMenuList.cpp create mode 100644 src/3rdparty/webkit/WebCore/accessibility/AccessibilityMenuList.h create mode 100644 src/3rdparty/webkit/WebCore/accessibility/AccessibilityMenuListOption.cpp create mode 100644 src/3rdparty/webkit/WebCore/accessibility/AccessibilityMenuListOption.h create mode 100644 src/3rdparty/webkit/WebCore/accessibility/AccessibilityMenuListPopup.cpp create mode 100644 src/3rdparty/webkit/WebCore/accessibility/AccessibilityMenuListPopup.h create mode 100644 src/3rdparty/webkit/WebCore/accessibility/AccessibilityScrollbar.cpp create mode 100644 src/3rdparty/webkit/WebCore/accessibility/AccessibilityScrollbar.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/generic/BindingDOMWindow.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/generic/BindingElement.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/generic/BindingSecurity.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/generic/BindingSecurityBase.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/generic/BindingSecurityBase.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/generic/GenericBinding.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/generic/RuntimeEnabledFeatures.h delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/DOMObjectWithSVGContext.h delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasArrayBufferConstructor.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasArrayBufferConstructor.h delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasArrayCustom.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasByteArrayConstructor.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasByteArrayConstructor.h delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasByteArrayCustom.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasFloatArrayConstructor.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasFloatArrayConstructor.h delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasFloatArrayCustom.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasIntArrayConstructor.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasIntArrayConstructor.h delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasIntArrayCustom.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasRenderingContext3DCustom.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasShortArrayConstructor.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasShortArrayConstructor.h delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasShortArrayCustom.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasUnsignedByteArrayConstructor.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasUnsignedByteArrayConstructor.h delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasUnsignedByteArrayCustom.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasUnsignedIntArrayConstructor.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasUnsignedIntArrayConstructor.h delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasUnsignedIntArrayCustom.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasUnsignedShortArrayConstructor.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasUnsignedShortArrayConstructor.h delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasUnsignedShortArrayCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSInjectedScriptHostCustom.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSInspectedObjectWrapper.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSInspectedObjectWrapper.h delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSInspectorBackendCustom.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSInspectorCallbackWrapper.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSInspectorCallbackWrapper.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSPopStateEventCustom.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSQuarantinedObjectWrapper.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSQuarantinedObjectWrapper.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSSVGContextCache.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSSVGPODListCustom.h delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSSVGPointListCustom.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSSVGTransformListCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLArrayBufferConstructor.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLArrayBufferConstructor.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLArrayCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLArrayHelper.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLByteArrayConstructor.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLByteArrayConstructor.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLByteArrayCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLFloatArrayConstructor.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLFloatArrayConstructor.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLFloatArrayCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLIntArrayConstructor.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLIntArrayConstructor.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLIntArrayCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLShortArrayConstructor.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLShortArrayConstructor.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLShortArrayCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLUnsignedByteArrayConstructor.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLUnsignedByteArrayConstructor.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLUnsignedByteArrayCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLUnsignedIntArrayConstructor.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLUnsignedIntArrayConstructor.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLUnsignedIntArrayCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLUnsignedShortArrayConstructor.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLUnsignedShortArrayConstructor.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebGLUnsignedShortArrayCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JavaScriptProfile.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JavaScriptProfile.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JavaScriptProfileNode.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JavaScriptProfileNode.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/ScriptDebugServer.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/ScriptDebugServer.h delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/ScriptObjectQuarantine.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/ScriptObjectQuarantine.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/ScriptProfile.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/ScriptProfiler.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/ScriptProfiler.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/ScriptWrappable.h delete mode 100644 src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorCOM.pm create mode 100644 src/3rdparty/webkit/WebCore/bridge/Bridge.h create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/JNIBridge.cpp create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/JNIBridge.h create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/JNIUtility.cpp create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/JNIUtility.h delete mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/jni_class.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/jni_class.h delete mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/jni_instance.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/jni_instance.h delete mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/jni_runtime.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/jni_runtime.h delete mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/jni_utility.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/jni_utility.h create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/jsc/JNIBridgeJSC.h create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/jsc/JNIUtilityPrivate.cpp create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/jsc/JNIUtilityPrivate.h create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/jsc/JavaClassJSC.cpp create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/jsc/JavaClassJSC.h create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/jsc/JavaInstanceJSC.h create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/jsc/JavaStringJSC.h create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/v8/JNIBridgeV8.cpp create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/v8/JNIBridgeV8.h create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/v8/JNIUtilityPrivate.cpp create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/v8/JNIUtilityPrivate.h create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/v8/JavaClassV8.cpp create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/v8/JavaClassV8.h create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/v8/JavaInstanceV8.cpp create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/v8/JavaInstanceV8.h create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/v8/JavaNPObjectV8.h create mode 100644 src/3rdparty/webkit/WebCore/bridge/jni/v8/JavaStringV8.h create mode 100644 src/3rdparty/webkit/WebCore/bridge/jsc/BridgeJSC.cpp create mode 100644 src/3rdparty/webkit/WebCore/bridge/jsc/BridgeJSC.h create mode 100644 src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.cpp create mode 100644 src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.h delete mode 100644 src/3rdparty/webkit/WebCore/bridge/runtime.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bridge/runtime.h create mode 100644 src/3rdparty/webkit/WebCore/css/mediaControlsGtk.css delete mode 100644 src/3rdparty/webkit/WebCore/dom/ClassNames.cpp delete mode 100644 src/3rdparty/webkit/WebCore/dom/ClassNames.h create mode 100644 src/3rdparty/webkit/WebCore/dom/CompositionEvent.cpp create mode 100644 src/3rdparty/webkit/WebCore/dom/CompositionEvent.h create mode 100644 src/3rdparty/webkit/WebCore/dom/CompositionEvent.idl create mode 100644 src/3rdparty/webkit/WebCore/dom/PopStateEvent.cpp create mode 100644 src/3rdparty/webkit/WebCore/dom/PopStateEvent.h create mode 100644 src/3rdparty/webkit/WebCore/dom/PopStateEvent.idl create mode 100644 src/3rdparty/webkit/WebCore/dom/SpaceSplitString.cpp create mode 100644 src/3rdparty/webkit/WebCore/dom/SpaceSplitString.h create mode 100644 src/3rdparty/webkit/WebCore/dom/Touch.cpp create mode 100644 src/3rdparty/webkit/WebCore/dom/Touch.h create mode 100644 src/3rdparty/webkit/WebCore/dom/Touch.idl create mode 100644 src/3rdparty/webkit/WebCore/dom/TouchEvent.cpp create mode 100644 src/3rdparty/webkit/WebCore/dom/TouchEvent.h create mode 100644 src/3rdparty/webkit/WebCore/dom/TouchEvent.idl create mode 100644 src/3rdparty/webkit/WebCore/dom/TouchList.cpp create mode 100644 src/3rdparty/webkit/WebCore/dom/TouchList.h create mode 100644 src/3rdparty/webkit/WebCore/dom/TouchList.idl delete mode 100644 src/3rdparty/webkit/WebCore/editing/android/EditorAndroid.cpp delete mode 100644 src/3rdparty/webkit/WebCore/editing/chromium/EditorChromium.cpp delete mode 100644 src/3rdparty/webkit/WebCore/editing/gtk/SelectionControllerGtk.cpp delete mode 100644 src/3rdparty/webkit/WebCore/generated/ArrayPrototype.lut.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/DatePrototype.lut.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/Grammar.cpp delete mode 100644 src/3rdparty/webkit/WebCore/generated/Grammar.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSBlob.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSBlob.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasArray.cpp delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasArray.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasArrayBuffer.cpp delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasArrayBuffer.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasByteArray.cpp delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasByteArray.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasFloatArray.cpp delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasFloatArray.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasIntArray.cpp delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasIntArray.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext3D.cpp delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext3D.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasShortArray.cpp delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasShortArray.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasUnsignedByteArray.cpp delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasUnsignedByteArray.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasUnsignedIntArray.cpp delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasUnsignedIntArray.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasUnsignedShortArray.cpp delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasUnsignedShortArray.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCompositionEvent.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCompositionEvent.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSDOMWindowBase.lut.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSInjectedScriptHost.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSInjectedScriptHost.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSInspectorFrontendHost.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSInspectorFrontendHost.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSONObject.lut.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSPopStateEvent.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSPopStateEvent.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSTouch.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSTouch.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSTouchEvent.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSTouchEvent.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSTouchList.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSTouchList.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSWebGLArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSWebGLArray.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSWebGLArrayBuffer.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSWebGLArrayBuffer.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSWebGLByteArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSWebGLByteArray.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSWebGLFloatArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSWebGLFloatArray.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSWebGLIntArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSWebGLIntArray.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSWebGLRenderingContext.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSWebGLRenderingContext.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSWebGLShortArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSWebGLShortArray.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSWebGLUnsignedByteArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSWebGLUnsignedByteArray.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSWebGLUnsignedIntArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSWebGLUnsignedIntArray.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSWebGLUnsignedShortArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSWebGLUnsignedShortArray.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSWorkerContextBase.lut.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/Lexer.lut.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/MathObject.lut.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/NumberConstructor.lut.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/RegExpConstructor.lut.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/RegExpObject.lut.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/StringPrototype.lut.h create mode 100644 src/3rdparty/webkit/WebCore/generated/XMLNSNames.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/XMLNSNames.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/chartables.c create mode 100644 src/3rdparty/webkit/WebCore/html/Blob.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/Blob.h create mode 100644 src/3rdparty/webkit/WebCore/html/Blob.idl create mode 100644 src/3rdparty/webkit/WebCore/html/DateComponents.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/DateComponents.h delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasActiveInfo.h delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasActiveInfo.idl delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasArray.cpp delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasArray.h delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasArray.idl delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasArrayBuffer.cpp delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasArrayBuffer.h delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasArrayBuffer.idl delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasBuffer.cpp delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasBuffer.h delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasBuffer.idl delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasByteArray.cpp delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasByteArray.h delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasByteArray.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasContextAttributes.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasContextAttributes.h delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasFloatArray.cpp delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasFloatArray.h delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasFloatArray.idl delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasFramebuffer.cpp delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasFramebuffer.h delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasFramebuffer.idl delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasIntArray.cpp delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasIntArray.h delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasIntArray.idl delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasProgram.cpp delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasProgram.h delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasProgram.idl delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderbuffer.cpp delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderbuffer.h delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderbuffer.idl delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext3D.cpp delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext3D.h delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext3D.idl delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasShader.cpp delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasShader.h delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasShader.idl delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasShortArray.cpp delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasShortArray.h delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasShortArray.idl delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasTexture.cpp delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasTexture.h delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasTexture.idl delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasUnsignedByteArray.cpp delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasUnsignedByteArray.h delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasUnsignedByteArray.idl delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasUnsignedIntArray.cpp delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasUnsignedIntArray.h delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasUnsignedIntArray.idl delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasUnsignedShortArray.cpp delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasUnsignedShortArray.h delete mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasUnsignedShortArray.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLActiveInfo.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLActiveInfo.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLArray.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLArray.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLArrayBuffer.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLArrayBuffer.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLArrayBuffer.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLBuffer.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLBuffer.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLBuffer.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLByteArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLByteArray.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLByteArray.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLContextAttributes.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLContextAttributes.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLContextAttributes.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLFloatArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLFloatArray.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLFloatArray.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLFramebuffer.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLFramebuffer.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLFramebuffer.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLGetInfo.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLGetInfo.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLIntArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLIntArray.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLIntArray.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLProgram.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLProgram.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLProgram.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLRenderbuffer.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLRenderbuffer.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLRenderbuffer.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLRenderingContext.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLRenderingContext.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLRenderingContext.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLShader.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLShader.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLShader.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLShortArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLShortArray.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLShortArray.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLTexture.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLTexture.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLTexture.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLUniformLocation.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLUniformLocation.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLUniformLocation.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLUnsignedByteArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLUnsignedByteArray.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLUnsignedByteArray.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLUnsignedIntArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLUnsignedIntArray.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLUnsignedIntArray.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLUnsignedShortArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLUnsignedShortArray.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/WebGLUnsignedShortArray.idl create mode 100644 src/3rdparty/webkit/WebCore/inspector/InjectedScript.cpp create mode 100644 src/3rdparty/webkit/WebCore/inspector/InjectedScript.h create mode 100644 src/3rdparty/webkit/WebCore/inspector/InjectedScriptHost.cpp create mode 100644 src/3rdparty/webkit/WebCore/inspector/InjectedScriptHost.h create mode 100644 src/3rdparty/webkit/WebCore/inspector/InjectedScriptHost.idl mode change 100644 => 100755 src/3rdparty/webkit/WebCore/inspector/InspectorFrontend.cpp create mode 100644 src/3rdparty/webkit/WebCore/inspector/InspectorFrontendHost.cpp create mode 100644 src/3rdparty/webkit/WebCore/inspector/InspectorFrontendHost.h create mode 100644 src/3rdparty/webkit/WebCore/inspector/InspectorFrontendHost.idl delete mode 100644 src/3rdparty/webkit/WebCore/inspector/JavaScriptProfile.cpp delete mode 100644 src/3rdparty/webkit/WebCore/inspector/JavaScriptProfile.h delete mode 100644 src/3rdparty/webkit/WebCore/inspector/JavaScriptProfileNode.cpp delete mode 100644 src/3rdparty/webkit/WebCore/inspector/JavaScriptProfileNode.h create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/AuditCategories.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/AuditLauncherView.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/AuditResultView.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/AuditRules.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/AuditsPanel.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/ConsolePanel.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/ContextMenu.js delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/DOMStorageDataGrid.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/DOMSyntaxHighlighter.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/consoleIcon.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/gearButtonGlyph.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/popoverArrows.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/popoverBackground.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/thumbActiveHoriz.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/thumbActiveVert.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/thumbHoriz.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/thumbHoverHoriz.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/thumbHoverVert.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/thumbVert.png delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/tipBalloon.png delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/tipBalloonBottom.png delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/tipIcon.png delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/tipIconPressed.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/trackHoriz.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/trackVert.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/InspectorBackendStub.js delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/InspectorControllerStub.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/InspectorFrontendHostStub.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Popover.js delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Popup.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Section.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Settings.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/SourceCSSTokenizer.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/SourceCSSTokenizer.re2js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/SourceHTMLTokenizer.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/SourceHTMLTokenizer.re2js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/SourceJavaScriptTokenizer.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/SourceJavaScriptTokenizer.re2js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/SourceTokenizer.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/TextEditorHighlighter.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/TextEditorModel.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/TextViewer.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/TimelineGrid.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/TimelineOverviewPane.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/WelcomeView.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/audits.css create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/popover.css create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/textViewer.css create mode 100644 src/3rdparty/webkit/WebCore/mathml/MathMLTextElement.cpp create mode 100644 src/3rdparty/webkit/WebCore/mathml/MathMLTextElement.h create mode 100644 src/3rdparty/webkit/WebCore/mathml/RenderMathMLBlock.cpp create mode 100644 src/3rdparty/webkit/WebCore/mathml/RenderMathMLBlock.h create mode 100644 src/3rdparty/webkit/WebCore/mathml/mathattrs.in create mode 100644 src/3rdparty/webkit/WebCore/page/ContextMenuProvider.h create mode 100644 src/3rdparty/webkit/WebCore/page/GeolocationController.cpp create mode 100644 src/3rdparty/webkit/WebCore/page/GeolocationController.h create mode 100644 src/3rdparty/webkit/WebCore/page/GeolocationControllerClient.h create mode 100644 src/3rdparty/webkit/WebCore/page/GeolocationError.h create mode 100644 src/3rdparty/webkit/WebCore/page/GeolocationPosition.h create mode 100644 src/3rdparty/webkit/WebCore/page/MediaCanStartListener.h delete mode 100644 src/3rdparty/webkit/WebCore/page/android/DragControllerAndroid.cpp delete mode 100644 src/3rdparty/webkit/WebCore/page/android/EventHandlerAndroid.cpp delete mode 100644 src/3rdparty/webkit/WebCore/page/android/InspectorControllerAndroid.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/PlatformTouchEvent.h create mode 100644 src/3rdparty/webkit/WebCore/platform/PlatformTouchPoint.h delete mode 100644 src/3rdparty/webkit/WebCore/platform/android/ClipboardAndroid.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/android/ClipboardAndroid.h delete mode 100644 src/3rdparty/webkit/WebCore/platform/android/CursorAndroid.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/android/DragDataAndroid.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/android/EventLoopAndroid.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/android/FileChooserAndroid.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/android/FileSystemAndroid.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/android/KeyEventAndroid.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/android/KeyboardCodes.h delete mode 100644 src/3rdparty/webkit/WebCore/platform/android/LocalizedStringsAndroid.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/android/PopupMenuAndroid.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/android/RenderThemeAndroid.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/android/RenderThemeAndroid.h delete mode 100644 src/3rdparty/webkit/WebCore/platform/android/ScreenAndroid.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/android/ScrollViewAndroid.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/android/SearchPopupMenuAndroid.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/android/SystemTimeAndroid.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/android/TemporaryLinkStubs.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/android/WidgetAndroid.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/cf/BinaryPropertyList.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/cf/BinaryPropertyList.h create mode 100644 src/3rdparty/webkit/WebCore/platform/cf/FileSystemCF.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/cf/KURLCFNet.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/cf/RunLoopTimerCF.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/cf/SchedulePair.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/cf/SchedulePair.h create mode 100644 src/3rdparty/webkit/WebCore/platform/cf/SharedBufferCF.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/ColorSpace.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/GraphicsContext3D.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/TypesettingFeatures.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/filters/ImageBufferFilter.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/filters/ImageBufferFilter.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/opentype/OpenTypeSanitizer.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/opentype/OpenTypeSanitizer.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/openvg/EGLDisplayOpenVG.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/openvg/EGLDisplayOpenVG.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/openvg/EGLUtils.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/openvg/GraphicsContextOpenVG.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/openvg/PainterOpenVG.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/openvg/PainterOpenVG.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/openvg/SurfaceOpenVG.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/openvg/SurfaceOpenVG.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/openvg/VGUtils.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/openvg/VGUtils.h delete mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCustomPlatformData.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCustomPlatformDataQt.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt43.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/transforms/AffineTransform.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/transforms/AffineTransform.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/FontCGWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/FontCacheWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/FontCustomPlatformData.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/FontCustomPlatformData.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/FontCustomPlatformDataCairo.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/FontCustomPlatformDataCairo.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/FontDatabase.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/FontDatabase.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/FontPlatformData.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/FontPlatformDataCGWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/FontPlatformDataCairoWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/FontPlatformDataWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/FontWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/GlyphPageTreeNodeCGWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/GraphicsContextWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/GraphicsLayerCACF.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/IconWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/ImageCGWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/ImageCairoWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/ImageWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/IntPointWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/IntRectWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/IntSizeWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/QTMovieWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/QTMovieWin.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/QTMovieWinTimer.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/QTMovieWinTimer.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/SimpleFontDataCairoWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/SimpleFontDataWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/TransformationMatrixWin.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/UniscribeController.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/UniscribeController.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/WKCACFContextFlusher.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/WKCACFContextFlusher.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/WKCACFLayer.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/WKCACFLayer.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/win/WKCACFLayerRenderer.h delete mode 100644 src/3rdparty/webkit/WebCore/platform/image-decoders/wx/ImageDecoderWx.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/network/AuthenticationClient.h create mode 100644 src/3rdparty/webkit/WebCore/platform/network/cf/AuthenticationCF.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/network/cf/AuthenticationCF.h create mode 100644 src/3rdparty/webkit/WebCore/platform/network/cf/AuthenticationChallenge.h create mode 100644 src/3rdparty/webkit/WebCore/platform/network/cf/CredentialStorageCFNet.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/network/cf/DNSCFNet.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/network/cf/FormDataStreamCFNet.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/network/cf/FormDataStreamCFNet.h create mode 100644 src/3rdparty/webkit/WebCore/platform/network/cf/LoaderRunLoopCF.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/network/cf/LoaderRunLoopCF.h create mode 100644 src/3rdparty/webkit/WebCore/platform/network/cf/ResourceError.h create mode 100644 src/3rdparty/webkit/WebCore/platform/network/cf/ResourceErrorCF.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/network/cf/ResourceHandleCFNet.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/network/cf/ResourceRequest.h create mode 100644 src/3rdparty/webkit/WebCore/platform/network/cf/ResourceRequestCFNet.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/network/cf/ResourceRequestCFNet.h create mode 100644 src/3rdparty/webkit/WebCore/platform/network/cf/ResourceResponse.h create mode 100644 src/3rdparty/webkit/WebCore/platform/network/cf/ResourceResponseCFNet.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/network/cf/SocketStreamError.h create mode 100644 src/3rdparty/webkit/WebCore/platform/network/cf/SocketStreamHandle.h create mode 100644 src/3rdparty/webkit/WebCore/platform/network/cf/SocketStreamHandleCFNet.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/network/qt/SocketStreamHandlePrivate.h create mode 100644 src/3rdparty/webkit/WebCore/platform/network/qt/SocketStreamHandleQt.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/network/qt/SocketStreamHandleSoup.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/qt/PlatformTouchEventQt.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/qt/PlatformTouchPointQt.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/qt/QWebPopup.h create mode 100644 src/3rdparty/webkit/WebCore/platform/qt/QtAbstractWebPopup.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/qt/QtAbstractWebPopup.h create mode 100644 src/3rdparty/webkit/WebCore/platform/text/TextBoundaries.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/text/TextBoundariesICU.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/text/android/TextBreakIteratorInternalICU.cpp delete mode 100644 src/3rdparty/webkit/WebCore/platform/text/qt/TextBoundaries.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/text/qt/TextBoundariesQt.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/text/wince/TextBoundariesWince.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/text/wince/TextBreakIteratorWince.cpp create mode 100644 src/3rdparty/webkit/WebCore/plugins/PluginWidget.h create mode 100644 src/3rdparty/webkit/WebCore/plugins/mac/PluginWidgetMac.mm create mode 100644 src/3rdparty/webkit/WebCore/rendering/BidiRun.cpp create mode 100644 src/3rdparty/webkit/WebCore/rendering/BidiRun.h create mode 100644 src/3rdparty/webkit/WebCore/rendering/InlineIterator.h create mode 100644 src/3rdparty/webkit/WebCore/rendering/RenderEmbeddedObject.cpp create mode 100644 src/3rdparty/webkit/WebCore/rendering/RenderEmbeddedObject.h create mode 100644 src/3rdparty/webkit/WebCore/rendering/RenderRuby.cpp create mode 100644 src/3rdparty/webkit/WebCore/rendering/RenderRuby.h create mode 100644 src/3rdparty/webkit/WebCore/rendering/RenderRubyBase.cpp create mode 100644 src/3rdparty/webkit/WebCore/rendering/RenderRubyBase.h create mode 100644 src/3rdparty/webkit/WebCore/rendering/RenderRubyRun.cpp create mode 100644 src/3rdparty/webkit/WebCore/rendering/RenderRubyRun.h create mode 100644 src/3rdparty/webkit/WebCore/rendering/RenderRubyText.cpp create mode 100644 src/3rdparty/webkit/WebCore/rendering/RenderRubyText.h create mode 100644 src/3rdparty/webkit/WebCore/rendering/RenderSVGResource.h create mode 100644 src/3rdparty/webkit/WebCore/rendering/RenderSVGResourceMasker.cpp create mode 100644 src/3rdparty/webkit/WebCore/rendering/RenderSVGResourceMasker.h create mode 100644 src/3rdparty/webkit/WebCore/rendering/RenderSVGShadowTreeRootContainer.cpp create mode 100644 src/3rdparty/webkit/WebCore/rendering/RenderSVGShadowTreeRootContainer.h create mode 100644 src/3rdparty/webkit/WebCore/rendering/SVGMarkerData.h create mode 100644 src/3rdparty/webkit/WebCore/rendering/SVGMarkerLayoutInfo.cpp create mode 100644 src/3rdparty/webkit/WebCore/rendering/SVGMarkerLayoutInfo.h create mode 100644 src/3rdparty/webkit/WebCore/rendering/SVGShadowTreeElements.cpp create mode 100644 src/3rdparty/webkit/WebCore/rendering/SVGShadowTreeElements.h create mode 100644 src/3rdparty/webkit/WebCore/rendering/TrailingFloatsRootInlineBox.h create mode 100644 src/3rdparty/webkit/WebCore/rendering/style/LineClampValue.h create mode 100644 src/3rdparty/webkit/WebCore/storage/IDBDatabaseError.h create mode 100644 src/3rdparty/webkit/WebCore/storage/IDBDatabaseError.idl create mode 100644 src/3rdparty/webkit/WebCore/storage/IDBDatabaseException.h create mode 100644 src/3rdparty/webkit/WebCore/storage/IDBDatabaseException.idl create mode 100644 src/3rdparty/webkit/WebCore/storage/IDBRequest.cpp create mode 100644 src/3rdparty/webkit/WebCore/storage/IDBRequest.h create mode 100644 src/3rdparty/webkit/WebCore/storage/IDBRequest.idl create mode 100644 src/3rdparty/webkit/WebCore/storage/IndexedDatabaseRequest.cpp create mode 100644 src/3rdparty/webkit/WebCore/storage/IndexedDatabaseRequest.h create mode 100644 src/3rdparty/webkit/WebCore/storage/IndexedDatabaseRequest.idl create mode 100644 src/3rdparty/webkit/WebCore/svg/SVGAnimatedPropertySynchronizer.h create mode 100644 src/3rdparty/webkit/WebCore/svg/SVGAnimatedPropertyTraits.h create mode 100644 src/3rdparty/webkit/WebCore/svg/SVGElementRareData.h delete mode 100644 src/3rdparty/webkit/WebCore/svg/SynchronizablePropertyController.cpp delete mode 100644 src/3rdparty/webkit/WebCore/svg/SynchronizablePropertyController.h delete mode 100644 src/3rdparty/webkit/WebCore/svg/SynchronizableTypeWrapper.h delete mode 100644 src/3rdparty/webkit/WebCore/svg/graphics/SVGResourceMasker.cpp delete mode 100644 src/3rdparty/webkit/WebCore/svg/graphics/SVGResourceMasker.h create mode 100644 src/3rdparty/webkit/WebCore/websockets/ThreadableWebSocketChannel.cpp create mode 100644 src/3rdparty/webkit/WebCore/websockets/ThreadableWebSocketChannel.h create mode 100644 src/3rdparty/webkit/WebCore/websockets/ThreadableWebSocketChannelClientWrapper.h create mode 100644 src/3rdparty/webkit/WebCore/websockets/WorkerThreadableWebSocketChannel.cpp create mode 100644 src/3rdparty/webkit/WebCore/websockets/WorkerThreadableWebSocketChannel.h create mode 100644 src/3rdparty/webkit/WebCore/xml/xmlnsattrs.in create mode 100644 src/3rdparty/webkit/WebKit/mac/ChangeLog-2010-01-29 create mode 100644 src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro create mode 100644 src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp create mode 100644 src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/benchmarks/loading/loading.pro delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/benchmarks/loading/tst_loading.pro create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/benchmarks/painting/painting.pro delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/benchmarks/painting/tst_painting.pro create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/hybridPixmap.pro create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/resources.qrc create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/test.html create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/tst_hybridPixmap.cpp create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/widget.cpp create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/widget.h create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/widget.ui delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebelement/image.png delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebelement/qwebelement.qrc create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebelement/resources/image.png create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebelement/resources/style.css create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebelement/resources/style2.css delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebelement/style.css delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebelement/style2.css create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.qrc delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebframe/image.png delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.qrc create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/image.png delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/image2.png create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/style.css create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/test1.html create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/test2.html create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/testiframe.html create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebframe/resources/testiframe2.html delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebframe/style.css delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebframe/test1.html delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebframe/test2.html delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebframe/testiframe.html delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebframe/testiframe2.html create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.qrc delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page1.html delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page2.html delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page3.html delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page4.html delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page5.html delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/data/page6.html create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page1.html create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page2.html create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page3.html create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page4.html create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page5.html create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebhistory/resources/page6.html create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebinspector/qwebinspector.pro create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebinspector/tst_qwebinspector.cpp delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/frame_a.html delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe.html delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe2.html delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/iframe3.html delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebpage/frametest/index.html create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebpage/resources/frame_a.html create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebpage/resources/iframe.html create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebpage/resources/iframe2.html create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebpage/resources/iframe3.html create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebpage/resources/index.html delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebview/data/frame_a.html delete mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebview/data/index.html create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebview/resources/frame_a.html create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebview/resources/index.html create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/resources/image2.png create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/tests.pri diff --git a/src/3rdparty/webkit/.gitattributes b/src/3rdparty/webkit/.gitattributes new file mode 100644 index 0000000..80386ae --- /dev/null +++ b/src/3rdparty/webkit/.gitattributes @@ -0,0 +1,273 @@ +# To enable automatic merging of ChangeLog files, use the following command: +# git config merge.changelog.driver "resolve-ChangeLogs --merge-driver %O %A %B" +ChangeLog* merge=changelog + +JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore.sln -crlf +JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj -crlf +JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCF.vsprops -crlf +JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops -crlf +JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops -crlf +JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj -crlf +JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln -crlf +JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj -crlf +JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFCommon.vsprops -crlf +JavaScriptCore/JavaScriptCore.vcproj/jsc/jsc.vcproj -crlf +JavaScriptCore/JavaScriptCore.vcproj/jsc/jscCommon.vsprops -crlf +JavaScriptCore/JavaScriptCore.vcproj/testapi/testapi.vcproj -crlf +LayoutTests/dom/svg/level3/xpath/Attribute_Nodes.svg -crlf +LayoutTests/dom/svg/level3/xpath/Attribute_Nodes_xmlns.svg -crlf +LayoutTests/dom/svg/level3/xpath/Comment_Nodes.svg -crlf +LayoutTests/dom/svg/level3/xpath/Conformance_Expressions.svg -crlf +LayoutTests/dom/svg/level3/xpath/Conformance_ID.svg -crlf +LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_3.svg -crlf +LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_empty.svg -crlf +LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_null.svg -crlf +LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_3.svg -crlf +LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_empty.svg -crlf +LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_null.svg -crlf +LayoutTests/dom/svg/level3/xpath/Element_Nodes.svg -crlf +LayoutTests/dom/svg/level3/xpath/Processing_Instruction_Nodes.svg -crlf +LayoutTests/dom/svg/level3/xpath/Text_Nodes.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathEvaluatorCast01.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_01.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NS.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_no_NS.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_all.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_document.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_documentElement.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_NAMESPACE_ERR.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_NOT_SUPPORTED_ERR.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_document.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_documentElement.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_NOT_SUPPORTED_ERR.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_WRONG_DOCUMENT_ERR.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_document.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_documentElement.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_nist_dmstc.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_null.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_prefix.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_xml.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_TYPE_ERR.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_booleanValue_false.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_booleanValue_true.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_ANY_TYPE.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_ANY_UNORDERED_NODE_TYPE.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_BOOLEAN_TYPE.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_FIRST_ORDERED_NODE_TYPE.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_NUMBER_TYPE.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_ITERATOR_TYPE.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_SNAPSHOT_TYPE.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_STRING_TYPE.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_ITERATOR_TYPE.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_SNAPSHOT_TYPE.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_iterateNext_INVALID_STATE_ERR.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_iteratorNext_ORDERED_NODE_ITERATOR_TYPE.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_numberValue.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_resultType.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_singleNodeValue_ANY_UNORDERED_NODE_TYPE.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_singleNodeValue_FIRST_ORDERED_NODE_TYPE.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_null.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_order.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_count.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_null.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotLength_ORDERED_NODE_SNAPSHOT_TYPE.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotLength_UNORDERED_NODE_SNAPSHOT_TYPE.svg -crlf +LayoutTests/dom/svg/level3/xpath/XPathResult_stringValue.svg -crlf +LayoutTests/editing/execCommand/align-in-span.html -crlf +LayoutTests/editing/selection/drag-start-event-client-x-y.html -crlf +LayoutTests/fast/backgrounds/background-position-rounding.html -crlf +LayoutTests/fast/backgrounds/repeat/resources/background-repeat-shorthand.js -crlf +LayoutTests/fast/backgrounds/repeat/resources/margin-shorthand.js -crlf +LayoutTests/fast/block/float/clamped-right-float.html -crlf +LayoutTests/fast/block/positioning/absolute-with-html-border-quirks.html -crlf +LayoutTests/fast/block/positioning/absolute-with-html-border-strict.html -crlf +LayoutTests/fast/canvas/script-tests/canvas-gradient-without-path.js -crlf +LayoutTests/fast/css/color-quirk.html -crlf +LayoutTests/fast/css/color-strict.html -crlf +LayoutTests/fast/css/css1_forward_compatible_parsing.html -crlf +LayoutTests/fast/css/empty-pseudo-class.html -crlf +LayoutTests/fast/css/first-child-pseudo-class.html -crlf +LayoutTests/fast/css/first-of-type-pseudo-class.html -crlf +LayoutTests/fast/css/last-child-pseudo-class.html -crlf +LayoutTests/fast/css/last-of-type-pseudo-class.html -crlf +LayoutTests/fast/css/only-child-pseudo-class.html -crlf +LayoutTests/fast/css/only-of-type-pseudo-class.html -crlf +LayoutTests/fast/css/text-input-with-webkit-border-radius.html -crlf +LayoutTests/fast/dom/Document/open-with-pending-load.html -crlf +LayoutTests/fast/dom/Element/hostname-host.html -crlf +LayoutTests/fast/dom/StyleSheet/ownerNode-lifetime-2.html -crlf +LayoutTests/fast/dom/Window/window-property-clearing-expected.txt -crlf +LayoutTests/fast/dom/everything-to-string.html -crlf +LayoutTests/fast/dom/insert-span-into-long-text-bug-28245.html -crlf +LayoutTests/fast/dom/resources/TestApplet.java -crlf +LayoutTests/fast/dom/simultaneouslyRegsiteredTimerFireOrder-expected.txt -crlf +LayoutTests/fast/dom/timer-clear-interval-in-handler-and-generate-error.html -crlf +LayoutTests/fast/events/keydown-keypress-focus-change.html -crlf +LayoutTests/fast/events/node-event-anchor-lock.html -crlf +LayoutTests/fast/events/onload-fires-twice.html -crlf +LayoutTests/fast/events/set-event-in-another-frame.html -crlf +LayoutTests/fast/events/set-event-to-null.html -crlf +LayoutTests/fast/forms/resources/form-and-frame-interaction-retains-values-main.html -crlf +LayoutTests/fast/forms/resources/form-and-frame-interaction-retains-values-submit.html -crlf +LayoutTests/fast/forms/select-remove-option.html -crlf +LayoutTests/fast/forms/select-reset-multiple-selections-4-single-selection.html -crlf +LayoutTests/fast/forms/textfield-onchange-deletion.html -crlf +LayoutTests/fast/frames/frame-src-attribute.html -crlf +LayoutTests/fast/frames/iframe-scroll-page-up-down.html-disabled -crlf +LayoutTests/fast/frames/javascript-url-as-framesrc-crash.html -crlf +LayoutTests/fast/frames/resources/iframe-scroll-page-up-down-1.html -crlf +LayoutTests/fast/frames/resources/iframe-scroll-page-up-down-2.html -crlf +LayoutTests/fast/frames/viewsource-attribute.html -crlf +LayoutTests/fast/inline/inline-padding-disables-text-quirk.html -crlf +LayoutTests/fast/loader/submit-form-while-parsing-1.xhtml -crlf +LayoutTests/fast/overflow/dynamic-hidden.html -crlf +LayoutTests/fast/parser/external-entities-in-xslt.xml -crlf +LayoutTests/fast/parser/external-entities.xml -crlf +LayoutTests/fast/parser/resources/external-entities.xsl -crlf +LayoutTests/fast/replaced/replaced-breaking.html -crlf +LayoutTests/fast/table/dynamic-cellpadding.html -crlf +LayoutTests/fast/table/fixed-table-with-percent-inside-percent-table.html -crlf +LayoutTests/fast/table/fixed-table-with-percent-width-inside-auto-table.html -crlf +LayoutTests/fast/table/fixed-table-with-percent-width-inside-extra-large-div.html -crlf +LayoutTests/fast/table/fixed-table-with-small-percent-width.html -crlf +LayoutTests/fast/table/rules-attr-dynchange1.html -crlf +LayoutTests/fast/table/rules-attr-dynchange2.html -crlf +LayoutTests/fast/text/international/thai-baht-space.html -crlf +LayoutTests/fast/text/resources/line-breaks-crlf.txt -crlf +LayoutTests/fast/text/text-large-negative-letter-spacing-with-opacity.html -crlf +LayoutTests/fast/text/text-letter-spacing.html -crlf +LayoutTests/http/tests/appcache/max-size.html -crlf +LayoutTests/http/tests/misc/location-test-xsl-style-sheet.xml -crlf +LayoutTests/http/tests/misc/resources/location-test-xsl-style-sheet.xsl -crlf +LayoutTests/http/tests/misc/single-character-pi-stylesheet.xhtml -crlf +LayoutTests/http/tests/misc/will-send-request-returns-null-on-redirect.html -crlf +LayoutTests/http/tests/navigation/no-referrer-reset.html -crlf +LayoutTests/http/tests/navigation/no-referrer-same-window.html -crlf +LayoutTests/http/tests/navigation/no-referrer-subframe.html -crlf +LayoutTests/http/tests/navigation/no-referrer-target-blank.html -crlf +LayoutTests/http/tests/navigation/resources/no-referrer-same-window-helper.php -crlf +LayoutTests/http/tests/security/isolatedWorld/events.html -crlf +LayoutTests/http/tests/security/isolatedWorld/resources/iframe.html -crlf +LayoutTests/http/tests/security/isolatedWorld/resources/userGestureEvents-second-window.html -crlf +LayoutTests/http/tests/security/isolatedWorld/userGestureEvents.html -crlf +LayoutTests/http/tests/security/resources/empty-svg.php -crlf +LayoutTests/platform/win/fast/events/panScroll-event-fired.html -crlf +LayoutTests/platform/win/fast/events/panScroll-image-no-scroll.html -crlf +LayoutTests/platform/win/fast/events/panScroll-imageMap-href-no-scroll.html -crlf +LayoutTests/platform/win/fast/events/panScroll-imageMap-noHref-scroll.html -crlf +LayoutTests/platform/win/fast/events/panScroll-nested-divs.html -crlf +LayoutTests/platform/win/fast/events/panScroll-no-iframe-jump.html -crlf +LayoutTests/platform/win/fast/events/panScroll-preventDefault.html -crlf +LayoutTests/svg/custom/marker-opacity.svg -crlf +LayoutTests/svg/custom/resources/graffiti.svg -crlf +LayoutTests/svg/custom/struct-use-09-b.svg -crlf +LayoutTests/svg/custom/svg-fonts-in-html.html -crlf +LayoutTests/svg/custom/use-events-crash.svg -crlf +LayoutTests/svg/custom/use-on-symbol-inside-pattern.svg -crlf +LayoutTests/svg/custom/use-setAttribute-crash.svg -crlf +LayoutTests/svg/custom/xml-stylesheet.svg -crlf +LayoutTests/tables/mozilla/bugs/bug119786.html -crlf +LayoutTests/tables/mozilla/bugs/bug222846.html -crlf +LayoutTests/tables/mozilla/bugs/bug275625.html -crlf +LayoutTests/tables/mozilla/images/aboutHeader.gif -crlf +LayoutTests/tables/mozilla/images/main-horizontal-scroll.gif -crlf +LayoutTests/tables/mozilla_expected_failures/bugs/bug101759.html -crlf +LayoutTests/tables/mozilla_expected_failures/bugs/bug14489.html -crlf +LayoutTests/tables/mozilla_expected_failures/images/aboutHeader.gif -crlf +LayoutTests/tables/mozilla_expected_failures/images/main-horizontal-scroll.gif -crlf +LayoutTests/wml/resources/enter-card-with-events.wml -crlf +LayoutTests/wml/resources/enter-first-card-with-events.wml -crlf +PageLoadTests/svg/files/Harvey_Rayner.svg -crlf +PageLoadTests/svg/files/cacuts_01.svg -crlf +PageLoadTests/svg/files/crawfish2_ganson.svg -crlf +PageLoadTests/svg/files/france.svg -crlf +PageLoadTests/svg/files/mtsthelens.svg -crlf +PageLoadTests/svg/files/worldcup.svg -crlf +PlanetWebKit/planet/LICENCE -crlf +SunSpider/tests/parse-only/jquery-1.3.2.js -crlf +WebCore/WebCore.vcproj/QTMovieWin.vcproj -crlf +WebCore/WebCore.vcproj/WebCore.sln -crlf +WebCore/WebCore.vcproj/WebCore.submit.sln -crlf +WebCore/WebCore.vcproj/WebCore.vcproj -crlf +WebCore/WebCore.vcproj/WebCoreCFNetwork.vsprops -crlf +WebCore/WebCore.vcproj/WebCoreCG.vsprops -crlf +WebCore/WebCore.vcproj/WebCoreCURL.vsprops -crlf +WebCore/WebCore.vcproj/WebCoreCairo.vsprops -crlf +WebCore/WebCore.vcproj/WebCoreGenerated.vcproj -crlf +WebCore/WebCore.vcproj/WebCoreMediaQT.vsprops -crlf +WebCore/WebCore.vcproj/WebCorePthreads.vsprops -crlf +WebCore/WebCore.vcproj/WebCoreQuartzCore.vsprops -crlf +WebCore/accessibility/AccessibilityAllInOne.cpp -crlf +WebCore/bindings/js/JSExceptionBase.cpp -crlf +WebCore/bindings/js/JSExceptionBase.h -crlf +WebCore/manual-tests/DOMContextMenuEvent.html -crlf +WebCore/manual-tests/cursor-max-size.html -crlf +WebCore/manual-tests/drag-with-div-or-image-as-data-image.html -crlf +WebCore/manual-tests/empty-script-crash.html -crlf +WebCore/manual-tests/remove-form-node-with-radio-buttons-crash.html -crlf +WebCore/manual-tests/select-delete-item.html -crlf +WebCore/manual-tests/textarea-caret-position-after-auto-spell-correct.html -crlf +WebCore/platform/chromium/SuddenTerminationChromium.cpp -crlf +WebCore/platform/network/win/NetworkStateNotifierWin.cpp -crlf +WebCore/platform/wx/wxcode/non-kerned-drawing.h -crlf +WebCore/rendering/RenderThemeChromiumWin.h -crlf +WebKit/chromium/src/EventListenerWrapper.cpp -crlf +WebKit/chromium/src/EventListenerWrapper.h -crlf +WebKit/chromium/src/WebEventListener.cpp -crlf +WebKit/chromium/src/WebEventListenerPrivate.cpp -crlf +WebKit/chromium/src/WebEventListenerPrivate.h -crlf +WebKit/gtk/po/sr.po -crlf +WebKit/gtk/po/sr@latin.po -crlf +WebKit/qt/tests/qwebframe/resources/testiframe.html -crlf +WebKit/qt/tests/qwebframe/resources/testiframe2.html -crlf +WebKit/win/COMPropertyBag.h -crlf +WebKit/win/COMVariantSetter.h -crlf +WebKit/win/Interfaces/IWebEmbeddedView.idl -crlf +WebKit/win/Interfaces/JavaScriptCoreAPITypes.idl -crlf +WebKit/win/WebCoreSupport/EmbeddedWidget.cpp -crlf +WebKit/win/WebCoreSupport/EmbeddedWidget.h -crlf +WebKit/win/WebCoreSupport/WebInspectorDelegate.h -crlf +WebKit/win/WebIconFetcher.cpp -crlf +WebKit/win/WebIconFetcher.h -crlf +WebKit/win/WebKit.vcproj/Interfaces.vcproj -crlf +WebKit/win/WebKit.vcproj/WebKit.sln -crlf +WebKit/win/WebKit.vcproj/WebKit.submit.sln -crlf +WebKit/win/WebKit.vcproj/WebKit.vcproj -crlf +WebKit/win/WebKit.vcproj/WebKitGUID.vcproj -crlf +WebKitLibraries/win/tools/vsprops/WinCairo.vsprops -crlf +WebKitLibraries/win/tools/vsprops/cURL.vsprops -crlf +WebKitLibraries/win/tools/vsprops/debug_wincairo.vsprops -crlf +WebKitSite/blog/license.txt -crlf +WebKitSite/blog/wp-config-sample.php -crlf +WebKitSite/blog/wp-config.php -crlf +WebKitSite/blog/wp-includes/images/crystal/license.txt -crlf +WebKitSite/blog/wp-includes/js/scriptaculous/MIT-LICENSE -crlf +WebKitSite/blog/wp-includes/js/swfupload/plugins/swfupload.speed.js -crlf +WebKitSite/blog/wp-includes/js/tinymce/license.txt -crlf +WebKitSite/perf/slickspeed/frameworks/DomQuery.js -crlf +WebKitTools/CLWrapper/CLWrapper.sln -crlf +WebKitTools/CLWrapper/CLWrapper.vcproj -crlf +WebKitTools/DumpRenderTree/DumpRenderTree.sln -crlf +WebKitTools/DumpRenderTree/cairo/PixelDumpSupportCairo.cpp -crlf +WebKitTools/DumpRenderTree/win/DumpRenderTree.vcproj -crlf +WebKitTools/DumpRenderTree/win/ImageDiff.vcproj -crlf +WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.def -crlf +WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.rc -crlf +WebKitTools/DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj -crlf +WebKitTools/FindSafari/FindSafari.vcproj -crlf +WebKitTools/FindSafari/Safari.exe.manifest -crlf +WebKitTools/MIDLWrapper/MIDLWrapper.sln -crlf +WebKitTools/MIDLWrapper/MIDLWrapper.vcproj -crlf +WebKitTools/Scripts/webkitpy/mock.py -crlf +WebKitTools/WebKitAPITest/WebKitAPITest.vcproj -crlf +WebKitTools/WebKitAPITest/WebKitAPITestCommon.vsprops -crlf +WebKitTools/WebKitLauncherWin/WebKitLauncherWin.vcproj -crlf +WebKitTools/WinLauncher/WinLauncher.h -crlf +WebKitTools/WinLauncher/WinLauncher.vcproj -crlf +WebKitTools/record-memory-win/main.cpp -crlf +WebKitTools/record-memory-win/record-memory-win.vcproj -crlf diff --git a/src/3rdparty/webkit/.gitignore b/src/3rdparty/webkit/.gitignore index b9595b3..607a22e 100644 --- a/src/3rdparty/webkit/.gitignore +++ b/src/3rdparty/webkit/.gitignore @@ -4,3 +4,21 @@ *.pyc build/ /WebKitBuild/ +autoinstall.cache.d + +# Ignore Chromium projects auto-generated from .gyp files: +JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.xcodeproj +WebCore/WebCore.gyp/WebCore.xcodeproj +WebKit/chromium/WebKit.xcodeproj + +# Though the GTK build builds in a subdirectory, autogen.sh still deposits +# a few files into the source tree. +/aclocal.m4 +/autom4te.cache +/autotools +/autotoolsconfig.h.in +/configure +/GNUmakefile.in +/gtk-doc.make +/INSTALL +/README diff --git a/src/3rdparty/webkit/ChangeLog b/src/3rdparty/webkit/ChangeLog index 1e89d1e..7bcf76e 100644 --- a/src/3rdparty/webkit/ChangeLog +++ b/src/3rdparty/webkit/ChangeLog @@ -1,3 +1,594 @@ +2010-02-20 Noam Rosenthal + + Reviewed by Laszlo Gombos. + + [Qt] ENABLE_3D_RENDERING should be optional + https://bugs.webkit.org/show_bug.cgi?id=35100 + + * WebKit.pri: ENABLE_3D_RENDERING moved to a proper feature test + +2010-02-19 Maciej Stachowiak + + Reviewed by David Levin. + + Add an ENABLE flag for sandboxed iframes to make it possible to disable it in releases + https://bugs.webkit.org/show_bug.cgi?id=35147 + + * configure.ac: + +2010-02-18 Tor Arne Vestbø + + Reviewed by Eric Seidel. + + Add .gitattributes file for custom ChangeLog merge-driver + + * .gitattributes: Added. + +2010-02-17 Noam Rosenthal + + Reviewed by Ariya Hidayat. + + [Qt] GraphicsLayer: support perspective and 3D transforms + https://bugs.webkit.org/show_bug.cgi?id=34960 + + * WebKit.pri: added appropriate define: ENABLED_3D_RENDERING + +2010-02-15 Philippe Normand + + Reviewed by Gustavo Noronha Silva. + + [GStreamer] Should handle BUFFERING messages + https://bugs.webkit.org/show_bug.cgi?id=30004 + + * configure.ac: Bump gstreamer -core/-plugins-base requirements to + 0.10.25 which is the minimum required version for on-disk buffering. + +2010-02-16 Xan Lopez + + Reviewed by Gustavo Noronha. + + Bump version to 1.1.22 so we can depend on it in applications. + + * configure.ac: + +2010-02-12 Simon Hausmann + + Reviewed by Holger Freyther. + + Removed WMLInputElement.* from .gitattributes as the file is + now CRLF clean. + + * .gitattributes: + +2010-02-10 Jocelyn Turcotte + + Reviewed by Tor Arne Vestbø. + + [Qt] Make qtlauncher and qgvlauncher use the generated headers + path to make sure they are correctly generated. + + * WebKit.pri: + +2010-02-10 Jocelyn Turcotte + + Reviewed by Tor Arne Vestbø. + + [Qt] Manually add support for the install target on Symbian. + + This is required to copy the headers over the ones in Qt. + + * WebKit.pro: + +2010-02-11 Fridrich Strba + + Reviewed by Gustavo Noronha Silva. + + Detect properly different versions of libpng out there. + + * configure.ac: + +2010-02-11 Xan Lopez + + Try to fix GTK+ build. + + * configure.ac: + +2010-02-11 Antonio Gomes + + Reviewed by Xan Lopez. + + Adjust gstreamer-plugins-base minimum version check (from 0.10 to 0.10.23). + + * configure.ac: + +2010-02-08 Maciej Stachowiak + + Reviewed by Cameron Zwarich. + + Restore ENABLE_RUBY flag so vendors can ship with Ruby disabled if they choose. + https://bugs.webkit.org/show_bug.cgi?id=34698 + + * configure.ac: + +2010-02-08 Gustavo Noronha Silva + + Reviewed by Xan Lopez. + + Bump version to 1.1.21, and adjust library versioning accordingly. + + * configure.ac: + +2010-02-05 Sebastian Dröge + + Reviewed by Gustavo Noronha. + + Add gstreamer-app-0.10 to configure.ac + https://bugs.webkit.org/show_bug.cgi?id=34317 + + * configure.ac: + +2010-02-05 Simon Hausmann + + Reviewed by Tor Arne Vestbø. + + Add .gitattributes file to tell git about files with Windows linefeeds + https://bugs.webkit.org/show_bug.cgi?id=34645 + + On Windows git defaults to "true" for core.autocrlf, meaning all text + files in the working directory are converted from CRLF to LF on checkin + time. Some files present in the repository have been checked in with + CRLF linefeeds and git should not try to convert them. The added + .gitattributes file tells git to not do any CRLF conversion. + + * .gitattributes: Added. + +2010-02-05 Tor Arne Vestbø + + Reviewed by Simon Hausmann. + + [Qt] Generate convenience headers (QWebView, etc) using qmake + + In Qt this is done using syncqt, but we use a pro-file instead + that generates makefile-rules for each of the extra headers. + + These extra headers are installed alongside the normal headers. + + * DerivedSources.pro: Include API-DerivedSources + +2010-02-04 Tor Arne Vestbø + + Reviewed by Lars Knoll. + + [Qt] Make 'make -f Makefile.DerivedSources qmake' work + + Previously this target ended up generating a file named + Makefile.DerivedSources.DerivedSources, and so on. + + * DerivedSources.pro: + +2010-02-04 Christian Dywan + + Reviewed by Xan Lopez. + + Require either libsoup 2.28.2 or 2.29.90. + + * configure.ac: + +2010-02-04 Xan Lopez + + Reviewed by Gustavo Noronha. + + Bump minimum libsoup requirement to 2.29.90 + + * configure.ac: + +2010-02-02 Gustavo Noronha Silva + + Reviewed by Xan Lopez. + + Bump version, and adjust library versioning for 1.1.20. + + * configure.ac: + +2010-01-29 Jeremy Orlow + + Reviewed by Dimitri Glazkov. + + A first step towards the Indexed Database API + https://bugs.webkit.org/show_bug.cgi?id=34342 + + Add Indexed Database API + + * configure.ac: + +2010-01-27 Simon Hausmann + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Don't build the tests in packages, only the launcher(s) + + * WebKit.pro: + +2010-01-27 Jocelyn Turcotte + + Reviewed by Tor Arne Vestbø. + + [Qt] Add the "d" suffix to QtWebKit's dll on Windows. + + * WebKit.pri: + +2010-01-27 Jocelyn Turcotte + + Unreviewed build fix + + [Qt] Build fix for windows when QTDIR contains release libraries. + + * WebKit.pri: Use the .lib syntax for linking instead of qmake's -l emulation + +2010-01-26 Jedrzej Nowacki + + Reviewed by Simon Hausmann. + + First steps of the QtScript API. + + Two new classes were created; QScriptEngine and QScriptValue. + The first should encapsulate a javascript context and the second a script + value. + + This API is still in development, so it isn't compiled by default. + To trigger compilation, pass --qmakearg="CONFIG+=build-qtscript" to + build-webkit. + + https://bugs.webkit.org/show_bug.cgi?id=32565 + + * WebKit.pro: + +2010-01-25 Simon Hausmann + + Reviewed by Laszlo Gombos. + + [Qt] Fix the build on Maemo5. + + https://bugs.webkit.org/show_bug.cgi?id=34051 + + * WebKit.pri: Disable the use of uitools, just like it's done for Symbian. + +2010-01-21 No'am Rosenthal + + Reviewed by Antti Koivisto. + + [Qt] Implement GraphicsLayer for accelerated layer compositing + https://bugs.webkit.org/show_bug.cgi?id=33514 + + * WebKit.pri: Addded compile flags to enable accelerated compositing + on versions higher than 4.5 + +2010-01-20 Tor Arne Vestbø + + Reviewed by Simon Hausmann. + + [Qt] Make DumpRenderTree build on Windows + + * WebKit.pro: + +2010-01-20 Jocelyn Turcotte + + Reviewed by Simon Hausmann. + + [Qt] Fix the recursive generated_files target to work with qmake -r -o + + * DerivedSources.pro: + +2010-01-20 Simon Hausmann + + Reviewed by Tor Arne Vestbø. + + [Qt] Make it possible (on *nix at least) to recursively call "make generated_files" + + * DerivedSources.pro: + +2010-01-19 Gustavo Noronha Silva + + Unreviewed. Shared library versioning update for 1.1.19. + + * configure.ac: + +2010-01-15 Gustavo Noronha Silva + + Rubber-stamped by Xan Lopez. + + Bump version to 1.1.19. + + * configure.ac: + +2010-01-14 Csaba Osztrogonác + + Reviewed by Eric Seidel. + + [Qt] Defective dependencies caused build failing on QtBuildBot. + https://bugs.webkit.org/show_bug.cgi?id=33693 + + * WebKit.pri: CONFIG += depend_includepath added. + +2010-01-14 Steve Block + + Reviewed by David Levin. + + Moves general includes before bindings includes in Android build system. + https://bugs.webkit.org/show_bug.cgi?id=33623 + + This avoids problems with collisions between WebCore/platform/text/StringBuilder.h + and the new JavaScriptCore/runtime/StringBuilder.h. This change puts + JavaScriptCore/runtime and other bindings includes after the WebCore and other + general includes, so that the WebCore StringBuilder.h is picked up when building + WebCore. + + * Android.mk: Modified. + +2010-01-13 Jocelyn Turcotte + + Reviewed by Simon Hausmann. + + [Qt] Split the build process in two different .pro files. + This allows qmake to be run once all source files are available. + + * DerivedSources.pro: Added. + * WebKit.pri: + +2010-01-07 Daniel Bates + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=32987 + + Added ENABLE_XHTMLMP flag. Disabled by default. + + * configure.ac: + +2010-01-05 Gustavo Noronha Silva + + Reviewed by Xan Lopez. + + Based on idea and original patch by Evan Martin. + + Remove libWebCore intermediate library, to improve link time. + + [GTK] Build time must be reduced + https://bugs.webkit.org/show_bug.cgi?id=32921 + + * GNUmakefile.am: + +2010-01-05 Xan Lopez + + Bump for 1.1.18 release. + + * configure.ac: + +2010-01-04 Gustavo Noronha Silva + + Fix JSCore-1.0.gir path to fix make distcheck. + + * GNUmakefile.am: + +2010-01-04 Simon Hausmann + + Reviewed by Tor Arne Vestbø. + + [Qt] Fix standalone package builds. + + * WebKit.pri: Add logic for detecting standalone builds. Set OUTPUT_DIR to the top-level dir in that case. + * WebKit.pro: Don't build JSC and DRT for package builds. + +2010-01-04 Eric Seidel + + Reviewed by Adam Barth. + + bugzilla-tool should not require users to install mechanize + https://bugs.webkit.org/show_bug.cgi?id=32635 + + * .gitignore: Ignore autoinstall.cache.d directory created by autoinstall.py + +2009-12-28 Estêvão Samuel Procópio + + Reviewed by Gustavo Noronha Silva. + + Bug 32940: [GTK] Changing the download throttle conditions. + https://bugs.webkit.org/show_bug.cgi?id=32716 + + The WebKitDownload progress notification was taking long to + update. This fix makes notification happens each 0.7 secs + or when the progress ups in 1%. + + * WebKit/gtk/webkit/webkitdownload.cpp: + +2009-12-22 Simon Hausmann + + Rubber-stamped by Holger Freyther. + + Adjusted path to QtLauncher. + + * WebKit.pro: + +2009-12-19 Evan Martin + + Reviewed by Gustavo Noronha Silva. + + Add a couple of WebKitGtk files to .gitignore. + + * .gitignore: + +2009-12-18 Benjamin Otte + + Reviewed by Xan Lopez. + + [GTK] RemoveDashboard support. It's useless. + + * configure.ac: + +2009-12-18 Simon Hausmann + + Reviewed by Tor Arne Vestbø. + + [Qt] Clean up the qmake build system to distinguish between trunk builds and package builds + + https://bugs.webkit.org/show_bug.cgi?id=32716 + + * WebKit.pri: Use standalone_package instead of QTDIR_build + +2009-12-17 Gustavo Noronha Silva + + Unreviewed. Build fixes for make distcheck. + + * GNUmakefile.am: + +2009-12-16 Dan Winship + + Reviewed by Gustavo Noronha Silva. + + [Gtk] Content-Encoding support + + https://bugs.webkit.org/show_bug.cgi?id=522772 + + * configure.ac: require libsoup 2.28.2 for SoupContentDecoder + +2009-12-13 Eric Seidel + + Reviewed by Gavin Barraclough. + + string-base64 test does not compute a valid base64 string + http://bugs.webkit.org/show_bug.cgi?id=16806 + + * tests/string-base64.js: change str[i] to str.charCodeAt(i) + +2009-12-10 Gustavo Noronha Silva + + Reviewed by Xan Lopez. + + [GTK] Should provide an API to control the IconDatabase + https://bugs.webkit.org/show_bug.cgi?id=32334 + + Add test to make sure favicon reporting works. + + * GNUmakefile.am: + +2009-12-09 Steve Block + + Reviewed by Adam Barth. + + Adds Android Makefiles for building with V8. + https://bugs.webkit.org/show_bug.cgi?id=32278 + + * Android.mk: Modified. Includes Makefiles for V8. + +2009-12-08 Steve Block + + Reviewed by Adam Barth. + + [Android] Adds Makefiles for Android port. + https://bugs.webkit.org/show_bug.cgi?id=31325 + + * Android.mk: Added. + +2009-12-08 Christian Dywan + + Reviewed by Xan Lopez. + + * configure.ac: Require only libSoup 2.27.91 but check for 2.29.3 + and define HAVE_LIBSOUP_2_29_3 in that case. + +2009-12-08 Gustavo Noronha Silva + + Rubber-stamped by Xan Lopez. + + Late post-release version bump. + + * configure.ac: + +2009-12-08 Dominik Röttsches + + Reviewed by Gustavo Noronha Silva. + + [Gtk] Create a TextBreakIterator implementation based on GLib (without ICU) + https://bugs.webkit.org/show_bug.cgi?id=31469 + + Removing hybrid configuration for --with-unicode-backend=glib + ICU not required anymore. + + * autotools/webkit.m4: + +2009-12-08 Nikolas Zimmermann + + Rubber-stamped by Maciej Stachowiak. + + Turn on (SVG) Filters for Gtk. + https://bugs.webkit.org/show_bug.cgi?id=32224 + + * configure.ac: + +2009-12-07 Dmitry Titov + + Rubber-stamped by Darin Adler. + + Remove ENABLE_SHARED_SCRIPT flags + https://bugs.webkit.org/show_bug.cgi?id=32245 + This patch was obtained by "git revert" command and then un-reverting of ChangeLog files. + + * configure.ac: + +2009-12-06 Gustavo Noronha Silva + + Reviewed by Xan Lopez. + + Build the new API test. + + [GTK] REGRESSION: webkit thinks it can render PDFs + https://bugs.webkit.org/show_bug.cgi?id=32183 + + * GNUmakefile.am: + +2009-12-05 Vincent Untz + + Reviewed by Gustavo Noronha. + + Fixes race for builds with introspection enabled, and parallel + make. + + * GNUmakefile.am: + +2009-12-04 Xan Lopez + + Reviewed by Gustavo Noronha. + + [GTK]Enable DNS prefetching + https://bugs.webkit.org/show_bug.cgi?id=23846 + + Bump libsoup required version to 2.29.3 for DNS prefetching. + + * configure.ac: + +2009-11-30 Gustavo Noronha Silva + + Rubber-stamped by Xan Lopez. + + Make sure we distribute and install GObject Introspection files. + + * GNUmakefile.am: + +2009-11-30 Gustavo Noronha Silva + + Build fix. Make sure JSCore-1.0.gir is added to the distributed + tarball. + + * GNUmakefile.am: + +2009-11-30 Xan Lopez + + Reviewed by Gustavo Noronha. + + Bump versions for 1.1.17 release. + + * configure.ac: + 2009-11-30 Jan-Arve Sæther Reviewed by Simon Hausmann. @@ -8,6 +599,110 @@ * WebKit.pri: +2009-11-26 Laszlo Gombos + + Reviewed by Oliver Hunt. + + Move GOwnPtr* from wtf to wtf/gtk + https://bugs.webkit.org/show_bug.cgi?id=31793 + + * GNUmakefile.am: Add JavaScriptCore/wtf/gtk to + the include path. + +2009-11-24 Dmitry Titov + + Reviewed by Eric Seidel. + + Add ENABLE_SHARED_SCRIPT feature define and flag for build-webkit + https://bugs.webkit.org/show_bug.cgi?id=31444 + + * configure.ac: + +2009-11-24 Jason Smith + + Reviewed by Alexey Proskuryakov. + + RegExp#exec's returned Array-like object behaves differently from + regular Arrays + https://bugs.webkit.org/show_bug.cgi?id=31689 + + * LayoutTests/fast/js/regexp-in-and-foreach-handling.html: Added. + * LayoutTests/fast/js/script-tests/regexp-in-and-foreach-handling.js: Added. + * LayoutTests/fast/js/regexp-in-and-foreach-handling-expected.txt: Added. + +2009-11-24 Jens Alfke + + Reviewed by David Levin. + + Ignore Chromium's Xcode projects that are auto-generated from .gyp files. + https://bugs.webkit.org/show_bug.cgi?id=31847 + + * .gitignore: Add three .xcodeproj files. + +2009-11-09 Priit Laes + + Reviewed by Oliver Hunt. + + [Gtk] Build from tarball fails with --enable-introspection + https://bugs.webkit.org/show_bug.cgi?id=31261 + + We need to enable gobject-introspection during distcheck otherwise + some of the required files are missing in tarball. + + * GNUmakefile.am: + +2009-11-05 Priit Laes + + Reviewed by Jan Alonzo. + + [Gtk] Build failure with --enable-introspection + https://bugs.webkit.org/show_bug.cgi?id=31102 + + Add search and include paths for JSCore-1.0.gir required by + gobject-introspection tools. + + * GNUmakefile.am: + +2009-11-04 Benjamin Otte + + Reviewed by Gustavo Noronha. + + Update Cairo requirement to 1.6. + + https://bugs.webkit.org/show_bug.cgi?id=19266 + + * configure.ac: + +2009-11-02 Estêvão Samuel Procópio + + Reviewed by Gustavo Noronha. + + [Build] make install ignores --prefix option for gobject-introspection. + https://bugs.webkit.org/show_bug.cgi?id=31025 + + Make the build system use the --prefix path also when installing + gobject-introspection files. + + * configure.ac: use --prefix path in GITDIR and GIRTYPELIBDIR + +2009-11-02 Xan Lopez + + Bump version before release (or post-release, depending on your + point of view) so that we can make applications depending on + unreleased APIs in WebKit svn fail at configure time when the + requirements are not met. + + * configure.ac: + +2009-11-01 Laszlo Gombos + + Reviewed by Eric Seidel. + + Turn on warnings for QtWebKit for gcc + https://bugs.webkit.org/show_bug.cgi?id=30958 + + * WebKit.pri: Turn on warnings for the GCC compiler + 2009-10-30 Adam Barth Reviewed by Mark Rowe. @@ -22,6 +717,19 @@ * .gitignore: Added. +2009-10-30 Roland Steiner + + Reviewed by Eric Seidel. + + Remove ENABLE_RUBY guards as discussed with Dave Hyatt and Maciej Stachowiak. + + Bug 28420 - Implement HTML5 rendering + (https://bugs.webkit.org/show_bug.cgi?id=28420) + + No new tests (no functional change). + + * configure.ac: + 2009-10-26 Holger Hans Peter Freyther Rubber-stamped by Darin Adler. diff --git a/src/3rdparty/webkit/JavaScriptCore/API/APICast.h b/src/3rdparty/webkit/JavaScriptCore/API/APICast.h index b9167a8..4284c44 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/APICast.h +++ b/src/3rdparty/webkit/JavaScriptCore/API/APICast.h @@ -51,16 +51,20 @@ typedef struct OpaqueJSValue* JSObjectRef; inline JSC::ExecState* toJS(JSContextRef c) { + ASSERT(c); return reinterpret_cast(const_cast(c)); } inline JSC::ExecState* toJS(JSGlobalContextRef c) { + ASSERT(c); return reinterpret_cast(c); } -inline JSC::JSValue toJS(JSC::ExecState*, JSValueRef v) +inline JSC::JSValue toJS(JSC::ExecState* exec, JSValueRef v) { + ASSERT_UNUSED(exec, exec); + ASSERT(v); #if USE(JSVALUE32_64) JSC::JSCell* jsCell = reinterpret_cast(const_cast(v)); if (!jsCell) @@ -73,6 +77,20 @@ inline JSC::JSValue toJS(JSC::ExecState*, JSValueRef v) #endif } +inline JSC::JSValue toJSForGC(JSC::ExecState* exec, JSValueRef v) +{ + ASSERT_UNUSED(exec, exec); + ASSERT(v); +#if USE(JSVALUE32_64) + JSC::JSCell* jsCell = reinterpret_cast(const_cast(v)); + if (!jsCell) + return JSC::JSValue(); + return jsCell; +#else + return JSC::JSValue::decode(reinterpret_cast(const_cast(v))); +#endif +} + inline JSC::JSObject* toJS(JSObjectRef o) { return reinterpret_cast(o); diff --git a/src/3rdparty/webkit/JavaScriptCore/API/APIShims.h b/src/3rdparty/webkit/JavaScriptCore/API/APIShims.h new file mode 100644 index 0000000..9a6cacb --- /dev/null +++ b/src/3rdparty/webkit/JavaScriptCore/API/APIShims.h @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2009 Apple 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: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``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 APPLE COMPUTER, INC. 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 APIShims_h +#define APIShims_h + +#include "CallFrame.h" +#include "JSLock.h" + +namespace JSC { + +class APIEntryShimWithoutLock { +protected: + APIEntryShimWithoutLock(JSGlobalData* globalData, bool registerThread) + : m_globalData(globalData) + , m_entryIdentifierTable(setCurrentIdentifierTable(globalData->identifierTable)) + { + if (registerThread) + globalData->heap.registerThread(); + m_globalData->timeoutChecker.start(); + } + + ~APIEntryShimWithoutLock() + { + m_globalData->timeoutChecker.stop(); + setCurrentIdentifierTable(m_entryIdentifierTable); + } + +private: + JSGlobalData* m_globalData; + IdentifierTable* m_entryIdentifierTable; +}; + +class APIEntryShim : public APIEntryShimWithoutLock { +public: + // Normal API entry + APIEntryShim(ExecState* exec, bool registerThread = true) + : APIEntryShimWithoutLock(&exec->globalData(), registerThread) + , m_lock(exec) + { + } + + // JSPropertyNameAccumulator only has a globalData. + APIEntryShim(JSGlobalData* globalData, bool registerThread = true) + : APIEntryShimWithoutLock(globalData, registerThread) + , m_lock(globalData->isSharedInstance ? LockForReal : SilenceAssertionsOnly) + { + } + +private: + JSLock m_lock; +}; + +class APICallbackShim { +public: + APICallbackShim(ExecState* exec) + : m_dropAllLocks(exec) + , m_globalData(&exec->globalData()) + { + resetCurrentIdentifierTable(); + } + + ~APICallbackShim() + { + setCurrentIdentifierTable(m_globalData->identifierTable); + } + +private: + JSLock::DropAllLocks m_dropAllLocks; + JSGlobalData* m_globalData; +}; + +} + +#endif diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSBase.cpp b/src/3rdparty/webkit/JavaScriptCore/API/JSBase.cpp index 4a32d35..ebfeafa 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSBase.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSBase.cpp @@ -28,6 +28,7 @@ #include "JSBasePrivate.h" #include "APICast.h" +#include "APIShims.h" #include "Completion.h" #include "OpaqueJSString.h" #include "SourceCode.h" @@ -43,8 +44,7 @@ using namespace JSC; JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef thisObject, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* jsThisObject = toJS(thisObject); @@ -69,8 +69,7 @@ JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef th bool JSCheckScriptSyntax(JSContextRef ctx, JSStringRef script, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); SourceCode source = makeSource(script->ustring(), sourceURL->ustring(), startingLineNumber); Completion completion = checkSyntax(exec->dynamicGlobalObject()->globalExec(), source); @@ -94,12 +93,11 @@ void JSGarbageCollect(JSContextRef ctx) return; ExecState* exec = toJS(ctx); - JSGlobalData& globalData = exec->globalData(); - - JSLock lock(globalData.isSharedInstance ? LockForReal : SilenceAssertionsOnly); + APIEntryShim entryShim(exec, false); + JSGlobalData& globalData = exec->globalData(); if (!globalData.heap.isBusy()) - globalData.heap.collect(); + globalData.heap.collectAllGarbage(); // FIXME: Perhaps we should trigger a second mark and sweep // once the garbage collector is done if this is called when @@ -109,8 +107,6 @@ void JSGarbageCollect(JSContextRef ctx) void JSReportExtraMemoryCost(JSContextRef ctx, size_t size) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); - + APIEntryShim entryShim(exec); exec->globalData().heap.reportExtraMemoryCost(size); } diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSBase.h b/src/3rdparty/webkit/JavaScriptCore/API/JSBase.h index d1ce9b3..2e16720 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSBase.h +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSBase.h @@ -65,27 +65,15 @@ typedef struct OpaqueJSValue* JSObjectRef; /* JavaScript symbol exports */ #undef JS_EXPORT -#if defined(BUILDING_WX__) +#if defined(JS_NO_EXPORT) #define JS_EXPORT #elif defined(__GNUC__) && !defined(__CC_ARM) && !defined(__ARMCC__) #define JS_EXPORT __attribute__((visibility("default"))) -#elif defined(_WIN32_WCE) - #if defined(JS_BUILDING_JS) - #define JS_EXPORT __declspec(dllexport) - #elif defined(JS_IMPORT_JS) - #define JS_EXPORT __declspec(dllimport) - #else - #define JS_EXPORT - #endif -#elif defined(WIN32) || defined(_WIN32) - /* - * TODO: Export symbols with JS_EXPORT when using MSVC. - * See http://bugs.webkit.org/show_bug.cgi?id=16227 - */ +#elif defined(WIN32) || defined(_WIN32) || defined(_WIN32_WCE) #if defined(BUILDING_JavaScriptCore) || defined(BUILDING_WTF) - #define JS_EXPORT __declspec(dllexport) + #define JS_EXPORT __declspec(dllexport) #else - #define JS_EXPORT __declspec(dllimport) + #define JS_EXPORT __declspec(dllimport) #endif #else #define JS_EXPORT diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackConstructor.cpp b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackConstructor.cpp index 1c33962..9c5f6d7 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackConstructor.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackConstructor.cpp @@ -26,6 +26,7 @@ #include "config.h" #include "JSCallbackConstructor.h" +#include "APIShims.h" #include "APICast.h" #include #include @@ -66,7 +67,7 @@ static JSObject* constructJSCallback(ExecState* exec, JSObject* constructor, con JSValueRef exception = 0; JSObjectRef result; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); result = callback(ctx, constructorRef, argumentCount, arguments.data(), &exception); } if (exception) diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackConstructor.h b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackConstructor.h index c4bd7ad..e529947 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackConstructor.h +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackConstructor.h @@ -41,7 +41,7 @@ public: static PassRefPtr createStructure(JSValue proto) { - return Structure::create(proto, TypeInfo(ObjectType, StructureFlags)); + return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); } protected: diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackFunction.cpp b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackFunction.cpp index b7dd768..0e434d9 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackFunction.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackFunction.cpp @@ -27,6 +27,7 @@ #include #include "JSCallbackFunction.h" +#include "APIShims.h" #include "APICast.h" #include "CodeBlock.h" #include "JSFunction.h" @@ -61,7 +62,7 @@ JSValue JSCallbackFunction::call(ExecState* exec, JSObject* functionObject, JSVa JSValueRef exception = 0; JSValueRef result; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); result = static_cast(functionObject)->m_callback(execRef, functionRef, thisObjRef, argumentCount, arguments.data(), &exception); } if (exception) diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackFunction.h b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackFunction.h index 0cf25c4..10dae6b 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackFunction.h +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackFunction.h @@ -41,7 +41,7 @@ public: // refactor the code so this override isn't necessary static PassRefPtr createStructure(JSValue proto) { - return Structure::create(proto, TypeInfo(ObjectType, StructureFlags)); + return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); } private: diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObject.h b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObject.h index d19890a..adb5b60 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObject.h +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObject.h @@ -50,7 +50,7 @@ public: static PassRefPtr createStructure(JSValue proto) { - return Structure::create(proto, TypeInfo(ObjectType, StructureFlags)); + return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), Base::AnonymousSlotCount); } protected: @@ -61,6 +61,7 @@ private: virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); virtual bool getOwnPropertySlot(ExecState*, unsigned, PropertySlot&); + virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); virtual void put(ExecState*, const Identifier&, JSValue, PutPropertySlot&); @@ -69,7 +70,7 @@ private: virtual bool hasInstance(ExecState* exec, JSValue value, JSValue proto); - virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&); + virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties); virtual double toNumber(ExecState*) const; virtual UString toString(ExecState*) const; diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObjectFunctions.h b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObjectFunctions.h index 9b726e8..4b28a99 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObjectFunctions.h +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObjectFunctions.h @@ -24,6 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "APIShims.h" #include "APICast.h" #include "Error.h" #include "JSCallbackFunction.h" @@ -79,7 +80,7 @@ void JSCallbackObject::init(ExecState* exec) // initialize from base to derived for (int i = static_cast(initRoutines.size()) - 1; i >= 0; i--) { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); JSObjectInitializeCallback initialize = initRoutines[i]; initialize(toRef(exec), toRef(this)); } @@ -117,7 +118,7 @@ bool JSCallbackObject::getOwnPropertySlot(ExecState* exec, const Identifie if (JSObjectHasPropertyCallback hasProperty = jsClass->hasProperty) { if (!propertyNameRef) propertyNameRef = OpaqueJSString::create(propertyName.ustring()); - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); if (hasProperty(ctx, thisRef, propertyNameRef.get())) { slot.setCustom(this, callbackGetter); return true; @@ -128,18 +129,18 @@ bool JSCallbackObject::getOwnPropertySlot(ExecState* exec, const Identifie JSValueRef exception = 0; JSValueRef value; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); value = getProperty(ctx, thisRef, propertyNameRef.get(), &exception); } - exec->setException(toJS(exec, exception)); - if (value) { - slot.setValue(toJS(exec, value)); - return true; - } if (exception) { + exec->setException(toJS(exec, exception)); slot.setValue(jsUndefined()); return true; } + if (value) { + slot.setValue(toJS(exec, value)); + return true; + } } if (OpaqueJSClassStaticValuesTable* staticValues = jsClass->staticValues(exec)) { @@ -167,6 +168,25 @@ bool JSCallbackObject::getOwnPropertySlot(ExecState* exec, unsigned proper } template +bool JSCallbackObject::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + PropertySlot slot; + if (getOwnPropertySlot(exec, propertyName, slot)) { + // Ideally we should return an access descriptor, but returning a value descriptor is better than nothing. + JSValue value = slot.getValue(exec, propertyName); + if (!exec->hadException()) + descriptor.setValue(value); + // We don't know whether the property is configurable, but assume it is. + descriptor.setConfigurable(true); + // We don't know whether the property is enumerable (we could call getOwnPropertyNames() to find out), but assume it isn't. + descriptor.setEnumerable(false); + return true; + } + + return Base::getOwnPropertyDescriptor(exec, propertyName, descriptor); +} + +template void JSCallbackObject::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) { JSContextRef ctx = toRef(exec); @@ -181,10 +201,11 @@ void JSCallbackObject::put(ExecState* exec, const Identifier& propertyName JSValueRef exception = 0; bool result; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); result = setProperty(ctx, thisRef, propertyNameRef.get(), valueRef, &exception); } - exec->setException(toJS(exec, exception)); + if (exception) + exec->setException(toJS(exec, exception)); if (result || exception) return; } @@ -199,10 +220,11 @@ void JSCallbackObject::put(ExecState* exec, const Identifier& propertyName JSValueRef exception = 0; bool result; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); result = setProperty(ctx, thisRef, propertyNameRef.get(), valueRef, &exception); } - exec->setException(toJS(exec, exception)); + if (exception) + exec->setException(toJS(exec, exception)); if (result || exception) return; } else @@ -237,10 +259,11 @@ bool JSCallbackObject::deleteProperty(ExecState* exec, const Identifier& p JSValueRef exception = 0; bool result; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); result = deleteProperty(ctx, thisRef, propertyNameRef.get(), &exception); } - exec->setException(toJS(exec, exception)); + if (exception) + exec->setException(toJS(exec, exception)); if (result || exception) return true; } @@ -298,10 +321,11 @@ JSObject* JSCallbackObject::construct(ExecState* exec, JSObject* construct JSValueRef exception = 0; JSObject* result; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); result = toJS(callAsConstructor(execRef, constructorRef, argumentCount, arguments.data(), &exception)); } - exec->setException(toJS(exec, exception)); + if (exception) + exec->setException(toJS(exec, exception)); return result; } } @@ -322,10 +346,11 @@ bool JSCallbackObject::hasInstance(ExecState* exec, JSValue value, JSValue JSValueRef exception = 0; bool result; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); result = hasInstance(execRef, thisRef, valueRef, &exception); } - exec->setException(toJS(exec, exception)); + if (exception) + exec->setException(toJS(exec, exception)); return result; } } @@ -360,10 +385,11 @@ JSValue JSCallbackObject::call(ExecState* exec, JSObject* functionObject, JSValueRef exception = 0; JSValue result; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); result = toJS(exec, callAsFunction(execRef, functionRef, thisObjRef, argumentCount, arguments.data(), &exception)); } - exec->setException(toJS(exec, exception)); + if (exception) + exec->setException(toJS(exec, exception)); return result; } } @@ -373,14 +399,14 @@ JSValue JSCallbackObject::call(ExecState* exec, JSObject* functionObject, } template -void JSCallbackObject::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) +void JSCallbackObject::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode) { JSContextRef execRef = toRef(exec); JSObjectRef thisRef = toRef(this); for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) { if (JSObjectGetPropertyNamesCallback getPropertyNames = jsClass->getPropertyNames) { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); getPropertyNames(execRef, thisRef, toRef(&propertyNames)); } @@ -390,7 +416,7 @@ void JSCallbackObject::getOwnPropertyNames(ExecState* exec, PropertyNameAr for (iterator it = staticValues->begin(); it != end; ++it) { UString::Rep* name = it->first.get(); StaticValueEntry* entry = it->second; - if (entry->getProperty && !(entry->attributes & kJSPropertyAttributeDontEnum)) + if (entry->getProperty && (!(entry->attributes & kJSPropertyAttributeDontEnum) || (mode == IncludeDontEnumProperties))) propertyNames.add(Identifier(exec, name)); } } @@ -401,13 +427,13 @@ void JSCallbackObject::getOwnPropertyNames(ExecState* exec, PropertyNameAr for (iterator it = staticFunctions->begin(); it != end; ++it) { UString::Rep* name = it->first.get(); StaticFunctionEntry* entry = it->second; - if (!(entry->attributes & kJSPropertyAttributeDontEnum)) + if (!(entry->attributes & kJSPropertyAttributeDontEnum) || (mode == IncludeDontEnumProperties)) propertyNames.add(Identifier(exec, name)); } } } - Base::getOwnPropertyNames(exec, propertyNames); + Base::getOwnPropertyNames(exec, propertyNames, mode); } template @@ -426,7 +452,7 @@ double JSCallbackObject::toNumber(ExecState* exec) const JSValueRef exception = 0; JSValueRef value; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); value = convertToType(ctx, thisRef, kJSTypeNumber, &exception); } if (exception) { @@ -435,7 +461,8 @@ double JSCallbackObject::toNumber(ExecState* exec) const } double dValue; - return toJS(exec, value).getNumber(dValue) ? dValue : NaN; + if (value) + return toJS(exec, value).getNumber(dValue) ? dValue : NaN; } return Base::toNumber(exec); @@ -452,14 +479,15 @@ UString JSCallbackObject::toString(ExecState* exec) const JSValueRef exception = 0; JSValueRef value; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); value = convertToType(ctx, thisRef, kJSTypeString, &exception); } if (exception) { exec->setException(toJS(exec, exception)); return ""; } - return toJS(exec, value).getString(); + if (value) + return toJS(exec, value).getString(exec); } return Base::toString(exec); @@ -504,16 +532,17 @@ JSValue JSCallbackObject::staticValueGetter(ExecState* exec, const Identif JSValueRef exception = 0; JSValueRef value; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); value = getProperty(toRef(exec), thisRef, propertyNameRef.get(), &exception); } - exec->setException(toJS(exec, exception)); + if (exception) { + exec->setException(toJS(exec, exception)); + return jsUndefined(); + } if (value) return toJS(exec, value); - if (exception) - return jsUndefined(); } - + return throwError(exec, ReferenceError, "Static value property defined with NULL getProperty callback."); } @@ -557,14 +586,15 @@ JSValue JSCallbackObject::callbackGetter(ExecState* exec, const Identifier JSValueRef exception = 0; JSValueRef value; { - JSLock::DropAllLocks dropAllLocks(exec); + APICallbackShim callbackShim(exec); value = getProperty(toRef(exec), thisRef, propertyNameRef.get(), &exception); } - exec->setException(toJS(exec, exception)); + if (exception) { + exec->setException(toJS(exec, exception)); + return jsUndefined(); + } if (value) return toJS(exec, value); - if (exception) - return jsUndefined(); } return throwError(exec, ReferenceError, "hasProperty callback returned true for a property that doesn't exist."); diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.cpp b/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.cpp index 3785bab..717488f 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.cpp @@ -33,11 +33,28 @@ #include #include #include +#include +using namespace std; using namespace JSC; +using namespace WTF::Unicode; const JSClassDefinition kJSClassDefinitionEmpty = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; +static inline UString tryCreateStringFromUTF8(const char* string) +{ + if (!string) + return UString::null(); + + size_t length = strlen(string); + Vector buffer(length); + UChar* p = buffer.data(); + if (conversionOK != convertUTF8ToUTF16(&string, string + length, &p, p + length)) + return UString::null(); + + return UString(buffer.data(), p - buffer.data()); +} + OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass* protoClass) : parentClass(definition->parentClass) , prototypeClass(0) @@ -52,7 +69,7 @@ OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass* , callAsConstructor(definition->callAsConstructor) , hasInstance(definition->hasInstance) , convertToType(definition->convertToType) - , m_className(UString::Rep::createFromUTF8(definition->className)) + , m_className(tryCreateStringFromUTF8(definition->className)) , m_staticValues(0) , m_staticFunctions(0) { @@ -61,8 +78,14 @@ OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass* if (const JSStaticValue* staticValue = definition->staticValues) { m_staticValues = new OpaqueJSClassStaticValuesTable(); while (staticValue->name) { - StaticValueEntry* e = new StaticValueEntry(staticValue->getProperty, staticValue->setProperty, staticValue->attributes); - m_staticValues->add(UString::Rep::createFromUTF8(staticValue->name), e); + UString valueName = tryCreateStringFromUTF8(staticValue->name); + if (!valueName.isNull()) { + // Use a local variable here to sidestep an RVCT compiler bug. + StaticValueEntry* entry = new StaticValueEntry(staticValue->getProperty, staticValue->setProperty, staticValue->attributes); + UStringImpl* impl = valueName.rep(); + impl->ref(); + m_staticValues->add(impl, entry); + } ++staticValue; } } @@ -70,8 +93,14 @@ OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass* if (const JSStaticFunction* staticFunction = definition->staticFunctions) { m_staticFunctions = new OpaqueJSClassStaticFunctionsTable(); while (staticFunction->name) { - StaticFunctionEntry* e = new StaticFunctionEntry(staticFunction->callAsFunction, staticFunction->attributes); - m_staticFunctions->add(UString::Rep::createFromUTF8(staticFunction->name), e); + UString functionName = tryCreateStringFromUTF8(staticFunction->name); + if (!functionName.isNull()) { + // Use a local variable here to sidestep an RVCT compiler bug. + StaticFunctionEntry* entry = new StaticFunctionEntry(staticFunction->callAsFunction, staticFunction->attributes); + UStringImpl* impl = functionName.rep(); + impl->ref(); + m_staticFunctions->add(impl, entry); + } ++staticFunction; } } @@ -82,12 +111,12 @@ OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass* OpaqueJSClass::~OpaqueJSClass() { - ASSERT(!m_className.rep()->identifierTable()); + ASSERT(!m_className.rep()->isIdentifier()); if (m_staticValues) { OpaqueJSClassStaticValuesTable::const_iterator end = m_staticValues->end(); for (OpaqueJSClassStaticValuesTable::const_iterator it = m_staticValues->begin(); it != end; ++it) { - ASSERT(!it->first->identifierTable()); + ASSERT(!it->first->isIdentifier()); delete it->second; } delete m_staticValues; @@ -96,7 +125,7 @@ OpaqueJSClass::~OpaqueJSClass() if (m_staticFunctions) { OpaqueJSClassStaticFunctionsTable::const_iterator end = m_staticFunctions->end(); for (OpaqueJSClassStaticFunctionsTable::const_iterator it = m_staticFunctions->begin(); it != end; ++it) { - ASSERT(!it->first->identifierTable()); + ASSERT(!it->first->isIdentifier()); delete it->second; } delete m_staticFunctions; @@ -115,56 +144,46 @@ static void clearReferenceToPrototype(JSObjectRef prototype) { OpaqueJSClassContextData* jsClassData = static_cast(JSObjectGetPrivate(prototype)); ASSERT(jsClassData); - jsClassData->cachedPrototype = 0; + jsClassData->cachedPrototype.clear(toJS(prototype)); } -PassRefPtr OpaqueJSClass::create(const JSClassDefinition* definition) +PassRefPtr OpaqueJSClass::create(const JSClassDefinition* clientDefinition) { - if (const JSStaticFunction* staticFunctions = definition->staticFunctions) { - // copy functions into a prototype class - JSClassDefinition protoDefinition = kJSClassDefinitionEmpty; - protoDefinition.staticFunctions = staticFunctions; - protoDefinition.finalize = clearReferenceToPrototype; - - // We are supposed to use JSClassRetain/Release but since we know that we currently have - // the only reference to this class object we cheat and use a RefPtr instead. - RefPtr protoClass = adoptRef(new OpaqueJSClass(&protoDefinition, 0)); - - // remove functions from the original class - JSClassDefinition objectDefinition = *definition; - objectDefinition.staticFunctions = 0; + JSClassDefinition definition = *clientDefinition; // Avoid modifying client copy. - return adoptRef(new OpaqueJSClass(&objectDefinition, protoClass.get())); - } - - return adoptRef(new OpaqueJSClass(definition, 0)); + JSClassDefinition protoDefinition = kJSClassDefinitionEmpty; + protoDefinition.finalize = clearReferenceToPrototype; + swap(definition.staticFunctions, protoDefinition.staticFunctions); // Move static functions to the prototype. + + // We are supposed to use JSClassRetain/Release but since we know that we currently have + // the only reference to this class object we cheat and use a RefPtr instead. + RefPtr protoClass = adoptRef(new OpaqueJSClass(&protoDefinition, 0)); + return adoptRef(new OpaqueJSClass(&definition, protoClass.get())); } OpaqueJSClassContextData::OpaqueJSClassContextData(OpaqueJSClass* jsClass) : m_class(jsClass) - , cachedPrototype(0) { if (jsClass->m_staticValues) { staticValues = new OpaqueJSClassStaticValuesTable; OpaqueJSClassStaticValuesTable::const_iterator end = jsClass->m_staticValues->end(); for (OpaqueJSClassStaticValuesTable::const_iterator it = jsClass->m_staticValues->begin(); it != end; ++it) { - ASSERT(!it->first->identifierTable()); - StaticValueEntry* e = new StaticValueEntry(it->second->getProperty, it->second->setProperty, it->second->attributes); - staticValues->add(UString::Rep::createCopying(it->first->data(), it->first->size()), e); - + ASSERT(!it->first->isIdentifier()); + // Use a local variable here to sidestep an RVCT compiler bug. + StaticValueEntry* entry = new StaticValueEntry(it->second->getProperty, it->second->setProperty, it->second->attributes); + staticValues->add(UString::Rep::create(it->first->data(), it->first->length()), entry); } - } else staticValues = 0; - if (jsClass->m_staticFunctions) { staticFunctions = new OpaqueJSClassStaticFunctionsTable; OpaqueJSClassStaticFunctionsTable::const_iterator end = jsClass->m_staticFunctions->end(); for (OpaqueJSClassStaticFunctionsTable::const_iterator it = jsClass->m_staticFunctions->begin(); it != end; ++it) { - ASSERT(!it->first->identifierTable()); - StaticFunctionEntry* e = new StaticFunctionEntry(it->second->callAsFunction, it->second->attributes); - staticFunctions->add(UString::Rep::createCopying(it->first->data(), it->first->size()), e); + ASSERT(!it->first->isIdentifier()); + // Use a local variable here to sidestep an RVCT compiler bug. + StaticFunctionEntry* entry = new StaticFunctionEntry(it->second->callAsFunction, it->second->attributes); + staticFunctions->add(UString::Rep::create(it->first->data(), it->first->length()), entry); } } else @@ -241,5 +260,5 @@ JSObject* OpaqueJSClass::prototype(ExecState* exec) jsClassData.cachedPrototype->setPrototype(prototype); } } - return jsClassData.cachedPrototype; + return jsClassData.cachedPrototype.get(); } diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.h b/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.h index c4777dd..ae60aad 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.h +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.h @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -76,7 +77,7 @@ struct OpaqueJSClassContextData : Noncopyable { OpaqueJSClassStaticValuesTable* staticValues; OpaqueJSClassStaticFunctionsTable* staticFunctions; - JSC::JSObject* cachedPrototype; + JSC::WeakGCPtr cachedPrototype; }; struct OpaqueJSClass : public ThreadSafeShared { diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSContextRef.cpp b/src/3rdparty/webkit/JavaScriptCore/API/JSContextRef.cpp index e6626b7..2c76338 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSContextRef.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSContextRef.cpp @@ -35,7 +35,7 @@ #include "JSObject.h" #include -#if PLATFORM(DARWIN) +#if OS(DARWIN) #include static const int32_t webkitFirstVersionWithConcurrentGlobalContexts = 0x2100500; // 528.5.0 @@ -46,7 +46,7 @@ using namespace JSC; JSContextGroupRef JSContextGroupCreate() { initializeThreading(); - return toRef(JSGlobalData::create().releaseRef()); + return toRef(JSGlobalData::createNonDefault().releaseRef()); } JSContextGroupRef JSContextGroupRetain(JSContextGroupRef group) @@ -63,7 +63,7 @@ void JSContextGroupRelease(JSContextGroupRef group) JSGlobalContextRef JSGlobalContextCreate(JSClassRef globalObjectClass) { initializeThreading(); -#if PLATFORM(DARWIN) +#if OS(DARWIN) // When running on Tiger or Leopard, or if the application was linked before JSGlobalContextCreate was changed // to use a unique JSGlobalData, we use a shared one for compatibility. #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) @@ -74,7 +74,7 @@ JSGlobalContextRef JSGlobalContextCreate(JSClassRef globalObjectClass) JSLock lock(LockForReal); return JSGlobalContextCreateInGroup(toRef(&JSGlobalData::sharedInstance()), globalObjectClass); } -#endif // PLATFORM(DARWIN) +#endif // OS(DARWIN) return JSGlobalContextCreateInGroup(0, globalObjectClass); } @@ -84,8 +84,9 @@ JSGlobalContextRef JSGlobalContextCreateInGroup(JSContextGroupRef group, JSClass initializeThreading(); JSLock lock(LockForReal); + RefPtr globalData = group ? PassRefPtr(toJS(group)) : JSGlobalData::createNonDefault(); - RefPtr globalData = group ? PassRefPtr(toJS(group)) : JSGlobalData::create(); + APIEntryShim entryShim(globalData.get(), false); #if ENABLE(JSC_MULTIPLE_THREADS) globalData->makeUsableFromMultipleThreads(); @@ -108,12 +109,9 @@ JSGlobalContextRef JSGlobalContextCreateInGroup(JSContextGroupRef group, JSClass JSGlobalContextRef JSGlobalContextRetain(JSGlobalContextRef ctx) { ExecState* exec = toJS(ctx); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSGlobalData& globalData = exec->globalData(); - - globalData.heap.registerThread(); - gcProtect(exec->dynamicGlobalObject()); globalData.ref(); return ctx; @@ -124,25 +122,26 @@ void JSGlobalContextRelease(JSGlobalContextRef ctx) ExecState* exec = toJS(ctx); JSLock lock(exec); + JSGlobalData& globalData = exec->globalData(); + IdentifierTable* savedIdentifierTable = setCurrentIdentifierTable(globalData.identifierTable); + gcUnprotect(exec->dynamicGlobalObject()); - JSGlobalData& globalData = exec->globalData(); if (globalData.refCount() == 2) { // One reference is held by JSGlobalObject, another added by JSGlobalContextRetain(). // The last reference was released, this is our last chance to collect. - ASSERT(!globalData.heap.protectedObjectCount()); - ASSERT(!globalData.heap.isBusy()); globalData.heap.destroy(); } else - globalData.heap.collect(); + globalData.heap.collectAllGarbage(); globalData.deref(); + + setCurrentIdentifierTable(savedIdentifierTable); } JSObjectRef JSContextGetGlobalObject(JSContextRef ctx) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); // It is necessary to call toThisObject to get the wrapper object when used with WebCore. return toRef(exec->lexicalGlobalObject()->toThisObject(exec)); @@ -157,8 +156,7 @@ JSContextGroupRef JSContextGetGroup(JSContextRef ctx) JSGlobalContextRef JSContextGetGlobalContext(JSContextRef ctx) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); return toGlobalRef(exec->lexicalGlobalObject()->globalExec()); } diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.cpp b/src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.cpp index 06ef578..faaa4eb 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.cpp @@ -76,8 +76,7 @@ void JSClassRelease(JSClassRef jsClass) JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef jsClass, void* data) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); if (!jsClass) return toRef(new (exec) JSObject(exec->lexicalGlobalObject()->emptyObjectStructure())); // slightly more efficient @@ -92,8 +91,7 @@ JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef jsClass, void* data) JSObjectRef JSObjectMakeFunctionWithCallback(JSContextRef ctx, JSStringRef name, JSObjectCallAsFunctionCallback callAsFunction) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); Identifier nameID = name ? name->identifier(&exec->globalData()) : Identifier(exec, "anonymous"); @@ -103,8 +101,7 @@ JSObjectRef JSObjectMakeFunctionWithCallback(JSContextRef ctx, JSStringRef name, JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObjectCallAsConstructorCallback callAsConstructor) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsPrototype = jsClass ? jsClass->prototype(exec) : 0; if (!jsPrototype) @@ -118,8 +115,7 @@ JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObje JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned parameterCount, const JSStringRef parameterNames[], JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); Identifier nameID = name ? name->identifier(&exec->globalData()) : Identifier(exec, "anonymous"); @@ -141,8 +137,7 @@ JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned pa JSObjectRef JSObjectMakeArray(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* result; if (argumentCount) { @@ -167,8 +162,7 @@ JSObjectRef JSObjectMakeArray(JSContextRef ctx, size_t argumentCount, const JSVa JSObjectRef JSObjectMakeDate(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); MarkedArgumentBuffer argList; for (size_t i = 0; i < argumentCount; ++i) @@ -188,8 +182,7 @@ JSObjectRef JSObjectMakeDate(JSContextRef ctx, size_t argumentCount, const JSVal JSObjectRef JSObjectMakeError(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); MarkedArgumentBuffer argList; for (size_t i = 0; i < argumentCount; ++i) @@ -209,8 +202,7 @@ JSObjectRef JSObjectMakeError(JSContextRef ctx, size_t argumentCount, const JSVa JSObjectRef JSObjectMakeRegExp(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); MarkedArgumentBuffer argList; for (size_t i = 0; i < argumentCount; ++i) @@ -230,8 +222,7 @@ JSObjectRef JSObjectMakeRegExp(JSContextRef ctx, size_t argumentCount, const JSV JSValueRef JSObjectGetPrototype(JSContextRef ctx, JSObjectRef object) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); return toRef(exec, jsObject->prototype()); @@ -240,8 +231,7 @@ JSValueRef JSObjectGetPrototype(JSContextRef ctx, JSObjectRef object) void JSObjectSetPrototype(JSContextRef ctx, JSObjectRef object, JSValueRef value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); JSValue jsValue = toJS(exec, value); @@ -252,8 +242,7 @@ void JSObjectSetPrototype(JSContextRef ctx, JSObjectRef object, JSValueRef value bool JSObjectHasProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); @@ -263,8 +252,7 @@ bool JSObjectHasProperty(JSContextRef ctx, JSObjectRef object, JSStringRef prope JSValueRef JSObjectGetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); @@ -280,8 +268,7 @@ JSValueRef JSObjectGetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef void JSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSPropertyAttributes attributes, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); Identifier name(propertyName->identifier(&exec->globalData())); @@ -304,8 +291,7 @@ void JSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef prope JSValueRef JSObjectGetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); @@ -322,8 +308,7 @@ JSValueRef JSObjectGetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsi void JSObjectSetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef value, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); JSValue jsValue = toJS(exec, value); @@ -339,8 +324,7 @@ void JSObjectSetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned p bool JSObjectDeleteProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); @@ -389,8 +373,7 @@ bool JSObjectIsFunction(JSContextRef, JSObjectRef object) JSValueRef JSObjectCallAsFunction(JSContextRef ctx, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); JSObject* jsThisObject = toJS(thisObject); @@ -427,8 +410,7 @@ bool JSObjectIsConstructor(JSContextRef, JSObjectRef object) JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSObject* jsObject = toJS(object); @@ -466,8 +448,7 @@ JSPropertyNameArrayRef JSObjectCopyPropertyNames(JSContextRef ctx, JSObjectRef o { JSObject* jsObject = toJS(object); ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSGlobalData* globalData = &exec->globalData(); @@ -492,7 +473,7 @@ JSPropertyNameArrayRef JSPropertyNameArrayRetain(JSPropertyNameArrayRef array) void JSPropertyNameArrayRelease(JSPropertyNameArrayRef array) { if (--array->refCount == 0) { - JSLock lock(array->globalData->isSharedInstance ? LockForReal : SilenceAssertionsOnly); + APIEntryShim entryShim(array->globalData, false); delete array; } } @@ -510,9 +491,6 @@ JSStringRef JSPropertyNameArrayGetNameAtIndex(JSPropertyNameArrayRef array, size void JSPropertyNameAccumulatorAddName(JSPropertyNameAccumulatorRef array, JSStringRef propertyName) { PropertyNameArray* propertyNames = toJS(array); - - propertyNames->globalData()->heap.registerThread(); - JSLock lock(propertyNames->globalData()->isSharedInstance ? LockForReal : SilenceAssertionsOnly); - + APIEntryShim entryShim(propertyNames->globalData()); propertyNames->add(propertyName->identifier(propertyNames->globalData())); } diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSStringRef.h b/src/3rdparty/webkit/JavaScriptCore/API/JSStringRef.h index c58b958..92135b1 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSStringRef.h +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSStringRef.h @@ -37,7 +37,8 @@ extern "C" { #endif -#if !defined(WIN32) && !defined(_WIN32) && !defined(__WINSCW__) +#if !defined(WIN32) && !defined(_WIN32) && !defined(__WINSCW__) \ + && !(defined(__CC_ARM) || defined(__ARMCC__)) /* RVCT */ /*! @typedef JSChar @abstract A Unicode character. diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSValueRef.cpp b/src/3rdparty/webkit/JavaScriptCore/API/JSValueRef.cpp index 2207181..a12cc34 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSValueRef.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSValueRef.cpp @@ -28,6 +28,7 @@ #include #include "APICast.h" +#include "APIShims.h" #include "JSCallbackObject.h" #include @@ -41,13 +42,14 @@ #include // for std::min -JSType JSValueGetType(JSContextRef ctx, JSValueRef value) +using namespace JSC; + +::JSType JSValueGetType(JSContextRef ctx, JSValueRef value) { - JSC::ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSC::JSLock lock(exec); + ExecState* exec = toJS(ctx); + APIEntryShim entryShim(exec); - JSC::JSValue jsValue = toJS(exec, value); + JSValue jsValue = toJS(exec, value); if (jsValue.isUndefined()) return kJSTypeUndefined; @@ -63,13 +65,10 @@ JSType JSValueGetType(JSContextRef ctx, JSValueRef value) return kJSTypeObject; } -using namespace JSC; // placed here to avoid conflict between JSC::JSType and JSType, above. - bool JSValueIsUndefined(JSContextRef ctx, JSValueRef value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); return jsValue.isUndefined(); @@ -78,8 +77,7 @@ bool JSValueIsUndefined(JSContextRef ctx, JSValueRef value) bool JSValueIsNull(JSContextRef ctx, JSValueRef value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); return jsValue.isNull(); @@ -88,8 +86,7 @@ bool JSValueIsNull(JSContextRef ctx, JSValueRef value) bool JSValueIsBoolean(JSContextRef ctx, JSValueRef value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); return jsValue.isBoolean(); @@ -98,8 +95,7 @@ bool JSValueIsBoolean(JSContextRef ctx, JSValueRef value) bool JSValueIsNumber(JSContextRef ctx, JSValueRef value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); return jsValue.isNumber(); @@ -108,8 +104,7 @@ bool JSValueIsNumber(JSContextRef ctx, JSValueRef value) bool JSValueIsString(JSContextRef ctx, JSValueRef value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); return jsValue.isString(); @@ -118,8 +113,7 @@ bool JSValueIsString(JSContextRef ctx, JSValueRef value) bool JSValueIsObject(JSContextRef ctx, JSValueRef value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); return jsValue.isObject(); @@ -128,8 +122,7 @@ bool JSValueIsObject(JSContextRef ctx, JSValueRef value) bool JSValueIsObjectOfClass(JSContextRef ctx, JSValueRef value, JSClassRef jsClass) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); @@ -145,8 +138,7 @@ bool JSValueIsObjectOfClass(JSContextRef ctx, JSValueRef value, JSClassRef jsCla bool JSValueIsEqual(JSContextRef ctx, JSValueRef a, JSValueRef b, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsA = toJS(exec, a); JSValue jsB = toJS(exec, b); @@ -163,20 +155,18 @@ bool JSValueIsEqual(JSContextRef ctx, JSValueRef a, JSValueRef b, JSValueRef* ex bool JSValueIsStrictEqual(JSContextRef ctx, JSValueRef a, JSValueRef b) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsA = toJS(exec, a); JSValue jsB = toJS(exec, b); - return JSValue::strictEqual(jsA, jsB); + return JSValue::strictEqual(exec, jsA, jsB); } bool JSValueIsInstanceOfConstructor(JSContextRef ctx, JSValueRef value, JSObjectRef constructor, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); @@ -195,8 +185,7 @@ bool JSValueIsInstanceOfConstructor(JSContextRef ctx, JSValueRef value, JSObject JSValueRef JSValueMakeUndefined(JSContextRef ctx) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); return toRef(exec, jsUndefined()); } @@ -204,8 +193,7 @@ JSValueRef JSValueMakeUndefined(JSContextRef ctx) JSValueRef JSValueMakeNull(JSContextRef ctx) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); return toRef(exec, jsNull()); } @@ -213,8 +201,7 @@ JSValueRef JSValueMakeNull(JSContextRef ctx) JSValueRef JSValueMakeBoolean(JSContextRef ctx, bool value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); return toRef(exec, jsBoolean(value)); } @@ -222,8 +209,7 @@ JSValueRef JSValueMakeBoolean(JSContextRef ctx, bool value) JSValueRef JSValueMakeNumber(JSContextRef ctx, double value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); return toRef(exec, jsNumber(exec, value)); } @@ -231,8 +217,7 @@ JSValueRef JSValueMakeNumber(JSContextRef ctx, double value) JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef string) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); return toRef(exec, jsString(exec, string->ustring())); } @@ -240,8 +225,7 @@ JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef string) bool JSValueToBoolean(JSContextRef ctx, JSValueRef value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); return jsValue.toBoolean(exec); @@ -250,8 +234,7 @@ bool JSValueToBoolean(JSContextRef ctx, JSValueRef value) double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); @@ -268,8 +251,7 @@ double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef* exception JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); @@ -286,8 +268,7 @@ JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef* JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exception) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); JSValue jsValue = toJS(exec, value); @@ -304,19 +285,17 @@ JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exce void JSValueProtect(JSContextRef ctx, JSValueRef value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); - JSValue jsValue = toJS(exec, value); + JSValue jsValue = toJSForGC(exec, value); gcProtect(jsValue); } void JSValueUnprotect(JSContextRef ctx, JSValueRef value) { ExecState* exec = toJS(ctx); - exec->globalData().heap.registerThread(); - JSLock lock(exec); + APIEntryShim entryShim(exec); - JSValue jsValue = toJS(exec, value); + JSValue jsValue = toJSForGC(exec, value); gcUnprotect(jsValue); } diff --git a/src/3rdparty/webkit/JavaScriptCore/API/OpaqueJSString.cpp b/src/3rdparty/webkit/JavaScriptCore/API/OpaqueJSString.cpp index 7c7b1af..f740abe 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/OpaqueJSString.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/API/OpaqueJSString.cpp @@ -42,7 +42,7 @@ PassRefPtr OpaqueJSString::create(const UString& ustring) UString OpaqueJSString::ustring() const { if (this && m_characters) - return UString(m_characters, m_length, true); + return UString(m_characters, m_length); return UString::null(); } diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog index 6446773..ccad6b3 100644 --- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog +++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog @@ -1,164 +1,7839 @@ +2009-10-30 Tor Arne Vestbø + + Reviewed by NOBODY (OOPS!). + + [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml() + + This ensures that long-running JavaScript (for example due to a modal alert() dialog), + will not trigger a deferred load after only 500ms (the default tokenizer delay) while + still giving a reasonable timeout (10 seconds) to prevent deadlock. + + https://bugs.webkit.org/show_bug.cgi?id=29381 + + * runtime/TimeoutChecker.h: Add getter for the timeout interval + +2010-02-19 Maciej Stachowiak + + Reviewed by David Levin. + + Add an ENABLE flag for sandboxed iframes to make it possible to disable it in releases + https://bugs.webkit.org/show_bug.cgi?id=35147 + + * Configurations/FeatureDefines.xcconfig: + +2010-02-19 Gavin Barraclough + + Reviewed by Oliver Hunt. + + JSString::getIndex() calls value() to resolve the string value (is a rope) + to a UString, then passes the result to jsSingleCharacterSubstring without + checking for an exception. In case of out-of-memory the returned UString + is null(), which may result in an out-of-buounds substring being created. + This is bad. + + Simple fix is to be able to get an index from a rope without resolving to + UString. This may be a useful optimization in some test cases. + + The same bug exists in some other methods is JSString, these can be fixed + by changing them to call getIndex(). + + * runtime/JSString.cpp: + (JSC::JSString::resolveRope): + (JSC::JSString::getStringPropertyDescriptor): + * runtime/JSString.h: + (JSC::jsSingleCharacterSubstring): + (JSC::JSString::getIndex): + (JSC::jsSingleCharacterString): + (JSC::JSString::getStringPropertySlot): + * runtime/UStringImpl.cpp: + (JSC::singleCharacterSubstring): + * runtime/UStringImpl.h: + (JSC::UStringImpl::singleCharacterSubstring): + +2010-02-19 Oliver Hunt + + RS = Gavin Barraclough. + + Split the 32/64 version of JITPropertyAccess into a separate file. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pri: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * jit/JITPropertyAccess.cpp: + * jit/JITPropertyAccess32_64.cpp: Added. + (JSC::JIT::emit_op_put_by_index): + (JSC::JIT::emit_op_put_getter): + (JSC::JIT::emit_op_put_setter): + (JSC::JIT::emit_op_del_by_id): + (JSC::JIT::emit_op_method_check): + (JSC::JIT::emitSlow_op_method_check): + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emitSlow_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::emitSlow_op_put_by_val): + (JSC::JIT::emit_op_get_by_id): + (JSC::JIT::emitSlow_op_get_by_id): + (JSC::JIT::emit_op_put_by_id): + (JSC::JIT::emitSlow_op_put_by_id): + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::compileGetByIdSlowCase): + (JSC::JIT::compilePutDirectOffset): + (JSC::JIT::compileGetDirectOffset): + (JSC::JIT::testPrototype): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::patchGetByIdSelf): + (JSC::JIT::patchMethodCallProto): + (JSC::JIT::patchPutByIdReplace): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + (JSC::JIT::emit_op_get_by_pname): + (JSC::JIT::emitSlow_op_get_by_pname): + +2010-02-19 Patrick Gansterer + + Reviewed by Laszlo Gombos. + + Added additional parameter to create_rvct_stubs + for setting the regularexpression prefix. + Renamed it because it now works for other platforms too. + https://bugs.webkit.org/show_bug.cgi?id=34951 + + * DerivedSources.pro: + * create_jit_stubs: Copied from JavaScriptCore/create_rvct_stubs. + * create_rvct_stubs: Removed. + +2010-02-18 Oliver Hunt + + Reviewed by Gavin Barraclough. + + Improve interpreter getter performance + https://bugs.webkit.org/show_bug.cgi?id=35138 + + Improve the performance of getter dispatch by making it possible + for the interpreter to cache the GetterSetter object lookup. + + To do this we simply need to make PropertySlot aware of getters + as a potentially cacheable property, and record the base and this + objects for a getter access. This allows us to use more-or-less + identical code to that used by the normal get_by_id caching, with + the dispatch being the only actual difference. + + I'm holding off of implementing this in the JIT until I do some + cleanup to try and making coding in the JIT not be as horrible + as it is currently. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + (JSC::CodeBlock::derefStructures): + (JSC::CodeBlock::refStructures): + * bytecode/Opcode.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolveGlobal): + (JSC::Interpreter::tryCacheGetByID): + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + * runtime/JSObject.cpp: + (JSC::JSObject::fillGetterPropertySlot): + * runtime/PropertySlot.cpp: + (JSC::PropertySlot::functionGetter): + * runtime/PropertySlot.h: + (JSC::PropertySlot::isGetter): + (JSC::PropertySlot::isCacheable): + (JSC::PropertySlot::isCacheableValue): + (JSC::PropertySlot::setValueSlot): + (JSC::PropertySlot::setGetterSlot): + (JSC::PropertySlot::setCacheableGetterSlot): + (JSC::PropertySlot::clearOffset): + (JSC::PropertySlot::thisValue): + +2010-02-17 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Fixed a portion of: + | https://bugs.webkit.org/show_bug.cgi?id=28676 + Safari 4 does not release memory back to the operating system fast enough (28676) + + This patch fixes a surprisingly common edge case in which the page heap + would have only one free span, but that span would be larger than the + minimum free size, so we would decide not to free it, even though it + could be as large as 100MB or more! + + SunSpider reports no change on Mac or Windows. + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::scavenge): Call shouldContinueScavenging() instead + of doing the math ourselves. Don't keep a local value for pagesDecommitted + because that lets free_committed_pages_ be wrong temporarily. Instead, + update free_committed_pages_ as we go. ASSERT that we aren't releasing + a span that has already been released, because we think this is impossible. + Finally, don't be afraid to release all free memory in the page heap when + scavenging. We only scavenge after 5 seconds of the application's working + set not growing, and we keep both thread caches and a central cache on + top of the page heap, so the extra free pages in the page heap were just + overkill. + +2010-02-17 Gavin Barraclough + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=35070 + Addition of 2 strings of length 2^31 may result in a string of length 0. + + Check for overflow when creating a new JSString as a result of an addition + or concatenation, throw an out of memory exception. + + * runtime/JSString.h: + (JSC::): + * runtime/Operations.h: + (JSC::jsString): + +2010-02-17 Xan Lopez + + Reviewed by Gustavo Noronha. + + [Linux] Webkit incompatible with Java plugins + https://bugs.webkit.org/show_bug.cgi?id=24912 + + Add support for GFile to GOwnPtr. + + Based on original work by Gustavo Noronha. + + * wtf/gtk/GOwnPtr.cpp: + (WTF::GFile): + * wtf/gtk/GOwnPtr.h: + +2010-02-16 Gavin Barraclough + + Reviewed by Mark Rowe. + + Fix a handful of other leaks seen on the buildbot. + + * runtime/UStringImpl.h: + (JSC::UStringOrRopeImpl::deref): Delegate through to the subclass version of deref to ensure that + the correct cleanup takes place. This function previously featured some code that attempted to + skip deletion of static UStringImpl's. Closer inspection revealed that it was in fact equivalent + to "if (false)", meaning that UStringImpl's which had their final deref performed via this function + were leaked. + +2010-02-16 Mark Rowe + + Reviewed by Gavin Barraclough. + + Fix a handful of leaks seen on the buildbot. + + * runtime/UStringImpl.h: + (JSC::UStringOrRopeImpl::deref): Call URopeImpl::destructNonRecursive rather than delete + to ensure that the rope's fibers are also destroyed. + +2010-02-16 Gavin Barraclough + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=34964 + Leaks tool reports false memory leaks due to Rope implementation. + + A rope is a recursive data structure where each node in the rope holds a set of + pointers, each of which may reference either a string (in UStringImpl form) or + another rope node. A low bit in each pointer is used to distinguish between + rope & string elements, in a fashion similar to the recently-removed + PtrAndFlags class (see https://bugs.webkit.org/show_bug.cgi?id=33731 ). Again, + this causes a problem for Leaks – refactor to remove the magic pointer + mangling. + + Move Rope out from JSString.h and rename to URopeImpl, to match UStringImpl. + Give UStringImpl and URopeImpl a common parent class, UStringOrRopeImpl. + Repurpose an otherwise invalid permutation to flags (static & should report + memory cost) to identify ropes. + + This allows us to change the rope's fibers to interrogate the object rather + than storing a bool within the low bits of the pointer (or in some cases the + use of a common parent class removes the need to determine the type at all - + there is a common interface to ref or get the length of either ropes or strings). + + * API/JSClassRef.cpp: + (OpaqueJSClass::OpaqueJSClass): + (OpaqueJSClassContextData::OpaqueJSClassContextData): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::keyForCharacterSwitch): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + * runtime/Identifier.cpp: + (JSC::Identifier::equal): + (JSC::Identifier::addSlowCase): + * runtime/JSString.cpp: + (JSC::JSString::resolveRope): + * runtime/JSString.h: + (JSC::): + (JSC::RopeBuilder::JSString): + (JSC::RopeBuilder::~JSString): + (JSC::RopeBuilder::appendStringInConstruct): + (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): + (JSC::RopeBuilder::JSStringFinalizerStruct::JSStringFinalizerStruct): + (JSC::RopeBuilder::JSStringFinalizerStruct::): + * runtime/UString.cpp: + (JSC::UString::toStrictUInt32): + (JSC::equal): + * runtime/UString.h: + (JSC::UString::isEmpty): + (JSC::UString::size): + * runtime/UStringImpl.cpp: + (JSC::URopeImpl::derefFibersNonRecursive): + (JSC::URopeImpl::destructNonRecursive): + * runtime/UStringImpl.h: + (JSC::UStringOrRopeImpl::isRope): + (JSC::UStringOrRopeImpl::length): + (JSC::UStringOrRopeImpl::ref): + (JSC::UStringOrRopeImpl::): + (JSC::UStringOrRopeImpl::operator new): + (JSC::UStringOrRopeImpl::UStringOrRopeImpl): + (JSC::UStringImpl::adopt): + (JSC::UStringImpl::createUninitialized): + (JSC::UStringImpl::tryCreateUninitialized): + (JSC::UStringImpl::data): + (JSC::UStringImpl::cost): + (JSC::UStringImpl::deref): + (JSC::UStringImpl::UStringImpl): + (JSC::UStringImpl::): + (JSC::URopeImpl::tryCreateUninitialized): + (JSC::URopeImpl::initializeFiber): + (JSC::URopeImpl::fiberCount): + (JSC::URopeImpl::fibers): + (JSC::URopeImpl::deref): + (JSC::URopeImpl::URopeImpl): + (JSC::URopeImpl::hasOneRef): + (JSC::UStringOrRopeImpl::deref): + +2010-02-15 Gabor Loki + + Reviewed by Gavin Barraclough. + + Fix the SP at ctiOpThrowNotCaught on Thumb2 (JSVALUE32) + https://bugs.webkit.org/show_bug.cgi?id=34939 + + * jit/JITStubs.cpp: + +2010-02-15 Gavin Barraclough + + Reviewed by NOBODY (Build Fix!). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-02-15 Gavin Barraclough + + Reviewed by Oliver Hunt. + + Some general Rope related refactoring. + + Rename Rope::m_ropeLength to m_fiberCount, to be more descriptive. + Rename Rope::m_stringLength to simply m_length (since this is the + more conventional name for the length of a string). Move append + behaviour out into a new RopeBuilder class, so that Rope no longer + needs any knowledge of the JSString or UString implementation. + + Make Rope no longer be nested within JSString. + (Rope now no-longer need reside within JSString.h, but leaving + the change of moving this out to a different header as a separate + change from these renames). + + * JavaScriptCore.exp: + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * runtime/JSString.cpp: + (JSC::Rope::destructNonRecursive): + (JSC::Rope::~Rope): + (JSC::JSString::resolveRope): + (JSC::JSString::toBoolean): + (JSC::JSString::getStringPropertyDescriptor): + * runtime/JSString.h: + (JSC::Rope::Fiber::Fiber): + (JSC::Rope::Fiber::deref): + (JSC::Rope::Fiber::ref): + (JSC::Rope::Fiber::refAndGetLength): + (JSC::Rope::Fiber::isRope): + (JSC::Rope::Fiber::rope): + (JSC::Rope::Fiber::isString): + (JSC::Rope::Fiber::string): + (JSC::Rope::Fiber::nonFiber): + (JSC::Rope::tryCreateUninitialized): + (JSC::Rope::append): + (JSC::Rope::fiberCount): + (JSC::Rope::length): + (JSC::Rope::fibers): + (JSC::Rope::Rope): + (JSC::Rope::operator new): + (JSC::): + (JSC::RopeBuilder::JSString): + (JSC::RopeBuilder::~JSString): + (JSC::RopeBuilder::length): + (JSC::RopeBuilder::canGetIndex): + (JSC::RopeBuilder::appendStringInConstruct): + (JSC::RopeBuilder::appendValueInConstructAndIncrementLength): + (JSC::RopeBuilder::isRope): + (JSC::RopeBuilder::fiberCount): + (JSC::JSString::getStringPropertySlot): + * runtime/Operations.h: + (JSC::jsString): + +2010-02-15 Gavin Barraclough + + Reviewed by NOBODY (Build fix). + + Add missing cast for !YARR (PPC) builds. + + * runtime/RegExp.cpp: + (JSC::RegExp::match): + +2010-02-14 Gavin Barraclough + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=33731 + Many false leaks in release builds due to PtrAndFlags + + StructureTransitionTable was effectively a smart pointer type, + one machine word in size and wholly contained as a member of + of Structure. It either pointed to an actual table, or could + be used to describe a single transtion entry without use of a + table. + + This, however, worked by using a PtrAndFlags, which is not + compatible with the leaks tool. Since there is no clear way to + obtain another bit for 'free' here, and since there are bits + available up in Structure, merge this functionality back up into + Structure. Having this in a separate class was quite clean + from an enacapsulation perspective, but this solution doesn't + seem to bad - all table access is now intermediated through the + Structure::structureTransitionTableFoo methods, keeping the + optimization fairly well contained. + + This was the last use of PtrAndFlags, so removing the file too. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.h: + * runtime/Structure.cpp: + (JSC::Structure::Structure): + (JSC::Structure::~Structure): + (JSC::Structure::addPropertyTransitionToExistingStructure): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::hasTransition): + * runtime/Structure.h: + (JSC::Structure::): + (JSC::Structure::structureTransitionTableContains): + (JSC::Structure::structureTransitionTableGet): + (JSC::Structure::structureTransitionTableHasTransition): + (JSC::Structure::structureTransitionTableRemove): + (JSC::Structure::structureTransitionTableAdd): + (JSC::Structure::structureTransitionTable): + (JSC::Structure::setStructureTransitionTable): + (JSC::Structure::singleTransition): + (JSC::Structure::setSingleTransition): + * runtime/StructureTransitionTable.h: + * wtf/PtrAndFlags.h: Removed. + +2010-02-15 Gavin Barraclough + + Rubber Stamped by Geoff Garen. + + Bug 34948 - tryMakeString should fail on error in length calculation + + Ooops! - "bool overflow" argument should have been "bool& overflow". + + * runtime/UString.h: + (JSC::sumWithOverflow): + (JSC::tryMakeString): + +2010-02-15 Gavin Barraclough + + Reviewed by NOBODY (Build Fix (pt 2!)). + + Some symbol names have changed, remove, will readd if required. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-02-15 Gavin Barraclough + + Reviewed by NOBODY (Build Fix (pt 1?)). + + Some symbol names have changed, remove, will readd if required. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-02-15 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Removed some mistaken code added in http://trac.webkit.org/changeset/53860. + + * API/APIShims.h: + (JSC::APICallbackShim::APICallbackShim): + (JSC::APICallbackShim::~APICallbackShim): No need to start/stop the + timeout checker when calling out from the API to the client; we want to + monitor the VM for timeouts, not the client. This mistake was harmless / + undetectable, since it's totally redundant with the APIEntryShim, which + also starts / stops the timeout checker. + +2010-02-15 Gavin Barraclough + + Reviewed by Geoff Garen. + + Bug 34952 - String lengths in UString should be unsigned. + This matches WebCore::StringImpl, and better unifies behaviour throughout JSC. + + * JavaScriptCore.exp: + * bytecode/EvalCodeCache.h: + * runtime/Identifier.cpp: + (JSC::Identifier::equal): + * runtime/Identifier.h: + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncEscape): + * runtime/JSONObject.cpp: + (JSC::gap): + (JSC::Stringifier::indent): + * runtime/NumberPrototype.cpp: + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToPrecision): + * runtime/RegExp.cpp: + (JSC::RegExp::match): + * runtime/StringPrototype.cpp: + (JSC::substituteBackreferencesSlow): + (JSC::stringProtoFuncReplace): + (JSC::stringProtoFuncSplit): + (JSC::trimString): + * runtime/UString.cpp: + (JSC::UString::UString): + (JSC::UString::from): + (JSC::UString::getCString): + (JSC::UString::ascii): + (JSC::UString::operator[]): + (JSC::UString::toStrictUInt32): + (JSC::UString::find): + (JSC::UString::rfind): + (JSC::UString::substr): + (JSC::operator<): + (JSC::operator>): + (JSC::compare): + (JSC::equal): + (JSC::UString::UTF8String): + * runtime/UString.h: + (JSC::UString::size): + (JSC::operator==): + * runtime/UStringImpl.cpp: + (JSC::UStringImpl::create): + * runtime/UStringImpl.h: + (JSC::UStringImpl::create): + (JSC::UStringImpl::size): + (JSC::UStringImpl::computeHash): + (JSC::UStringImpl::UStringImpl): + +2010-02-15 Gavin Barraclough + + Reviewed by Geoff Garen. + + Bug 34948 - tryMakeString should fail on error in length calculation + + The sum of the length of substrings could overflow. + + * runtime/UString.h: + (JSC::sumWithOverflow): + (JSC::tryMakeString): + +2010-02-15 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Fixed Crash beneath JSGlobalContextRelease when + typing in Google search field with GuardMalloc/full page heap enabled + + * API/JSContextRef.cpp: Don't use APIEntryShim, since that requires + a JSGlobalData, which this function destroys. Do use setCurrentIdentifierTable + and JSLock instead, since those are the two features of APIEntryShim we + require. + +2010-02-15 Patrick Gansterer + + Reviewed by Laszlo Gombos. + + Added additional parameter to create_rvct_stubs + for setting the offset of thunkReturnAddress. + https://bugs.webkit.org/show_bug.cgi?id=34657 + + * create_rvct_stubs: + * jit/JITStubs.cpp: + +2010-02-15 Jedrzej Nowacki + + Reviewed by Simon Hausmann. + + Fix QScriptValue::toIntXX methods. + + More ECMA Script compliance. + + [Qt] QScriptValue::toIntXX returns incorrect values + https://bugs.webkit.org/show_bug.cgi?id=34847 + + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::toInteger): + (QScriptValuePrivate::toInt32): + (QScriptValuePrivate::toUInt32): + (QScriptValuePrivate::toUInt16): + * qt/tests/qscriptvalue/tst_qscriptvalue.h: + * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: + (tst_QScriptValue::toInteger_initData): + (tst_QScriptValue::toInteger_makeData): + (tst_QScriptValue::toInteger_test): + (tst_QScriptValue::toInt32_initData): + (tst_QScriptValue::toInt32_makeData): + (tst_QScriptValue::toInt32_test): + (tst_QScriptValue::toUInt32_initData): + (tst_QScriptValue::toUInt32_makeData): + (tst_QScriptValue::toUInt32_test): + (tst_QScriptValue::toUInt16_initData): + (tst_QScriptValue::toUInt16_makeData): + (tst_QScriptValue::toUInt16_test): + +2010-02-14 Laszlo Gombos + + Reviewed by Adam Barth. + + Implement NEVER_INLINE and NO_RETURN for RVCT + https://bugs.webkit.org/show_bug.cgi?id=34740 + + * wtf/AlwaysInline.h: + +2010-02-12 Gavin Barraclough + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=33731 + Remove uses of PtrAndFlags from JIT data stuctures. + + These break the OS X Leaks tool. Free up a bit in CallLinkInfo, and invalid + permutation of pointer states in MethodCallLinkInfo to represent the removed bits. + + * bytecode/CodeBlock.h: + (JSC::CallLinkInfo::seenOnce): + (JSC::CallLinkInfo::setSeen): + (JSC::MethodCallLinkInfo::MethodCallLinkInfo): + (JSC::MethodCallLinkInfo::seenOnce): + (JSC::MethodCallLinkInfo::setSeen): + * jit/JIT.cpp: + (JSC::JIT::unlinkCall): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::patchMethodCallProto): + * runtime/UString.h: + +2010-02-12 Gavin Barraclough + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=33731 + Many false leaks in release builds due to PtrAndFlags + + Remove UntypedPtrAndBitfield (similar to PtrAndFlags) in UStringImpl, + and steal bits from the refCount instead. + + * runtime/UStringImpl.cpp: + (JSC::UStringImpl::baseSharedBuffer): + (JSC::UStringImpl::~UStringImpl): + * runtime/UStringImpl.h: + (JSC::UStringImpl::cost): + (JSC::UStringImpl::isIdentifier): + (JSC::UStringImpl::setIsIdentifier): + (JSC::UStringImpl::ref): + (JSC::UStringImpl::deref): + (JSC::UStringImpl::UStringImpl): + (JSC::UStringImpl::bufferOwnerString): + (JSC::UStringImpl::bufferOwnership): + (JSC::UStringImpl::isStatic): + (JSC::UStringImpl::): + +2010-02-12 Geoffrey Garen + + Reviewed by Darin Adler. + + Removed an unnecessary data dependency from my last patch. + + * runtime/SmallStrings.cpp: + (JSC::SmallStrings::markChildren): Since isAnyStringMarked being false + is a condition of entering the loop, we can just use '=' instead of '|='. + +2010-02-12 Janne Koskinen + + Reviewed by Tor Arne Vestbø. + + Additional refptr/passrefptr workarounds for WINSCW compiler + https://bugs.webkit.org/show_bug.cgi?id=28054 + + * wtf/PassRefPtr.h: + (WTF::refIfNotNull): + (WTF::PassRefPtr::PassRefPtr): + (WTF::PassRefPtr::~PassRefPtr): + (WTF::PassRefPtr::clear): + (WTF::::operator): + * wtf/RefPtr.h: + (WTF::RefPtr::RefPtr): + (WTF::::operator): + +2010-02-12 Janne Koskinen + + Reviewed by Simon Hausmann. + + Don't import the cmath functions from std:: for WINSCW. + + * wtf/MathExtras.h: + +2010-02-12 Kwang Yul Seo + + Reviewed by Adam Barth. + + Typedef both JSChar and UChar to wchar_t in RVCT. + https://bugs.webkit.org/show_bug.cgi?id=34560 + + Define both JSChar and UChar to wchar_t as the size + of wchar_t is 2 bytes in RVCT. + + * API/JSStringRef.h: + * wtf/unicode/qt4/UnicodeQt4.h: + +2010-02-11 Geoffrey Garen + + Reviewed by Oliver Hunt and Darin Adler. + + The rest of the fix for + https://bugs.webkit.org/show_bug.cgi?id=34864 | + Many objects left uncollected after visiting mail.google.com and closing + window + + Don't unconditionally hang onto small strings. Instead, hang onto all + small strings as long as any small string is still referenced. + + SunSpider reports no change. + + * runtime/Collector.cpp: + (JSC::Heap::markRoots): Mark the small strings cache last, so it can + check if anything else has kept any strings alive. + + * runtime/SmallStrings.cpp: + (JSC::isMarked): + (JSC::SmallStrings::markChildren): Only keep our strings alive if some + other reference to at least one of them exists, too. + +2010-02-11 Geoffrey Garen + + Reviewed by Gavin Barraclough. + + Some progress toward fixing + https://bugs.webkit.org/show_bug.cgi?id=34864 | + Many objects left uncollected after visiting mail.google.com and closing + window + + SunSpider reports no change. + + Keep weak references, rather than protected references, to cached for-in + property name enumerators. + + One problem with protected references is that a chain like + [ gc object 1 ] => [ non-gc object ] => [ gc object 2 ] + takes two GC passes to break, since the first pass collects [ gc object 1 ], + releasing [ non-gc object ] and unprotecting [ gc object 2 ], and only + then can a second pass collect [ gc object 2 ]. + + Another problem with protected references is that they can keep a bunch + of strings alive long after they're useful. In SunSpider and a few popular + websites, the size-speed tradeoff seems to favor weak references. + + * runtime/JSPropertyNameIterator.cpp: + (JSC::JSPropertyNameIterator::JSPropertyNameIterator): Moved this constructor + into the .cpp file, since it's not used elsewhere. + + (JSC::JSPropertyNameIterator::~JSPropertyNameIterator): Added a destructor + to support our weak reference. + + * runtime/JSPropertyNameIterator.h: + (JSC::Structure::setEnumerationCache): + (JSC::Structure::clearEnumerationCache): + (JSC::Structure::enumerationCache): Added a function for clearing a + Structure's enumeration cache, used by our new destructor. Also fixed + indentation to match the rest of the file. + + * runtime/Structure.h: Changed from protected pointer to weak pointer. + +2010-02-11 Chris Rogers + + Reviewed by David Levin. + + audio engine: add Complex number class + https://bugs.webkit.org/show_bug.cgi?id=34538 + + * wtf/Complex.h: Added. + (WebCore::complexFromMagnitudePhase): + +2010-02-10 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Added an SPI for asking about all the different live objects on the heap. + Useful for memory debugging. + + * JavaScriptCore.exp: Export the new SPI. + + * runtime/Collector.cpp: + (JSC::typeName): Use a little capitalization. Don't crash in the case of + a non-object cell, since it might just be an uninitialized cell. + + (JSC::Heap::objectTypeCounts): The new SPI. + + * runtime/Collector.h: + * runtime/CollectorHeapIterator.h: + (JSC::CollectorHeapIterator::advance): + (JSC::LiveObjectIterator::operator++): + (JSC::DeadObjectIterator::operator++): + (JSC::ObjectIterator::operator++): Made 2 tweaks to these iterators: + (1) Skip the last cell in the block, since it's a dummy sentinel, and + we don't want it to confuse the object count; (2) Fixed a logic error + in LiveObjectIterator that could cause it to iterate dead objects if + m_block were equal to m_heap.nextBlock and m_cell were less than + m_heap.nextCell. No test for this since I can't think of a way that this + could make WebKit behave badly. + +2010-02-11 Steve Block + + Reviewed by Darin Adler. + + Guard cmath using declarations in MathExtras.h on Android + https://bugs.webkit.org/show_bug.cgi?id=34840 + + Android does not provide these functions. + + * wtf/MathExtras.h: + +2010-02-08 Maciej Stachowiak + + Reviewed by Cameron Zwarich. + + Restore ENABLE_RUBY flag so vendors can ship with Ruby disabled if they choose. + https://bugs.webkit.org/show_bug.cgi?id=34698 + + * Configurations/FeatureDefines.xcconfig: + +2010-02-10 Kevin Watters + + Reviewed by Kevin Ollivier. + + [wx] Add Windows complex text support and Mac support for containsCharacters. + + https://bugs.webkit.org/show_bug.cgi?id=34759 + + * wscript: + +2010-02-10 Alexey Proskuryakov + + Addressing issues found by style bot. + + * wtf/ValueCheck.h: Renamed header guard to match final file name. + + * wtf/Vector.h: (WTF::::checkConsistency): Remove braces around a one-line clause. + +2010-02-09 Alexey Proskuryakov + + Reviewed by Geoffrey Garen. + + https://bugs.webkit.org/show_bug.cgi?id=34490 + WebCore::ImageEventSender::dispatchPendingEvents() crashes in certain conditions + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + Added ValueCheck.h. + + * wtf/ValueCheck.h: Added. Moved code out of HashTraits, since it would be awkward to + include that from Vector.h. + (WTF::ValueCheck::checkConsistency): Allow null pointers, those are pretty consistent. + + * wtf/HashTraits.h: Moved value checking code out of here. + + * wtf/HashTable.h: (WTF::::checkTableConsistencyExceptSize): Updated for the above changes. + + * wtf/Vector.h: + (WTF::::checkConsistency): Check all vector elements. + (WTF::ValueCheck): Support checking a Vector as an element in other containers. Currently + unused. + +2010-02-10 Jedrzej Nowacki + + Reviewed by Simon Hausmann. + + Fix QScriptValue::toBool. + + Fix ECMA compliance in the QScriptValue for values like 0, NaN and + empty strings. + + [Qt] QScriptValue::toBool problem + https://bugs.webkit.org/show_bug.cgi?id=34793 + + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::toBool): + * qt/tests/qscriptvalue/tst_qscriptvalue.h: + * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: + (tst_QScriptValue::toBool_initData): + (tst_QScriptValue::toBool_makeData): + (tst_QScriptValue::toBool_test): + (tst_QScriptValue::toBoolean_initData): + (tst_QScriptValue::toBoolean_makeData): + (tst_QScriptValue::toBoolean_test): + +2009-10-06 Yongjun Zhang + + Reviewed by Simon Hausmann. + + Use derefIfNotNull() to work around WINSCW compiler forward declaration bug + + The compiler bug is reported at + https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812. + + The change should be reverted when the above bug is fixed in WINSCW compiler. + + https://bugs.webkit.org/show_bug.cgi?id=28054 + +2009-10-06 Yongjun Zhang + + Reviewed by Simon Hausmann. + + Get rid of WINSCW hack for UnSpecifiedBoolType + + Add parenthesis around (RefPtr::*UnspecifiedBoolType) to make the WINSCW + compiler work with the default UnSpecifiedBoolType() operator. + + https://bugs.webkit.org/show_bug.cgi?id=28054 + + * wtf/RefPtr.h: + +2010-02-09 Jedrzej Nowacki + + Reviewed by Simon Hausmann. + + New functions nullValue() and undefinedValue(). + + [Qt] QScriptEngine should contain nullValue and undefinedValue methods + https://bugs.webkit.org/show_bug.cgi?id=34749 + + * qt/api/qscriptengine.cpp: + (QScriptEngine::nullValue): + (QScriptEngine::undefinedValue): + * qt/api/qscriptengine.h: + * qt/tests/qscriptengine/tst_qscriptengine.cpp: + (tst_QScriptEngine::nullValue): + (tst_QScriptEngine::undefinedValue): + +2010-02-09 Jedrzej Nowacki + + Reviewed by Simon Hausmann. + + Fixes for QScriptValue::toNumber(). + + Fix ECMA compliance in QScriptValue for values unbound + to a QScriptEngine. + + [Qt] QScriptValue::toNumber() is broken + https://bugs.webkit.org/show_bug.cgi?id=34592 + + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::toNumber): + * qt/tests/qscriptvalue/tst_qscriptvalue.h: + * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: + (tst_QScriptValue::toNumber_initData): + (tst_QScriptValue::toNumber_makeData): + (tst_QScriptValue::toNumber_test): + +2010-02-09 Jedrzej Nowacki + + Reviewed by Simon Hausmann. + + Fix QScriptValue::isNumber(). + + The isNumber() should return 'true' if the value is in the CNumber + state. + + [Qt] QScriptValue::isNumber() returns an incorrect value + https://bugs.webkit.org/show_bug.cgi?id=34575 + + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::isNumber): + * qt/tests/qscriptvalue/tst_qscriptvalue.h: + * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: + (tst_QScriptValue::isNumber_initData): + (tst_QScriptValue::isNumber_makeData): + (tst_QScriptValue::isNumber_test): + +2010-02-09 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Small refactoring to the small strings cache to allow it to be cleared + dynamically. + + * runtime/SmallStrings.cpp: + (JSC::SmallStrings::SmallStrings): + (JSC::SmallStrings::clear): + * runtime/SmallStrings.h: Moved initialization code into a shared function, + and changed the constructor to call it. + +2010-02-09 Gavin Barraclough + + Rubber Stamped by Geoff Garen. + + Rename StringBuilder::release && JSStringBuilder::releaseJSString + to 'build()'. + + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToLocaleString): + (JSC::arrayProtoFuncJoin): + * runtime/Executable.cpp: + (JSC::FunctionExecutable::paramString): + * runtime/FunctionConstructor.cpp: + (JSC::constructFunction): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::encode): + (JSC::decode): + (JSC::globalFuncEscape): + (JSC::globalFuncUnescape): + * runtime/JSONObject.cpp: + (JSC::Stringifier::stringify): + * runtime/JSStringBuilder.h: + (JSC::JSStringBuilder::build): + * runtime/LiteralParser.cpp: + (JSC::LiteralParser::Lexer::lexString): + * runtime/NumberPrototype.cpp: + (JSC::integerPartNoExp): + (JSC::numberProtoFuncToFixed): + * runtime/StringBuilder.h: + (JSC::StringBuilder::build): + +2010-02-09 John Sullivan + + https://bugs.webkit.org/show_bug.cgi?id=34772 + Overzealous new assertion in URStringImpl::adopt() + + Reviewed by Adam Barth. + + * runtime/UStringImpl.h: + (JSC::UStringImpl::adopt): + Only assert that vector.data() is non-zero if vector.size() is non-zero. + +2010-02-09 Nikolas Zimmermann + + Not reviewed. Try to fix build problem on SnowLeopard slaves to bring them back. + + * API/JSClassRef.cpp: + (tryCreateStringFromUTF8): Mark method as 'static inline' to suppress "warning: no previous prototype for ..." + +2010-02-09 Gavin Barraclough + + Reviewed by Oliver Hunt. + + Three small string fixes: + (1) StringBuilder::release should CRASH if the buffer allocation failed. + (2) Remove weird, dead code from JSString::tryGetValue, replace with an ASSERT. + (3) Move UString::createFromUTF8 out to the API, as tryCreateStringFromUTF8. + This is only used from the API, and (now) unlike other UString::create + methods may return UString::null() to indicate failure cases. Better + handle these in the API. + + * API/JSClassRef.cpp: + (tryCreateStringFromUTF8): + (OpaqueJSClass::OpaqueJSClass): + (OpaqueJSClassContextData::OpaqueJSClassContextData): + * runtime/JSString.h: + (JSC::Fiber::tryGetValue): + * runtime/StringBuilder.h: + (JSC::StringBuilder::release): + * runtime/UString.cpp: + (JSC::UString::UString): + (JSC::UString::from): + (JSC::UString::find): + * runtime/UString.h: + 2010-02-09 Janne Koskinen - Reviewed by Laszlo Gombos. + Reviewed by Laszlo Gombos. + + [Qt] use nanval() for Symbian as nonInlineNaN + https://bugs.webkit.org/show_bug.cgi?id=34170 + + numeric_limits::quiet_NaN is broken in Symbian + causing NaN to be evaluated as a number. + + * runtime/JSValue.cpp: + (JSC::nonInlineNaN): + +2010-02-09 Tamas Szirbucz + + Reviewed by Gavin Barraclough. + + Add a soft modulo operation to ARM JIT using a trampoline function. + The performance progression is about ~1.8% on ARMv7 + https://bugs.webkit.org/show_bug.cgi?id=34424 + + Developed in cooperation with Gabor Loki. + + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_mod): + (JSC::JIT::emitSlow_op_mod): + * jit/JITOpcodes.cpp: + (JSC::JIT::softModulo): + * jit/JITStubs.h: + (JSC::JITThunks::ctiSoftModulo): + * wtf/Platform.h: + +2010-02-08 Gavin Barraclough + + Reviewed by NOBODY (SL/win build fixes). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * runtime/StringPrototype.cpp: + +2010-02-08 Gavin Barraclough + + Reviewed by Oliver Hunt + + Make String.replace throw an exception on out-of-memory, rather than + returning a null (err, empty-ish) string. Move String::replaceRange + and String::spliceSubstringsWithSeparators out to StringPrototype - + these were fairly specific use anyway, and we can better integrate + throwing the JS expcetion this way. + + Also removes redundant assignment operator from UString. + + * JavaScriptCore.exp: + * runtime/StringPrototype.cpp: + (JSC::StringRange::StringRange): + (JSC::jsSpliceSubstringsWithSeparators): + (JSC::jsReplaceRange): + (JSC::stringProtoFuncReplace): + * runtime/UString.cpp: + * runtime/UString.h: + +2010-02-08 Kwang Yul Seo + + Reviewed by Eric Seidel. + + [BREWMP] Undefine WTF_OS_WINDOWS and WTF_PLATFORM_WIN + https://bugs.webkit.org/show_bug.cgi?id=34561 + + As the binary for simulator is built with MSVC 2005, + WTF_OS_WINDOWS and WTF_PLATFORM_WIN are defined. + Undefine them as we don't target Windows. + + * wtf/Platform.h: + +2010-02-08 Chris Rogers + + Reviewed by Darin Adler. + + audio engine: add Vector3 class + https://bugs.webkit.org/show_bug.cgi?id=34548 + + * wtf/Vector3.h: Added. + (WebCore::Vector3::Vector3): + (WebCore::Vector3::abs): + (WebCore::Vector3::isZero): + (WebCore::Vector3::normalize): + (WebCore::Vector3::x): + (WebCore::Vector3::y): + (WebCore::Vector3::z): + (WebCore::operator+): + (WebCore::operator-): + (WebCore::operator*): + (WebCore::dot): + (WebCore::cross): + (WebCore::distance): + +2010-02-08 Oliver Hunt + + Reviewed by Gavin Barraclough. + + Fix warning in clang++ + + * runtime/Structure.h: + (JSC::Structure::propertyStorageSize): + +2010-02-08 Gavin Barraclough + + Reviewed by Geoff Garen. + + Make makeString CRASH if we fail to allocate a string. + + (tryMakeString or jsMakeNontrivialString can be used where we + expect allocation may fail and want to handle the error). + + * runtime/JSStringBuilder.h: + (JSC::jsMakeNontrivialString): + * runtime/UString.h: + (JSC::tryMakeString): + (JSC::makeString): + +2010-02-08 Gavin Barraclough + + Rubber Stamped by Oliver Hunt. + + Remove a couple of unnecesary C-style casts spotted by Darin. + + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::encode): + (JSC::globalFuncEscape): + +2010-02-08 Gavin Barraclough + + Reviewed by Geoff Garen. + + Switch some more StringBuilder/jsNontrivialString code to use + JSStringBuilder/jsMakeNontrivialString - these methods will + throw an exception if we hit out-of-memory, rather than just + CRASHing. + + * runtime/FunctionPrototype.cpp: + (JSC::functionProtoFuncToString): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::encode): + (JSC::decode): + (JSC::globalFuncEscape): + +2010-02-08 Gavin Barraclough + + Reviewed by Sam Weinig. + + Use an empty identifier instead of a null identifier for parse + tokens without an identifier. + + This helps encapsulate the null UStringImpl within UString. + + * parser/Grammar.y: + * parser/NodeConstructors.h: + (JSC::ContinueNode::ContinueNode): + (JSC::BreakNode::BreakNode): + (JSC::ForInNode::ForInNode): + * runtime/CommonIdentifiers.cpp: + (JSC::CommonIdentifiers::CommonIdentifiers): + * runtime/CommonIdentifiers.h: + * runtime/FunctionPrototype.cpp: + (JSC::FunctionPrototype::FunctionPrototype): + +2010-02-08 Gustavo Noronha Silva + + Build fix for make distcheck. + + * GNUmakefile.am: + +2010-02-08 Simon Hausmann + + Unreviewed RVCT build fix. + + Similar to r54391, don't import the cmath functions from std:: for RVCT. + + * wtf/MathExtras.h: + +2010-02-05 Gavin Barraclough + + Reviewed by Geoff Garen. + + Change UStringImpl::create to CRASH if the string cannot be allocated, + rather than returning a null string (which will behave like a zero-length + string if used). + + Also move createRep function from UString to become new overloaded + UStringImpl::create methods. In doing so, bring their behaviour closer to + being in line with WebCore::StringImpl, in removing the behaviour that they + can be used to produce null UStrings (ASSERT the char* provided is non-null). + This behaviour of converting null C-strings to null UStrings is inefficient + (cmompared to just using UString::null()), incompatible with WebCore::StringImpl's + behaviour, and may generate unexpected behaviour, since in many cases a null + UString can be used like an empty string. + + With these changes UStringImpl need not have a concept of null impls, we can + start transitioning this to become an implementation detail of UString, that + internally it chooses to use a null-object rather than an actually zero impl + pointer. + + * JavaScriptCore.exp: + * debugger/Debugger.cpp: + (JSC::Debugger::recompileAllJSFunctions): + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::calculatedFunctionName): + * parser/Parser.cpp: + (JSC::Parser::parse): + * profiler/Profile.cpp: + (JSC::Profile::Profile): + * profiler/ProfileGenerator.cpp: + (JSC::ProfileGenerator::stopProfiling): + * runtime/Error.cpp: + (JSC::Error::create): + (JSC::throwError): + * runtime/ExceptionHelpers.cpp: + (JSC::createError): + * runtime/Identifier.cpp: + (JSC::Identifier::add): + * runtime/PropertyNameArray.cpp: + (JSC::PropertyNameArray::add): + * runtime/UString.cpp: + (JSC::initializeUString): + (JSC::UString::UString): + (JSC::UString::operator=): + * runtime/UString.h: + (JSC::UString::isNull): + (JSC::UString::null): + (JSC::UString::rep): + (JSC::UString::UString): + * runtime/UStringImpl.cpp: + (JSC::UStringImpl::create): + * runtime/UStringImpl.h: + +2010-02-05 Kwang Yul Seo + + Reviewed by Eric Seidel. + + [BREWMP] Define SYSTEM_MALLOC 1 + https://bugs.webkit.org/show_bug.cgi?id=34640 + + Make BREWMP use system malloc because FastMalloc is not ported. + + * wtf/Platform.h: + +2010-02-05 Kwang Yul Seo + + Reviewed by Alexey Proskuryakov. + + Don't call CRASH() in fastMalloc and fastCalloc when the requested memory size is 0 + https://bugs.webkit.org/show_bug.cgi?id=34569 + + With USE_SYSTEM_MALLOC=1, fastMalloc and fastCalloc call CRASH() + if the return value of malloc and calloc is 0. + + However, these functions can return 0 when the request size is 0. + Libc manual says, "If size is 0, then malloc() returns either NULL, + or a unique pointer value that can later be successfully passed to free()." + Though malloc returns a unique pointer in most systems, + 0 can be returned in some systems. For instance, BREW's MALLOC returns 0 + when size is 0. + + If malloc or calloc returns 0 due to allocation size, increase the size + to 1 and try again. + + * wtf/FastMalloc.cpp: + (WTF::fastMalloc): + (WTF::fastCalloc): + +2010-02-04 Mark Rowe + + Reviewed by Timothy Hatcher. + + Build fix. Remove a symbol corresponding to an inline function from the linker export + file to prevent a weak external failure. + + * JavaScriptCore.xcodeproj/project.pbxproj: Accommodate rename of script. + +2010-02-04 Daniel Bates + + [Qt] Unreviewed, build fix for Qt bot. + + * runtime/JSStringBuilder.h: Changed #include notation #include "X.h". + +2010-02-04 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Clearing a WeakGCPtr is weird + https://bugs.webkit.org/show_bug.cgi?id=34627 + + Added a WeakGCPtr::clear interface. + + As discussed in https://bugs.webkit.org/show_bug.cgi?id=33383, the old + interface made it pretty weird for a client to conditionally clear a + WeakGCPtr, which is exactly what clients want to do when objects are + finalized. + + * API/JSClassRef.cpp: + (clearReferenceToPrototype): Use the new WeakGCPtr::clear() interface. + + * runtime/WeakGCPtr.h: + (JSC::WeakGCPtr::clear): Added an interface for clearing a WeakGCPtr, + iff its current value is the value passed in. It's cumbersome for the + client to do this test, since WeakGCPtr sometimes pretends to be null. + +2010-02-04 Geoffrey Garen + + Build fix: export a header. + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2010-02-04 Gavin Barraclough + + Reviewed by Oliver Hunt. + + Add a JSStringBuilder class (similar-to, and derived-from StringBuilder) to + construct JSStrings, throwing a JS exception should we run out of memory whilst + allocating storage for the string. + + Similarly, add jsMakeNontrivialString methods to use in cases where previously + we were calling makeString & passing the result to jsNontrivialString. Again, + these new methods throw if we hit an out of memory condition. + + Move throwOutOfMemoryError into ExceptionHelpers, to make it more widely available. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + (JSC::arrayProtoFuncToLocaleString): + (JSC::arrayProtoFuncJoin): + * runtime/DateConstructor.cpp: + (JSC::callDate): + * runtime/DatePrototype.cpp: + (JSC::dateProtoFuncToString): + (JSC::dateProtoFuncToUTCString): + (JSC::dateProtoFuncToGMTString): + * runtime/ErrorPrototype.cpp: + (JSC::errorProtoFuncToString): + * runtime/ExceptionHelpers.cpp: + (JSC::throwOutOfMemoryError): + * runtime/ExceptionHelpers.h: + * runtime/JSStringBuilder.h: Added. + (JSC::JSStringBuilder::releaseJSString): + (JSC::jsMakeNontrivialString): + * runtime/NumberPrototype.cpp: + (JSC::numberProtoFuncToPrecision): + * runtime/ObjectPrototype.cpp: + (JSC::objectProtoFuncToString): + * runtime/Operations.cpp: + * runtime/Operations.h: + * runtime/RegExpPrototype.cpp: + (JSC::regExpProtoFuncToString): + * runtime/StringBuilder.h: + (JSC::StringBuilder::append): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncBig): + (JSC::stringProtoFuncSmall): + (JSC::stringProtoFuncBlink): + (JSC::stringProtoFuncBold): + (JSC::stringProtoFuncFixed): + (JSC::stringProtoFuncItalics): + (JSC::stringProtoFuncStrike): + (JSC::stringProtoFuncSub): + (JSC::stringProtoFuncSup): + (JSC::stringProtoFuncFontcolor): + (JSC::stringProtoFuncFontsize): + (JSC::stringProtoFuncAnchor): + +2010-02-04 Steve Falkenburg + + Windows build fix. + + * wtf/MathExtras.h: + +2010-02-04 Darin Adler + + Reviewed by David Levin. + + Make MathExtras.h compatible with + https://bugs.webkit.org/show_bug.cgi?id=34618 + + * wtf/MathExtras.h: Include instead of . + Use "using" as we do elsewhere in WTF for the four functions from + we want to use without the prefix. Later we could consider making the std + explicit at call sites instead. + +2010-02-04 Tamas Szirbucz + + Reviewed by Gavin Barraclough. + + Use an easily appendable structure for trampolines instead of pointer parameters. + https://bugs.webkit.org/show_bug.cgi?id=34424 + + * assembler/ARMAssembler.cpp: + (JSC::ARMAssembler::executableCopy): + * jit/JIT.h: + (JSC::JIT::compileCTIMachineTrampolines): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITStubs.cpp: + (JSC::JITThunks::JITThunks): + * jit/JITStubs.h: + (JSC::JITThunks::ctiStringLengthTrampoline): + (JSC::JITThunks::ctiVirtualCallLink): + (JSC::JITThunks::ctiVirtualCall): + (JSC::JITThunks::ctiNativeCallThunk): + +2010-02-04 Jedrzej Nowacki + + Reviewed by Simon Hausmann. + + Increase test coverage for the QScriptValue. + + https://bugs.webkit.org/show_bug.cgi?id=34533 + + * qt/tests/qscriptvalue/qscriptvalue.pro: + * qt/tests/qscriptvalue/tst_qscriptvalue.cpp: + (tst_QScriptValue::tst_QScriptValue): + (tst_QScriptValue::~tst_QScriptValue): + (tst_QScriptValue::dataHelper): + (tst_QScriptValue::newRow): + (tst_QScriptValue::testHelper): + (tst_QScriptValue::ctor): + * qt/tests/qscriptvalue/tst_qscriptvalue.h: Added. + * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: Added. + (tst_QScriptValue::initScriptValues): + (tst_QScriptValue::isValid_initData): + (tst_QScriptValue::isValid_makeData): + (tst_QScriptValue::isValid_test): + (tst_QScriptValue::isBool_initData): + (tst_QScriptValue::isBool_makeData): + (tst_QScriptValue::isBool_test): + (tst_QScriptValue::isBoolean_initData): + (tst_QScriptValue::isBoolean_makeData): + (tst_QScriptValue::isBoolean_test): + (tst_QScriptValue::isFunction_initData): + (tst_QScriptValue::isFunction_makeData): + (tst_QScriptValue::isFunction_test): + (tst_QScriptValue::isNull_initData): + (tst_QScriptValue::isNull_makeData): + (tst_QScriptValue::isNull_test): + (tst_QScriptValue::isString_initData): + (tst_QScriptValue::isString_makeData): + (tst_QScriptValue::isString_test): + (tst_QScriptValue::isUndefined_initData): + (tst_QScriptValue::isUndefined_makeData): + (tst_QScriptValue::isUndefined_test): + (tst_QScriptValue::isObject_initData): + (tst_QScriptValue::isObject_makeData): + (tst_QScriptValue::isObject_test): + +2010-02-03 Kwang Yul Seo + + Reviewed by Eric Seidel. + + [BREWMP] Define WTF_PLATFORM_BREWMP_SIMULATOR when AEE_SIMULATOR is defined + https://bugs.webkit.org/show_bug.cgi?id=34514 + + PLATFORM(BREWMP_SIMULATOR) guard is needed to make distinction between BREWMP + and BREWMP simulator. + + * wtf/Platform.h: + +2010-02-03 Kwang Yul Seo + + Reviewed by Eric Seidel. + + [BREWMP] Remove COMPILE_ASSERT conflict with the underlying PLATFORM + https://bugs.webkit.org/show_bug.cgi?id=34190 + + COMPILE_ASSERT conflicts with the underlying PLATFORM because it is defined + both in WTF's Assertions.h and BREWMP's AEEClassIDs.h. Include AEEClassIDs.h + in Assertions.h and undef COMPILE_ASSERT to avoid redefining COMPILE_ASSERT. + + * wtf/Assertions.h: + +2010-02-03 Kwang Yul Seo + + Reviewed by Eric Seidel. + + [BREWMP] Implement OwnPtrBrew to make sure BREW instances are freed. + https://bugs.webkit.org/show_bug.cgi?id=34518 + + Add OwnPtrBrew to release IFile, IFileMgr and IBitmap instances. + + * wtf/brew/OwnPtrBrew.cpp: Added. + (WTF::IFileMgr): + (WTF::IFile): + (WTF::IBitmap): + (WTF::freeOwnedPtrBrew): + * wtf/brew/OwnPtrBrew.h: Added. + (WTF::OwnPtrBrew::OwnPtrBrew): + (WTF::OwnPtrBrew::~OwnPtrBrew): + (WTF::OwnPtrBrew::get): + (WTF::OwnPtrBrew::release): + (WTF::OwnPtrBrew::outPtr): + (WTF::OwnPtrBrew::set): + (WTF::OwnPtrBrew::clear): + (WTF::OwnPtrBrew::operator*): + (WTF::OwnPtrBrew::operator->): + (WTF::OwnPtrBrew::operator!): + (WTF::OwnPtrBrew::operator UnspecifiedBoolType): + (WTF::OwnPtrBrew::swap): + (WTF::swap): + (WTF::operator==): + (WTF::operator!=): + (WTF::getPtr): + +2010-02-03 Kwang Yul Seo + + Reviewed by Darin Adler. + + Export WTF::fastStrDup symbol + https://bugs.webkit.org/show_bug.cgi?id=34526 + + * JavaScriptCore.exp: + +2010-02-03 Kevin Watters + + Reviewed by Kevin Ollivier. + + [wx] Enable JIT compilation for wx. + + https://bugs.webkit.org/show_bug.cgi?id=34536 + + * wtf/Platform.h: + +2010-02-02 Oliver Hunt + + Reviewed by Geoffrey Garen. + + Crash in CollectorBitmap::get at nbcolympics.com + https://bugs.webkit.org/show_bug.cgi?id=34504 + + This was caused by the use of m_offset to determine the offset of + a new property into the property storage. This patch corrects + the effected cases by incorporating the anonymous slot count. It + also removes the duplicate copy of anonymous slot count from the + property table as keeping this up to date merely increased the + chance of a mismatch. Finally I've added a large number of + assertions in an attempt to prevent such a bug from happening + again. + + With the new assertions in place the existing anonymous slot tests + all fail without the m_offset fixes. + + * runtime/PropertyMapHashTable.h: + * runtime/Structure.cpp: + (JSC::Structure::materializePropertyMap): + (JSC::Structure::addPropertyTransitionToExistingStructure): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::removePropertyTransition): + (JSC::Structure::flattenDictionaryStructure): + (JSC::Structure::addPropertyWithoutTransition): + (JSC::Structure::removePropertyWithoutTransition): + (JSC::Structure::copyPropertyTable): + (JSC::Structure::get): + (JSC::Structure::put): + (JSC::Structure::remove): + (JSC::Structure::insertIntoPropertyMapHashTable): + (JSC::Structure::createPropertyMapHashTable): + (JSC::Structure::rehashPropertyMapHashTable): + (JSC::Structure::checkConsistency): + +2010-02-02 Steve Falkenburg + + Reviewed by Darin Adler. + + Copyright year updating for Windows version resources should be automatic + https://bugs.webkit.org/show_bug.cgi?id=34503 + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: + +2010-02-02 Kwang Yul Seo + + Reviewed by Eric Seidel. + + [BREWMP] Add dummy main thread functions + https://bugs.webkit.org/show_bug.cgi?id=33569 + + Add dummy initializeMainThreadPlatform and + scheduleDispatchFunctionsOnMainThread. + + * wtf/brew/MainThreadBrew.cpp: Added. + (WTF::initializeMainThreadPlatform): + (WTF::scheduleDispatchFunctionsOnMainThread): + +2010-02-02 Kwang Yul Seo + + Reviewed by Darin Adler. + + Add using WTF::getLocalTime to CurrentTime.h + https://bugs.webkit.org/show_bug.cgi?id=34493 + + * wtf/CurrentTime.h: + +2010-02-02 Kwang Yul Seo + + Reviewed by Eric Seidel. + + [BREWMP] Add HAVE_XXX definitions + https://bugs.webkit.org/show_bug.cgi?id=34414 + + Add HAVE_ERRNO_H=1 + + * wtf/Platform.h: + +2010-02-02 Kwang Yul Seo + + Reviewed by Eric Seidel. + + [BREWMP] Don't define HAVE_TM_GMTOFF, HAVE_TM_ZONE and HAVE_TIMEGM + https://bugs.webkit.org/show_bug.cgi?id=34388 + + BREWMP does not have these features. + + * wtf/Platform.h: + +2010-02-02 Kwang Yul Seo + + Reviewed by Eric Seidel. + + [BREWMP] Define WTF_PLATFORM_BREWMP=1 when BUILDING_BREWMP is defined + https://bugs.webkit.org/show_bug.cgi?id=34386 + + Define WTF_PLATFORM_BREWMP=1 so that PLATFORM(BREWMP) guard can be used. + + * wtf/Platform.h: + +2010-02-01 Kent Tamura + + Reviewed by Darin Adler. + + Date.UTC() should apply TimeClip operation. + https://bugs.webkit.org/show_bug.cgi?id=34461 + + ECMAScript 5 15.9.4.3: + > 9 Return TimeClip(MakeDate(MakeDay(yr, m, dt), MakeTime(h, min, s, milli))). + + * runtime/DateConstructor.cpp: + (JSC::dateUTC): Calls WTF::timeClip(). + +2010-02-01 Kent Tamura + + Reviewed by Darin Adler. + + Fix a bug that Math.round() retunrs incorrect results for huge integers + https://bugs.webkit.org/show_bug.cgi?id=34462 + + * runtime/MathObject.cpp: + (JSC::mathProtoFuncRound): Avoid "arg + 0.5". + +2010-02-01 Kwang Yul Seo + + Reviewed by Eric Seidel. + + [BREWMP] Port WTF's currentTime + https://bugs.webkit.org/show_bug.cgi?id=33567 + + Combine GETUTCSECONDS and GETTIMEMS to calculate the number + of milliseconds since 1970/01/01 00:00:00 UTC. + + * wtf/CurrentTime.cpp: + (WTF::currentTime): + +2010-02-01 Patrick Gansterer + + Reviewed by Darin Adler. + + [Qt] WinCE buildfix after r52729 and fix for Q_BIG_ENDIAN typo. + https://bugs.webkit.org/show_bug.cgi?id=34378 + + * wtf/Platform.h: + +2010-02-01 Oliver Hunt + + Reviewed by Gavin Barraclough. + + Structure not accounting for anonymous slots when computing property storage size + https://bugs.webkit.org/show_bug.cgi?id=34441 + + Previously any Structure with anonymous storage would have a property map, so we + were only including anonymous slot size if there was a property map. Given this + is no longer the case we should always include the anonymous slot count in the + property storage size. + + * runtime/Structure.h: + (JSC::Structure::propertyStorageSize): + +2010-02-01 Oliver Hunt + + Windows build fix, update exports file (again) + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-02-01 Oliver Hunt + + Windows build fix, update exports file + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-01-31 Oliver Hunt + + Reviewed by Maciej Stachowiak. + + JSC is failing to propagate anonymous slot count on some transitions + https://bugs.webkit.org/show_bug.cgi?id=34321 + + Remove secondary Structure constructor, and make Structure store a copy + of the number of anonymous slots directly so saving an immediate allocation + of a property map for all structures with anonymous storage, which also + avoids the leaked property map on new property transition in the original + version of this patch. + + We need to propagate the the anonymous slot count otherwise we can end up + with a structure recording incorrect information about the available and + needed space for property storage, or alternatively incorrectly reusing + some slots. + + * JavaScriptCore.exp: + * runtime/Structure.cpp: + (JSC::Structure::Structure): + (JSC::Structure::materializePropertyMap): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::changePrototypeTransition): + (JSC::Structure::despecifyFunctionTransition): + (JSC::Structure::getterSetterTransition): + (JSC::Structure::toDictionaryTransition): + (JSC::Structure::flattenDictionaryStructure): + (JSC::Structure::copyPropertyTable): + (JSC::Structure::put): + (JSC::Structure::remove): + (JSC::Structure::insertIntoPropertyMapHashTable): + (JSC::Structure::createPropertyMapHashTable): + * runtime/Structure.h: + (JSC::Structure::create): + (JSC::Structure::hasAnonymousSlots): + (JSC::Structure::anonymousSlotCount): + +2010-01-31 Patrick Gansterer + + Reviewed by Darin Adler. + + Buildfix for WinCE + style fixes (TLS_OUT_OF_INDEXES is not defined). + https://bugs.webkit.org/show_bug.cgi?id=34380 + + * wtf/ThreadSpecific.h: + +2010-01-31 Kent Tamura + + Reviewed by Darin Adler. + + [Windows] Fix a bug of round() with huge integral numbers + https://bugs.webkit.org/show_bug.cgi?id=34297 + + Fix a bug that round() for huge integral numbers returns incorrect + results. For example, round(8639999913600001) returns + 8639999913600002 without this change though the double type can + represent 8639999913600001 precisely. + + Math.round() of JavaScript has a similar problem. But this change + doesn't fix it because Math.round() doesn't use round() of + MathExtra.h. + + * wtf/MathExtras.h: + (round): Avoid to do "num + 0.5" or "num - 0.5". + (roundf): Fixed similarly. + (llround): Calls round(). + (llroundf): Calls roundf(). + (lround): Calls round(). + (lroundf): Calls roundf(). + +2010-01-29 Mark Rowe + + Sort Xcode projects. + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2010-01-29 Mark Rowe + + Fix the Mac build. + + Disable ENABLE_INDEXED_DATABASE since it is "completely non-functional". + + As the comment in FeatureDefines.xcconfig notes, the list of feature defines + needs to be kept in sync across the various files. The default values also + need to be kept in sync between these files and build-webkit. + + * Configurations/FeatureDefines.xcconfig: + +2010-01-29 Simon Hausmann + + Rubber-stamped by Maciej Stachowiak. + + Fix the ARM build. + + * runtime/JSNumberCell.h: + (JSC::JSNumberCell::createStructure): Call the right Structure::create overload. + +2010-01-28 Kevin Ollivier + + [wx] Build fix for MSW, use ThreadingWin.cpp as the Windows pthreads implementation + implements pthread_t in a way that makes it impossible to check its validity, + which is needed by ThreadingPthreads.cpp. + + * wscript: + +2010-01-28 Oliver Hunt + + Reviewed by Gavin Barraclough. + + DOM Objects shouldn't all require custom mark functions + https://bugs.webkit.org/show_bug.cgi?id=34291 + + Make getAnonymousValue const-friendly + + * runtime/JSObject.h: + (JSC::JSObject::getAnonymousValue): + +2010-01-28 Oliver Hunt + + Reviewed by Gavin Barraclough. + + Simplify anonymous slot implementation + https://bugs.webkit.org/show_bug.cgi?id=34282 + + A class must now specify the number of slots it needs at construction time + rather than later on with a transition. This makes many things simpler, + we no longer need to need an additional transition on object creation to + add the anonymous slots, and we remove the need for a number of transition + type checks. + + * API/JSCallbackConstructor.h: + (JSC::JSCallbackConstructor::createStructure): + * API/JSCallbackFunction.h: + (JSC::JSCallbackFunction::createStructure): + * API/JSCallbackObject.h: + (JSC::JSCallbackObject::createStructure): + * JavaScriptCore.exp: + * debugger/DebuggerActivation.h: + (JSC::DebuggerActivation::createStructure): + * runtime/Arguments.h: + (JSC::Arguments::createStructure): + * runtime/BooleanObject.h: + (JSC::BooleanObject::createStructure): + * runtime/DateInstance.h: + (JSC::DateInstance::createStructure): + * runtime/DatePrototype.h: + (JSC::DatePrototype::createStructure): + * runtime/FunctionPrototype.h: + (JSC::FunctionPrototype::createStructure): + * runtime/GetterSetter.h: + (JSC::GetterSetter::createStructure): + * runtime/GlobalEvalFunction.h: + (JSC::GlobalEvalFunction::createStructure): + * runtime/InternalFunction.h: + (JSC::InternalFunction::createStructure): + * runtime/JSAPIValueWrapper.h: + (JSC::JSAPIValueWrapper::createStructure): + * runtime/JSActivation.h: + (JSC::JSActivation::createStructure): + * runtime/JSArray.h: + (JSC::JSArray::createStructure): + * runtime/JSByteArray.cpp: + (JSC::JSByteArray::createStructure): + * runtime/JSCell.h: + (JSC::JSCell::createDummyStructure): + * runtime/JSFunction.h: + (JSC::JSFunction::createStructure): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::createStructure): + * runtime/JSNotAnObject.h: + (JSC::JSNotAnObject::createStructure): + * runtime/JSONObject.h: + (JSC::JSONObject::createStructure): + * runtime/JSObject.h: + (JSC::JSObject::createStructure): + (JSC::JSObject::putAnonymousValue): + (JSC::JSObject::getAnonymousValue): + * runtime/JSPropertyNameIterator.h: + (JSC::JSPropertyNameIterator::createStructure): + * runtime/JSStaticScopeObject.h: + (JSC::JSStaticScopeObject::createStructure): + * runtime/JSString.h: + (JSC::Fiber::createStructure): + * runtime/JSVariableObject.h: + (JSC::JSVariableObject::createStructure): + * runtime/JSWrapperObject.h: + (JSC::JSWrapperObject::createStructure): + (JSC::JSWrapperObject::JSWrapperObject): + * runtime/MathObject.h: + (JSC::MathObject::createStructure): + * runtime/NumberConstructor.h: + (JSC::NumberConstructor::createStructure): + * runtime/NumberObject.h: + (JSC::NumberObject::createStructure): + * runtime/RegExpConstructor.h: + (JSC::RegExpConstructor::createStructure): + * runtime/RegExpObject.h: + (JSC::RegExpObject::createStructure): + * runtime/StringObject.h: + (JSC::StringObject::createStructure): + * runtime/StringObjectThatMasqueradesAsUndefined.h: + (JSC::StringObjectThatMasqueradesAsUndefined::createStructure): + * runtime/Structure.cpp: + (JSC::Structure::~Structure): + (JSC::Structure::materializePropertyMap): + * runtime/Structure.h: + (JSC::Structure::create): + (JSC::Structure::anonymousSlotCount): + * runtime/StructureTransitionTable.h: + +2010-01-27 Oliver Hunt + + Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-01-27 Oliver Hunt + + Reviewed by Maciej Stachowiak. + + MessageEvent.data should deserialize in the context of the MessageEvent's global object + https://bugs.webkit.org/show_bug.cgi?id=34227 + + Add logic to allow us to create an Object, Array, or Date instance + so we can create them in the context of a specific global object, + rather than just using the current lexical global object. + + * JavaScriptCore.exp: + * runtime/DateInstance.cpp: + (JSC::DateInstance::DateInstance): + * runtime/DateInstance.h: + * runtime/JSGlobalObject.h: + (JSC::constructEmptyObject): + (JSC::constructEmptyArray): + +2010-01-27 Alexey Proskuryakov + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=34150 + WebKit needs a mechanism to catch stale HashMap entries + + It is very difficult to catch stale pointers that are HashMap keys - since a pointer's hash + is just its value, it is very unlikely that any observable problem is reproducible. + + This extends hash table consistency checks to check that pointers are referencing allocated + memory blocks, and makes it possible to invoke the checks explicitly (it is not feasible + to enable CHECK_HASHTABLE_CONSISTENCY by default, because that affects performance too much). + + * wtf/HashMap.h: (WTF::::checkConsistency): Call through to HashTable implementation. We can + add similar calls to HashSet and HashCountedSet, but I haven't seen hard to debug problems + with those yet. + + * wtf/HashSet.h: (WTF::::remove): The version of checkTableConsistency that's guarded by + CHECK_HASHTABLE_CONSISTENCY is now called internalCheckTableConsistency(). + + * wtf/HashTable.h: + (WTF::HashTable::internalCheckTableConsistency): + (WTF::HashTable::internalCheckTableConsistencyExceptSize): + (WTF::HashTable::checkTableConsistencyExceptSize): + Expose checkTableConsistency() even if CHECK_HASHTABLE_CONSISTENCY is off. + (WTF::::add): Updated for checkTableConsistency renaming. + (WTF::::addPassingHashCode): Ditto. + (WTF::::removeAndInvalidate): Ditto. + (WTF::::remove): Ditto. + (WTF::::rehash): Ditto. + (WTF::::checkTableConsistency): The assertion for !shouldExpand() was not correct - this + function returns true for tables with m_table == 0. + (WTF::::checkTableConsistencyExceptSize): Call checkValueConsistency for key. Potentially, + we could do the same for values. + + * wtf/HashTraits.h: + (WTF::GenericHashTraits::checkValueConsistency): An empty function that can be overridden + to add checks. Currently, the only override is for pointer hashes. + + * wtf/RefPtrHashMap.h: (WTF::::remove): Updated for checkTableConsistency renaming. + +2010-01-27 Anton Muhin + + Reviewed by Darin Adler. + + Remove trailing \ from inline function code + https://bugs.webkit.org/show_bug.cgi?id=34223 + + * assembler/ARMv7Assembler.h: + (JSC::ARMThumbImmediate::countLeadingZerosPartial): + +2010-01-27 Kwang Yul Seo + + Reviewed by Eric Seidel. + + [BREWMP] Port WTF's randomNumber + https://bugs.webkit.org/show_bug.cgi?id=33566 + + Use GETRAND to generate 4 byte random byte sequence to implement + weakRandomNumber. Create a secure random number generator with + AEECLSID_RANDOM to implement randomNumber. + + * wtf/RandomNumber.cpp: + (WTF::weakRandomNumber): + (WTF::randomNumber): + +2010-01-27 Kwang Yul Seo + + Reviewed by Eric Seidel. + + [BREWMP] Port getCPUTime + https://bugs.webkit.org/show_bug.cgi?id=33572 + + Use GETUPTIMEMS which returns a continuously and + linearly increasing millisecond timer from the time the device + was powered on. This function is enough to implement getCPUTime. + + * runtime/TimeoutChecker.cpp: + (JSC::getCPUTime): + +2010-01-27 Kwang Yul Seo + + Reviewed by Oliver Hunt. + + [BREWMP] Add MarkStack fastMalloc implementation for platforms without VirtualAlloc or mmap. + https://bugs.webkit.org/show_bug.cgi?id=33582 + + Use fastMalloc and fastFree to implement MarkStack::allocateStack and + MarkStack::releaseStack for platforms without page level allocation. + + * runtime/MarkStack.h: + (JSC::MarkStack::MarkStackArray::shrinkAllocation): + * runtime/MarkStackNone.cpp: Added. + (JSC::MarkStack::initializePagesize): + (JSC::MarkStack::allocateStack): + (JSC::MarkStack::releaseStack): + +2010-01-27 Kwang Yul Seo + + Reviewed by Eric Seidel. + + [BREWMP] Don't use time function + https://bugs.webkit.org/show_bug.cgi?id=33577 + + Calling time(0) in BREW devices causes a crash because time + is not properly ported in most devices. Cast currentTime() to + time_t to get the same result as time(0). + + * wtf/DateMath.cpp: + (WTF::calculateUTCOffset): + +2010-01-27 Alexey Proskuryakov + + Revert r53899 (HashMap key checks) and subsequent build fixes, + because they make SVG tests crash in release builds. + + * wtf/HashMap.h: + (WTF::::remove): + * wtf/HashSet.h: + (WTF::::remove): + * wtf/HashTable.h: + (WTF::::add): + (WTF::::addPassingHashCode): + (WTF::::removeAndInvalidate): + (WTF::::remove): + (WTF::::rehash): + (WTF::::checkTableConsistency): + (WTF::::checkTableConsistencyExceptSize): + * wtf/HashTraits.h: + (WTF::GenericHashTraits::emptyValue): + (WTF::): + * wtf/RefPtrHashMap.h: + (WTF::::remove): + +2010-01-26 Alexey Proskuryakov + + More Windows build fixing. + + * wtf/HashTraits.h: _msize takes void*, remove const qualifier from type. + +2010-01-26 Alexey Proskuryakov + + Windows build fix. + + * wtf/HashTraits.h: Include malloc.h for _msize(). + +2010-01-26 Alexey Proskuryakov + + Build fix. + + * wtf/HashTable.h: (WTF::HashTable::checkTableConsistencyExceptSize): Remove const from a + static (empty) version of this function. + +2010-01-26 Alexey Proskuryakov + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=34150 + WebKit needs a mechanism to catch stale HashMap entries + + It is very difficult to catch stale pointers that are HashMap keys - since a pointer's hash + is just its value, it is very unlikely that any observable problem is reproducible. + + This extends hash table consistency checks to check that pointers are referencing allocated + memory blocks, and makes it possible to invoke the checks explicitly (it is not feasible + to enable CHECK_HASHTABLE_CONSISTENCY by default, because that affects performance too much). + + * wtf/HashMap.h: (WTF::::checkConsistency): Call through to HashTable implementation. We can + add similar calls to HashSet and HashCountedSet, but I haven't seen hard to debug problems + with those yet. + + * wtf/HashSet.h: (WTF::::remove): The version of checkTableConsistency that's guarded by + CHECK_HASHTABLE_CONSISTENCY is now called internalCheckTableConsistency(). + + * wtf/HashTable.h: + (WTF::HashTable::internalCheckTableConsistency): + (WTF::HashTable::internalCheckTableConsistencyExceptSize): + (WTF::HashTable::checkTableConsistencyExceptSize): + Expose checkTableConsistency() even if CHECK_HASHTABLE_CONSISTENCY is off. + (WTF::::add): Updated for checkTableConsistency renaming. + (WTF::::addPassingHashCode): Ditto. + (WTF::::removeAndInvalidate): Ditto. + (WTF::::remove): Ditto. + (WTF::::rehash): Ditto. + (WTF::::checkTableConsistency): The assertion for !shouldExpand() was not correct - this + function returns true for tables with m_table == 0. + (WTF::::checkTableConsistencyExceptSize): Call checkValueConsistency for key. Potentially, + we could do the same for values. + + * wtf/HashTraits.h: + (WTF::GenericHashTraits::checkValueConsistency): An empty function that can be overridden + to add checks. Currently, the only override is for pointer hashes. + + * wtf/RefPtrHashMap.h: (WTF::::remove): Updated for checkTableConsistency renaming. + +2010-01-26 Lyon Chen + + Reviewed by Maciej Stachowiak. + + Opcode.h use const void* for Opcode cause error #1211 for RVCT compiler + https://bugs.webkit.org/show_bug.cgi?id=33902 + + * bytecode/Opcode.h: + +2010-01-26 Steve Falkenburg + + Reviewed by Oliver Hunt. + + Windows build references non-existent include paths + https://bugs.webkit.org/show_bug.cgi?id=34175 + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: + * JavaScriptCore.vcproj/testapi/testapi.vcproj: + * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: + +2010-01-26 Oliver Hunt + + Reviewed by Geoffrey Garen. + + Using JavaScriptCore API with a webkit vended context can result in slow script dialog + https://bugs.webkit.org/show_bug.cgi?id=34172 + + Make the APIShim correctly increment and decrement the timeout + entry counter. + + * API/APIShims.h: + (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): + (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock): + (JSC::APICallbackShim::APICallbackShim): + (JSC::APICallbackShim::~APICallbackShim): + +2010-01-26 Simon Hausmann + + [Qt] Fix compilation of QtScript with non-gcc compilers + + Variable length stack arrays are a gcc extension. Use QVarLengthArray + as a more portable solution that still tries to allocate on the stack + first. + + * qt/api/qscriptvalue_p.h: + (QScriptValuePrivate::call): + +2010-01-26 Simon Hausmann + + Reviewed by Tor Arne Vestbø. + + [Qt] Fix the build on platforms without JIT support. + + The JIT support should be determined at compile-time via wtf/Platform.h + + * qt/api/QtScript.pro: + +2010-01-26 Jedrzej Nowacki + + Reviewed by Simon Hausmann. + + First steps of the QtScript API. + + Two new classes were created; QScriptEngine and QScriptValue. + The first should encapsulate a javascript context and the second a script + value. + + This API is still in development, so it isn't compiled by default. + To trigger compilation, pass --qmakearg="CONFIG+=build-qtscript" to + build-webkit. + + https://bugs.webkit.org/show_bug.cgi?id=32565 + + * qt/api/QtScript.pro: Added. + * qt/api/qscriptconverter_p.h: Added. + (QScriptConverter::toString): + * qt/api/qscriptengine.cpp: Added. + (QScriptEngine::QScriptEngine): + (QScriptEngine::~QScriptEngine): + (QScriptEngine::evaluate): + (QScriptEngine::collectGarbage): + * qt/api/qscriptengine.h: Added. + * qt/api/qscriptengine_p.cpp: Added. + (QScriptEnginePrivate::QScriptEnginePrivate): + (QScriptEnginePrivate::~QScriptEnginePrivate): + (QScriptEnginePrivate::evaluate): + * qt/api/qscriptengine_p.h: Added. + (QScriptEnginePrivate::get): + (QScriptEnginePrivate::collectGarbage): + (QScriptEnginePrivate::makeJSValue): + (QScriptEnginePrivate::context): + * qt/api/qscriptvalue.cpp: Added. + (QScriptValue::QScriptValue): + (QScriptValue::~QScriptValue): + (QScriptValue::isValid): + (QScriptValue::isBool): + (QScriptValue::isBoolean): + (QScriptValue::isNumber): + (QScriptValue::isNull): + (QScriptValue::isString): + (QScriptValue::isUndefined): + (QScriptValue::isError): + (QScriptValue::isObject): + (QScriptValue::isFunction): + (QScriptValue::toString): + (QScriptValue::toNumber): + (QScriptValue::toBool): + (QScriptValue::toBoolean): + (QScriptValue::toInteger): + (QScriptValue::toInt32): + (QScriptValue::toUInt32): + (QScriptValue::toUInt16): + (QScriptValue::call): + (QScriptValue::engine): + (QScriptValue::operator=): + (QScriptValue::equals): + (QScriptValue::strictlyEquals): + * qt/api/qscriptvalue.h: Added. + (QScriptValue::): + * qt/api/qscriptvalue_p.h: Added. + (QScriptValuePrivate::): + (QScriptValuePrivate::get): + (QScriptValuePrivate::QScriptValuePrivate): + (QScriptValuePrivate::isValid): + (QScriptValuePrivate::isBool): + (QScriptValuePrivate::isNumber): + (QScriptValuePrivate::isNull): + (QScriptValuePrivate::isString): + (QScriptValuePrivate::isUndefined): + (QScriptValuePrivate::isError): + (QScriptValuePrivate::isObject): + (QScriptValuePrivate::isFunction): + (QScriptValuePrivate::toString): + (QScriptValuePrivate::toNumber): + (QScriptValuePrivate::toBool): + (QScriptValuePrivate::toInteger): + (QScriptValuePrivate::toInt32): + (QScriptValuePrivate::toUInt32): + (QScriptValuePrivate::toUInt16): + (QScriptValuePrivate::equals): + (QScriptValuePrivate::strictlyEquals): + (QScriptValuePrivate::assignEngine): + (QScriptValuePrivate::call): + (QScriptValuePrivate::engine): + (QScriptValuePrivate::context): + (QScriptValuePrivate::value): + (QScriptValuePrivate::object): + (QScriptValuePrivate::inherits): + (QScriptValuePrivate::isJSBased): + (QScriptValuePrivate::isNumberBased): + (QScriptValuePrivate::isStringBased): + * qt/api/qtscriptglobal.h: Added. + * qt/tests/qscriptengine/qscriptengine.pro: Added. + * qt/tests/qscriptengine/tst_qscriptengine.cpp: Added. + (tst_QScriptEngine::tst_QScriptEngine): + (tst_QScriptEngine::~tst_QScriptEngine): + (tst_QScriptEngine::init): + (tst_QScriptEngine::cleanup): + (tst_QScriptEngine::collectGarbage): + (tst_QScriptEngine::evaluate): + * qt/tests/qscriptvalue/qscriptvalue.pro: Added. + * qt/tests/qscriptvalue/tst_qscriptvalue.cpp: Added. + (tst_QScriptValue::tst_QScriptValue): + (tst_QScriptValue::~tst_QScriptValue): + (tst_QScriptValue::init): + (tst_QScriptValue::cleanup): + (tst_QScriptValue::ctor): + (tst_QScriptValue::toString_data): + (tst_QScriptValue::toString): + (tst_QScriptValue::copyConstructor_data): + (tst_QScriptValue::copyConstructor): + (tst_QScriptValue::assignOperator_data): + (tst_QScriptValue::assignOperator): + (tst_QScriptValue::dataSharing): + (tst_QScriptValue::constructors_data): + (tst_QScriptValue::constructors): + (tst_QScriptValue::call): + * qt/tests/tests.pri: Added. + * qt/tests/tests.pro: Added. + +2010-01-25 Dmitry Titov + + Reviewed by David Levin. + + Fix Chromium Linux tests: the pthread functions on Linux produce segfault if they receive 0 thread handle. + After r53714, we can have 0 thread handles passed to pthread_join and pthread_detach if corresponding threads + were already terminated and their threadMap entries cleared. + Add a 0 check. + + * wtf/ThreadingPthreads.cpp: + (WTF::waitForThreadCompletion): + (WTF::detachThread): + +2010-01-24 Laszlo Gombos + + Reviewed by Maciej Stachowiak. + + Refactor JITStubs.cpp so that DEFINE_STUB_FUNCTION is only used once for each function + https://bugs.webkit.org/show_bug.cgi?id=33866 + + Place the guard USE(JSVALUE32_64) inside the body of the DEFINE_STUB_FUNCTION + macro for those functions that are always present. + + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + +2010-01-22 Kevin Watters + + Reviewed by Kevin Ollivier. + + [wx] Remove the Bakefile build system, which is no longer being used. + + https://bugs.webkit.org/show_bug.cgi?id=34022 + + * JavaScriptCoreSources.bkl: Removed. + * jscore.bkl: Removed. + +2010-01-22 Steve Falkenburg + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=34025 + Enable client-based Geolocation abstraction for Mac, Windows AppleWebKit targets. + + * Configurations/FeatureDefines.xcconfig: + +2010-01-22 Dmitry Titov + + Not reviewed, attempted Snow Leopard build fix. + + * wtf/ThreadingPthreads.cpp: Add a forward declaration of a function which is not 'static'. + +2009-01-22 Dmitry Titov + + Reviewed by Maciej Stachowiak. + + Fix the leak of ThreadIdentifiers in threadMap across threads. + https://bugs.webkit.org/show_bug.cgi?id=32689 + + Test is added to DumpRenderTree.mm. + + * Android.mk: Added file ThreadIdentifierDataPthreads.(h|cpp) to build. + * Android.v8.wtf.mk: Ditto. + * GNUmakefile.am: Ditto. + * JavaScriptCore.gyp/JavaScriptCore.gyp: Ditto. + * JavaScriptCore.gypi: Ditto. + * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. + + * wtf/ThreadIdentifierDataPthreads.cpp: Added. Contains custom implementation of thread-specific data that uses custom destructor. + (WTF::ThreadIdentifierData::~ThreadIdentifierData): Removes the ThreadIdentifier from the threadMap. + (WTF::ThreadIdentifierData::identifier): + (WTF::ThreadIdentifierData::initialize): + (WTF::ThreadIdentifierData::destruct): Custom thread-specific destructor. Resets the value for the key again to cause second invoke. + (WTF::ThreadIdentifierData::initializeKeyOnceHelper): + (WTF::ThreadIdentifierData::initializeKeyOnce): Need to use pthread_once since initialization may come on any thread(s). + * wtf/ThreadIdentifierDataPthreads.h: Added. + (WTF::ThreadIdentifierData::ThreadIdentifierData): + + * wtf/Threading.cpp: + (WTF::threadEntryPoint): Move initializeCurrentThreadInternal to after the lock to make + sure it is invoked when ThreadIdentifier is already established. + + * wtf/Threading.h: Rename setThreadNameInternal -> initializeCurrentThreadInternal since it does more then only set the name now. + * wtf/ThreadingNone.cpp: + (WTF::initializeCurrentThreadInternal): Ditto. + * wtf/ThreadingWin.cpp: + (WTF::initializeCurrentThreadInternal): Ditto. + (WTF::initializeThreading): Ditto. + * wtf/gtk/ThreadingGtk.cpp: + (WTF::initializeCurrentThreadInternal): Ditto. + * wtf/qt/ThreadingQt.cpp: + (WTF::initializeCurrentThreadInternal): Ditto. + + * wtf/ThreadingPthreads.cpp: + (WTF::establishIdentifierForPthreadHandle): + (WTF::clearPthreadHandleForIdentifier): Make it not 'static' so the ~ThreadIdentifierData() in another file can call it. + (WTF::initializeCurrentThreadInternal): Set the thread-specific data. The ThreadIdentifier is already established by creating thread. + (WTF::waitForThreadCompletion): Remove call to clearPthreadHandleForIdentifier(threadID) since it is now done in ~ThreadIdentifierData(). + (WTF::detachThread): Ditto. + (WTF::currentThread): Use the thread-specific data to get the ThreadIdentifier. It's many times faster then Mutex-protected iteration through the map. + Also, set the thread-specific data if called first time on the thread. + +2010-01-21 Kwang Yul Seo + + Reviewed by Alexey Proskuryakov. + + Add ThreadSpecific for ENABLE(SINGLE_THREADED) + https://bugs.webkit.org/show_bug.cgi?id=33878 + + Implement ThreadSpecific with a simple getter/setter + when ENABLE(SINGLE_THREADED) is true. + + Due to the change in https://bugs.webkit.org/show_bug.cgi?id=33236, + an implementation of ThreadSpecific must be available to build WebKit. + This causes a build failure for platforms without a proper + ThreadSpecific implementation. + + * wtf/ThreadSpecific.h: + (WTF::::ThreadSpecific): + (WTF::::~ThreadSpecific): + (WTF::::get): + (WTF::::set): + (WTF::::destroy): + +2010-01-21 Kwang Yul Seo + + Reviewed by Maciej Stachowiak. + + Add fastStrDup to FastMalloc + https://bugs.webkit.org/show_bug.cgi?id=33937 + + The new string returned by fastStrDup is obtained with fastMalloc, + and can be freed with fastFree. This makes the memory management + more consistent because we don't need to keep strdup allocated pointers + and free them with free(). Instead we can use fastFree everywhere. + + * wtf/FastMalloc.cpp: + (WTF::fastStrDup): + * wtf/FastMalloc.h: + +2010-01-21 Brady Eidson + + Reviewed by Maciej Stachowiak. + + history.back() for same-document history traversals isn't synchronous as the specification states. + and https://bugs.webkit.org/show_bug.cgi?id=33538 + + * wtf/Platform.h: Add a "HISTORY_ALWAYS_ASYNC" enable and turn it on for Chromium. + +2010-01-21 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Always create a prototype for automatically managed classes. + + This fixes some errors where prototype chains were not correctly hooked + up, and also ensures that API classes work correctly with features like + instanceof. + + * API/JSClassRef.cpp: + (OpaqueJSClass::create): Cleaned up some of this code. Also changed it + to always create a prototype class. + + * API/tests/testapi.c: + (Derived2_class): + (main): Fixed a null value crash in the exception checking code. + * API/tests/testapi.js: Added some tests for the case where a prototype + chain would not be hooked up correctly. + +2010-01-21 Oliver Hunt + + Reviewed by Geoff Garen. + + Force JSC to create a prototype chain for API classes with a + parent class but no static functions. + + * API/JSClassRef.cpp: + (OpaqueJSClass::create): + +2010-01-21 Kent Hansen + + Reviewed by Geoffrey Garen. + + Object.getOwnPropertyDescriptor always returns undefined for JS API objects + https://bugs.webkit.org/show_bug.cgi?id=33946 + + Ideally the getOwnPropertyDescriptor() reimplementation should return an + access descriptor that wraps the property getter and setter callbacks, but + that approach is much more involved than returning a value descriptor. + Keep it simple for now. + + * API/JSCallbackObject.h: + * API/JSCallbackObjectFunctions.h: + (JSC::::getOwnPropertyDescriptor): + * API/tests/testapi.js: + +2010-01-20 Mark Rowe + + Build fix. + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::initializeScavenger): Remove unnecessary function call. + +2010-01-20 Mark Rowe + + Reviewed by Oliver Hunt. + + Use the inline i386 assembly for x86_64 as well rather than falling back to using pthread mutexes. + + * wtf/TCSpinLock.h: + (TCMalloc_SpinLock::Lock): + (TCMalloc_SpinLock::Unlock): + (TCMalloc_SlowLock): + +2010-01-20 Mark Rowe + + Reviewed by Oliver Hunt. + + Use GCD instead of an extra thread for FastMalloc scavenging on platforms where it is supported + + Abstract the background scavenging slightly so that an alternate implementation that uses GCD can be used on platforms + where it is supported. + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::init): + (WTF::TCMalloc_PageHeap::initializeScavenger): + (WTF::TCMalloc_PageHeap::signalScavenger): + (WTF::TCMalloc_PageHeap::shouldContinueScavenging): + (WTF::TCMalloc_PageHeap::Delete): + (WTF::TCMalloc_PageHeap::periodicScavenge): + * wtf/Platform.h: + +2010-01-20 Geoffrey Garen + + Reviewed by Oliver Hunt. + + REGRESSION(53460): Heap::destroy may not run + all destructors + + * runtime/Collector.cpp: + (JSC::Heap::freeBlocks): Instead of fully marking protected objects, + just set their mark bits. This prevents protected objects from keeping + unprotected objects alive. Destructor order is not guaranteed, so it's + OK to destroy objects pointed to by protected objects before destroying + protected objects. + +2010-01-19 David Levin + + Reviewed by Oliver Hunt. + + CrossThreadCopier needs to support ThreadSafeShared better. + https://bugs.webkit.org/show_bug.cgi?id=33698 + + * wtf/TypeTraits.cpp: Added tests for the new type traits. + * wtf/TypeTraits.h: + (WTF::IsSubclass): Determines if a class is a derived from another class. + (WTF::IsSubclassOfTemplate): Determines if a class is a derived from a + template class (with one parameter that is unknown). + (WTF::RemoveTemplate): Reveals the type for a template parameter. + +2010-01-20 Steve Falkenburg + + Reviewed by Darin Adler and Adam Roben. + + Feature defines are difficult to maintain on Windows builds + https://bugs.webkit.org/show_bug.cgi?id=33883 + + FeatureDefines.vsprops are now maintained in a way similar to + Configurations/FeatureDefines.xcconfig, with the added advantage + of having a single FeatureDefines file across all projects. + + * Configurations/FeatureDefines.xcconfig: Add comments about keeping feature definitions in sync. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add FeatureDefines.vsprops inherited property sheet. + * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add FeatureDefines.vsprops inherited property sheet. + +2010-01-20 Csaba Osztrogonác + + [Qt] Unreviewed buildfix for r53547. + + * DerivedSources.pro: + +2010-01-20 Tor Arne Vestbø + + Reviewed by Simon Hausmann. + + [Qt] Make extraCompilers for generated sources depend on their scripts + + * DerivedSources.pro: + +2010-01-19 Brian Weinstein + + Reviewed by Tim Hatcher. + + When JavaScriptCore calls Debugger::Exception, have it pass a + hasHandler variable that represents if exception is being handled + in the same function (not in a parent on the call stack). + + This just adds a new parameter, no behavior is changed. + + * debugger/Debugger.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::throwException): + +2010-01-18 Maciej Stachowiak + + Reviewed by Adam Barth. + + Inline functions that are hot in DOM manipulation + https://bugs.webkit.org/show_bug.cgi?id=33820 + + (3% speedup on Dromaeo DOM Core tests) + + * runtime/WeakGCMap.h: + (JSC::::get): inline + +2010-01-19 Laszlo Gombos + + Unreviewed build fix for JIT with RVCT. + + Remove IMPORT statement; cti_vm_throw is already defined in JITStubs.h. + Remove extra ')'. + + * jit/JITStubs.cpp: + (JSC::ctiVMThrowTrampoline): + +2010-01-19 Geoffrey Garen + + Reviewed by Oliver Hunt. + + REGRESSION (52082): Crash on worker thread when reloading http://radnan.public.iastate.edu/procedural/ + https://bugs.webkit.org/show_bug.cgi?id=33826 + + This bug was caused by a GC-protected object being destroyed early by + Heap::destroy. Clients of the GC protect APIs (reasonably) expect pointers + to GC-protected memory to be valid. + + The solution is to do two passes of tear-down in Heap::destroy. The first + pass tears down all unprotected objects. The second pass ASSERTs that all + previously protected objects are now unprotected, and then tears down + all perviously protected objects. These two passes simulate the two passes + that would have been required to free a protected object during normal GC. + + * API/JSContextRef.cpp: Removed some ASSERTs that have moved into Heap. + + * runtime/Collector.cpp: + (JSC::Heap::destroy): Moved ASSERTs to here. + (JSC::Heap::freeBlock): Tidied up the use of didShrink by moving its + setter to the function that does the shrinking. + (JSC::Heap::freeBlocks): Implemented above algorithm. + (JSC::Heap::shrinkBlocks): Tidied up the use of didShrink. + +2010-01-19 Gavin Barraclough + + Reviewed by NOBODY (build fix). + + Reverting r53455, breaks 2 javascriptcore tests. + + * API/JSContextRef.cpp: + * runtime/Collector.cpp: + (JSC::Heap::destroy): + (JSC::Heap::freeBlock): + (JSC::Heap::freeBlocks): + (JSC::Heap::shrinkBlocks): + +2010-01-18 Gavin Barraclough + + Reviewed by NOBODY (build fix). + + Revert r53454, since it causes much sadness in this world. + + * runtime/UString.cpp: + (JSC::UString::spliceSubstringsWithSeparators): + (JSC::UString::replaceRange): + * runtime/UStringImpl.cpp: + (JSC::UStringImpl::baseSharedBuffer): + (JSC::UStringImpl::sharedBuffer): + (JSC::UStringImpl::~UStringImpl): + * runtime/UStringImpl.h: + (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield): + (JSC::UntypedPtrAndBitfield::asPtr): + (JSC::UntypedPtrAndBitfield::operator&=): + (JSC::UntypedPtrAndBitfield::operator|=): + (JSC::UntypedPtrAndBitfield::operator&): + (JSC::UStringImpl::create): + (JSC::UStringImpl::cost): + (JSC::UStringImpl::isIdentifier): + (JSC::UStringImpl::setIsIdentifier): + (JSC::UStringImpl::ref): + (JSC::UStringImpl::deref): + (JSC::UStringImpl::checkConsistency): + (JSC::UStringImpl::UStringImpl): + (JSC::UStringImpl::bufferOwnerString): + (JSC::UStringImpl::bufferOwnership): + (JSC::UStringImpl::isStatic): + * wtf/StringHashFunctions.h: + (WTF::stringHash): + +2010-01-18 Geoffrey Garen + + Reviewed by Oliver Hunt. + + REGRESSION (52082): Crash on worker thread when reloading http://radnan.public.iastate.edu/procedural/ + https://bugs.webkit.org/show_bug.cgi?id=33826 + + This bug was caused by a GC-protected object being destroyed early by + Heap::destroy. Clients of the GC protect APIs (reasonably) expect pointers + to GC-protected memory to be valid. + + The solution is to do two passes of tear-down in Heap::destroy. The first + pass tears down all unprotected objects. The second pass ASSERTs that all + previously protected objects are now unprotected, and then tears down + all perviously protected objects. These two passes simulate the two passes + that would have been required to free a protected object during normal GC. + + * API/JSContextRef.cpp: Removed some ASSERTs that have moved into Heap. + + * runtime/Collector.cpp: + (JSC::Heap::destroy): Moved ASSERTs to here. + (JSC::Heap::freeBlock): Tidied up the use of didShrink by moving its + setter to the function that does the shrinking. + (JSC::Heap::freeBlocks): Implemented above algorithm. + (JSC::Heap::shrinkBlocks): Tidied up the use of didShrink. + +2010-01-18 Gavin Barraclough + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=33731 + Remove UntypedPtrAndBitfield from UStringImpl (akin to PtrAndFlags). + + This break the OS X Leaks tool. Instead, free up some more bits from the refCount. + + * runtime/UStringImpl.cpp: + (JSC::UStringImpl::sharedBuffer): + (JSC::UStringImpl::~UStringImpl): + * runtime/UStringImpl.h: + (JSC::UStringImpl::cost): + (JSC::UStringImpl::checkConsistency): + (JSC::UStringImpl::UStringImpl): + (JSC::UStringImpl::bufferOwnerString): + (JSC::UStringImpl::): + * wtf/StringHashFunctions.h: + (WTF::stringHash): + +2010-01-18 Kent Tamura + + Reviewed by Darin Adler. + + HTMLInputElement::valueAsDate setter support for type=month. + https://bugs.webkit.org/show_bug.cgi?id=33021 + + Expose the following functions to be used by WebCore: + - WTF::msToyear() + - WTF::dayInYear() + - WTF::monthFromDayInYear() + - WTF::dayInMonthFromDayInYear() + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * wtf/DateMath.cpp: + (WTF::msToYear): Remove "static inline". + (WTF::dayInYear): Remove "static inline". + (WTF::monthFromDayInYear): Remove "static inline". + (WTF::dayInMonthFromDayInYear): Remove "static inline". + * wtf/DateMath.h: Declare the above functions. + +2010-01-18 Darin Adler + + Fix build by reverting the previous change. + + * runtime/UString.h: Rolled out the FastAllocBase base class. + It was making UString larger, and therefore JSString larger, + and too big for a garbage collection cell. + + This raises the unpleasant possibility that many classes became + larger because we added the FastAllocBase base class. I am + worried about this, and it needs to be investigated. + +2010-01-18 Zoltan Horvath + + Reviewed by Darin Adler. + + Allow custom memory allocation control for UString class + https://bugs.webkit.org/show_bug.cgi?id=27831 + + Inherits the following class from FastAllocBase because it is + instantiated by 'new' and no need to be copyable: + + class name - instantiated at: + classs UString - JavaScriptCore/runtime/UString.cpp:160 + + * runtime/UString.h: + +2010-01-18 Evan Cheng + + Reviewed by Darin Adler. + + Add some ALWAYS_INLINE for key functions not inlined by some versions of GCC. + rdar://problem/7553780 + + * runtime/JSObject.h: + (JSC::JSObject::getPropertySlot): ALWAYS_INLINE both overloads. + * runtime/JSString.h: + (JSC::JSString::JSString): ALWAYS_INLINE the version that takes a UString. + * runtime/UString.h: + (JSC::operator==): ALWAYS_INLINE the version that compares two UString objects. + +2010-01-18 Csaba Osztrogonác + + Reviewed by Darin Adler. + + Delete dftables-xxxxxxxx.in files automatically. + https://bugs.webkit.org/show_bug.cgi?id=33796 + + * pcre/dftables: unlink unnecessary temporary file. + +2010-01-18 Tor Arne Vestbø + + Reviewed by Simon Hausmann. + + [Qt] Force qmake to generate a single makefile for DerivedSources.pro + + * DerivedSources.pro: + +2010-01-18 Csaba Osztrogonác + + Rubber-stamped by Gustavo Noronha Silva. + + Rolling out r53391 and r53392 because of random crashes on buildbots. + https://bugs.webkit.org/show_bug.cgi?id=33731 + + * bytecode/CodeBlock.h: + (JSC::CallLinkInfo::seenOnce): + (JSC::CallLinkInfo::setSeen): + (JSC::MethodCallLinkInfo::MethodCallLinkInfo): + (JSC::MethodCallLinkInfo::seenOnce): + (JSC::MethodCallLinkInfo::setSeen): + * jit/JIT.cpp: + (JSC::JIT::unlinkCall): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::patchMethodCallProto): + * runtime/UString.cpp: + (JSC::UString::spliceSubstringsWithSeparators): + (JSC::UString::replaceRange): + * runtime/UString.h: + * runtime/UStringImpl.cpp: + (JSC::UStringImpl::baseSharedBuffer): + (JSC::UStringImpl::sharedBuffer): + (JSC::UStringImpl::~UStringImpl): + * runtime/UStringImpl.h: + (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield): + (JSC::UntypedPtrAndBitfield::asPtr): + (JSC::UntypedPtrAndBitfield::operator&=): + (JSC::UntypedPtrAndBitfield::operator|=): + (JSC::UntypedPtrAndBitfield::operator&): + (JSC::UStringImpl::create): + (JSC::UStringImpl::cost): + (JSC::UStringImpl::isIdentifier): + (JSC::UStringImpl::setIsIdentifier): + (JSC::UStringImpl::ref): + (JSC::UStringImpl::deref): + (JSC::UStringImpl::checkConsistency): + (JSC::UStringImpl::UStringImpl): + (JSC::UStringImpl::bufferOwnerString): + (JSC::UStringImpl::bufferOwnership): + (JSC::UStringImpl::isStatic): + * wtf/StringHashFunctions.h: + (WTF::stringHash): + +2010-01-18 Simon Hausmann + + Reviewed by Kenneth Rohde Christiansen. + + Fix the build with strict gcc and RVCT versions: It's not legal to cast a + pointer to a function to a void* without an intermediate cast to a non-pointer + type. A cast to a ptrdiff_t inbetween fixes it. + + * runtime/JSString.h: + (JSC::Fiber::JSString): + +2010-01-15 Gavin Barraclough + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=33731 + Remove UntypedPtrAndBitfield from UStringImpl (akin to PtrAndFlags). + + This break the OS X Leaks tool. Instead, free up some more bits from the refCount. + + * runtime/UStringImpl.cpp: + (JSC::UStringImpl::sharedBuffer): + (JSC::UStringImpl::~UStringImpl): + * runtime/UStringImpl.h: + (JSC::UStringImpl::cost): + (JSC::UStringImpl::checkConsistency): + (JSC::UStringImpl::UStringImpl): + (JSC::UStringImpl::bufferOwnerString): + (JSC::UStringImpl::): + * wtf/StringHashFunctions.h: + (WTF::stringHash): + +2010-01-15 Gavin Barraclough + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=33731 + Remove uses of PtrAndFlags from JIT data stuctures. + + These break the OS X Leaks tool. Free up a bit in CallLinkInfo, and invalid + permutation of pointer states in MethodCallLinkInfo to represent the removed bits. + + * bytecode/CodeBlock.h: + (JSC::CallLinkInfo::seenOnce): + (JSC::CallLinkInfo::setSeen): + (JSC::MethodCallLinkInfo::MethodCallLinkInfo): + (JSC::MethodCallLinkInfo::seenOnce): + (JSC::MethodCallLinkInfo::setSeen): + * jit/JIT.cpp: + (JSC::JIT::unlinkCall): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::patchMethodCallProto): + * runtime/UString.h: + +2010-01-16 Maciej Stachowiak + + Reviewed by Oliver Hunt. + + Cache JS string values made from DOM strings (Dromaeo speedup) + https://bugs.webkit.org/show_bug.cgi?id=33768 + + + * runtime/JSString.h: + (JSC::jsStringWithFinalizer): Added new mechanism for a string to have an optional + finalizer callback, for the benefit of weak-referencing caches. + (JSC::): + (JSC::Fiber::JSString): + (JSC::Fiber::~JSString): + * runtime/JSString.cpp: + (JSC::JSString::resolveRope): Clear fibers so this doesn't look like a string with a finalizer. + * runtime/WeakGCMap.h: Include "Collector.h" to make this header includable by itself. + +2010-01-15 Sam Weinig + + Reviewed by Maciej Stachowiak. + + Fix for + Add ALWAYS_INLINE to jsLess for a 1% speedup on llvm-gcc. + + * runtime/Operations.h: + (JSC::jsLess): + +2010-01-14 Geoffrey Garen + + Reviewed by Oliver Hunt. + + REGRESISON: Google maps buttons not working properly + https://bugs.webkit.org/show_bug.cgi?id=31871 + + REGRESSION(r52948): JavaScript exceptions thrown on Google Maps when + getting directions for a second time + https://bugs.webkit.org/show_bug.cgi?id=33446 + + SunSpider and v8 report no change. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::tryCacheGetByID): Update our cached offset in case + flattening the dictionary changed any of its offsets. + + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + * runtime/Operations.h: + (JSC::normalizePrototypeChain): ditto + +2010-01-14 Gavin Barraclough + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=33705 + UStringImpl::create() should use internal storage + + When creating a UStringImpl copying of a UChar*, we can use an internal buffer, + by calling UStringImpl::tryCreateUninitialized(). + + Also, remove duplicate of copyChars from JSString, call UStringImpl's version. + + Small (max 0.5%) progression on Sunspidey. + + * runtime/JSString.cpp: + (JSC::JSString::resolveRope): + * runtime/UStringImpl.h: + (JSC::UStringImpl::create): + +2010-01-14 Gavin Barraclough + + Reviewed by Sam Weinig. + + Make naming & behaviour of UString[Impl] methods more consistent. + https://bugs.webkit.org/show_bug.cgi?id=33702 + + UString::create() creates a copy of the UChar* passed, but UStringImpl::create() assumes + that it should assume ownership of the provided buffer (with UString::createNonCopying() + and UStringImpl::createCopying() providing the alternate behaviours). Unify on create() + taking a copy of the provided buffer. For non-copying cases, use the name 'adopt', and + make this method take a Vector&. For cases where non-copying construction was being + used, other than from a Vector, change the code to allocate the storage along with + the UStringImpl using UStringImpl::createUninitialized(). (The adopt() method also more + closely matches that of WebCore::StringImpl). + + Also, UString::createUninitialized() and UStringImpl::createUninitialized() have incompatible + behaviours, in that the UString form sets the provided UChar* to a null or non-null value to + indicate success or failure, but UStringImpl uses the returned PassRefPtr to + indicate when allocation has failed (potentially leaving the output Char* uninitialized). + This is also incompatible with WebCore::StringImpl's behaviour, in that + StringImpl::createUninitialized() will CRASH() if unable to allocate. Some uses of + createUninitialized() in JSC are unsafe, since they do not test the result for null. + UStringImpl's indication is preferable, since we may want a successful call to set the result + buffer to 0 (specifically, StringImpl returns 0 for the buffer where createUninitialized() + returns the empty string, which seems reasonable to catch bugs early). UString's method + cannot support UStringImpl's behaviour directly, since it returns an object rather than a + pointer. + - remove UString::createUninitialized(), replace with calls to UStringImpl::createUninitialized() + - create a UStringImpl::tryCreateUninitialized() form UStringImpl::createUninitialized(), + with current behaviour, make createUninitialized() crash on failure to allocate. + - make cases in JSC that do not check the result call createUninitialized(), and cases that do + check call tryCreateUninitialized(). + + Rename computedHash() to existingHash(), to bring this in line wih WebCore::StringImpl. + + * API/JSClassRef.cpp: + (OpaqueJSClassContextData::OpaqueJSClassContextData): + * JavaScriptCore.exp: + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + * runtime/Identifier.cpp: + (JSC::CStringTranslator::translate): + (JSC::UCharBufferTranslator::translate): + * runtime/JSString.cpp: + (JSC::JSString::resolveRope): + * runtime/Lookup.cpp: + (JSC::HashTable::createTable): + * runtime/Lookup.h: + (JSC::HashTable::entry): + * runtime/StringBuilder.h: + (JSC::StringBuilder::release): + * runtime/StringConstructor.cpp: + (JSC::stringFromCharCodeSlowCase): + * runtime/StringPrototype.cpp: + (JSC::substituteBackreferencesSlow): + (JSC::stringProtoFuncToLowerCase): + (JSC::stringProtoFuncToUpperCase): + (JSC::stringProtoFuncFontsize): + (JSC::stringProtoFuncLink): + * runtime/Structure.cpp: + (JSC::Structure::despecifyDictionaryFunction): + (JSC::Structure::get): + (JSC::Structure::despecifyFunction): + (JSC::Structure::put): + (JSC::Structure::remove): + (JSC::Structure::insertIntoPropertyMapHashTable): + (JSC::Structure::checkConsistency): + * runtime/Structure.h: + (JSC::Structure::get): + * runtime/StructureTransitionTable.h: + (JSC::StructureTransitionTableHash::hash): + * runtime/UString.cpp: + (JSC::createRep): + (JSC::UString::UString): + (JSC::UString::spliceSubstringsWithSeparators): + (JSC::UString::replaceRange): + (JSC::UString::operator=): + * runtime/UString.h: + (JSC::UString::adopt): + (JSC::IdentifierRepHash::hash): + (JSC::makeString): + * runtime/UStringImpl.h: + (JSC::UStringImpl::adopt): + (JSC::UStringImpl::create): + (JSC::UStringImpl::createUninitialized): + (JSC::UStringImpl::tryCreateUninitialized): + (JSC::UStringImpl::existingHash): + +2010-01-13 Kent Hansen + + Reviewed by Oliver Hunt. + + JSON.stringify and JSON.parse needlessly process properties in the prototype chain + https://bugs.webkit.org/show_bug.cgi?id=33053 + + * runtime/JSONObject.cpp: + (JSC::Stringifier::Holder::appendNextProperty): + (JSC::Walker::walk): + +2010-01-13 Gavin Barraclough + + Reviewed by NOBODY (buildfix). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-01-13 Alexey Proskuryakov + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=33641 + Assertion failure in Lexer.cpp if input stream ends while in string escape + + Test: fast/js/end-in-string-escape.html + + * parser/Lexer.cpp: (JSC::Lexer::lex): Bail out quickly on end of stream, not giving the + assertion a chance to fire. + +2010-01-13 Gavin Barraclough + + Reviewed by NOBODY (buildfix). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-01-13 Gavin Barraclough + + Rubber stamped by Sam Weinig & Darin Adler. + + Three quick fixes to UStringImpl. + - The destroy() method can be switched back to a normal destructor; since we've switched + the way we protect static strings to be using an odd ref-count the destroy() won't abort. + - The cost() calculation logic was wrong. If you have multiple JSStrings wrapping substrings + of a base string, they would each report the full cost of the base string to the heap. + Instead we should only be reporting once for the base string. + - Remove the overloaded new operator calling fastMalloc, replace this with a 'using' to pick + up the implementation from the parent class. + + * JavaScriptCore.exp: + * runtime/UStringImpl.cpp: + (JSC::UStringImpl::~UStringImpl): + * runtime/UStringImpl.h: + (JSC::UStringImpl::cost): + (JSC::UStringImpl::deref): + +2010-01-13 Jocelyn Turcotte + + Reviewed by Simon Hausmann. + + [Qt] Split the build process in two different .pro files. + This allows qmake to be run once all source files are available. + + * DerivedSources.pro: Added. + * JavaScriptCore.pri: Moved source generation to DerivedSources.pro + * pcre/pcre.pri: Moved source generation to DerivedSources.pro + +2010-01-12 Kent Hansen + + Reviewed by Geoffrey Garen. + + [ES5] Implement Object.getOwnPropertyNames + https://bugs.webkit.org/show_bug.cgi?id=32242 + + Add an extra argument to getPropertyNames() and getOwnPropertyNames() + (and all reimplementations thereof) that indicates whether non-enumerable + properties should be added. + + * API/JSCallbackObject.h: + * API/JSCallbackObjectFunctions.h: + (JSC::::getOwnPropertyNames): + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * debugger/DebuggerActivation.cpp: + (JSC::DebuggerActivation::getOwnPropertyNames): + * debugger/DebuggerActivation.h: + * runtime/Arguments.cpp: + (JSC::Arguments::getOwnPropertyNames): + * runtime/Arguments.h: + * runtime/CommonIdentifiers.h: + * runtime/JSArray.cpp: + (JSC::JSArray::getOwnPropertyNames): + * runtime/JSArray.h: + * runtime/JSByteArray.cpp: + (JSC::JSByteArray::getOwnPropertyNames): + * runtime/JSByteArray.h: + * runtime/JSFunction.cpp: + (JSC::JSFunction::getOwnPropertyNames): + * runtime/JSFunction.h: + * runtime/JSNotAnObject.cpp: + (JSC::JSNotAnObject::getOwnPropertyNames): + * runtime/JSNotAnObject.h: + * runtime/JSObject.cpp: + (JSC::getClassPropertyNames): + (JSC::JSObject::getPropertyNames): + (JSC::JSObject::getOwnPropertyNames): + * runtime/JSObject.h: + * runtime/JSVariableObject.cpp: + (JSC::JSVariableObject::getOwnPropertyNames): + * runtime/JSVariableObject.h: + * runtime/ObjectConstructor.cpp: + (JSC::ObjectConstructor::ObjectConstructor): + (JSC::objectConstructorGetOwnPropertyNames): + * runtime/RegExpMatchesArray.h: + (JSC::RegExpMatchesArray::getOwnPropertyNames): + * runtime/StringObject.cpp: + (JSC::StringObject::getOwnPropertyNames): + * runtime/StringObject.h: + * runtime/Structure.cpp: Rename getEnumerablePropertyNames() to getPropertyNames(), which takes an extra argument. + (JSC::Structure::getPropertyNames): + * runtime/Structure.h: + (JSC::): + +2010-01-12 Alexey Proskuryakov + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=33540 + Make it possible to build in debug mode with assertions disabled + + * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): + * runtime/Identifier.cpp: (JSC::Identifier::checkSameIdentifierTable): + * wtf/FastMalloc.cpp: + * wtf/HashTable.h: (WTF::HashTableConstIterator::checkValidity): + * yarr/RegexCompiler.cpp: (JSC::Yarr::compileRegex): + +2009-11-23 Yong Li + + Reviewed by Adam Treat. + + Make GIF decoder support down-sampling + https://bugs.webkit.org/show_bug.cgi?id=31806 + + * platform/image-decoders/ImageDecoder.cpp: + (WebCore::ImageDecoder::upperBoundScaledY): + (WebCore::ImageDecoder::lowerBoundScaledY): + * platform/image-decoders/ImageDecoder.h: + (WebCore::RGBA32Buffer::scaledRect): + (WebCore::RGBA32Buffer::setScaledRect): + (WebCore::ImageDecoder::scaledSize): + * platform/image-decoders/gif/GIFImageDecoder.cpp: + (WebCore::GIFImageDecoder::sizeNowAvailable): + (WebCore::GIFImageDecoder::initFrameBuffer): + (WebCore::copyOnePixel): + (WebCore::GIFImageDecoder::haveDecodedRow): + (WebCore::GIFImageDecoder::frameComplete): + +2010-01-12 Adam Barth + + Reviewed by Eric Seidel. + + ecma/Date/15.9.5.12-1.js fails every night at midnight + https://bugs.webkit.org/show_bug.cgi?id=28041 + + Change the test to use a concrete time instead of "now". + + * tests/mozilla/ecma/Date/15.9.5.10-1.js: + * tests/mozilla/ecma/Date/15.9.5.12-1.js: + +2010-01-11 Csaba Osztrogonác + + Reviewed by Ariya Hidayat. + + [Qt] Enable JIT and YARR_JIT if (CPU(X86_64) && OS(LINUX) && GCC_VERSION >= 40100) + + * wtf/Platform.h: + +2010-01-11 Geoffrey Garen + + Reviewed by Alexey Proskuryakov. + + https://bugs.webkit.org/show_bug.cgi?id=33481 + Uninitialized data members in ArrayStorage + + SunSpider reports no change. + + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): Initialize missing data members in the two cases + where we don't use fastZeroedMalloc, so it doesn't happen automatically. + +2010-01-11 Steve Falkenburg + + Reviewed by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=33480 + + Improve debugging reliability for WTF on Windows. + Store WTF static library's PDB file into a better location. + + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + +2010-01-11 Steve Falkenburg + + Windows build fix. + Remove extraneous entries from def file causing build warning. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-01-10 Kent Hansen + + Reviewed by Darin Adler. + + RegExp.prototype.toString returns "//" for empty regular expressions + https://bugs.webkit.org/show_bug.cgi?id=33319 + + "//" starts a single-line comment, hence "/(?:)/" should be used, according to ECMA. + + * runtime/RegExpPrototype.cpp: + (JSC::regExpProtoFuncToString): + + * tests/mozilla/ecma_2/RegExp/properties-001.js: + (AddRegExpCases): + * tests/mozilla/js1_2/regexp/toString.js: + Update relevant Mozilla tests (Mozilla has had this behavior since November 2003). + +2010-01-10 Darin Adler + + * tests/mozilla/ecma/Array/15.4.1.1.js: Added property allow-tabs. + * tests/mozilla/ecma/Array/15.4.1.2.js: Added property allow-tabs. + * tests/mozilla/ecma/Array/15.4.2.1-1.js: Added property allow-tabs. + * tests/mozilla/ecma/Array/15.4.2.2-1.js: Added property allow-tabs. + * tests/mozilla/ecma/Array/15.4.2.2-2.js: Added property allow-tabs. + * tests/mozilla/ecma/Array/15.4.2.3.js: Added property allow-tabs. + * tests/mozilla/ecma/Array/15.4.3.2.js: Added property allow-tabs. + * tests/mozilla/ecma/Array/15.4.3.js: Added property allow-tabs. + * tests/mozilla/ecma/Array/15.4.4.1.js: Added property allow-tabs. + * tests/mozilla/ecma/Array/15.4.4.js: Added property allow-tabs. + * tests/mozilla/ecma/LexicalConventions/7.7.4.js: Added property allow-tabs. + * tests/mozilla/ecma/Math/15.8.2.13.js: Added property allow-tabs. + * tests/mozilla/ecma/Math/15.8.2.16.js: Added property allow-tabs. + * tests/mozilla/ecma/Math/15.8.2.18.js: Added property allow-tabs. + * tests/mozilla/ecma/Math/15.8.2.2.js: Added property allow-tabs. + * tests/mozilla/ecma/Math/15.8.2.4.js: Added property allow-tabs. + * tests/mozilla/ecma/Math/15.8.2.5.js: Added property allow-tabs. + * tests/mozilla/ecma/Math/15.8.2.7.js: Added property allow-tabs. + * tests/mozilla/ecma/String/15.5.1.js: Added property allow-tabs. + * tests/mozilla/ecma/String/15.5.2.js: Added property allow-tabs. + * tests/mozilla/ecma/String/15.5.3.1-3.js: Added property allow-tabs. + * tests/mozilla/ecma/String/15.5.3.1-4.js: Added property allow-tabs. + * tests/mozilla/ecma/String/15.5.3.js: Added property allow-tabs. + * tests/mozilla/ecma/TypeConversion/9.5-2.js: Added property allow-tabs. + * tests/mozilla/ecma/jsref.js: Modified property allow-tabs. + * tests/mozilla/ecma/shell.js: Modified property allow-tabs. + * tests/mozilla/ecma_2/LexicalConventions/keywords-001.js: Added property allow-tabs. + * tests/mozilla/ecma_2/RegExp/exec-001.js: Added property allow-tabs. + * tests/mozilla/ecma_2/String/match-004.js: Added property allow-tabs. + * tests/mozilla/ecma_2/String/replace-001.js: Added property allow-tabs. + * tests/mozilla/ecma_2/String/split-002.js: Added property allow-tabs. + * tests/mozilla/ecma_2/jsref.js: Modified property allow-tabs. + * tests/mozilla/ecma_2/shell.js: Added property allow-tabs. + * tests/mozilla/ecma_3/Date/shell.js: Modified property allow-tabs. + * tests/mozilla/ecma_3/Exceptions/regress-181654.js: Added property allow-tabs. + * tests/mozilla/ecma_3/RegExp/regress-209067.js: Added property allow-tabs. + * tests/mozilla/ecma_3/RegExp/regress-85721.js: Added property allow-tabs. + * tests/mozilla/importList.html: Added property allow-tabs. + * tests/mozilla/js1_1/shell.js: Added property allow-tabs. + * tests/mozilla/js1_2/Array/general1.js: Added property allow-tabs. + * tests/mozilla/js1_2/Array/general2.js: Added property allow-tabs. + * tests/mozilla/js1_2/Array/slice.js: Added property allow-tabs. + * tests/mozilla/js1_2/Array/splice1.js: Added property allow-tabs. + * tests/mozilla/js1_2/Array/splice2.js: Added property allow-tabs. + * tests/mozilla/js1_2/Objects/toString-001.js: Added property allow-tabs. + * tests/mozilla/js1_2/String/charCodeAt.js: Added property allow-tabs. + * tests/mozilla/js1_2/String/concat.js: Modified property allow-tabs. + * tests/mozilla/js1_2/String/match.js: Added property allow-tabs. + * tests/mozilla/js1_2/String/slice.js: Added property allow-tabs. + * tests/mozilla/js1_2/function/Function_object.js: Added property allow-tabs. + * tests/mozilla/js1_2/function/Number.js: Modified property allow-tabs. + * tests/mozilla/js1_2/function/String.js: Modified property allow-tabs. + * tests/mozilla/js1_2/function/nesting.js: Added property allow-tabs. + * tests/mozilla/js1_2/function/regexparg-1.js: Added property allow-tabs. + * tests/mozilla/js1_2/function/regexparg-2-n.js: Added property allow-tabs. + * tests/mozilla/js1_2/jsref.js: Added property allow-tabs. + * tests/mozilla/js1_2/operator/equality.js: Added property allow-tabs. + * tests/mozilla/js1_2/operator/strictEquality.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/RegExp_dollar_number.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/RegExp_input.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/RegExp_input_as_array.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/RegExp_lastIndex.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/RegExp_lastMatch.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/RegExp_lastMatch_as_array.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/RegExp_lastParen.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/RegExp_lastParen_as_array.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/RegExp_leftContext.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/RegExp_leftContext_as_array.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/RegExp_multiline.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/RegExp_multiline_as_array.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/RegExp_object.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/RegExp_rightContext.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/RegExp_rightContext_as_array.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/alphanumeric.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/asterisk.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/backslash.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/backspace.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/beginLine.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/character_class.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/compile.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/control_characters.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/digit.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/dot.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/endLine.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/everything.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/exec.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/flags.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/global.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/hexadecimal.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/ignoreCase.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/interval.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/octal.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/parentheses.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/plus.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/question_mark.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/simple_form.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/source.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/special_characters.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/string_replace.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/string_search.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/string_split.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/test.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/toString.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/vertical_bar.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/whitespace.js: Added property allow-tabs. + * tests/mozilla/js1_2/regexp/word_boundary.js: Added property allow-tabs. + * tests/mozilla/js1_2/shell.js: Added property allow-tabs. + * tests/mozilla/js1_2/statements/break.js: Added property allow-tabs. + * tests/mozilla/js1_2/statements/continue.js: Added property allow-tabs. + * tests/mozilla/js1_2/statements/do_while.js: Added property allow-tabs. + * tests/mozilla/js1_2/statements/switch.js: Added property allow-tabs. + * tests/mozilla/js1_2/statements/switch2.js: Added property allow-tabs. + * tests/mozilla/js1_3/shell.js: Added property allow-tabs. + * tests/mozilla/js1_4/shell.js: Added property allow-tabs. + * tests/mozilla/js1_5/Regress/regress-111557.js: Added property allow-tabs. + * tests/mozilla/js1_5/Regress/regress-216320.js: Added property allow-tabs. + * tests/mozilla/menuhead.html: Added property allow-tabs. + * tests/mozilla/mklistpage.pl: Added property allow-tabs. + * tests/mozilla/runtests.pl: Added property allow-tabs. + +2010-01-08 Daniel Bates + + Reviewed by Adam Barth. + + https://bugs.webkit.org/show_bug.cgi?id=33417 + + Cleans up style errors exposed by the patch for bug #33198. + Moreover, fixes all "Weird number of spaces at line-start. Are you using a 4-space indent?" + errors reported by check-webkit-style. + + No functionality was changed. So, no new tests. + + * wtf/Platform.h: + +2010-01-08 Kent Hansen + + Reviewed by Eric Seidel. + + Don't store RegExp flags string representation + https://bugs.webkit.org/show_bug.cgi?id=33321 + + It's unused; the string representation is reconstructed from flags. + + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + * runtime/RegExp.h: + +2010-01-08 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Memory use grows grows possibly unbounded in this JavaScript Array test case + https://bugs.webkit.org/show_bug.cgi?id=31675 + + This fixes one observed bug in this test case, which is that + arrays don't report extra cost for the sparse value maps. + + SunSpider reports a small speedup. + + * runtime/JSArray.cpp: + (JSC::JSArray::putSlowCase): Report extra memory cost for + the sparse value map. + * runtime/JSArray.h: + +2010-01-08 Yong Li + + Reviewed by Darin Adler. + + Remove unnecessary #include from FastMalloc.cpp + https://bugs.webkit.org/show_bug.cgi?id=33393 + + * wtf/FastMalloc.cpp: + +2010-01-08 Eric Seidel + + No review, rolling out r52983. + http://trac.webkit.org/changeset/52983 + https://bugs.webkit.org/show_bug.cgi?id=33321 + + Broke 59 JavaScriptCore tests. I don't think Kent knew about + run-javascriptcore-tests. Sadly neither does the commit-bot, + yet. + + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + * runtime/RegExp.h: + (JSC::RegExp::flags): + +2010-01-08 Eric Seidel + + No review, rolling out r52981. + http://trac.webkit.org/changeset/52981 + https://bugs.webkit.org/show_bug.cgi?id=33319 + + Caused two JS tests to start failing: + ecma_2/RegExp/properties-001.js and js1_2/regexp/toString.js + + * runtime/RegExpPrototype.cpp: + (JSC::regExpProtoFuncToString): + +2010-01-08 Kent Hansen + + Reviewed by Darin Adler. + + Don't store RegExp flags string representation + https://bugs.webkit.org/show_bug.cgi?id=33321 + + It's unused; the string representation is reconstructed from flags. + + * runtime/RegExp.cpp: + (JSC::RegExp::RegExp): + * runtime/RegExp.h: + +2010-01-08 Kent Hansen + + Reviewed by Darin Adler. + + RegExp.prototype.toString returns "//" for empty regular expressions + https://bugs.webkit.org/show_bug.cgi?id=33319 + + "//" starts a single-line comment, hence "/(?:)/" should be used, according to ECMA. + + * runtime/RegExpPrototype.cpp: + (JSC::regExpProtoFuncToString): + +2010-01-08 Norbert Leser + + Reviewed by Darin Adler. + + RVCT compiler with "-Otime -O3" optimization tries to optimize out + inline new'ed pointers that are passed as arguments. + Proposed patch assigns new'ed pointer explicitly outside function call. + + https://bugs.webkit.org/show_bug.cgi?id=33084 + + * API/JSClassRef.cpp: + (OpaqueJSClass::OpaqueJSClass): + (OpaqueJSClassContextData::OpaqueJSClassContextData): + +2010-01-08 Gabor Loki + + Reviewed by Gavin Barraclough. + + Remove an unnecessary cacheFlush from ARM_TRADITIONAL JIT + https://bugs.webkit.org/show_bug.cgi?id=33203 + + * assembler/ARMAssembler.cpp: Remove obsolete linkBranch function. + (JSC::ARMAssembler::executableCopy): Inline a clean linkBranch code. + * assembler/ARMAssembler.h: + (JSC::ARMAssembler::getLdrImmAddress): Use inline function. + (JSC::ARMAssembler::getLdrImmAddressOnPool): Ditto. + (JSC::ARMAssembler::patchPointerInternal): Remove an unnecessary cacheFlush. + (JSC::ARMAssembler::linkJump): Use patchPointerInternal instead of linkBranch. + (JSC::ARMAssembler::linkCall): Ditto. + (JSC::ARMAssembler::relinkCall): Ditto. + +2010-01-07 Gabor Loki + + Reviewed by Gavin Barraclough. + + Build fix for JSVALUE32 when ENABLE_JIT_OPTIMIZE* are disabled + https://bugs.webkit.org/show_bug.cgi?id=33311 + + Move compileGetDirectOffset function to common part of JSVALUE32 + + * jit/JITPropertyAccess.cpp: + (JSC::JIT::compileGetDirectOffset): + +2010-01-07 Laszlo Gombos + + Reviewed by Maciej Stachowiak. + + Allow call sites to determine if ASSERT_* and LOG_* macros are operational + https://bugs.webkit.org/show_bug.cgi?id=33020 + + * wtf/Assertions.h: Set ASSERT_MSG_DISABLED, FATAL_DISABLED, + ERROR_DISABLED, LOG_DISABLED to 1 if the compiler does not support + variadic macros. Refactor for better readibility. + +2010-01-07 Daniel Bates + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=32987 + + Added ENABLE_XHTMLMP flag. Disabled by default. + + * Configurations/FeatureDefines.xcconfig: + +2010-01-07 Laszlo Gombos + + Reviewed by Gavin Barraclough. + + [Symbian] Port ARM traditional JIT Trampolines to RVCT + https://bugs.webkit.org/show_bug.cgi?id=30552 + + Take the GCC implementation and mechanically convert + it to RVCT syntax. + + Use 'bx rX' instead of 'mov pc, rX' when it is available. + + Developed in cooperation with Iain Campbell and Gabor Loki. + + * JavaScriptCore.pri: Extra step to generate RVCT stubs. The + script generation intentionally executed all the time not just + for RVCT targets. + + * create_rvct_stubs: Added. Perl script to expand precompiler macros + for RVCT assembler - the template is defined in JITStubs.cpp. + + * jit/JITStubs.cpp: + (JSC::ctiTrampoline): + (JSC::ctiVMThrowTrampoline): + (JSC::ctiOpThrowNotCaught): + +2010-01-07 Geoffrey Garen + + Reviewed by Sam Weinig. + + Fix a crash seen on the buildbots. + + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::init): Disable specific function tracking here, + instead of in WebCore, to ensure that the disabling happens before a + specific function can be registered. + +2010-01-07 Alexey Proskuryakov + + Mac build fix. + + * JavaScriptCore.exp: Export new JSGlobalData static data members. + +2010-01-07 Alexey Proskuryakov + + Reviewed by Geoffrey Garen. + + https://bugs.webkit.org/show_bug.cgi?id=33057 + REGRESSION(r49365): typeof(xhr.responseText) != "string" in Windows + + REGRESSION: WebKit fails to start PeaceKeeper benchmark + + Test: fast/js/webcore-string-comparison.html + + In r49365, some code was moved from JSString.cpp to JSString.h, and as a result, WebCore + got a way to directly instantiate JSStrings over DLL borders. Since vftable for JSString was + not exported, objects created from WebCore got a different vptr, and JavaScriptCore + optimizations that relied on vptr of all JSString objects being equal failed. + + * config.h: Added a JS_EXPORTCLASS macro for exporting classes. It's currently the same as + JS_EXPORTDATA, but it clearly needed a new name. + + * runtime/InitializeThreading.cpp: + (JSC::initializeThreadingOnce): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::storeVPtrs): + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::createNonDefault): + (JSC::JSGlobalData::create): + (JSC::JSGlobalData::sharedInstance): + * runtime/JSGlobalData.h: + Store vptrs just once, no need to repeatedly pick and copy them. This makes it possible to + assert vptr correctness in object destructors (which don't have access to JSGlobalData, + and even Heap::heap(this) will fail for fake objects created from storeVPtrs()). + + * runtime/JSArray.cpp: (JSC::JSArray::~JSArray): Assert that vptr is what we expect it to be. + It's important to assert in destructor, because MSVC changes the vptr after constructor + is invoked. + * runtime/JSByteArray.cpp: (JSC::JSByteArray::~JSByteArray): Ditto. + * runtime/JSByteArray.h: Ditto. + * runtime/JSFunction.h: Ditto. + * runtime/JSFunction.cpp: (JSC::JSFunction::~JSFunction): Ditto. + + * runtime/JSCell.h: (JSC::JSCell::setVPtr): Added a method to substitute vptr for another + one. + + * runtime/JSString.h: Export JSString class together with its vftable, and tell other + libraries tp import it. This is needed on platforms that have a separate JavaScriptCore + dynamic library - and on Mac, we already did the export via JavaScriptCore.exp. + (JSC::JSString::~JSString): Assert tha vptr is what we expect it to be. + (JSC::fixupVPtr): Store a previously saved primary vftable pointer (do nothing if building + JavaScriptCore itself). + (JSC::jsSingleCharacterString): Call fixupVPtr in case this is call across DLL boundary. + (JSC::jsSingleCharacterSubstring): Ditto. + (JSC::jsNontrivialString): Ditto. + (JSC::jsString): Ditto. + (JSC::jsSubstring): Ditto. + (JSC::jsOwnedString): Ditto. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export the new static + JSGlobalData members that are used in WebCore via inline functions. + +2010-01-07 Geoffrey Garen + + Reviewed by Sam Weinig. + + Safari memory usage skyrockets using new Google AdWords interface + https://bugs.webkit.org/show_bug.cgi?id=33343 + + The memory use was caused by the global object creating too many structures + as it thrashed between different specific functions. + + * runtime/Structure.cpp: + (JSC::Structure::Structure): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::changePrototypeTransition): + (JSC::Structure::despecifyFunctionTransition): + (JSC::Structure::addAnonymousSlotsTransition): + (JSC::Structure::getterSetterTransition): + (JSC::Structure::toDictionaryTransition): + (JSC::Structure::addPropertyWithoutTransition): + (JSC::Structure::despecifyAllFunctions): + * runtime/Structure.h: + (JSC::Structure::disableSpecificFunctionTracking): Track a thrash count + for specific functions. Disable specific function tracking once the + thrash count has been hit. + +2010-01-07 Csaba Osztrogonác + + Reviewed by Simon Hausmann. + + [Qt] Enable JIT in debug mode on win32 after r51141 fixed the crashes. + + * JavaScriptCore.pri: + +2010-01-07 Zoltan Horvath + + Reviewed by Holger Freyther. + + [Mac] Build fix when FAST_MALLOC_MATCH_VALIDATION=1 + https://bugs.webkit.org/show_bug.cgi?id=33312 + + Using of operator += cause compile error on Mac, so it is changed to + "= static_cast(old_ptr) + 1". + + * wtf/FastMalloc.cpp: + (WTF::TCMallocStats::realloc): + +2010-01-07 Zoltan Horvath + + Reviewed by Holger Freyther. + + [Qt] Build fix when FAST_MALLOC_MATCH_VALIDATION=1 + https://bugs.webkit.org/show_bug.cgi?id=33312 + + Remove pByte (committed in r42344 from #20422), because pByte doesn't + exist and it is unnecessary. + + * wtf/FastMalloc.cpp: + (WTF::TCMallocStats::realloc): + +2010-01-06 Gavin Barraclough + + QT build fix. + + * runtime/Identifier.cpp: + (JSC::createIdentifierTableSpecific): + +2010-01-06 Gavin Barraclough + + Windows build fix part I. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2010-01-06 Dan Bernstein + + Build fix + + * runtime/Identifier.cpp: + (JSC::createIdentifierTableSpecificCallback): + +2010-01-05 Gavin Barraclough + + Reviewed by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=33236 + Remove m_identifierTable pointer from UString + + Currently every string holds a pointer so that during destruction, + if a string has been used as an identifier, it can remove itself + from the table. By instead accessing the identifierTable via a + thread specific tracking the table associated with the current + globaldata, we can save the memory cost of this pointer. + + * API/APIShims.h: + (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): + (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock): + (JSC::APICallbackShim::APICallbackShim): + (JSC::APICallbackShim::~APICallbackShim): + + - change the API shims to track the identifierTable of the current JSGlobalData. + + * API/JSContextRef.cpp: + (JSContextGroupCreate): + + - update creation of JSGlobalData for API usage to use new create method. + - fix shim instanciation bug in JSGlobalContextCreateInGroup. + + * JavaScriptCore.exp: + * runtime/Completion.cpp: + (JSC::checkSyntax): + (JSC::evaluate): + + - add asserts to check the identifierTable is being tracked correctly. + + * runtime/Identifier.cpp: + (JSC::IdentifierTable::~IdentifierTable): + (JSC::IdentifierTable::add): + (JSC::Identifier::remove): + (JSC::Identifier::checkSameIdentifierTable): + (JSC::createIdentifierTableSpecificCallback): + (JSC::createIdentifierTableSpecific): + (JSC::createDefaultDataSpecific): + + - Use currentIdentifierTable() instead of UStringImpl::m_identifierTable. + - Define methods to access the thread specific identifier tables. + + * runtime/Identifier.h: + (JSC::ThreadIdentifierTableData::ThreadIdentifierTableData): + (JSC::defaultIdentifierTable): + (JSC::setDefaultIdentifierTable): + (JSC::currentIdentifierTable): + (JSC::setCurrentIdentifierTable): + (JSC::resetCurrentIdentifierTable): + + - Declare methods to access the thread specific identifier tables. + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::createNonDefault): + (JSC::JSGlobalData::create): + (JSC::JSGlobalData::sharedInstance): + + - creation of JSGlobalData objects, other than for API usage, associate themselves with the current thread. + + * runtime/JSGlobalData.h: + * runtime/UStringImpl.cpp: + (JSC::UStringImpl::destroy): + + - destroy() method should be using isIdentifier(). + + * runtime/UStringImpl.h: + (JSC::UStringImpl::isIdentifier): + (JSC::UStringImpl::setIsIdentifier): + (JSC::UStringImpl::checkConsistency): + (JSC::UStringImpl::UStringImpl): + + - replace m_identifierTable with a single m_isIdentifier bit. + + * wtf/StringHashFunctions.h: + (WTF::stringHash): + + - change string hash result from 32-bit to 31-bit, to free a bit in UStringImpl for m_isIdentifier. + +2009-12-25 Patrick Gansterer + + Reviewed by Eric Seidel. + + Buildfix for WinCE + style fixes. + https://bugs.webkit.org/show_bug.cgi?id=32939 + + * jsc.cpp: + (functionPrint): + (functionQuit): + (parseArguments): + (fillBufferWithContentsOfFile): + +2010-01-05 Patrick Gansterer + + Reviewed by Eric Seidel. + + WinCE buildfix after r52791 (renamed PLATFORM(WINCE) to OS(WINCE)). + https://bugs.webkit.org/show_bug.cgi?id=33205 + + * jit/ExecutableAllocator.h: + +2010-01-05 Patrick Gansterer + + Reviewed by Darin Adler. + + Added compiler error for unsupported platforms. + https://bugs.webkit.org/show_bug.cgi?id=33112 + + * jit/JITStubs.cpp: + +2010-01-05 Gabor Loki + + Reviewed by Maciej Stachowiak. + + Follow r52729 in ARMAssembler. + https://bugs.webkit.org/show_bug.cgi?id=33208 + + Use WTF_ARM_ARCH_AT_LEAST instead of ARM_ARCH_VERSION + + * assembler/ARMAssembler.cpp: + (JSC::ARMAssembler::encodeComplexImm): Move tmp declaration to ARMv7 + * assembler/ARMAssembler.h: + (JSC::ARMAssembler::): + (JSC::ARMAssembler::bkpt): + +2010-01-05 Maciej Stachowiak + + Unreviewed build fix for Gtk+ + + Don't use // comments in Platform.h, at least some of them seem to make the version of GCC + used on the Gtk buildbot unhappy. + + * wtf/Platform.h: + +2010-01-04 Maciej Stachowiak + + Reviewed by Darin Fisher. + + Reorganize, document and rename OS() platform macros. + https://bugs.webkit.org/show_bug.cgi?id=33198 + + * wtf/Platform.h: Rename, reorganize and document OS() macros. + + Adapt to name changes. Also fixed a few incorrect OS checks. + + * API/JSContextRef.cpp: + * assembler/MacroAssemblerARM.cpp: + (JSC::isVFPPresent): + * assembler/MacroAssemblerX86Common.h: + * bytecode/SamplingTool.cpp: + * config.h: + * interpreter/RegisterFile.cpp: + (JSC::RegisterFile::~RegisterFile): + * interpreter/RegisterFile.h: + (JSC::RegisterFile::RegisterFile): + (JSC::RegisterFile::grow): + * jit/ExecutableAllocator.h: + * jit/ExecutableAllocatorFixedVMPool.cpp: + * jit/ExecutableAllocatorPosix.cpp: + * jit/ExecutableAllocatorSymbian.cpp: + * jit/ExecutableAllocatorWin.cpp: + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITStubs.cpp: + * jsc.cpp: + (main): + * parser/Grammar.y: + * profiler/ProfileNode.cpp: + (JSC::getCount): + * runtime/Collector.cpp: + (JSC::Heap::Heap): + (JSC::Heap::allocateBlock): + (JSC::Heap::freeBlockPtr): + (JSC::currentThreadStackBase): + (JSC::getCurrentPlatformThread): + (JSC::suspendThread): + (JSC::resumeThread): + (JSC::getPlatformThreadRegisters): + (JSC::otherThreadStackPointer): + * runtime/Collector.h: + * runtime/DateConstructor.cpp: + * runtime/DatePrototype.cpp: + (JSC::formatLocaleDate): + * runtime/InitializeThreading.cpp: + (JSC::initializeThreading): + * runtime/MarkStack.h: + (JSC::MarkStack::MarkStackArray::shrinkAllocation): + * runtime/MarkStackPosix.cpp: + * runtime/MarkStackSymbian.cpp: + * runtime/MarkStackWin.cpp: + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncLastIndexOf): + * runtime/TimeoutChecker.cpp: + (JSC::getCPUTime): + * runtime/UString.cpp: + (JSC::UString::from): + * wtf/Assertions.cpp: + * wtf/Assertions.h: + * wtf/CurrentTime.cpp: + (WTF::lowResUTCTime): + * wtf/CurrentTime.h: + (WTF::getLocalTime): + * wtf/DateMath.cpp: + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_ThreadCache::InitModule): + (WTF::TCMallocStats::): + * wtf/FastMalloc.h: + * wtf/MathExtras.h: + * wtf/RandomNumber.cpp: + (WTF::randomNumber): + * wtf/RandomNumberSeed.h: + (WTF::initializeRandomNumberGenerator): + * wtf/StringExtras.h: + * wtf/TCSpinLock.h: + (TCMalloc_SpinLock::Unlock): + (TCMalloc_SlowLock): + * wtf/TCSystemAlloc.cpp: + * wtf/ThreadSpecific.h: + (WTF::::destroy): + * wtf/Threading.h: + * wtf/ThreadingPthreads.cpp: + (WTF::initializeThreading): + (WTF::isMainThread): + * wtf/ThreadingWin.cpp: + (WTF::wtfThreadEntryPoint): + (WTF::createThreadInternal): + * wtf/VMTags.h: + * wtf/unicode/icu/CollatorICU.cpp: + (WTF::Collator::userDefault): + * wtf/win/MainThreadWin.cpp: + (WTF::initializeMainThreadPlatform): + +2010-01-04 Gustavo Noronha Silva + + Add missing files to the build system - make distcheck build fix. + + * GNUmakefile.am: + +2010-01-04 Gavin Barraclough + + Reviewed by Sam Weinig, additional coding by Mark Rowe. + + https://bugs.webkit.org/show_bug.cgi?id=33163 + Add string hashing functions to WTF. + Use WTF's string hashing functions from UStringImpl. + + * GNUmakefile.am: + * JavaScriptCore.exp: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/UStringImpl.cpp: + * runtime/UStringImpl.h: + (JSC::UStringImpl::computeHash): + * wtf/HashFunctions.h: + * wtf/StringHashFunctions.h: Added. + (WTF::stringHash): + +2010-01-04 Dmitry Titov + + Not reviewed, attempt to fix ARM bulid. + + * wtf/Platform.h: + +2010-01-04 Gavin Barraclough + + Rubber stamped by Geoff Garen. + + Add an 'isIdentifier' to UStringImpl, use this where appropriate + (where previously 'identifierTable' was being tested). + + * API/JSClassRef.cpp: + (OpaqueJSClass::~OpaqueJSClass): + (OpaqueJSClassContextData::OpaqueJSClassContextData): + * runtime/Identifier.cpp: + (JSC::Identifier::addSlowCase): + * runtime/Identifier.h: + (JSC::Identifier::add): + * runtime/PropertyNameArray.cpp: + (JSC::PropertyNameArray::add): + * runtime/UStringImpl.h: + (JSC::UStringImpl::isIdentifier): + +2010-01-04 Gavin Barraclough + + Reviewed by Sam "Shimmey Shimmey" Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=33158 + Refactor JSC API entry/exit to use RAII instead of copy/pasting code. + Make it easier to change set of actions taken when passing across the API boundary. + + * API/APIShims.h: Added. + (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): + (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock): + (JSC::APIEntryShim::APIEntryShim): + (JSC::APICallbackShim::APICallbackShim): + (JSC::APICallbackShim::~APICallbackShim): + * API/JSBase.cpp: + (JSEvaluateScript): + (JSCheckScriptSyntax): + (JSGarbageCollect): + (JSReportExtraMemoryCost): + * API/JSCallbackConstructor.cpp: + (JSC::constructJSCallback): + * API/JSCallbackFunction.cpp: + (JSC::JSCallbackFunction::call): + * API/JSCallbackObjectFunctions.h: + (JSC::::init): + (JSC::::getOwnPropertySlot): + (JSC::::put): + (JSC::::deleteProperty): + (JSC::::construct): + (JSC::::hasInstance): + (JSC::::call): + (JSC::::getOwnPropertyNames): + (JSC::::toNumber): + (JSC::::toString): + (JSC::::staticValueGetter): + (JSC::::callbackGetter): + * API/JSContextRef.cpp: + * API/JSObjectRef.cpp: + (JSObjectMake): + (JSObjectMakeFunctionWithCallback): + (JSObjectMakeConstructor): + (JSObjectMakeFunction): + (JSObjectMakeArray): + (JSObjectMakeDate): + (JSObjectMakeError): + (JSObjectMakeRegExp): + (JSObjectGetPrototype): + (JSObjectSetPrototype): + (JSObjectHasProperty): + (JSObjectGetProperty): + (JSObjectSetProperty): + (JSObjectGetPropertyAtIndex): + (JSObjectSetPropertyAtIndex): + (JSObjectDeleteProperty): + (JSObjectCallAsFunction): + (JSObjectCallAsConstructor): + (JSObjectCopyPropertyNames): + (JSPropertyNameArrayRelease): + (JSPropertyNameAccumulatorAddName): + * API/JSValueRef.cpp: + (JSValueGetType): + (JSValueIsUndefined): + (JSValueIsNull): + (JSValueIsBoolean): + (JSValueIsNumber): + (JSValueIsString): + (JSValueIsObject): + (JSValueIsObjectOfClass): + (JSValueIsEqual): + (JSValueIsStrictEqual): + (JSValueIsInstanceOfConstructor): + (JSValueMakeUndefined): + (JSValueMakeNull): + (JSValueMakeBoolean): + (JSValueMakeNumber): + (JSValueMakeString): + (JSValueToBoolean): + (JSValueToNumber): + (JSValueToStringCopy): + (JSValueToObject): + (JSValueProtect): + (JSValueUnprotect): + * JavaScriptCore.xcodeproj/project.pbxproj: + +2010-01-04 Dan Bernstein + + Reviewed by Ada Chan and Mark Rowe. + + Updated copyright string + + * Info.plist: + * JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: + +2010-01-04 Adam Roben + + No review, rolling out r52741. + http://trac.webkit.org/changeset/52741 + https://bugs.webkit.org/show_bug.cgi?id=33056 + + * wtf/AlwaysInline.h: + +2010-01-04 Patrick Gansterer + + Reviewed by Darin Adler. + + Add cacheFlush support for WinCE + https://bugs.webkit.org/show_bug.cgi?id=33110 + + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::cacheFlush): + +2010-01-04 Patrick Gansterer + + Reviewed by Adam Roben. + + Implement NO_RETURN for COMPILER(MSVC). + https://bugs.webkit.org/show_bug.cgi?id=33056 + + * wtf/AlwaysInline.h: + +2010-01-04 Maciej Stachowiak + + Reviewed by Simon Hausmann. + + Fix some PLATFORM(*_ENDIAN) uses to CPU() + https://bugs.webkit.org/show_bug.cgi?id=33148 + + * runtime/JSCell.cpp: + (JSC::): + * runtime/JSValue.h: + (JSC::JSValue::): + +2010-01-04 Maciej Stachowiak + + Reviewed by Adam Barth. + + Document CPU() macros in comments. + https://bugs.webkit.org/show_bug.cgi?id=33147 + + * wtf/Platform.h: + +2010-01-04 Maciej Stachowiak + + Reviewed by Adam Barth. + + Reorganize, document and rename CPU() platform macros. + https://bugs.webkit.org/show_bug.cgi?id=33145 + ExecutableAllocatorSymbian appears to have buggy ARM version check + https://bugs.webkit.org/show_bug.cgi?id=33138 + + * wtf/Platform.h: + Rename all macros related to detection of particular CPUs or + classes of CPUs to CPU(), reorganize and document them. + + All remaining changes are adapting to the renames, plus fixing the + second bug cited above. + + * assembler/ARMAssembler.cpp: + * assembler/ARMAssembler.h: + * assembler/ARMv7Assembler.h: + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::Imm32::Imm32): + * assembler/MacroAssembler.h: + * assembler/MacroAssemblerARM.cpp: + * assembler/MacroAssemblerARM.h: + * assembler/MacroAssemblerCodeRef.h: + (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr): + * assembler/MacroAssemblerX86.h: + * assembler/MacroAssemblerX86Common.h: + * assembler/MacroAssemblerX86_64.h: + * assembler/X86Assembler.h: + (JSC::X86Registers::): + (JSC::X86Assembler::): + (JSC::X86Assembler::movl_mEAX): + (JSC::X86Assembler::movl_EAXm): + (JSC::X86Assembler::repatchLoadPtrToLEA): + (JSC::X86Assembler::X86InstructionFormatter::memoryModRM): + * jit/ExecutableAllocator.h: + * jit/ExecutableAllocatorFixedVMPool.cpp: + * jit/ExecutableAllocatorPosix.cpp: + * jit/ExecutableAllocatorSymbian.cpp: + (JSC::ExecutableAllocator::intializePageSize): + * jit/JIT.cpp: + * jit/JIT.h: + * jit/JITArithmetic.cpp: + * jit/JITInlineMethods.h: + (JSC::JIT::beginUninterruptedSequence): + (JSC::JIT::restoreArgumentReferenceForTrampoline): + (JSC::JIT::emitCount): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITStubs.cpp: + (JSC::JITThunks::JITThunks): + * jit/JITStubs.h: + * runtime/Collector.cpp: + (JSC::currentThreadStackBase): + (JSC::getPlatformThreadRegisters): + (JSC::otherThreadStackPointer): + * wrec/WREC.h: + * wrec/WRECGenerator.cpp: + (JSC::WREC::Generator::generateEnter): + (JSC::WREC::Generator::generateReturnSuccess): + (JSC::WREC::Generator::generateReturnFailure): + * wrec/WRECGenerator.h: + * wtf/FastMalloc.cpp: + * wtf/TCSpinLock.h: + (TCMalloc_SpinLock::Lock): + (TCMalloc_SpinLock::Unlock): + (TCMalloc_SlowLock): + * wtf/Threading.h: + * wtf/dtoa.cpp: + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateEnter): + (JSC::Yarr::RegexGenerator::generateReturn): + * yarr/RegexJIT.h: + +2010-01-04 Maciej Stachowiak + + Reviewed by Adam Barth. + + Clean up COMPILER macros and remove unused ones. + https://bugs.webkit.org/show_bug.cgi?id=33132 + + Removed values are COMPILER(BORLAND) and COMPILER(CYGWIN) - they were + not used anywhere. + + * wtf/Platform.h: + +2010-01-03 Maciej Stachowiak + + Reviewed by Eric Seidel. + + Update wtf/Platform.h to document the new system for porting macros. + https://bugs.webkit.org/show_bug.cgi?id=33130 + + * wtf/Platform.h: + +2009-12-29 Laszlo Gombos + + Reviewed by Maciej Stachowiak. + + PLATFORM(CAIRO) should be defined by WIN_CAIRO define + https://bugs.webkit.org/show_bug.cgi?id=22250 + + * wtf/Platform.h: Define WTF_PLATFORM_CAIRO for GTK port only + For the WinCairo port WTF_PLATFORM_CAIRO is already defined in config.h + +2009-12-28 Shu Chang + + Reviewed by Laszlo Gombos. + + [Qt] Delete ThreadPrivate instance after it is finished. + https://bugs.webkit.org/show_bug.cgi?id=32614 + + * wtf/qt/ThreadingQt.cpp: + (WTF::ThreadMonitor::instance): + (WTF::ThreadMonitor::threadFinished): + (WTF::createThreadInternal): + (WTF::detachThread): + +2009-12-28 Patrick Gansterer + + Reviewed by Maciej Stachowiak. + + Cleanup of #define JS_EXPORT. + + * API/JSBase.h: + +2009-12-27 Patrick Gansterer + + Reviewed by Adam Barth. + + WinCE buildfix (HWND_MESSAGE isn't supported there) + + * wtf/win/MainThreadWin.cpp: + (WTF::initializeMainThreadPlatform): + +2009-12-27 Patrick Gansterer + + Reviewed by Adam Barth. + + Added a file with WinMain function to link agains in WinCE. + + * os-win32/WinMain.cpp: Added. + (convertToUtf8): + (WinMain): + +2009-12-24 Laszlo Gombos + + Unreviewed; revert of r52550. + + The change regressed the following LayoutTests for QtWebKit. + + fast/workers/worker-call.html -> crashed + fast/workers/worker-close.html -> crashed + + * wtf/qt/ThreadingQt.cpp: + (WTF::waitForThreadCompletion): + (WTF::detachThread): + +2009-12-24 Shu Chang + + Reviewed by Laszlo Gombos. + + [Qt] Fix memory leak by deleting instance of ThreadPrivate + in function waitForThreadCompletion(), synchronously, or in + detachThread(), asynchronously. + https://bugs.webkit.org/show_bug.cgi?id=32614 + + * wtf/qt/ThreadingQt.cpp: + (WTF::waitForThreadCompletion): + (WTF::detachThread): + +2009-12-23 Kwang Yul Seo + + Reviewed by Laszlo Gombos. + + Include stddef.h for ptrdiff_t + https://bugs.webkit.org/show_bug.cgi?id=32891 + + ptrdiff_t is typedef-ed in stddef.h. + Include stddef.h in jit/ExecutableAllocator.h. + + * jit/ExecutableAllocator.h: + +2009-12-23 Patrick Gansterer + + Reviewed by Eric Seidel. + + Buildfix after r47092. + + * wtf/wince/MemoryManager.cpp: + (WTF::tryFastMalloc): + (WTF::tryFastZeroedMalloc): + (WTF::tryFastCalloc): + (WTF::tryFastRealloc): + +2009-12-23 Kent Tamura + + Reviewed by Darin Adler. + + HTMLInputElement::valueAsDate getter support. + https://bugs.webkit.org/show_bug.cgi?id=32876 + + Expose dateToDaysFrom1970(). + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * wtf/DateMath.cpp: + (WTF::dateToDaysFrom1970): + * wtf/DateMath.h: + +2009-12-22 Darin Adler + + Reviewed by Mark Rowe. + + Turn off datagrid by default, at least for all platforms Apple ships. + The datagrid implementation isn't ready for general web use yet. + + * Configurations/FeatureDefines.xcconfig: Turn off datagrid by default. + +2009-12-22 Steve Block + + Reviewed by David Levin. + + Updates Android's scheduleDispatchFunctionsOnMainThread() to use new + AndroidThreading class, rather than using JavaSharedClient directly. + This fixes the current layering violation. + https://bugs.webkit.org/show_bug.cgi?id=32651 + + The pattern is copied from Chromium, which uses the ChromiumThreading + class. This patch also fixes the style in ChromiumThreading.h. + + * wtf/android/AndroidThreading.h: Added. Declares AndroidThreading. + * wtf/android/MainThreadAndroid.cpp: Modified + (WTF::scheduleDispatchFunctionsOnMainThread): Uses AndroidThreading. + * wtf/chromium/ChromiumThreading.h: Modified. Fixes style. + +2009-12-22 Gavin Barraclough + + Reviewed by Sam Weinig. + + Fix a couple of problems with UntypedPtrAndBitfield. + + Add a m_leaksPtr to reduce false positives from leaks in debug builds + (this isn't perfect because we'd like a solution for release builds, + but this is now at least as good as a PtrAndFlags would be). + + Switch SmallStringsto use a regular string for the base, rather than + a static one. UntypedPtrAndBitfield assumes all strings are at least + 8 byte aligned; this migt not be true of static strings. Shared buffers + are heap allocated, as are all UStringImpls other than static strings. + Static strings cannot end up being the owner string of substrings, + since the only static strings are length 0. + + * runtime/SmallStrings.cpp: + (JSC::SmallStringsStorage::SmallStringsStorage): + * runtime/UStringImpl.h: + (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield): + (JSC::UStringImpl::UStringImpl): + +2009-12-22 Kwang Yul Seo + + Reviewed by Darin Adler. + + RVCT (__ARMCC_VERSION < 400000) does not provide strcasecmp and strncasecmp + https://bugs.webkit.org/show_bug.cgi?id=32857 + + Add implementation of strcasecmp and strncasecmp for RVCT < 4.0 + because earlier versions of RVCT 4.0 does not provide these functions. + + * wtf/StringExtras.cpp: Added. + (strcasecmp): + (strncasecmp): + * wtf/StringExtras.h: + +2009-12-22 Kwang Yul Seo + + Reviewed by Darin Adler. + + Define ALWAYS_INLINE and WTF_PRIVATE_INLINE to __forceinline for RVCT + https://bugs.webkit.org/show_bug.cgi?id=32853 + + Use __forceinline forces RVCT to compile a C or C++ function + inline. The compiler attempts to inline the function, regardless of + the characteristics of the function. + + * wtf/AlwaysInline.h: + * wtf/FastMalloc.h: + +2009-12-21 Simon Hausmann + + Prospective GTK build fix: Add UStringImpl.cpp/h to the build. + + * GNUmakefile.am: + +2009-12-21 Simon Hausmann + + Fix the Qt build, add UStringImpl.cpp to the build. + + * JavaScriptCore.pri: + +2009-12-21 Gavin Barraclough + + Windows Build fix part 5. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + +2009-12-21 Gavin Barraclough + + Reviewed by NOBODY (build fix). + Fix breakage of world introduced in build fix to r52463. + + * runtime/UStringImpl.h: + +2009-12-21 Gavin Barraclough + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=32831 + Replace UString::Rep implementation, following introduction of ropes to JSC. + + * Remove redundant overcapacity mechanisms. + * Reduce memory cost of Rep's. + * Add an inline storage mechanism akin to that in WebCore's StringImpl. + + ~1% Sunspider progression. + + * JavaScriptCore.exp: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/JSString.cpp: + (JSC::JSString::resolveRope): + * runtime/SmallStrings.cpp: + (JSC::SmallStringsStorage::SmallStringsStorage): + * runtime/UString.cpp: + (JSC::initializeUString): + (JSC::createRep): + (JSC::UString::createFromUTF8): + (JSC::UString::createUninitialized): + (JSC::UString::spliceSubstringsWithSeparators): + (JSC::UString::replaceRange): + (JSC::UString::ascii): + (JSC::UString::operator=): + (JSC::UString::toStrictUInt32): + (JSC::equal): + * runtime/UString.h: + (JSC::UString::isEmpty): + (JSC::UString::cost): + (JSC::makeString): + * runtime/UStringImpl.cpp: Added. + (JSC::UStringImpl::baseSharedBuffer): + (JSC::UStringImpl::sharedBuffer): + (JSC::UStringImpl::destroy): + (JSC::UStringImpl::computeHash): + * runtime/UStringImpl.h: Added. + (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield): + (JSC::UntypedPtrAndBitfield::asPtr): + (JSC::UntypedPtrAndBitfield::operator&=): + (JSC::UntypedPtrAndBitfield::operator|=): + (JSC::UntypedPtrAndBitfield::operator&): + (JSC::UStringImpl::create): + (JSC::UStringImpl::createCopying): + (JSC::UStringImpl::createUninitialized): + (JSC::UStringImpl::data): + (JSC::UStringImpl::size): + (JSC::UStringImpl::cost): + (JSC::UStringImpl::hash): + (JSC::UStringImpl::computedHash): + (JSC::UStringImpl::setHash): + (JSC::UStringImpl::identifierTable): + (JSC::UStringImpl::setIdentifierTable): + (JSC::UStringImpl::ref): + (JSC::UStringImpl::deref): + (JSC::UStringImpl::allocChars): + (JSC::UStringImpl::copyChars): + (JSC::UStringImpl::computeHash): + (JSC::UStringImpl::null): + (JSC::UStringImpl::empty): + (JSC::UStringImpl::checkConsistency): + (JSC::UStringImpl::): + (JSC::UStringImpl::UStringImpl): + (JSC::UStringImpl::operator new): + (JSC::UStringImpl::bufferOwnerString): + (JSC::UStringImpl::bufferOwnership): + (JSC::UStringImpl::isStatic): + +2009-12-18 Laszlo Gombos + + Reviewed by Kenneth Rohde Christiansen. + + Move some build decisions from Qt build system into source files + https://bugs.webkit.org/show_bug.cgi?id=31956 + + * JavaScriptCore.pri: Compile files unconditionally + * jit/ExecutableAllocatorPosix.cpp: Guard with PLATFORM(UNIX) && !PLATFORM(SYMBIAN) + * jit/ExecutableAllocatorWin.cpp: Guard with PLATFORM(WIN_OS) + * runtime/MarkStackPosix.cpp: Guard with PLATFORM(UNIX) && !PLATFORM(SYMBIAN) + * runtime/MarkStackSymbian.cpp: Guard with PLATFORM(SYMBIAN) + * runtime/MarkStackWin.cpp: Guard with PLATFORM(WIN_OS) + * wtf/Platform.h: Guard ENABLE_JSC_MULTIPLE_THREADS with ENABLE_SINGLE_THREADED for the Qt port + * wtf/ThreadingNone.cpp: Guard with ENABLE(SINGLE_THREADED) + * wtf/qt/ThreadingQt.cpp: Guard with !ENABLE(SINGLE_THREADED) + +2009-12-18 Gavin Barraclough + + Reviewed by Sam Weinig. + + Add createNonCopying method to UString to make replace constructor passed bool, + to make behaviour more explicit. Add createFromUTF8 to UString (wrapping method + on UString::Rep), since other cases of transliteration (e.g. from ascii) are + performed in UString constructors. Add/use setHash & size() accessors on Rep, + rather than accessing _hash/len directly. + + * API/JSClassRef.cpp: + (OpaqueJSClass::OpaqueJSClass): + * API/OpaqueJSString.cpp: + (OpaqueJSString::ustring): + * JavaScriptCore.exp: + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + * runtime/Identifier.cpp: + (JSC::Identifier::equal): + (JSC::CStringTranslator::translate): + (JSC::UCharBufferTranslator::translate): + (JSC::Identifier::addSlowCase): + * runtime/JSString.cpp: + (JSC::JSString::resolveRope): + * runtime/JSString.h: + (JSC::JSString::Rope::Fiber::refAndGetLength): + (JSC::JSString::Rope::append): + * runtime/StringBuilder.h: + (JSC::StringBuilder::release): + * runtime/StringConstructor.cpp: + (JSC::stringFromCharCodeSlowCase): + * runtime/StringPrototype.cpp: + (JSC::substituteBackreferencesSlow): + (JSC::stringProtoFuncToLowerCase): + (JSC::stringProtoFuncToUpperCase): + (JSC::stringProtoFuncFontsize): + (JSC::stringProtoFuncLink): + * runtime/UString.cpp: + (JSC::UString::UString): + (JSC::UString::createNonCopying): + (JSC::UString::createFromUTF8): + * runtime/UString.h: + (JSC::UString::Rep::setHash): + (JSC::UString::~UString): + (JSC::makeString): + +2009-12-18 Geoffrey Garen + + Reviewed by Cameron Zwarich and Gavin Barraclough. + + Changed Register constructors to assignment operators, to streamline + moving values into registers. (In theory, there's no difference between + the two, since the constructor should just inline away, but there seems + to be a big difference in the addled mind of the GCC optimizer.) + + In the interpreter, this is a 3.5% SunSpider speedup and a 1K-2K + reduction in stack usage per privateExecute stack frame. + + * interpreter/CallFrame.h: + (JSC::ExecState::setCalleeArguments): + (JSC::ExecState::setCallerFrame): + (JSC::ExecState::setScopeChain): + (JSC::ExecState::init): + (JSC::ExecState::setArgumentCount): + (JSC::ExecState::setCallee): + (JSC::ExecState::setCodeBlock): Added a little bit of casting so these + functions could use the new Register assignment operators. + + * interpreter/Register.h: + (JSC::Register::withInt): + (JSC::Register::Register): + (JSC::Register::operator=): Swapped in assignment operators for constructors. + +2009-12-18 Yongjun Zhang + + Reviewed by Simon Hausmann. + + https://bugs.webkit.org/show_bug.cgi?id=32713 + [Qt] make wtf/Assertions.h compile in winscw compiler. + + Add string arg before ellipsis to help winscw compiler resolve variadic + macro definitions in wtf/Assertions.h. + + * wtf/Assertions.h: + +2009-12-18 Geoffrey Garen + + Reviewed by Adam Roben. + + Fixed intermittent failure seen on Windows buildbot, and in other JSC + API clients. + + Added a WeakGCPtr class and changed OpaqueJSClass::cachedPrototype to + use it, to avoid vending a stale object as a prototype. + + * API/JSClassRef.cpp: + (OpaqueJSClassContextData::OpaqueJSClassContextData): + (OpaqueJSClass::prototype): + * API/JSClassRef.h: Use WeakGCPtr. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/WeakGCPtr.h: Added. + (JSC::WeakGCPtr::WeakGCPtr): + (JSC::WeakGCPtr::get): + (JSC::WeakGCPtr::clear): + (JSC::WeakGCPtr::operator*): + (JSC::WeakGCPtr::operator->): + (JSC::WeakGCPtr::operator!): + (JSC::WeakGCPtr::operator bool): + (JSC::WeakGCPtr::operator UnspecifiedBoolType): + (JSC::WeakGCPtr::assign): + (JSC::::operator): + (JSC::operator==): + (JSC::operator!=): + (JSC::static_pointer_cast): + (JSC::const_pointer_cast): + (JSC::getPtr): Added WeakGCPtr to the project. + +2009-12-18 Gavin Barraclough + + Reviewed by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=32720 + + * JavaScriptCore.exp: + - Remove exports for UString::append + * JavaScriptCore.xcodeproj/project.pbxproj: + - Make StringBuilder a private header (was project). + +2009-12-18 Martin Robinson + + Reviewed by Gustavo Noronha Silva. + + [GTK] GRefPtr does not take a reference when assigned a raw pointer + https://bugs.webkit.org/show_bug.cgi?id=32709 + + Ensure that when assigning a raw pointer to a GRefPtr, the reference + count is incremented. Also remove the GRefPtr conversion overload as + GRefPtr types have necessarily incompatible reference counting. + + * wtf/gtk/GRefPtr.h: + (WTF::GRefPtr::operator=): + +2009-12-18 Simon Hausmann + + Reviewed by Tor Arne Vestbø. + + [Qt] Clean up the qmake build system to distinguish between trunk builds and package builds + + https://bugs.webkit.org/show_bug.cgi?id=32716 + + * pcre/pcre.pri: Use standalone_package instead of QTDIR_build + +2009-12-18 Martin Robinson + + Reviewed by Gustavo Noronha Silva. + + [GTK] Compile warning from line 29 of GRefPtr.cpp + https://bugs.webkit.org/show_bug.cgi?id=32703 + + Fix memory leak and compiler warning in GRefPtr GHashTable template + specialization. + + * wtf/gtk/GRefPtr.cpp: + (WTF::refGPtr): + +2009-12-17 Sam Weinig + + Reviewed by Mark Rowe. + + Add BUILDING_ON_SNOW_LEOPARD and TARGETING_SNOW_LEOPARD #defines. + + * wtf/Platform.h: + +2009-12-17 Adam Roben + + Sync JavaScriptCore.vcproj with JavaScriptCore.xcodeproj and the + source tree + + Fixes . + + Reviewed by Ada Chan. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Moved + around files and filters so that the structure matches + JavaScriptCore.xcodeproj and the source tree. A few headers that were + previously omitted have been added, as well as JSZombie.{cpp,h}. + +2009-12-17 Adam Roben + + Remove HeavyProfile and TreeProfile completely + + These were mostly removed in r42808, but the empty files were left in + place. + + Fixes . + + Reviewed by John Sullivan. + + * Android.mk: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pri: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCoreSources.bkl: + Removed HeavyProfile/TreeProfile source files. + + * profiler/HeavyProfile.cpp: Removed. + * profiler/HeavyProfile.h: Removed. + * profiler/TreeProfile.cpp: Removed. + * profiler/TreeProfile.h: Removed. + +2009-12-17 Martin Robinson + + Reviewed by Gustavo Noronha Silva. + + [GTK] WebKit GTK needs a wrapper for ref counted glib/gobject structs + https://bugs.webkit.org/show_bug.cgi?id=21599 + + Implement GRefPtr, a smart pointer for reference counted GObject types. + + * GNUmakefile.am: + * wtf/gtk/GOwnPtr.cpp: + (WTF::GDir): + * wtf/gtk/GRefPtr.h: Added. + (WTF::): + (WTF::GRefPtr::GRefPtr): + (WTF::GRefPtr::~GRefPtr): + (WTF::GRefPtr::clear): + (WTF::GRefPtr::get): + (WTF::GRefPtr::operator*): + (WTF::GRefPtr::operator->): + (WTF::GRefPtr::operator!): + (WTF::GRefPtr::operator UnspecifiedBoolType): + (WTF::GRefPtr::hashTableDeletedValue): + (WTF::::operator): + (WTF::::swap): + (WTF::swap): + (WTF::operator==): + (WTF::operator!=): + (WTF::static_pointer_cast): + (WTF::const_pointer_cast): + (WTF::getPtr): + (WTF::adoptGRef): + (WTF::refGPtr): + (WTF::derefGPtr): + +2009-12-17 Gustavo Noronha Silva + + Unreviewed. Build fixes for make distcheck. + + * GNUmakefile.am: + +2009-12-16 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Fixed Interpreter::privateExecute macro generates + bloated code + + This patch cuts Interpreter stack use by about a third. + + * bytecode/Opcode.h: Changed Opcode to const void* to work with the + const static initiliazation we want to do in Interpreter::privateExecute. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::Interpreter): Moved hashtable initialization here to + avoid polluting Interpreter::privateExecute's stack, and changed it from a + series of add() calls to one add() call in a loop, to cut down on code size. + + (JSC::Interpreter::privateExecute): Changed a series of label computations + to a copy of a compile-time constant array to cut down on code size. + +2009-12-16 Mark Rowe + + Build fix. Disable debug variants of WebKit frameworks. + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2009-12-15 Geoffrey Garen + + Reviewed by Sam "r=me" Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=32498 + + REGRESSION(r51978-r52039): AJAX "Mark This Forum Read" function no longer + works + + Fixed a tyop. + + * runtime/Operations.h: + (JSC::jsAdd): Use the '&&' operator, not the ',' operator. + +2009-12-15 Geoffrey Garen + + Try to fix the windows build: don't export this inlined function. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2009-12-15 Geoffrey Garen + + Reviewed by Beth Dakin. + + Inlined JSCell's operator new. + + 3.7% speedup on bench-allocate-nonretained.js. + + * JavaScriptCore.exp: + * runtime/JSCell.cpp: + * runtime/JSCell.h: + (JSC::JSCell::operator new): + +2009-12-15 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Removed the number heap, replacing it with a one-item free list for + numbers, taking advantage of the fact that two number cells fit inside + the space for one regular cell, and number cells don't require destruction. + + SunSpider says 1.6% faster in JSVALUE32 mode (the only mode that + heap-allocates numbers). + + SunSpider says 1.1% faster in JSVALUE32_64 mode. v8 says 0.8% faster + in JSVALUE32_64 mode. 10% speedup on bench-alloc-nonretained.js. 6% + speedup on bench-alloc-retained.js. + + There's a lot of formulaic change in this patch, but not much substance. + + * JavaScriptCore.exp: + * debugger/Debugger.cpp: + (JSC::Debugger::recompileAllJSFunctions): + * runtime/Collector.cpp: + (JSC::Heap::Heap): + (JSC::Heap::destroy): + (JSC::Heap::allocateBlock): + (JSC::Heap::freeBlock): + (JSC::Heap::freeBlockPtr): + (JSC::Heap::freeBlocks): + (JSC::Heap::recordExtraCost): + (JSC::Heap::allocate): + (JSC::Heap::resizeBlocks): + (JSC::Heap::growBlocks): + (JSC::Heap::shrinkBlocks): + (JSC::Heap::markConservatively): + (JSC::Heap::clearMarkBits): + (JSC::Heap::markedCells): + (JSC::Heap::sweep): + (JSC::Heap::markRoots): + (JSC::Heap::objectCount): + (JSC::Heap::addToStatistics): + (JSC::Heap::statistics): + (JSC::Heap::isBusy): + (JSC::Heap::reset): + (JSC::Heap::collectAllGarbage): + (JSC::Heap::primaryHeapBegin): + (JSC::Heap::primaryHeapEnd): + * runtime/Collector.h: + (JSC::): Removed all code pertaining to the number heap, and changed all + heap template functions and classes to non-template functions and classes. + + (JSC::Heap::allocateNumber): A new optimization to replace the number + heap: allocate half-sized number cells in pairs, returning the first + cell and caching the second cell for the next allocation. + + * runtime/CollectorHeapIterator.h: + (JSC::LiveObjectIterator::LiveObjectIterator): + (JSC::LiveObjectIterator::operator++): + (JSC::DeadObjectIterator::DeadObjectIterator): + (JSC::DeadObjectIterator::operator++): + (JSC::ObjectIterator::ObjectIterator): + (JSC::ObjectIterator::operator++): + * runtime/JSCell.h: + (JSC::JSCell::isNumber): Removed all code pertaining to the number heap, + and changed all heap template functions and classes to non-template functions + and classes. + +2009-12-15 Zoltan Horvath + + Reviewed by Darin Adler. + + Allow custom memory allocation control for WeakGCMap class + https://bugs.webkit.org/show_bug.cgi?id=32547 + + Inherits WeakGCMap from FastAllocBase because it is instantiated by + 'new' at: WebCore/dom/Document.cpp:512. + + * runtime/WeakGCMap.h: + +2009-12-15 Zoltan Horvath + + Reviewed by Darin Adler. + + Allow custom memory allocation control for dtoa's P5Node struct + https://bugs.webkit.org/show_bug.cgi?id=32544 + + Inherits P5Node struct from Noncopyable because it is instantiated by + 'new' at wtf/dtoa.cpp:588 and don't need to be copyable. + + * wtf/dtoa.cpp: + +2009-12-14 Geoffrey Garen + + Reviewed by Simon Fraser. + + https://bugs.webkit.org/show_bug.cgi?id=32524 + REGRESSION(52084): fast/dom/prototypes.html failing two CSS tests + + * wtf/StdLibExtras.h: + (WTF::bitCount): The original patch put the parentheses in the wrong + place, completely changing the calculation and making it almost always + wrong. Moved the parentheses around the '+' operation, like the original + compiler warning suggested. + +2009-12-14 Gabor Loki + + Unreviewed trivial buildfix. + + Fix crosses initialization of usedPrimaryBlocks for JSValue32 + + * runtime/Collector.cpp: + (JSC::Heap::markConservatively): + +2009-12-14 Csaba Osztrogonác + + Reviewed by Simon Hausmann. + + GCC 4.3.x warning fixed. Suggested parantheses added. + warning: ../../../JavaScriptCore/wtf/StdLibExtras.h:77: warning: suggest parentheses around + or - in operand of & + + * wtf/StdLibExtras.h: + (WTF::bitCount): + +2009-12-13 Geoffrey Garen + + Reviewed by Sam Weinig. + + Changed GC from mark-sweep to mark-allocate. + + Added WeakGCMap to keep WebCore blissfully ignorant about objects that + have become garbage but haven't run their destructors yet. + + 1% SunSpider speedup. + 7.6% v8 speedup (37% splay speedup). + 17% speedup on bench-alloc-nonretained.js. + 18% speedup on bench-alloc-retained.js. + + * API/JSBase.cpp: + (JSGarbageCollect): + * API/JSContextRef.cpp: + * JavaScriptCore.exp: + * JavaScriptCore.xcodeproj/project.pbxproj: Updated for renames and new + files. + + * debugger/Debugger.cpp: + (JSC::Debugger::recompileAllJSFunctions): Updated to use the Collector + iterator abstraction. + + * jsc.cpp: + (functionGC): Updated for rename. + + * runtime/Collector.cpp: Slightly reduced the number of allocations per + collection, so that small workloads only allocate on collector block, + rather than two. + + (JSC::Heap::Heap): Updated to use the new allocateBlock function. + + (JSC::Heap::destroy): Updated to use the new freeBlocks function. + + (JSC::Heap::allocateBlock): New function to initialize a block when + allocating it. + + (JSC::Heap::freeBlock): Consolidated the responsibility for running + destructors into this function. + + (JSC::Heap::freeBlocks): Updated to use freeBlock. + + (JSC::Heap::recordExtraCost): Sweep the heap in this reporting function, + so that allocation, which is more common, doesn't have to check extraCost. + + (JSC::Heap::heapAllocate): Run destructors right before recycling a + garbage cell. This has better cache utilization than a separate sweep phase. + + (JSC::Heap::resizeBlocks): + (JSC::Heap::growBlocks): + (JSC::Heap::shrinkBlocks): New set of functions for managing the size of + the heap, now that the heap doesn't maintain any information about its + size. + + (JSC::isPointerAligned): + (JSC::isHalfCellAligned): + (JSC::isPossibleCell): + (JSC::isCellAligned): + (JSC::Heap::markConservatively): Cleaned up this code a bit. + + (JSC::Heap::clearMarkBits): + (JSC::Heap::markedCells): Some helper functions for examining the the mark + bitmap. + + (JSC::Heap::sweep): Simplified this function by using a DeadObjectIterator. + + (JSC::Heap::markRoots): Reordered some operations for clarity. + + (JSC::Heap::objectCount): + (JSC::Heap::addToStatistics): + (JSC::Heap::statistics): Rewrote these functions to calculate an object + count on demand, since the heap doesn't maintain this information by + itself. + + (JSC::Heap::reset): New function for resetting the heap once we've + exhausted heap space. + + (JSC::Heap::collectAllGarbage): This function matches the old collect() + behavior, but it's now an uncommon function used only by API. + + * runtime/Collector.h: + (JSC::CollectorBitmap::count): + (JSC::CollectorBitmap::isEmpty): Added some helper functions for managing + the collector mark bitmap. + + (JSC::Heap::reportExtraMemoryCost): Changed reporting from cell equivalents + to bytes, so it's easier to understand. + + * runtime/CollectorHeapIterator.h: + (JSC::CollectorHeapIterator::CollectorHeapIterator): + (JSC::CollectorHeapIterator::operator!=): + (JSC::CollectorHeapIterator::operator*): + (JSC::CollectorHeapIterator::advance): + (JSC::::LiveObjectIterator): + (JSC::::operator): + (JSC::::DeadObjectIterator): + (JSC::::ObjectIterator): New iterators for encapsulating details about + heap layout, and what's live and dead on the heap. + + * runtime/JSArray.cpp: + (JSC::JSArray::putSlowCase): + (JSC::JSArray::increaseVectorLength): Delay reporting extra cost until + we're fully constructed, so the heap mark phase won't visit us in an + invalid state. + + * runtime/JSCell.h: + (JSC::JSCell::): + (JSC::JSCell::createDummyStructure): + (JSC::JSCell::JSCell): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: Added a dummy cell to simplify allocation logic. + + * runtime/JSString.h: + (JSC::jsSubstring): Don't report extra cost for substrings, since they + share a buffer that's already reported extra cost. + + * runtime/Tracing.d: + * runtime/Tracing.h: Changed these dtrace hooks not to report object + counts, since they're no longer cheap to compute. + + * runtime/UString.h: Updated for renames. + + * runtime/WeakGCMap.h: Added. + (JSC::WeakGCMap::isEmpty): + (JSC::WeakGCMap::uncheckedGet): + (JSC::WeakGCMap::uncheckedBegin): + (JSC::WeakGCMap::uncheckedEnd): + (JSC::::get): + (JSC::::take): + (JSC::::set): + (JSC::::uncheckedRemove): Mentioned above. + + * wtf/StdLibExtras.h: + (WTF::bitCount): Added a bit population count function, so the heap can + count live objects to fulfill statistics questions. + +The very last cell in the block is not allocated -- should not be marked. + +2009-12-13 Geoffrey Garen + + Windows build fix: Export some new symbols. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2009-12-13 Geoffrey Garen + + Windows build fix: Removed some old exports. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2009-12-13 Geoffrey Garen + + Windows build fix: Use unsigned instead of uint32_t to avoid dependencies. + + * wtf/StdLibExtras.h: + (WTF::bitCount): + +2009-12-13 Gavin Barraclough + + Reviewed by NOBODY (speculative Windows build fix). + + * runtime/JSGlobalObjectFunctions.cpp: + +2009-12-13 Gavin Barraclough + + Reviewed by Sam Weinig. + + https://bugs.webkit.org/show_bug.cgi?id=32496 + Switch remaining cases of string construction to use StringBuilder. + Builds strings using a vector rather than using string append / addition. + + * JavaScriptCore.exp: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/Executable.cpp: + (JSC::FunctionExecutable::paramString): + * runtime/FunctionConstructor.cpp: + (JSC::constructFunction): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::encode): + (JSC::decode): + (JSC::globalFuncEscape): + (JSC::globalFuncUnescape): + * runtime/JSONObject.cpp: + (JSC::Stringifier::stringify): + (JSC::Stringifier::indent): + * runtime/JSString.h: + * runtime/LiteralParser.cpp: + (JSC::LiteralParser::Lexer::lexString): + * runtime/NumberPrototype.cpp: + (JSC::integerPartNoExp): + (JSC::numberProtoFuncToFixed): + (JSC::numberProtoFuncToPrecision): + * runtime/Operations.h: + (JSC::jsString): + * runtime/StringPrototype.cpp: + (JSC::substituteBackreferencesSlow): + (JSC::substituteBackreferences): + (JSC::stringProtoFuncConcat): + +2009-12-08 Jeremy Moskovich + + Reviewed by Eric Seidel. + + Add code to allow toggling ATSUI/Core Text rendering at runtime in ComplexTextController. + https://bugs.webkit.org/show_bug.cgi?id=31802 + + The goal here is to allow for a zero runtime hit for ports that decide to select + the API at compile time. + When both USE(ATSUI) and USE(CORE_TEXT) are true, the API is toggled + at runtime. Core Text is used for OS Versions >= 10.6. + + * wtf/Platform.h: #define USE_CORE_TEXT and USE_ATSUI on Chrome/Mac. + +2009-12-11 Maciej Stachowiak + + Reviewed by Oliver Hunt. + + Unify codegen for forward and backward variants of branches + https://bugs.webkit.org/show_bug.cgi?id=32463 + + * jit/JIT.h: + (JSC::JIT::emit_op_loop): Implemented in terms of forward variant. + (JSC::JIT::emit_op_loop_if_true): ditto + (JSC::JIT::emitSlow_op_loop_if_true): ditto + (JSC::JIT::emit_op_loop_if_false): ditto + (JSC::JIT::emitSlow_op_loop_if_false): ditto + (JSC::JIT::emit_op_loop_if_less): ditto + (JSC::JIT::emitSlow_op_loop_if_less): ditto + * jit/JITOpcodes.cpp: + +2009-12-11 Sam Weinig + + Reviewed by Anders Carlsson. + + Allow WTFs concept of the main thread to differ from pthreads when necessary. + + * wtf/ThreadingPthreads.cpp: + (WTF::initializeThreading): + (WTF::isMainThread): + * wtf/mac/MainThreadMac.mm: + (WTF::initializeMainThreadPlatform): + (WTF::scheduleDispatchFunctionsOnMainThread): + +2009-12-11 Gavin Barraclough + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=32454 + Refactor construction of simple strings to avoid string concatenation. + + Building strings through concatenation has a memory and performance cost - + a memory cost since we must over-allocate the buffer to leave space to append + into, and performance in that the string may still require reallocation (and + thus copying during construction). Instead move the full construction to + within a single function call (makeString), so that the arguments' lengths + can be calculated and an appropriate sized buffer allocated before copying + any characters. + + ~No performance change (~2% progression on date tests). + + * bytecode/CodeBlock.cpp: + (JSC::escapeQuotes): + (JSC::valueToSourceString): + (JSC::constantName): + (JSC::idName): + (JSC::CodeBlock::registerName): + (JSC::regexpToSourceString): + (JSC::regexpName): + * bytecompiler/NodesCodegen.cpp: + (JSC::substitute): + * profiler/Profiler.cpp: + (JSC::Profiler::createCallIdentifier): + * runtime/DateConstructor.cpp: + (JSC::callDate): + * runtime/DateConversion.cpp: + (JSC::formatDate): + (JSC::formatDateUTCVariant): + (JSC::formatTime): + (JSC::formatTimeUTC): + * runtime/DateConversion.h: + (JSC::): + * runtime/DatePrototype.cpp: + (JSC::dateProtoFuncToString): + (JSC::dateProtoFuncToUTCString): + (JSC::dateProtoFuncToDateString): + (JSC::dateProtoFuncToTimeString): + (JSC::dateProtoFuncToGMTString): + * runtime/ErrorPrototype.cpp: + (JSC::errorProtoFuncToString): + * runtime/ExceptionHelpers.cpp: + (JSC::createUndefinedVariableError): + (JSC::createErrorMessage): + (JSC::createInvalidParamError): + * runtime/FunctionPrototype.cpp: + (JSC::insertSemicolonIfNeeded): + (JSC::functionProtoFuncToString): + * runtime/ObjectPrototype.cpp: + (JSC::objectProtoFuncToString): + * runtime/RegExpConstructor.cpp: + (JSC::constructRegExp): + * runtime/RegExpObject.cpp: + (JSC::RegExpObject::match): + * runtime/RegExpPrototype.cpp: + (JSC::regExpProtoFuncCompile): + (JSC::regExpProtoFuncToString): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncBig): + (JSC::stringProtoFuncSmall): + (JSC::stringProtoFuncBlink): + (JSC::stringProtoFuncBold): + (JSC::stringProtoFuncFixed): + (JSC::stringProtoFuncItalics): + (JSC::stringProtoFuncStrike): + (JSC::stringProtoFuncSub): + (JSC::stringProtoFuncSup): + (JSC::stringProtoFuncFontcolor): + (JSC::stringProtoFuncFontsize): + (JSC::stringProtoFuncAnchor): + * runtime/UString.h: + (JSC::): + (JSC::makeString): + +2009-12-10 Gavin Barraclough + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=32400 + Switch remaining cases of string addition to use ropes. + + Re-landing r51975 - added toPrimitiveString method, + performs toPrimitive then subsequent toString operations. + + ~1% progression on Sunspidey. + + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * runtime/JSString.h: + (JSC::JSString::JSString): + (JSC::JSString::appendStringInConstruct): + * runtime/Operations.cpp: + (JSC::jsAddSlowCase): + * runtime/Operations.h: + (JSC::jsString): + (JSC::jsAdd): + +2009-12-11 Adam Roben + + Windows build fix + + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Added + $(WebKitOutputDir)/include/private to the include path. + +2009-12-11 Adam Roben + + Move QuartzCorePresent.h to include/private + + This fixes other projects that use wtf/Platform.h + + Rubber-stamped by Steve Falkenburg. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Let VS do its thang. + * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Write + QuartzCorePresent.h to $(WebKitOutputDir)/include/private. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: + Added $(WebKitOutputDir)/include/private to the include path. + +2009-12-11 Adam Roben + + Fix clean builds and everything rebuilding on every build + + Reviewed by Sam Weinig. + + * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Don't + write out QuartzCorePresent.h if it exists but is older than + QuartzCore.h. Also, create the directory we write QuartzCorePresent.h + into first. + +2009-12-11 Adam Roben + + Windows build fix for systems with spaces in their paths + + * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Quote some paths. + +2009-12-11 Chris Marrin + + Reviewed by Adam Roben. + + Add check for presence of QuartzCore headers + https://bugs.webkit.org/show_bug.cgi?id=31856 + + The script now checks for the presence of QuartzCore.h. If present + it will turn on ACCELERATED_COMPOSITING and 3D_RENDERING to enable + HW compositing on Windows. The script writes QuartzCorePresent.h to + the build directory which has a define telling whether QuartzCore is + present. + + * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: + * wtf/Platform.h: + +2009-12-11 Kent Tamura + + Reviewed by Darin Adler. + + Fix a problem that JSC::gregorianDateTimeToMS() returns a negative + value for a huge year value. + https://bugs.webkit.org/show_bug.cgi?id=32304 + + * wtf/DateMath.cpp: + (WTF::dateToDaysFrom1970): Renamed from dateToDayInYear, and changed the return type to double. + (WTF::calculateDSTOffset): Follow the dateToDaysFrom1970() change. + (WTF::timeClip): Use maxECMAScriptTime. + (JSC::gregorianDateTimeToMS): Follow the dateToDaysFrom1970() change. + +2009-12-10 Adam Barth + + No review, rolling out r51975. + http://trac.webkit.org/changeset/51975 + + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * runtime/JSString.h: + (JSC::JSString::JSString): + (JSC::JSString::appendStringInConstruct): + * runtime/Operations.cpp: + (JSC::jsAddSlowCase): + * runtime/Operations.h: + (JSC::jsString): + (JSC::jsAdd): + +2009-12-10 Oliver Hunt + + Reviewed by Gavin Barraclough. + + Incorrect caching of prototype lookup with dictionary base + https://bugs.webkit.org/show_bug.cgi?id=32402 + + Make sure we don't add cached prototype lookup to the proto_list + lookup chain if the top level object is a dictionary. + + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCacheGetByID): + +2009-12-10 Gavin Barraclough + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=32400 + Switch remaining cases of string addition to use ropes. + + ~1% progression on Sunspidey. + + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * runtime/JSString.h: + (JSC::JSString::JSString): + (JSC::JSString::appendStringInConstruct): + * runtime/Operations.cpp: + (JSC::jsAddSlowCase): + * runtime/Operations.h: + (JSC::jsString): + (JSC::jsAdd): + +2009-12-10 Kent Hansen + + Reviewed by Geoffrey Garen. + + Remove JSObject::getPropertyAttributes() and all usage of it. + https://bugs.webkit.org/show_bug.cgi?id=31933 + + getOwnPropertyDescriptor() should be used instead. + + * JavaScriptCore.exp: + * JavaScriptCore.order: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * debugger/DebuggerActivation.cpp: + (JSC::DebuggerActivation::getOwnPropertyDescriptor): + * debugger/DebuggerActivation.h: + * runtime/JSObject.cpp: + (JSC::JSObject::propertyIsEnumerable): + * runtime/JSObject.h: + * runtime/JSVariableObject.cpp: + * runtime/JSVariableObject.h: + +2009-12-10 Gavin Barraclough + + Reviewed by Oliver Hunt & Mark Rowe. + + https://bugs.webkit.org/show_bug.cgi?id=32367 + Add support for short Ropes (up to 3 entries) inline within JSString. + (rather than externally allocating an object to hold the rope). + Switch jsAdd of (JSString* + JSString*) to now make use of Ropes. + + ~1% progression on Sunspidey. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * runtime/JSString.cpp: + (JSC::JSString::resolveRope): + (JSC::JSString::toBoolean): + (JSC::JSString::getStringPropertyDescriptor): + * runtime/JSString.h: + (JSC::JSString::Rope::Fiber::deref): + (JSC::JSString::Rope::Fiber::ref): + (JSC::JSString::Rope::Fiber::refAndGetLength): + (JSC::JSString::Rope::append): + (JSC::JSString::JSString): + (JSC::JSString::~JSString): + (JSC::JSString::value): + (JSC::JSString::tryGetValue): + (JSC::JSString::length): + (JSC::JSString::canGetIndex): + (JSC::JSString::appendStringInConstruct): + (JSC::JSString::appendValueInConstructAndIncrementLength): + (JSC::JSString::isRope): + (JSC::JSString::string): + (JSC::JSString::ropeLength): + (JSC::JSString::getStringPropertySlot): + * runtime/Operations.h: + (JSC::jsString): + (JSC::jsAdd): + (JSC::resolveBase): + +2009-12-09 Anders Carlsson + + Reviewed by Geoffrey Garen. + + Fix three more things found by compiling with clang++. + + * runtime/Structure.h: + (JSC::StructureTransitionTable::reifySingleTransition): + Add the 'std' qualifier to the call to make_pair. + + * wtf/DateMath.cpp: + (WTF::initializeDates): + Incrementing a bool is deprecated according to the C++ specification. + + * wtf/PtrAndFlags.h: + (WTF::PtrAndFlags::PtrAndFlags): + Name lookup should not be done in dependent bases, so explicitly qualify the call to set. + +2009-12-09 Maciej Stachowiak + + Reviewed by Oliver Hunt. + + Google reader gets stuck in the "Loading..." state and does not complete + https://bugs.webkit.org/show_bug.cgi?id=32256 + + + * jit/JITArithmetic.cpp: + (JSC::JIT::emitSlow_op_jless): Fix some backward branches. + +2009-12-09 Gavin Barraclough + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=32228 + Make destruction of ropes non-recursive to prevent stack exhaustion. + Also, pass a UString& into initializeFiber rather than a Ustring::Rep*, + since the Rep is not being ref counted this could result in usage of a + Rep with refcount zero (where the Rep comes from a temporary UString + returned from a function). + + * runtime/JSString.cpp: + (JSC::JSString::Rope::destructNonRecursive): + (JSC::JSString::Rope::~Rope): + * runtime/JSString.h: + (JSC::JSString::Rope::initializeFiber): + * runtime/Operations.h: + (JSC::concatenateStrings): + +2009-12-09 Zoltan Herczeg + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=31930 + + Update to r51457. ASSERTs changed to COMPILE_ASSERTs. + The speedup is 25%. + + * runtime/JSGlobalData.cpp: + (JSC::VPtrSet::VPtrSet): + +2009-12-09 Steve Block + + Reviewed by Adam Barth. + + Updates Android Makefiles with latest additions. + https://bugs.webkit.org/show_bug.cgi?id=32278 + + * Android.mk: Modified. + * Android.v8.wtf.mk: Modified. + +2009-12-09 Sam Weinig + + Reviewed by Gavin Barraclough. + + Fix a bug found while trying to compile JavaScriptCore with clang++. + + * yarr/RegexPattern.h: + (JSC::Yarr::PatternTerm::PatternTerm): Don't self assign here. Use false instead. + +2009-12-09 Anders Carlsson + + Reviewed by Sam Weinig. + + Attempt to fix the Windows build. + + * wtf/FastMalloc.h: + +2009-12-09 Anders Carlsson + + Reviewed by Sam Weinig. + + Fix some things found while trying to compile JavaScriptCore with clang++. + + * wtf/FastMalloc.h: + Add correct exception specifications for the allocation/deallocation operators. + + * wtf/Vector.h: + * wtf/VectorTraits.h: + Fix a bunch of struct/class mismatches. + +2009-12-08 Maciej Stachowiak + + Reviewed by Darin Adler. + + move code generation portions of Nodes.cpp to bytecompiler directory + https://bugs.webkit.org/show_bug.cgi?id=32284 + + * bytecompiler/NodesCodegen.cpp: Copied from parser/Nodes.cpp. Removed parts that + are not about codegen. + * parser/Nodes.cpp: Removed everything that is about codegen. + + Update build systems: + + * Android.mk: + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pri: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * JavaScriptCoreSources.bkl: + +2009-12-08 Kevin Watters + + Reviewed by Kevin Ollivier. + + [wx] Mac plugins support. + + https://bugs.webkit.org/show_bug.cgi?id=32236 + + * wtf/Platform.h: + +2009-12-08 Dmitry Titov + + Rubber-stamped by David Levin. + + Revert and reopen "Add asserts to RefCounted to make sure ref/deref happens on the right thread." + It may have caused massive increase of reported leaks on the bots. + https://bugs.webkit.org/show_bug.cgi?id=31639 + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/WTF/WTF.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/Structure.cpp: + (JSC::Structure::Structure): + * wtf/RefCounted.h: + (WTF::RefCountedBase::ref): + (WTF::RefCountedBase::hasOneRef): + (WTF::RefCountedBase::refCount): + (WTF::RefCountedBase::derefBase): + * wtf/ThreadVerifier.h: Removed. + +2009-12-08 Gustavo Noronha Silva + + Reviewed by Darin Adler. + + Make WebKit build correctly on FreeBSD, IA64, and Alpha. + Based on work by Petr Salinger , + and Colin Watson . + + * wtf/Platform.h: + +2009-12-08 Dmitry Titov + + Reviewed by Darin Adler. + + Add asserts to RefCounted to make sure ref/deref happens on the right thread. + https://bugs.webkit.org/show_bug.cgi?id=31639 + + * runtime/Structure.cpp: + (JSC::Structure::Structure): Disable thread verification on this class since it uses addressOfCount(). + * wtf/RefCounted.h: + (WTF::RefCountedBase::ref): Add ASSERT. + (WTF::RefCountedBase::hasOneRef): Ditto. + (WTF::RefCountedBase::refCount): Ditto. + (WTF::RefCountedBase::derefBase): Ditto. + (WTF::RefCountedBase::disableThreadVerification): delegate to ThreadVerifier method. + * wtf/ThreadVerifier.h: Added. + (WTF::ThreadVerifier::ThreadVerifier): New Debug-only class to verify that ref/deref of RefCounted is done on the same thread. + (WTF::ThreadVerifier::activate): Activates checks. Called when ref count becomes above 2. + (WTF::ThreadVerifier::deactivate): Deactivates checks. Called when ref count drops below 2. + (WTF::ThreadVerifier::disableThreadVerification): used on objects that should not be checked (StringImpl etc) + (WTF::ThreadVerifier::verifyThread): + * GNUmakefile.am: Add ThreadVerifier.h to the build file. + * JavaScriptCore.gypi: Ditto. + * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto. + * JavaScriptCore.xcodeproj/project.pbxproj: Ditto. + +2009-12-08 Steve Block + + Reviewed by Adam Barth. + + [Android] Adds Makefiles for Android port. + https://bugs.webkit.org/show_bug.cgi?id=31325 + + * Android.mk: Added. + * Android.v8.wtf.mk: Added. + +2009-12-07 Dmitry Titov + + Rubber-stamped by Darin Adler. + + Remove ENABLE_SHARED_SCRIPT flags + https://bugs.webkit.org/show_bug.cgi?id=32245 + This patch was obtained by "git revert" command and then un-reverting of ChangeLog files. + + * Configurations/FeatureDefines.xcconfig: + * wtf/Platform.h: + +2009-12-07 Gavin Barraclough + + Reviewed by NOBODY (Windows build fixage part I). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2009-12-05 Gavin Barraclough + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=32184 + Handle out-of-memory conditions with JSC Ropes with a JS exception, rather than crashing. + Switch from using fastMalloc to tryFastMalloc, pass an ExecState to record the exception on. + + * API/JSCallbackObjectFunctions.h: + (JSC::::toString): + * API/JSValueRef.cpp: + (JSValueIsStrictEqual): + * JavaScriptCore.exp: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitEqualityOp): + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::functionName): + (JSC::DebuggerCallFrame::calculatedFunctionName): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::callEval): + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * profiler/ProfileGenerator.cpp: + (JSC::ProfileGenerator::addParentForConsoleStart): + * profiler/Profiler.cpp: + (JSC::Profiler::willExecute): + (JSC::Profiler::didExecute): + (JSC::Profiler::createCallIdentifier): + (JSC::createCallIdentifierFromFunctionImp): + * profiler/Profiler.h: + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncIndexOf): + (JSC::arrayProtoFuncLastIndexOf): + * runtime/DateConstructor.cpp: + (JSC::constructDate): + * runtime/FunctionPrototype.cpp: + (JSC::functionProtoFuncToString): + * runtime/InternalFunction.cpp: + (JSC::InternalFunction::name): + (JSC::InternalFunction::displayName): + (JSC::InternalFunction::calculatedDisplayName): + * runtime/InternalFunction.h: + * runtime/JSCell.cpp: + (JSC::JSCell::getString): + * runtime/JSCell.h: + (JSC::JSValue::getString): + * runtime/JSONObject.cpp: + (JSC::gap): + (JSC::Stringifier::Stringifier): + (JSC::Stringifier::appendStringifiedValue): + * runtime/JSObject.cpp: + (JSC::JSObject::putDirectFunction): + (JSC::JSObject::putDirectFunctionWithoutTransition): + (JSC::JSObject::defineOwnProperty): + * runtime/JSObject.h: + * runtime/JSPropertyNameIterator.cpp: + (JSC::JSPropertyNameIterator::get): + * runtime/JSString.cpp: + (JSC::JSString::Rope::~Rope): + (JSC::JSString::resolveRope): + (JSC::JSString::getPrimitiveNumber): + (JSC::JSString::toNumber): + (JSC::JSString::toString): + (JSC::JSString::toThisString): + (JSC::JSString::getStringPropertyDescriptor): + * runtime/JSString.h: + (JSC::JSString::Rope::createOrNull): + (JSC::JSString::Rope::operator new): + (JSC::JSString::value): + (JSC::JSString::tryGetValue): + (JSC::JSString::getIndex): + (JSC::JSString::getStringPropertySlot): + (JSC::JSValue::toString): + * runtime/JSValue.h: + * runtime/NativeErrorConstructor.cpp: + (JSC::NativeErrorConstructor::NativeErrorConstructor): + * runtime/Operations.cpp: + (JSC::JSValue::strictEqualSlowCase): + * runtime/Operations.h: + (JSC::JSValue::equalSlowCaseInline): + (JSC::JSValue::strictEqualSlowCaseInline): + (JSC::JSValue::strictEqual): + (JSC::jsLess): + (JSC::jsLessEq): + (JSC::jsAdd): + (JSC::concatenateStrings): + * runtime/PropertyDescriptor.cpp: + (JSC::PropertyDescriptor::equalTo): + * runtime/PropertyDescriptor.h: + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncReplace): + (JSC::stringProtoFuncToLowerCase): + (JSC::stringProtoFuncToUpperCase): + +2009-12-07 Nikolas Zimmermann + + Reviewed by Holger Freyther. + + Turn on (SVG) Filters support, by default. + https://bugs.webkit.org/show_bug.cgi?id=32224 + + * Configurations/FeatureDefines.xcconfig: Enable FILTERS build flag. + +2009-12-07 Steve Falkenburg + + Build fix. Be flexible about which version of ICU is used on Windows. + + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Add optional xcopy commands to copy ICU 4.2. + +2009-12-07 Maciej Stachowiak + + Reviewed by Oliver Hunt. + + op_loop_if_less JIT codegen is broken for 64-bit + https://bugs.webkit.org/show_bug.cgi?id=32221 + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_loop_if_false): Fix codegen in this version - test was backwards. + +2009-12-07 Oliver Hunt + + Reviewed by Maciej Stachowiak. + + Object.create fails if properties on the descriptor are getters + https://bugs.webkit.org/show_bug.cgi?id=32219 + + Correctly initialise the PropertySlots with the descriptor object. + + * runtime/ObjectConstructor.cpp: + (JSC::toPropertyDescriptor): + +2009-12-06 Maciej Stachowiak + + Not reviewed, build fix. + + Actually tested 64-bit *and* 32-bit build this time. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_loop_if_false): + +2009-12-06 Maciej Stachowiak + + Not reviewed, build fix. + + Really really fix 64-bit build for prior patch (actually tested this time). + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_loop_if_false): + (JSC::JIT::emitSlow_op_loop_if_false): + +2009-12-06 Maciej Stachowiak + + Not reviewed, build fix. + + Really fix 64-bit build for prior patch. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emitSlow_op_jless): + +2009-12-06 Maciej Stachowiak + + Not reviewed, build fix. + + Fix 64-bit build for prior patch. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emitSlow_op_loop_if_less): + +2009-12-05 Maciej Stachowiak + + Reviewed by Oliver Hunt. + + conway benchmark spends half it's time in op_less (jump fusion fails) + https://bugs.webkit.org/show_bug.cgi?id=32190 + + <1% speedup on SunSpider and V8 + 2x speedup on "conway" benchmark + + Two optimizations: + 1) Improve codegen for logical operators &&, || and ! in a condition context + + When generating code for combinations of &&, || and !, in a + condition context (i.e. in an if statement or loop condition), we + used to produce a value, and then separately jump based on its + truthiness. Now we pass the false and true targets in, and let the + logical operators generate jumps directly. This helps in four + ways: + + a) Individual clauses of a short-circuit logical operator can now + jump directly to the then or else clause of an if statement (or to + the top or exit of a loop) instead of jumping to a jump. + + b) It used to be that jump fusion with the condition of the first + clause of a logical operator was inhibited, because the register + was ref'd to be used later, in the actual condition jump; this no + longer happens since a jump straight to the final target is + generated directly. + + c) It used to be that jump fusion with the condition of the second + clause of a logical operator was inhibited, because there was a + jump target right after the second clause and before the actual + condition jump. But now it's no longer necessary for the first + clause to jump there so jump fusion is not blocked. + + d) We avoid generating excess mov statements in some cases. + + As a concrete example this source: + + if (!((x < q && y < q) || (t < q && z < q))) { + // ... + } + + Used to generate this bytecode: + + [ 34] less r1, r-15, r-19 + [ 38] jfalse r1, 7(->45) + [ 41] less r1, r-16, r-19 + [ 45] jtrue r1, 14(->59) + [ 48] less r1, r-17, r-19 + [ 52] jfalse r1, 7(->59) + [ 55] less r1, r-18, r-19 + [ 59] jtrue r1, 17(->76) + + And now generates this bytecode (also taking advantage of the second optimization below): + + [ 34] jnless r-15, r-19, 8(->42) + [ 38] jless r-16, r-19, 26(->64) + [ 42] jnless r-17, r-19, 8(->50) + [ 46] jless r-18, r-19, 18(->64) + + Note the jump fusion and the fact that there's less jump + indirection - three of the four jumps go straight to the target + clause instead of indirecting through another jump. + + 2) Implement jless opcode to take advantage of the above, since we'll now often generate + a less followed by a jtrue where fusion is not forbidden. + + * parser/Nodes.h: + (JSC::ExpressionNode::hasConditionContextCodegen): Helper function to determine + whether a node supports special conditional codegen. Return false as this is the default. + (JSC::ExpressionNode::emitBytecodeInConditionContext): Assert not reached - only really + defined for nodes that do have conditional codegen. + (JSC::UnaryOpNode::expr): Add const version. + (JSC::LogicalNotNode::hasConditionContextCodegen): Returne true only if subexpression + supports it. + (JSC::LogicalOpNode::hasConditionContextCodegen): Return true. + * parser/Nodes.cpp: + (JSC::LogicalNotNode::emitBytecodeInConditionContext): Implemented - just swap + the true and false targets for the child node. + (JSC::LogicalOpNode::emitBytecodeInConditionContext): Implemented - handle jumps + directly, improving codegen quality. Also handles further nested conditional codegen. + (JSC::ConditionalNode::emitBytecode): Use condition context codegen when available. + (JSC::IfNode::emitBytecode): ditto + (JSC::IfElseNode::emitBytecode): ditto + (JSC::DoWhileNode::emitBytecode): ditto + (JSC::WhileNode::emitBytecode): ditto + (JSC::ForNode::emitBytecode): ditto + + * bytecode/Opcode.h: + - Added loop_if_false opcode - needed now that falsey jumps can be backwards. + - Added jless opcode to take advantage of new fusion opportunities. + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): Handle above. + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitJumpIfTrue): Add peephole for less + jtrue ==> jless. + (JSC::BytecodeGenerator::emitJumpIfFalse): Add handling of backwrds falsey jumps. + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::emitNodeInConditionContext): Wrapper to handle tracking of + overly deep expressions etc. + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): Implement the two new opcodes (loop_if_false, jless). + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): Implement JIT support for the two new opcodes. + (JSC::JIT::privateCompileSlowCases): ditto + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_jless): + (JSC::JIT::emitSlow_op_jless): ditto + (JSC::JIT::emitBinaryDoubleOp): ditto + * jit/JITOpcodes.cpp: + (JSC::JIT::emitSlow_op_loop_if_less): ditto + (JSC::JIT::emit_op_loop_if_false): ditto + (JSC::JIT::emitSlow_op_loop_if_false): ditto + * jit/JITStubs.cpp: + * jit/JITStubs.h: + (JSC::): + +2009-12-04 Kent Hansen + + Reviewed by Darin Adler. + + JavaScript delete operator should return false for string properties + https://bugs.webkit.org/show_bug.cgi?id=32012 + + * runtime/StringObject.cpp: + (JSC::StringObject::deleteProperty): + +2009-12-03 Drew Wilson + + Rolled back r51633 because it causes a perf regression in Chromium. + + * wtf/Platform.h: + +2009-12-03 Gavin Barraclough + + Try and fix the Windows build. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export a symbol that should be exported. + +2009-12-03 Mark Rowe + + Try and fix the Mac build. + + * JavaScriptCore.exp: Export a symbol that should be exported. + +2009-12-03 Oliver Hunt + + Reviewed by Gavin Barraclough. + + REGRESSION(4.0.3-48777): Crash in JSC::ExecState::propertyNames() (Debug-only?) + https://bugs.webkit.org/show_bug.cgi?id=32133 + + Work around odd GCC-ism and correct the scopechain for use by + calls made while a cachedcall is active on the callstack. + + * interpreter/CachedCall.h: + (JSC::CachedCall::newCallFrame): + * runtime/JSArray.cpp: + (JSC::AVLTreeAbstractorForArrayCompare::compare_key_key): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncReplace): + +2009-12-03 Gavin Barraclough + + Reviewed by Oliver "Brraaaaiiiinnnnnzzzzzzzz" Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=32136 + Add a rope representation to JSString. Presently JSString always holds its data in UString form. + Instead, allow the result of a string concatenation to be represented in a tree form - with a + variable sized, reference-counted rope node retaining a set of UString::Reps (or other rope nopes). + + Strings must still currently be resolved down to a flat UString representation before being used, + but by holding the string in a rope representation during construction we can avoid copying data + until we know the final size of the string. + + ~2% progression on SunSpider (~25% on date-format-xparb, ~20% on string-validate-input). + + * JavaScriptCore.exp: + + - Update exports. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + + - Make use of new JSString::length() method to avoid prematurely resolving ropes. + + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + + - Switch the string length trampoline to read the length directly from JSString::m_length, + rather than from the JSString's UString::Rep's 'len' property. + + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + + - Modify op_add such that addition of two strings, where either or both strings are already + in rope representation, produces a rope as a result. + + * runtime/JSString.cpp: + (JSC::JSString::Rope::~Rope): + (JSC::copyChars): + (JSC::JSString::resolveRope): + (JSC::JSString::getPrimitiveNumber): + (JSC::JSString::toBoolean): + (JSC::JSString::toNumber): + (JSC::JSString::toString): + (JSC::JSString::toThisString): + (JSC::JSString::getStringPropertyDescriptor): + * runtime/JSString.h: + (JSC::JSString::Rope::Fiber::Fiber): + (JSC::JSString::Rope::Fiber::destroy): + (JSC::JSString::Rope::Fiber::isRope): + (JSC::JSString::Rope::Fiber::rope): + (JSC::JSString::Rope::Fiber::string): + (JSC::JSString::Rope::create): + (JSC::JSString::Rope::initializeFiber): + (JSC::JSString::Rope::ropeLength): + (JSC::JSString::Rope::stringLength): + (JSC::JSString::Rope::fibers): + (JSC::JSString::Rope::Rope): + (JSC::JSString::Rope::operator new): + (JSC::JSString::JSString): + (JSC::JSString::value): + (JSC::JSString::length): + (JSC::JSString::isRope): + (JSC::JSString::rope): + (JSC::JSString::string): + (JSC::JSString::canGetIndex): + (JSC::jsSingleCharacterSubstring): + (JSC::JSString::getIndex): + (JSC::jsSubstring): + (JSC::JSString::getStringPropertySlot): + + - Add rope form. + + * runtime/Operations.h: + (JSC::jsAdd): + (JSC::concatenateStrings): + + - Update string concatenation, and addition of ropes, to produce ropes. + + * runtime/StringObject.cpp: + (JSC::StringObject::getOwnPropertyNames): + + - Make use of new JSString::length() method to avoid prematurely resolving ropes. + +2009-11-23 Jeremy Moskovich + + Reviewed by Eric Seidel. + + Switch Chrome/Mac to use Core Text APIs rather than ATSUI APIs. + https://bugs.webkit.org/show_bug.cgi?id=31802 + + No test since this is already covered by existing pixel tests. + + * wtf/Platform.h: #define USE_CORE_TEXT for Chrome/Mac. + +2009-12-02 Oliver Hunt + + Reviewed by Gavin Barraclough. + + Add files missed in prior patch. + + * runtime/JSZombie.cpp: + (JSC::): + (JSC::JSZombie::leakedZombieStructure): + * runtime/JSZombie.h: Added. + (JSC::JSZombie::JSZombie): + (JSC::JSZombie::isZombie): + (JSC::JSZombie::classInfo): + (JSC::JSZombie::isGetterSetter): + (JSC::JSZombie::isAPIValueWrapper): + (JSC::JSZombie::isPropertyNameIterator): + (JSC::JSZombie::getCallData): + (JSC::JSZombie::getConstructData): + (JSC::JSZombie::getUInt32): + (JSC::JSZombie::toPrimitive): + (JSC::JSZombie::getPrimitiveNumber): + (JSC::JSZombie::toBoolean): + (JSC::JSZombie::toNumber): + (JSC::JSZombie::toString): + (JSC::JSZombie::toObject): + (JSC::JSZombie::markChildren): + (JSC::JSZombie::put): + (JSC::JSZombie::deleteProperty): + (JSC::JSZombie::toThisObject): + (JSC::JSZombie::toThisString): + (JSC::JSZombie::toThisJSString): + (JSC::JSZombie::getJSNumber): + (JSC::JSZombie::getOwnPropertySlot): + +2009-12-02 Oliver Hunt + + Reviewed by Gavin Barraclough. + + Add zombies to JSC + https://bugs.webkit.org/show_bug.cgi?id=32103 + + Add a compile time flag to make the JSC collector replace "unreachable" + objects with zombie objects. The zombie object is a JSCell subclass that + ASSERTs on any attempt to use the JSCell methods. In addition there are + a number of additional assertions in bottleneck code to catch zombie usage + as quickly as possible. + + Grrr. Argh. Brains. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * interpreter/Register.h: + (JSC::Register::Register): + * runtime/ArgList.h: + (JSC::MarkedArgumentBuffer::append): + (JSC::ArgList::ArgList): + * runtime/Collector.cpp: + (JSC::Heap::destroy): + (JSC::Heap::sweep): + * runtime/Collector.h: + * runtime/JSCell.h: + (JSC::JSCell::isZombie): + (JSC::JSValue::isZombie): + * runtime/JSValue.h: + (JSC::JSValue::decode): + (JSC::JSValue::JSValue): + * wtf/Platform.h: + +2009-12-01 Jens Alfke + + Reviewed by Darin Adler. + + Added variants of find/contains/add that allow a foreign key type to be used. + This will allow AtomicString-keyed maps to be queried by C string without + having to create a temporary AtomicString (see HTTPHeaderMap.) + The code for this is adapted from the equivalent in HashSet.h. + + * wtf/HashMap.h: + (WTF::HashMap::find): + (WTF::HashMap::contains): + (WTF::HashMap::add): + * wtf/HashSet.h: Changed "method" to "function member" in a comment. + +2009-12-01 Gustavo Noronha Silva + + Revert 51551 because it broke GTK+. + + * wtf/Platform.h: + +2009-11-30 Gavin Barraclough + + Windows Build fix. Reviewed by NOBODY. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2009-11-24 Gavin Barraclough + + Reviewed by Geoff Garen. + + Bug 31859 - Make world selection for JSC IsolatedWorlds automagical. + + WebCore presently has to explicitly specify the world before entering into JSC, + which is a little fragile (particularly since property access via a + getter/setter might invoke execution). Instead derive the current world from + the lexical global object. + + Remove the temporary duct tape of willExecute/didExecute virtual hooks on the JSGlobalData::ClientData - these are no longer necessary. + + * API/JSBase.cpp: + (JSEvaluateScript): + * API/JSObjectRef.cpp: + (JSObjectCallAsFunction): + * JavaScriptCore.exp: + * runtime/JSGlobalData.cpp: + * runtime/JSGlobalData.h: + +2009-11-30 Laszlo Gombos + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Remove obsolete PLATFORM(KDE) code + https://bugs.webkit.org/show_bug.cgi?id=31958 + + KDE is now using unpatched QtWebKit. + + * parser/Lexer.cpp: Remove obsolete KDE_USE_FINAL guard + * wtf/Platform.h: Remove PLATFORM(KDE) definition and code + section that is guarded with it. + +2009-11-30 Jan-Arve Sæther + + Reviewed by Simon Hausmann. + + [Qt] Fix compilation with win32-icc + + The Intel compiler does not support the __has_trivial_constructor type + trait. The Intel Compiler can report itself as _MSC_VER >= 1400. The + reason for that is that the Intel Compiler depends on the Microsoft + Platform SDK, and in order to try to be "fully" MS compatible it will + "pretend" to be the same MS compiler as was shipped with the MS PSDK. + (Thus, compiling with win32-icc with VC8 SDK will make the source code + "think" the compiler at hand supports this type trait). + + * wtf/TypeTraits.h: + +2009-11-29 Laszlo Gombos + + Reviewed by Eric Seidel. + + [Qt] Mac build has JIT disabled + https://bugs.webkit.org/show_bug.cgi?id=31828 + + * wtf/Platform.h: Enable JIT for Qt Mac builds + +2009-11-28 Laszlo Gombos + + Reviewed by Eric Seidel. + + Apply workaround for the limitation of VirtualFree with MEM_RELEASE to all ports running on Windows + https://bugs.webkit.org/show_bug.cgi?id=31943 + + * runtime/MarkStack.h: + (JSC::MarkStack::MarkStackArray::shrinkAllocation): + +2009-11-28 Zoltan Herczeg + + Reviewed by Gavin Barraclough. + + https://bugs.webkit.org/show_bug.cgi?id=31930 + + Seems a typo. We don't need ~270k memory to determine the vptrs. + + * runtime/JSGlobalData.cpp: + (JSC::VPtrSet::VPtrSet): + +2009-11-27 Shinichiro Hamaji + + Unreviewed. + + Move GOwnPtr* from wtf to wtf/gtk + https://bugs.webkit.org/show_bug.cgi?id=31793 + + Build fix for chromium after r51423. + Exclude gtk directory from chromium build. + + * JavaScriptCore.gyp/JavaScriptCore.gyp: + +2009-11-25 Oliver Hunt + + Reviewed by Gavin Barraclough. + + Incorrect behaviour of jneq_null in the interpreter + https://bugs.webkit.org/show_bug.cgi?id=31901 + + Correct the logic of jneq_null. This is already covered by existing tests. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + +2009-11-26 Laszlo Gombos + + Reviewed by Oliver Hunt. + + Move GOwnPtr* from wtf to wtf/gtk + https://bugs.webkit.org/show_bug.cgi?id=31793 + + * GNUmakefile.am: Change the path for GOwnPtr.*. + * JavaScriptCore.gyp/JavaScriptCore.gyp: Remove + GOwnPtr.cpp from the exclude list. + * JavaScriptCore.gypi: Change the path for GOwnPtr.*. + * wscript: Remove GOwnPtr.cpp from the exclude list. + * wtf/GOwnPtr.cpp: Removed. + * wtf/GOwnPtr.h: Removed. + * wtf/Threading.h: Change the path for GOwnPtr.h. + * wtf/gtk/GOwnPtr.cpp: Copied from JavaScriptCore/wtf/GOwnPtr.cpp. + * wtf/gtk/GOwnPtr.h: Copied from JavaScriptCore/wtf/GOwnPtr.h. + * wtf/unicode/glib/UnicodeGLib.h: Change the path for GOwnPtr.h. + +2009-11-24 Dmitry Titov + + Reviewed by Eric Seidel. + + Add ENABLE_SHARED_SCRIPT feature define and flag for build-webkit + https://bugs.webkit.org/show_bug.cgi?id=31444 + + * Configurations/FeatureDefines.xcconfig: + * wtf/Platform.h: + +2009-11-24 Chris Marrin + + Reviewed by Simon Fraser. + + Add ability to enable ACCELERATED_COMPOSITING on Windows (currently disabled) + https://bugs.webkit.org/show_bug.cgi?id=27314 + + * wtf/Platform.h: + +2009-11-24 Jason Smith + + Reviewed by Alexey Proskuryakov. + + RegExp#exec's returned Array-like object behaves differently from + regular Arrays + https://bugs.webkit.org/show_bug.cgi?id=31689 + + * JavaScriptCore/runtime/RegExpConstructor.cpp: ensure that undefined + values are added to the returned RegExpMatchesArray + +2009-11-24 Oliver Hunt + + Reviewed by Alexey Proskuryakov. + + JSON.stringify performance on undefined is very poor + https://bugs.webkit.org/show_bug.cgi?id=31839 + + Switch from a UString to a Vector when building + the JSON string, allowing us to safely remove the substr-copy + we otherwise did when unwinding an undefined property. + + Also turns out to be a ~5% speedup on stringification. + + * runtime/JSONObject.cpp: + (JSC::Stringifier::StringBuilder::append): + (JSC::Stringifier::stringify): + (JSC::Stringifier::Holder::appendNextProperty): + +2009-11-24 Mark Rowe + + Fix production builds where the source tree may be read-only. + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2009-11-23 Laszlo Gombos + + Reviewed by Kenneth Rohde Christiansen. + + Include "config.h" to meet Coding Style Guidelines + https://bugs.webkit.org/show_bug.cgi?id=31792 + + * wtf/unicode/UTF8.cpp: + * wtf/unicode/glib/UnicodeGLib.cpp: + * wtf/unicode/wince/UnicodeWince.cpp: + +2009-11-23 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Streamlined some Math functions where we expect or know the result not + to be representable as an int. + + SunSpider says 0.6% faster. + + * runtime/JSNumberCell.h: + (JSC::JSValue::JSValue): + * runtime/JSValue.h: + (JSC::JSValue::): + (JSC::jsDoubleNumber): + (JSC::JSValue::JSValue): Added a function for making a numeric JSValue + and skipping the "can I encode this as an int?" check, avoiding the + overhead of int <-> double roundtripping and double <-> double comparison + and branching. + + * runtime/MathObject.cpp: + (JSC::mathProtoFuncACos): + (JSC::mathProtoFuncASin): + (JSC::mathProtoFuncATan): + (JSC::mathProtoFuncATan2): + (JSC::mathProtoFuncCos): + (JSC::mathProtoFuncExp): + (JSC::mathProtoFuncLog): + (JSC::mathProtoFuncRandom): + (JSC::mathProtoFuncSin): + (JSC::mathProtoFuncSqrt): + (JSC::mathProtoFuncTan): For these functions, which we expect or know + to produce results not representable as ints, call jsDoubleNumber instead + of jsNumber. + +2009-11-23 Mark Rowe + + Unreviewed. Unbreak the regression tests after r51329. + + * API/JSBase.cpp: + (JSEvaluateScript): Null-check clientData before dereferencing it. + * API/JSObjectRef.cpp: + (JSObjectCallAsFunction): Ditto. + +2009-11-23 Gavin Barraclough + + Reviewed by Geoff Garen. + + Part 1/3 of REGRESSION: Many web pages fail to render after interesting script runs in isolated world + + Some clients of the JavaScriptCore API expect to be able to make callbacks over the JSC API, + and for this to automagically cause execution to take place in the world associated with the + global object associated with the ExecState (JSContextRef) passed. However this is not how + things work - the world must be explicitly set within WebCore. + + Making this work just for API calls to evaluate & call will be a far from perfect solution, + since direct (non-API) use of JSC still relies on WebCore setting the current world correctly. + A better solution would be to make this all work automagically all throughout WebCore, but this + will require more refactoring. + + Since the API is in JSC but worlds only exist in WebCore, add callbacks on the JSGlobalData::ClientData + to allow it to update the current world on entry/exit via the JSC API. This is temporary duck + tape, and should be removed once the current world no longer needs to be explicitly tracked. + + * API/JSBase.cpp: + (JSEvaluateScript): + * API/JSObjectRef.cpp: + (JSObjectCallAsFunction): + * JavaScriptCore.exp: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::ClientData::beginningExecution): + (JSC::JSGlobalData::ClientData::completedExecution): + * runtime/JSGlobalData.h: + +2009-11-23 Steve Block + + Reviewed by Dmitry Titov. + + Adds MainThreadAndroid.cpp with Android-specific WTF threading functions. + https://bugs.webkit.org/show_bug.cgi?id=31807 + + * wtf/android: Added. + * wtf/android/MainThreadAndroid.cpp: Added. + (WTF::timeoutFired): + (WTF::initializeMainThreadPlatform): + (WTF::scheduleDispatchFunctionsOnMainThread): + +2009-11-23 Alexey Proskuryakov + + Reviewed by Brady Eidson. + + https://bugs.webkit.org/show_bug.cgi?id=31748 + Make WebSocketHandleCFNet respect proxy auto-configuration files via CFProxySupport + + * JavaScriptCore.exp: Export callOnMainThreadAndWait. + +2009-11-23 Laszlo Gombos + + Reviewed by Kenneth Rohde Christiansen. + + [Symbian] Fix lastIndexOf() for Symbian + https://bugs.webkit.org/show_bug.cgi?id=31773 + + Symbian soft floating point library has problems with operators + comparing NaN to numbers. Without a workaround lastIndexOf() + function does not work. + + Patch developed by David Leong. + + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncLastIndexOf):Add an extra test + to check for NaN for Symbian. + +2009-11-23 Steve Block + + Reviewed by Eric Seidel. + + Android port lacks implementation of atomicIncrement and atomicDecrement. + https://bugs.webkit.org/show_bug.cgi?id=31715 + + * wtf/Threading.h: Modified. + (WTF::atomicIncrement): Added Android implementation. + (WTF::atomicDecrement): Added Android implementation. + +2009-11-22 Laszlo Gombos + + Unreviewed. + + [Qt] Sort source lists and remove obsolete comments + from the build system. + + * JavaScriptCore.pri: + +2009-11-21 Laszlo Gombos + + Reviewed by Eric Seidel. + + [Qt][Mac] Turn on multiple JavaScript threads for QtWebkit on Mac + https://bugs.webkit.org/show_bug.cgi?id=31753 + + * wtf/Platform.h: + +2009-11-19 Steve Block + + Android port lacks configuration in Platform.h and config.h. + https://bugs.webkit.org/show_bug.cgi?id=31671 + + * wtf/Platform.h: Modified. Added Android-specific configuration. + +2009-11-19 Alexey Proskuryakov + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=31690 + Make SocketStreamHandleCFNet work on Windows + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * wtf/MainThread.cpp: + (WTF::FunctionWithContext::FunctionWithContext): + (WTF::dispatchFunctionsFromMainThread): + (WTF::callOnMainThreadAndWait): + * wtf/MainThread.h: + Re-add callOnMainThreadAndWait(), which was removed in bug 23926. + +2009-11-19 Dmitry Titov + + Reviewed by David Levin. + + isMainThread() on Chromium (Mac and Linux) is so slow it timeouts LayoutTests.. + https://bugs.webkit.org/show_bug.cgi?id=31693 + + * wtf/ThreadingPthreads.cpp: + (WTF::initializeThreading): grab and use the pthread_t of the main thread instead of ThreadIdentifier. + (WTF::isMainThread): Ditto. + +2009-11-19 Laszlo Gombos + + Reviewed by Darin Adler. + + Remove HAVE(STRING_H) guard from JavaScriptCore + https://bugs.webkit.org/show_bug.cgi?id=31668 + + * config.h: + * runtime/UString.cpp: + +2009-11-19 Dumitru Daniliuc + + Reviewed by Dmitry Titov. + + Fixing a bug in MessageQueue::removeIf() that leads to an + assertion failure. + + https://bugs.webkit.org/show_bug.cgi?id=31657 + + * wtf/MessageQueue.h: + (WTF::MessageQueue::removeIf): + +2009-11-19 Laszlo Gombos + + Reviewed by Darin Adler. + + Remove HAVE(FLOAT_H) guard + https://bugs.webkit.org/show_bug.cgi?id=31661 + + JavaScriptCore has a dependency on float.h, there is + no need to guard float.h. + + * runtime/DatePrototype.cpp: Remove include directive + for float.h as it is included in MathExtras.h already. + * runtime/Operations.cpp: Ditto. + * runtime/UString.cpp: Ditto. + * wtf/dtoa.cpp: Ditto. + * wtf/MathExtras.h: Remove HAVE(FLOAT_H) guard. + * wtf/Platform.h: Ditto. + +2009-11-19 Thiago Macieira + + Reviewed by Simon Hausmann. + + Build fix for 32-bit Sparc machines: these machines are big-endian. + + * wtf/Platform.h: + +2009-11-18 Laszlo Gombos + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Remove support for Qt v4.3 or older versions + https://bugs.webkit.org/show_bug.cgi?id=29469 + + * JavaScriptCore.pro: + * jsc.pro: + * wtf/unicode/qt4/UnicodeQt4.h: + +2009-11-18 Kent Tamura + + Reviewed by Darin Adler. + + Move UString::from(double) implementation to new + WTF::doubleToStringInJavaScriptFormat(), and expose it because WebCore + code will use it. + https://bugs.webkit.org/show_bug.cgi?id=31330 + + - Introduce new function createRep(const char*, unsigned) and + UString::UString(const char*, unsigned) to reduce 2 calls to strlen(). + - Fix a bug that dtoa() doesn't update *rve if the input value is NaN + or Infinity. + + No new tests because this doesn't change the behavior. + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * runtime/UString.cpp: + (JSC::createRep): + (JSC::UString::UString): + (JSC::UString::from): Move the code to doubleToStringInJavaScriptFormat(). + * runtime/UString.h: + * wtf/dtoa.cpp: + (WTF::dtoa): Fix a bug about rve. + (WTF::append): A helper for doubleToStringInJavaScriptFormat(). + (WTF::doubleToStringInJavaScriptFormat): Move the code from UString::from(double). + * wtf/dtoa.h: + +2009-11-18 Laszlo Gombos + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Remove WTF_USE_JAVASCRIPTCORE_BINDINGS as it is no longer used + https://bugs.webkit.org/show_bug.cgi?id=31643 + + * JavaScriptCore.pro: + +2009-11-18 Nate Chapin + + Reviewed by Darin Fisher. + + Remove Chromium's unnecessary dependency on wtf's tcmalloc files. + + https://bugs.webkit.org/show_bug.cgi?id=31648 + + * JavaScriptCore.gyp/JavaScriptCore.gyp: + +2009-11-18 Thiago Macieira + + Reviewed by Gavin Barraclough. + + [Qt] Implement symbol hiding for JSC's JIT functions. + + These functions are implemented directly in assembly, so they need the + proper directives to enable/disable visibility. On ELF systems, it's + .hidden, whereas on Mach-O systems (Mac) it's .private_extern. On + Windows, it's not necessary since you have to explicitly export. I + also implemented the AIX idiom, though it's unlikely anyone will + implement AIX/POWER JIT. + https://bugs.webkit.org/show_bug.cgi?id=30864 + + * jit/JITStubs.cpp: + +2009-11-18 Oliver Hunt + + Reviewed by Alexey Proskuryakov. + + Interpreter may do an out of range access when throwing an exception in the profiler. + https://bugs.webkit.org/show_bug.cgi?id=31635 + + Add bounds check. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::throwException): + +2009-11-18 Gabor Loki + + Reviewed by Darin Adler. + + Fix the clobber list of cacheFlush for ARM and Thumb2 on Linux + https://bugs.webkit.org/show_bug.cgi?id=31631 + + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::cacheFlush): + +2009-11-18 Harald Fernengel + + Reviewed by Simon Hausmann. + + [Qt] Fix detection of linux-g++ + + Never use "linux-g++*" to check for linux-g++, since this will break embedded + builds which use linux-arm-g++ and friends. Use 'linux*-g++*' to check for any + g++ on linux mkspec. + + * JavaScriptCore.pri: + +2009-11-17 Jon Honeycutt + + Add JSContextRefPrivate.h to list of copied files. + + Reviewed by Mark Rowe. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: + +2009-11-17 Martin Robinson + + Reviewed by Adam Barth. + + [GTK] Style cleanup for GOwnPtr + https://bugs.webkit.org/show_bug.cgi?id=31506 + + Remove forward declaration in GOwnPtr and do some style cleanup. + + * wtf/GOwnPtr.cpp: + * wtf/GOwnPtr.h: + (WTF::GOwnPtr::GOwnPtr): + (WTF::GOwnPtr::~GOwnPtr): + (WTF::GOwnPtr::get): + (WTF::GOwnPtr::release): + (WTF::GOwnPtr::outPtr): + (WTF::GOwnPtr::set): + (WTF::GOwnPtr::clear): + (WTF::GOwnPtr::operator*): + (WTF::GOwnPtr::operator->): + (WTF::GOwnPtr::operator!): + (WTF::GOwnPtr::operator UnspecifiedBoolType): + (WTF::GOwnPtr::swap): + (WTF::swap): + (WTF::operator==): + (WTF::operator!=): + (WTF::getPtr): + (WTF::freeOwnedGPtr): + +2009-11-17 Oliver Hunt + + Reviewed by Maciej Stachowiak. + + Incorrect use of JavaScriptCore API in DumpRenderTree + https://bugs.webkit.org/show_bug.cgi?id=31577 + + Add assertions to the 'toJS' functions to catch mistakes like + this early. Restructure existing code which blindly passed potentially + null values to toJS when forwarding exceptions so that a null check is + performed first. + + * API/APICast.h: + (toJS): + (toJSForGC): + * API/JSCallbackObjectFunctions.h: + (JSC::::getOwnPropertySlot): + (JSC::::put): + (JSC::::deleteProperty): + (JSC::::construct): + (JSC::::hasInstance): + (JSC::::call): + (JSC::::toNumber): + (JSC::::toString): + (JSC::::staticValueGetter): + (JSC::::callbackGetter): + * API/tests/testapi.c: Fix errors in the API tester. + (MyObject_getProperty): + (MyObject_convertToType): + (EvilExceptionObject_convertToType): + +2009-11-16 Zoltan Herczeg + + Reviewed by Gavin Barraclough. + + https://bugs.webkit.org/show_bug.cgi?id=31050 + + Minor fixes for JSVALUE32_64: branchConvertDoubleToInt32 + failed on a CortexA8 CPU, but not on a simulator; and + JITCall.cpp modifications was somehow not committed to mainline. + + * assembler/ARMAssembler.h: + (JSC::ARMAssembler::fmrs_r): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::branchConvertDoubleToInt32): + * jit/JITCall.cpp: + (JSC::JIT::compileOpCall): + +2009-11-16 Joerg Bornemann + + Reviewed by Simon Hausmann. + + Fix Qt build on Windows CE 6. + + * JavaScriptCore.pri: Add missing include path. + * wtf/Platform.h: Include ce_time.h for Windows CE 6. + +2009-11-13 Zoltan Herczeg + + Reviewed by Gavin Barraclough. + + https://bugs.webkit.org/show_bug.cgi?id=31050 + + Adding optimization support for mode JSVALUE32_64 + on ARM systems. + + * jit/JIT.h: + * jit/JITCall.cpp: + (JSC::JIT::compileOpCall): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_method_check): + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::compileGetByIdSlowCase): + (JSC::JIT::emit_op_put_by_id): + +2009-11-14 Zoltan Herczeg + + Reviewed by Gavin Barraclough. + + https://bugs.webkit.org/show_bug.cgi?id=31050 + + Adding JSVALUE32_64 support for ARM (but not turning it + on by default). All optimizations must be disabled, since + this patch is only the first of a series of patches. + + During the work, a lot of x86 specific code revealed and + made platform independent. + See revisions: 50531 50541 50593 50594 50595 + + * assembler/ARMAssembler.h: + (JSC::ARMAssembler::): + (JSC::ARMAssembler::fdivd_r): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::lshift32): + (JSC::MacroAssemblerARM::neg32): + (JSC::MacroAssemblerARM::rshift32): + (JSC::MacroAssemblerARM::branchOr32): + (JSC::MacroAssemblerARM::set8): + (JSC::MacroAssemblerARM::setTest8): + (JSC::MacroAssemblerARM::loadDouble): + (JSC::MacroAssemblerARM::divDouble): + (JSC::MacroAssemblerARM::convertInt32ToDouble): + (JSC::MacroAssemblerARM::zeroDouble): + * jit/JIT.cpp: + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITStubs.cpp: + * wtf/StdLibExtras.h: + +2009-11-13 Dominik Röttsches + + Reviewed by Eric Seidel. + + Unify TextBoundaries implementations by only relying on WTF Unicode abstractions + https://bugs.webkit.org/show_bug.cgi?id=31468 + + Adding isAlphanumeric abstraction, required + by TextBoundaries.cpp. + + * wtf/unicode/glib/UnicodeGLib.h: + (WTF::Unicode::isAlphanumeric): + * wtf/unicode/icu/UnicodeIcu.h: + (WTF::Unicode::isAlphanumeric): + +2009-11-13 Norbert Leser + + Reviewed by Eric Seidel. + + Added macros for USERINCLUDE paths within symbian blocks + to guarantee inclusion of respective header files from local path + first (to avoid clashes with same names of header files in system include path). + + * JavaScriptCore.pri: + +2009-11-13 Oliver Hunt + + Reviewed by Geoff Garen. + + JSValueProtect and JSValueUnprotect don't protect API wrapper values + https://bugs.webkit.org/show_bug.cgi?id=31485 + + Make JSValueProtect/Unprotect use a new 'toJS' function, 'toJSForGC' that + does not attempt to to strip out API wrapper objects. + + * API/APICast.h: + (toJSForGC): + * API/JSValueRef.cpp: + (JSValueProtect): + (JSValueUnprotect): + * API/tests/testapi.c: + (makeGlobalNumberValue): + (main): + +2009-11-13 İsmail Dönmez + + Reviewed by Antti Koivisto. + + Fix typo, ce_time.cpp should be ce_time.c + + * JavaScriptCore.pri: + +2009-11-12 Steve VanDeBogart + + Reviewed by Adam Barth. + + Calculate the time offset only if we were able to parse + the date string. This saves an IPC in Chromium for + invalid date strings. + https://bugs.webkit.org/show_bug.cgi?id=31416 + + * wtf/DateMath.cpp: + (WTF::parseDateFromNullTerminatedCharacters): + (JSC::parseDateFromNullTerminatedCharacters): + +2009-11-12 Oliver Hunt + + Rollout r50896 until i can work out why it causes failures. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitReturn): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::execute): + * parser/Nodes.cpp: + (JSC::EvalNode::emitBytecode): + +2009-11-12 Steve Falkenburg + + Reviewed by Stephanie Lewis. + + Remove LIBRARY directive from def file to fix Debug_All target. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2009-11-12 Gustavo Noronha Silva + + Rubber-stamped by Holger Freyther. + + Revert r50204, since it makes DRT crash on 32 bits release builds + for GTK+. + + * wtf/FastMalloc.h: + +2009-11-12 Oliver Hunt + + Reviewed by Gavin Barraclough. + + Start unifying entry logic for function and eval code. + + Eval now uses a ret instruction to end execution, and sets up + a callframe more in line with what we do for function entry. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitReturn): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::execute): + * parser/Nodes.cpp: + (JSC::EvalNode::emitBytecode): + +2009-11-12 Richard Moe Gustavsen + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Disable pthread_setname_np. + + This allows Qt builds on Mac from 10.6 to run on earlier version + where this symbol is not present. + https://bugs.webkit.org/show_bug.cgi?id=31403 + + * wtf/Platform.h: + +2009-11-12 Thiago Macieira + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Fix linking on Linux 32-bit. + + It was missing the ".text" directive at the top of the file, + indicating that code would follow. Without it, the assembler created + "NOTYPE" symbols, which would result in linker errors. + https://bugs.webkit.org/show_bug.cgi?id=30863 + + * jit/JITStubs.cpp: + +2009-11-11 Laszlo Gombos + + Reviewed by Alexey Proskuryakov. + + Refactor multiple JavaScriptCore threads + https://bugs.webkit.org/show_bug.cgi?id=31328 + + Remove the id field from the PlatformThread structure + as it is not used. + + * runtime/Collector.cpp: + (JSC::getCurrentPlatformThread): + (JSC::suspendThread): + (JSC::resumeThread): + (JSC::getPlatformThreadRegisters): + +2009-11-10 Geoffrey Garen + + Linux build fix: Added an #include for UINT_MAX. + + * runtime/WeakRandom.h: + +2009-11-10 Geoffrey Garen + + JavaScriptGlue build fix: Marked a file 'private' instead of 'project'. + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2009-11-10 Geoffrey Garen + + Reviewed by Gavin "avGni arBalroguch" Barraclough. + + Faster Math.random, based on GameRand. + + SunSpider says 1.4% faster. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: Added the header to the project. + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: Use an object to track random number generation + state, initialized to the current time. + + * runtime/MathObject.cpp: + (JSC::MathObject::MathObject): + (JSC::mathProtoFuncRandom): Use the new hotness. + + * runtime/WeakRandom.h: Added. + (JSC::WeakRandom::WeakRandom): + (JSC::WeakRandom::get): + (JSC::WeakRandom::advance): The new hotness. + +2009-11-09 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Imported the v8 DST cache. + + SunSpider says 1.5% faster. + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::resetDateCache): Reset the DST cache when resetting + other date data. + + * runtime/JSGlobalData.h: + (JSC::DSTOffsetCache::DSTOffsetCache): + (JSC::DSTOffsetCache::reset): Added a struct for the DST cache. + + * wtf/DateMath.cpp: + (WTF::calculateDSTOffsetSimple): + (WTF::calculateDSTOffset): + (WTF::parseDateFromNullTerminatedCharacters): + (JSC::getDSTOffset): + (JSC::gregorianDateTimeToMS): + (JSC::msToGregorianDateTime): + (JSC::parseDateFromNullTerminatedCharacters): + * wtf/DateMath.h: The imported code for probing and updating the cache. + +2009-11-09 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Fixed an edge case that could cause the engine not to notice a timezone + change. + + No test because this case would require manual intervention to change + the timezone during the test. + + SunSpider reports no change. + + * runtime/DateInstanceCache.h: + (JSC::DateInstanceCache::DateInstanceCache): + (JSC::DateInstanceCache::reset): Added a helper function for resetting + this cache. Also, shrank the cache, since we'll be resetting it often. + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::resetDateCache): Include resetting the DateInstanceCache + in resetting Date data. (Otherwise, a cache hit could bypass a necessary + timezone update check.) + +2009-11-09 Geoffrey Garen + + Reviewed by Sam Weinig. + + Some manual inlining and constant propogation in Date code. + + SunSpider reports a 0.4% speedup on date-*, no overall speedup. Shark + says some previously evident stalls are now gone. + + * runtime/DateConstructor.cpp: + (JSC::callDate): + * runtime/DateConversion.cpp: + (JSC::formatTime): + (JSC::formatTimeUTC): Split formatTime into UTC and non-UTC variants. + + * runtime/DateConversion.h: + * runtime/DateInstance.cpp: + (JSC::DateInstance::calculateGregorianDateTime): + (JSC::DateInstance::calculateGregorianDateTimeUTC): + * runtime/DateInstance.h: + (JSC::DateInstance::gregorianDateTime): + (JSC::DateInstance::gregorianDateTimeUTC): Split gregorianDateTime into + a UTC and non-UTC variant, and split each variant into a fast inline + case and a slow out-of-line case. + + * runtime/DatePrototype.cpp: + (JSC::formatLocaleDate): + (JSC::dateProtoFuncToString): + (JSC::dateProtoFuncToUTCString): + (JSC::dateProtoFuncToISOString): + (JSC::dateProtoFuncToDateString): + (JSC::dateProtoFuncToTimeString): + (JSC::dateProtoFuncGetFullYear): + (JSC::dateProtoFuncGetUTCFullYear): + (JSC::dateProtoFuncToGMTString): + (JSC::dateProtoFuncGetMonth): + (JSC::dateProtoFuncGetUTCMonth): + (JSC::dateProtoFuncGetDate): + (JSC::dateProtoFuncGetUTCDate): + (JSC::dateProtoFuncGetDay): + (JSC::dateProtoFuncGetUTCDay): + (JSC::dateProtoFuncGetHours): + (JSC::dateProtoFuncGetUTCHours): + (JSC::dateProtoFuncGetMinutes): + (JSC::dateProtoFuncGetUTCMinutes): + (JSC::dateProtoFuncGetSeconds): + (JSC::dateProtoFuncGetUTCSeconds): + (JSC::dateProtoFuncGetTimezoneOffset): + (JSC::setNewValueFromTimeArgs): + (JSC::setNewValueFromDateArgs): + (JSC::dateProtoFuncSetYear): + (JSC::dateProtoFuncGetYear): Updated for the gregorianDateTime change above. + +2009-11-09 Geoffrey Garen + + Build fix: export a new symbol. + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2009-11-09 Geoffrey Garen + + Reviewed by Sam "Home Wrecker" Weinig. + + Added a tiny cache for Date parsing. + + SunSpider says 1.2% faster. + + * runtime/DateConversion.cpp: + (JSC::parseDate): Try to reuse the last parsed Date, if present. + + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::resetDateCache): + * runtime/JSGlobalData.h: Added storage for last parsed Date. Refactored + this code to make resetting the date cache easier. + + * runtime/JSGlobalObject.h: + (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Updated for + refactoring. + + * wtf/DateMath.cpp: + (JSC::parseDateFromNullTerminatedCharacters): + * wtf/DateMath.h: Changed ExecState to be first parameter, as is the JSC custom. + +2009-11-09 Oliver Hunt + + Reviewed by Gavin Barraclough. + + Can cache prototype lookups on uncacheable dictionaries. + https://bugs.webkit.org/show_bug.cgi?id=31198 + + Replace fromDictionaryTransition with flattenDictionaryObject and + flattenDictionaryStructure. This change is necessary as we need to + guarantee that our attempt to convert away from a dictionary structure + will definitely succeed, and in some cases this requires mutating the + object storage itself. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::tryCacheGetByID): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + * runtime/BatchedTransitionOptimizer.h: + (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer): + * runtime/JSObject.h: + (JSC::JSObject::flattenDictionaryObject): + * runtime/Operations.h: + (JSC::normalizePrototypeChain): + * runtime/Structure.cpp: + (JSC::Structure::flattenDictionaryStructure): + (JSC::comparePropertyMapEntryIndices): + * runtime/Structure.h: + +2009-11-09 Laszlo Gombos + + Not reviewed, build fix. + + Remove extra character from r50701. + + * JavaScriptCore.pri: + +2009-11-09 Laszlo Gombos + + Not reviewed, build fix. + + Revert r50695 because it broke QtWebKit (clean builds). + + * JavaScriptCore.pri: + +2009-11-09 Norbert Leser + + Reviewed by Kenneth Rohde Christiansen. + + Prepended $$PWD to GENERATED_SOURCES_DIR to avoid potential ambiguities when included from WebCore.pro. + Some preprocessors consider this GENERATED_SOURCES_DIR relative to current invoking dir (e.g., ./WebCore), + and not the working dir of JavaCriptCore.pri (i.e., ../JavaScriptCore/). + + * JavaScriptCore.pri: + +2009-11-09 Laszlo Gombos + + Reviewed by Kenneth Rohde Christiansen. + + Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings + https://bugs.webkit.org/show_bug.cgi?id=31040 + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + +2009-11-08 David Levin + + Reviewed by NOBODY (speculative snow leopard and windows build fixes). + + * wtf/DateMath.cpp: + (WTF::parseDateFromNullTerminatedCharacters): + (JSC::gregorianDateTimeToMS): + (JSC::msToGregorianDateTime): + (JSC::parseDateFromNullTerminatedCharacters): + * wtf/DateMath.h: + (JSC::GregorianDateTime::GregorianDateTime): + +2009-11-08 David Levin + + Reviewed by NOBODY (chromium build fix). + + Hopefully, the last build fix. + + Create better separation in DateMath about the JSC + and non-JSC portions. Also, only expose the non-JSC + version in the exports. + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * wtf/DateMath.cpp: + (WTF::parseDateFromNullTerminatedCharacters): + (JSC::getUTCOffset): + (JSC::gregorianDateTimeToMS): + (JSC::msToGregorianDateTime): + (JSC::parseDateFromNullTerminatedCharacters): + * wtf/DateMath.h: + (JSC::gmtoffset): + +2009-11-08 David Levin + + Reviewed by NOBODY (chromium build fix). + + For the change in DateMath. + + * config.h: + * wtf/DateMath.cpp: + +2009-11-06 Geoffrey Garen + + Windows build fix: export some symbols. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2009-11-06 Geoffrey Garen + + Build fix: updated export file. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + +2009-11-06 Geoffrey Garen + + Build fix: added some #includes. + + * wtf/CurrentTime.h: + * wtf/DateMath.h: + +2009-11-06 Geoffrey Garen + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=31197 + Implemented a timezone cache not based on Mac OS X's notify_check API. + + If the VM calculates the local timezone offset from UTC, it caches the + result until the end of the current VM invocation. (We don't want to cache + forever, because the user's timezone may change over time.) + + This removes notify_* overhead on Mac, and, more significantly, removes + OS time and date call overhead on non-Mac platforms. + + ~8% speedup on Date microbenchmark on Mac. SunSpider reports maybe a tiny + speedup on Mac. (Speedup on non-Mac platforms should be even more noticeable.) + + * JavaScriptCore.exp: + + * interpreter/CachedCall.h: + (JSC::CachedCall::CachedCall): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::execute): + * runtime/JSGlobalObject.h: + (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Made the + DynamicGlobalObjectScope constructor responsible for checking whether a + dynamicGlobalObject has already been set. This eliminated some duplicate + client code, and allowed me to avoid adding even more duplicate client + code. Made DynamicGlobalObjectScope responsible for resetting the + local timezone cache upon first entry to the VM. + + * runtime/DateConstructor.cpp: + (JSC::constructDate): + (JSC::callDate): + (JSC::dateParse): + (JSC::dateUTC): + * runtime/DateConversion.cpp: + (JSC::parseDate): + * runtime/DateConversion.h: + * runtime/DateInstance.cpp: + (JSC::DateInstance::gregorianDateTime): + * runtime/DateInstance.h: + * runtime/DateInstanceCache.h: + * runtime/DatePrototype.cpp: + (JSC::setNewValueFromTimeArgs): + (JSC::setNewValueFromDateArgs): + (JSC::dateProtoFuncSetYear): + * runtime/InitializeThreading.cpp: + (JSC::initializeThreadingOnce): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + * wtf/DateMath.cpp: + (WTF::getCurrentUTCTime): + (WTF::getCurrentUTCTimeWithMicroseconds): + (WTF::getLocalTime): + (JSC::getUTCOffset): Use the new cache. Also, see below. + (JSC::gregorianDateTimeToMS): + (JSC::msToGregorianDateTime): + (JSC::initializeDates): + (JSC::parseDateFromNullTerminatedCharacters): Simplified the way this function + accounts for the local timezone offset, to accomodate our new caching API, + and a (possibly misguided) caller in WebCore. Also, see below. + * wtf/DateMath.h: + (JSC::GregorianDateTime::GregorianDateTime): Moved most of the code in + DateMath.* into the JSC namespace. The code needed to move so it could + naturally interact with ExecState and JSGlobalData to support caching. + Logically, it seemed right to move it, too, since this code is not really + as low-level as the WTF namespace might imply -- it implements a set of + date parsing and conversion quirks that are finely tuned to the JavaScript + language. Also removed the Mac OS X notify_* infrastructure. + + * wtf/CurrentTime.h: + (WTF::currentTimeMS): + (WTF::getLocalTime): Moved the rest of the DateMath code here, and renamed + it to make it consistent with WTF's currentTime function. + +2009-11-06 Gabor Loki + + Unreviewed trivial buildfix after r50595. + + Rename the remaining rshiftPtr calls to rshift32 - [Qt] use nanval() for Symbian as nonInlineNaN - https://bugs.webkit.org/show_bug.cgi?id=34170 + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_rshift): + * jit/JITInlineMethods.h: + (JSC::JIT::emitFastArithImmToInt): - numeric_limits::quiet_NaN is broken in Symbian - causing NaN to be evaluated as a number. +2009-11-06 Gavin Barraclough - * runtime/JSValue.cpp: - (JSC::nonInlineNaN): + Reviewed by Oliver Hunt. -2010-01-07 Norbert Leser + Tidy up the shift methods on the macro-assembler interface. - Reviewed by NOBODY (OOPS!). + Currently behaviour of shifts of a magnitude > 0x1f is undefined. + Instead defined that all shifts are masked to this range. This makes a lot of + practical sense, both since having undefined behaviour is not particularly + desirable, and because this behaviour is commonly required (particularly since + it is required bt ECMA-262 for shifts). - RVCT compiler with "-Otime -O3" optimization tries to optimize out - inline new'ed pointers that are passed as arguments. - Proposed patch assigns new'ed pointer explicitly outside function call. + Update the ARM assemblers to provide this behaviour. Remove (now) redundant + masks from JITArithmetic, and remove rshiftPtr (this was used in case that + could be rewritten in a simpler form using rshift32, only optimized JSVALUE32 + on x86-64, which uses JSVALUE64!) - * API/JSClassRef.cpp: - (OpaqueJSClass::OpaqueJSClass): - (OpaqueJSClassContextData::OpaqueJSClassContextData): + * assembler/MacroAssembler.h: + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::lshift32): + (JSC::MacroAssemblerARM::rshift32): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::lshift32): + (JSC::MacroAssemblerARMv7::rshift32): + * assembler/MacroAssemblerX86_64.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_lshift): + (JSC::JIT::emit_op_rshift): -2009-11-19 Thiago Macieira +2009-11-05 Gavin Barraclough - Reviewed by Simon Hausmann. + Rubber Stamped by Oliver Hunt. - Build fix for 32-bit Sparc machines: these machines are big-endian. + Remove a magic number (1) from the JIT, instead compute the value with OBJECT_OFFSET. - * wtf/Platform.h: + * jit/JITInlineMethods.h: + (JSC::JIT::emitPutJITStubArg): + (JSC::JIT::emitPutJITStubArgConstant): + (JSC::JIT::emitGetJITStubArg): + (JSC::JIT::emitPutJITStubArgFromVirtualRegister): + * jit/JITStubCall.h: + (JSC::JITStubCall::JITStubCall): + (JSC::JITStubCall::getArgument): + * jit/JITStubs.h: -2009-12-08 Gustavo Noronha Silva +2009-11-05 Zoltan Herczeg - Reviewed by Darin Adler. + Reviewed by Gavin Barraclough. - Make WebKit build correctly on FreeBSD, IA64, and Alpha. - Based on work by Petr Salinger , - and Colin Watson . + https://bugs.webkit.org/show_bug.cgi?id=31159 + Fix branchDouble behaviour on ARM THUMB2 JIT. - * wtf/Platform.h: + The x86 branchDouble behaviour is reworked, and all JIT + ports should follow the x86 port. See bug 31104 and 31151 -2009-12-18 Yongjun Zhang + This patch contains a fix for the traditional ARM port - Reviewed by Simon Hausmann. + * assembler/ARMAssembler.h: + (JSC::ARMAssembler::): + (JSC::ARMAssembler::fmrs_r): + (JSC::ARMAssembler::ftosid_r): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::): + (JSC::MacroAssemblerARM::branchDouble): + (JSC::MacroAssemblerARM::branchConvertDoubleToInt32): - https://bugs.webkit.org/show_bug.cgi?id=32713 - [Qt] make wtf/Assertions.h compile in winscw compiler. +2009-11-05 Chris Jerdonek - Add string arg before ellipsis to help winscw compiler resolve variadic - macro definitions in wtf/Assertions.h. + Reviewed by Eric Seidel. - * wtf/Assertions.h: + Removed the "this is part of the KDE project" comments from + all *.h, *.cpp, *.idl, and *.pm files. + + https://bugs.webkit.org/show_bug.cgi?id=31167 + + The maintenance and architecture page in the project wiki lists + this as a task. + + This change includes no changes or additions to test cases + since the change affects only comments. + + * wtf/wince/FastMallocWince.h: -2009-11-30 Jan-Arve Sæther +2009-11-05 Gabor Loki - Reviewed by Simon Hausmann. + Reviewed by Gavin Barraclough. - [Qt] Fix compilation with win32-icc + Use ARMv7 specific encoding for immediate constants on ARMv7 target + https://bugs.webkit.org/show_bug.cgi?id=31060 - The Intel compiler does not support the __has_trivial_constructor type - trait. The Intel Compiler can report itself as _MSC_VER >= 1400. The - reason for that is that the Intel Compiler depends on the Microsoft - Platform SDK, and in order to try to be "fully" MS compatible it will - "pretend" to be the same MS compiler as was shipped with the MS PSDK. - (Thus, compiling with win32-icc with VC8 SDK will make the source code - "think" the compiler at hand supports this type trait). + * assembler/ARMAssembler.cpp: + (JSC::ARMAssembler::getOp2): Use INVALID_IMM + (JSC::ARMAssembler::getImm): Use encodeComplexImm for complex immediate + (JSC::ARMAssembler::moveImm): Ditto. + (JSC::ARMAssembler::encodeComplexImm): Encode a constant by one or two + instructions or a PC relative load. + * assembler/ARMAssembler.h: Use INVALID_IMM if a constant cannot be + encoded as an immediate constant. + (JSC::ARMAssembler::): + (JSC::ARMAssembler::movw_r): 16-bit immediate load + (JSC::ARMAssembler::movt_r): High halfword 16-bit immediate load + (JSC::ARMAssembler::getImm16Op2): Encode immediate constant for + movw_r and mowt_r - * wtf/TypeTraits.h: +2009-11-04 Mark Mentovai -2009-11-28 Laszlo Gombos + Reviewed by Mark Rowe. - Reviewed by Eric Seidel. + Provide TARGETING_TIGER and TARGETING_LEOPARD as analogues to + BUILDING_ON_TIGER and BUILDING_ON_LEOPARD. The TARGETING_ macros + consider the deployment target; the BUILDING_ON_ macros consider the + headers being built against. - Apply workaround for the limitation of VirtualFree with MEM_RELEASE to all ports running on Windows - https://bugs.webkit.org/show_bug.cgi?id=31943 + * wtf/Platform.h: - * runtime/MarkStack.h: - (JSC::MarkStack::MarkStackArray::shrinkAllocation): +2009-11-04 Gavin Barraclough -2009-11-18 Gabor Loki + Reviewed by Oliver Hunt. - Reviewed by Darin Adler. + https://bugs.webkit.org/show_bug.cgi?id=31151 + Fix branchDouble behaviour on ARM THUMB2 JIT. - Fix the clobber list of cacheFlush for ARM and Thumb2 on Linux - https://bugs.webkit.org/show_bug.cgi?id=31631 + The ARMv7 JIT is currently using ARMv7Assembler::ConditionEQ to branch + for DoubleEqualOrUnordered, however this is incorrect – ConditionEQ won't + branch on unordered operands. Similarly, DoubleLessThanOrUnordered & + DoubleLessThanOrEqualOrUnordered use ARMv7Assembler::ConditionLO & + ARMv7Assembler::ConditionLS, whereas they should be using + ARMv7Assembler::ConditionLT & ARMv7Assembler::ConditionLE. - * jit/ExecutableAllocator.h: - (JSC::ExecutableAllocator::cacheFlush): + Fix these, and fill out the missing DoubleConditions. -2009-11-23 Laszlo Gombos + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::): + (JSC::MacroAssemblerARMv7::branchDouble): - Reviewed by Kenneth Rohde Christiansen. +2009-11-04 Gavin Barraclough - [Symbian] Fix lastIndexOf() for Symbian - https://bugs.webkit.org/show_bug.cgi?id=31773 + Rubber Stamped by Oliver Hunt. - Symbian soft floating point library has problems with operators - comparing NaN to numbers. Without a workaround lastIndexOf() - function does not work. + Enable native call optimizations on ARMv7. (Existing ARM_TRADITIONAL + implementation was generic, worked perfectly, just needed turning on). - Patch developed by David Leong. + * jit/JITOpcodes.cpp: + * wtf/Platform.h: - * runtime/StringPrototype.cpp: - (JSC::stringProtoFuncLastIndexOf):Add an extra test - to check for NaN for Symbian. +2009-11-04 Gavin Barraclough -2009-11-18 Harald Fernengel + Rubber Stamped by Mark Rowe, Oliver Hunt, and Sam Weinig. - Reviewed by Simon Hausmann. + Add a missing assert to the ARMv7 JIT. - [Qt] Fix detection of linux-g++ + * assembler/ARMv7Assembler.h: + (JSC::ARMThumbImmediate::ARMThumbImmediate): - Never use "linux-g++*" to check for linux-g++, since this will break embedded - builds which use linux-arm-g++ and friends. Use 'linux*-g++*' to check for any - g++ on linux mkspec. +2009-11-04 Mark Rowe - * JavaScriptCore.pri: + Rubber-stamped by Oliver Hunt. -2009-11-16 Joerg Bornemann + Remove bogus op_ prefix on dumped version of three opcodes. - Reviewed by Simon Hausmann. + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): - Fix Qt build on Windows CE 6. +2009-11-04 Mark Rowe - * JavaScriptCore.pri: Add missing include path. - * wtf/Platform.h: Include ce_time.h for Windows CE 6. + Reviewed by Sam Weinig. -2009-11-12 Thiago Macieira + Fix dumping of constants in bytecode so that they aren't printed as large positive register numbers. - Reviewed by Kenneth Rohde Christiansen. + We do this by having the registerName function return information about the constant if the register + number corresponds to a constant. This requires that registerName, and several functions that call it, + be converted to member functions of CodeBlock so that the constant value can be retrieved. The + ExecState also needs to be threaded down through these functions so that it can be passed on to + constantName when needed. - [Qt] Fix linking on Linux 32-bit. + * bytecode/CodeBlock.cpp: + (JSC::constantName): + (JSC::CodeBlock::registerName): + (JSC::CodeBlock::printUnaryOp): + (JSC::CodeBlock::printBinaryOp): + (JSC::CodeBlock::printConditionalJump): + (JSC::CodeBlock::printGetByIdOp): + (JSC::CodeBlock::printPutByIdOp): + (JSC::CodeBlock::dump): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::isConstantRegisterIndex): - It was missing the ".text" directive at the top of the file, - indicating that code would follow. Without it, the assembler created - "NOTYPE" symbols, which would result in linker errors. - https://bugs.webkit.org/show_bug.cgi?id=30863 +2009-11-04 Pavel Heimlich - * jit/JITStubs.cpp: + Reviewed by Alexey Proskuryakov. -2009-11-13 İsmail Dönmez + https://bugs.webkit.org/show_bug.cgi?id=30647 + Solaris build failure due to strnstr. - Reviewed by Antti Koivisto. + * wtf/StringExtras.h: Enable strnstr on Solaris, too. - Fix typo, ce_time.cpp should be ce_time.c +2009-11-04 Gavin Barraclough - * JavaScriptCore.pri: + Reviewed by Oliver Hunt. -2009-11-12 Richard Moe Gustavsen + https://bugs.webkit.org/show_bug.cgi?id=31104 + Refactor x86-specific behaviour out of the JIT. - Reviewed by Kenneth Rohde Christiansen. + - Add explicit double branch conditions for ordered and unordered comparisons (presently the brehaviour is a mix). + - Refactor double to int conversion out into the MacroAssembler. + - Remove broken double to int conversion for !JSVALUE32_64 builds - this code was broken and slowing us down, fixing it showed it not to be an improvement. + - Remove exclusion of double to int conversion from (1 % X) cases in JSVALUE32_64 builds - if this was of benefit this is no longer the case; simplify. - [Qt] Disable pthread_setname_np. + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::): + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::): + (JSC::MacroAssemblerX86Common::convertInt32ToDouble): + (JSC::MacroAssemblerX86Common::branchDouble): + (JSC::MacroAssemblerX86Common::branchConvertDoubleToInt32): + * jit/JITArithmetic.cpp: + (JSC::JIT::emitBinaryDoubleOp): + (JSC::JIT::emit_op_div): + (JSC::JIT::emitSlow_op_jnless): + (JSC::JIT::emitSlow_op_jnlesseq): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_jfalse): - This allows Qt builds on Mac from 10.6 to run on earlier version - where this symbol is not present. - https://bugs.webkit.org/show_bug.cgi?id=31403 +2009-11-04 Mark Mentovai - * wtf/Platform.h: + Reviewed by Eric Seidel. + + Remove BUILDING_ON_LEOPARD from JavaScriptCore.gyp. This is supposed + to be set as needed only in wtf/Platform.h. + + * JavaScriptCore.gyp/JavaScriptCore.gyp: 2009-11-02 Oliver Hunt @@ -177,19 +7852,161 @@ * jit/JITStubs.cpp: (JSC::JITThunks::tryCacheGetByID): -2009-10-30 Tor Arne Vestbø +2009-11-02 Laszlo Gombos - Reviewed by NOBODY (OOPS!). + Reviewed by Darin Adler. - [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml() + PLATFORM(CF) should be set when building for Qt on Darwin + https://bugs.webkit.org/show_bug.cgi?id=23671 - This ensures that long-running JavaScript (for example due to a modal alert() dialog), - will not trigger a deferred load after only 500ms (the default tokenizer delay) while - still giving a reasonable timeout (10 seconds) to prevent deadlock. + * wtf/Platform.h: Turn on CF support if both QT and DARWIN + platforms are defined. - https://bugs.webkit.org/show_bug.cgi?id=29381 +2009-11-02 Dmitry Titov - * runtime/TimeoutChecker.h: Add getter for the timeout interval + Reviewed by David Levin. + + Remove threadsafe refcounting from tasks used with WTF::MessageQueue. + https://bugs.webkit.org/show_bug.cgi?id=30612 + + * wtf/MessageQueue.h: + (WTF::MessageQueue::alwaysTruePredicate): + (WTF::MessageQueue::~MessageQueue): + (WTF::MessageQueue::append): + (WTF::MessageQueue::appendAndCheckEmpty): + (WTF::MessageQueue::prepend): + (WTF::MessageQueue::waitForMessage): + (WTF::MessageQueue::waitForMessageFilteredWithTimeout): + (WTF::MessageQueue::tryGetMessage): + (WTF::MessageQueue::removeIf): + The MessageQueue is changed to act as a queue of OwnPtr. It takes ownership + of posted tasks and passes it to the new owner (in another thread) when the task is fetched. + All methods have arguments of type PassOwnPtr and return the same type. + + * wtf/Threading.cpp: + (WTF::createThread): + Superficial change to trigger rebuild of JSC project on Windows, + workaround for https://bugs.webkit.org/show_bug.cgi?id=30890 + +2009-10-30 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Fixed failing layout test: restore a special case I accidentally deleted. + + * runtime/DatePrototype.cpp: + (JSC::setNewValueFromDateArgs): In the case of applying a change to a date + that is NaN, reset the date to 0 *and* then apply the change; don't just + reset the date to 0. + +2009-10-30 Geoffrey Garen + + Windows build fix: update for object-to-pointer change. + + * runtime/DatePrototype.cpp: + (JSC::formatLocaleDate): + +2009-10-29 Geoffrey Garen + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=30942 + Use pointers instead of copies to pass GregorianDateTime objects around. + + SunSpider reports a shocking 4.5% speedup on date-format-xparb, and 1.3% + speedup on date-format-tofte. + + * runtime/DateInstance.cpp: + (JSC::DateInstance::gregorianDateTime): + * runtime/DateInstance.h: + * runtime/DatePrototype.cpp: + (JSC::formatLocaleDate): + (JSC::dateProtoFuncToString): + (JSC::dateProtoFuncToUTCString): + (JSC::dateProtoFuncToISOString): + (JSC::dateProtoFuncToDateString): + (JSC::dateProtoFuncToTimeString): + (JSC::dateProtoFuncGetFullYear): + (JSC::dateProtoFuncGetUTCFullYear): + (JSC::dateProtoFuncToGMTString): + (JSC::dateProtoFuncGetMonth): + (JSC::dateProtoFuncGetUTCMonth): + (JSC::dateProtoFuncGetDate): + (JSC::dateProtoFuncGetUTCDate): + (JSC::dateProtoFuncGetDay): + (JSC::dateProtoFuncGetUTCDay): + (JSC::dateProtoFuncGetHours): + (JSC::dateProtoFuncGetUTCHours): + (JSC::dateProtoFuncGetMinutes): + (JSC::dateProtoFuncGetUTCMinutes): + (JSC::dateProtoFuncGetSeconds): + (JSC::dateProtoFuncGetUTCSeconds): + (JSC::dateProtoFuncGetTimezoneOffset): + (JSC::setNewValueFromTimeArgs): + (JSC::setNewValueFromDateArgs): + (JSC::dateProtoFuncSetYear): + (JSC::dateProtoFuncGetYear): Renamed getGregorianDateTime to gregorianDateTime, + since it no longer has an out parameter. Uses 0 to indicate invalid dates. + +2009-10-30 Zoltan Horvath + + Reviewed by Darin Adler. + + Allow custom memory allocation control for JavaScriptCore's ListHashSet + https://bugs.webkit.org/show_bug.cgi?id=30853 + + Inherits ListHashSet class from FastAllocBase because it is + instantiated by 'new' in WebCore/rendering/RenderBlock.cpp:1813. + + * wtf/ListHashSet.h: + +2009-10-30 Oliver Hunt + + Reviewed by Gavin Barraclough. + + Regression: crash enumerating properties of an object with getters or setters + https://bugs.webkit.org/show_bug.cgi?id=30948 + + Add a guard to prevent us trying to cache property enumeration on + objects with getters or setters. + + * runtime/JSPropertyNameIterator.cpp: + (JSC::JSPropertyNameIterator::create): + +2009-10-30 Roland Steiner + + Reviewed by Eric Seidel. + + Remove ENABLE_RUBY guards as discussed with Dave Hyatt and Maciej Stachowiak. + + Bug 28420 - Implement HTML5 rendering + (https://bugs.webkit.org/show_bug.cgi?id=28420) + + No new tests (no functional change). + + * Configurations/FeatureDefines.xcconfig: + +2009-10-29 Oliver Hunt + + Reviewed by Maciej Stachowiak. + + REGRESSION (r50218-r50262): E*TRADE accounts page is missing content + https://bugs.webkit.org/show_bug.cgi?id=30947 + + + The logic for flagging that a structure has non-enumerable properties + was in addPropertyWithoutTransition, rather than in the core Structure::put + method. Despite this I was unable to produce a testcase that caused + the failure that etrade was experiencing, but the new assertion in + getEnumerablePropertyNames triggers on numerous layout tests without + the fix, so in effecti all for..in enumeration in any test ends up + doing the required consistency check. + + * runtime/Structure.cpp: + (JSC::Structure::addPropertyWithoutTransition): + (JSC::Structure::put): + (JSC::Structure::getEnumerablePropertyNames): + (JSC::Structure::checkConsistency): 2009-10-29 Gabor Loki diff --git a/src/3rdparty/webkit/JavaScriptCore/Info.plist b/src/3rdparty/webkit/JavaScriptCore/Info.plist index 17949b0..77c9eb8 100644 --- a/src/3rdparty/webkit/JavaScriptCore/Info.plist +++ b/src/3rdparty/webkit/JavaScriptCore/Info.plist @@ -1,5 +1,5 @@ - + CFBundleDevelopmentRegion @@ -7,7 +7,7 @@ CFBundleExecutable ${PRODUCT_NAME} CFBundleGetInfoString - ${BUNDLE_VERSION}, Copyright 2003-2009 Apple Inc.; Copyright 1999-2001 Harri Porten <porten@kde.org>; Copyright 2001 Peter Kelly <pmk@post.com>; Copyright 1997-2005 University of Cambridge; Copyright 1991, 2000, 2001 by Lucent Technologies. + ${BUNDLE_VERSION}, Copyright 2003-2010 Apple Inc.; Copyright 1999-2001 Harri Porten <porten@kde.org>; Copyright 2001 Peter Kelly <pmk@post.com>; Copyright 1997-2005 University of Cambridge; Copyright 1991, 2000, 2001 by Lucent Technologies. CFBundleIdentifier com.apple.${PRODUCT_NAME} CFBundleInfoDictionaryVersion diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi index 03c23c3..c0eb086 100644 --- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi +++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi @@ -64,6 +64,7 @@ 'bytecode/StructureStubInfo.h', 'bytecompiler/BytecodeGenerator.cpp', 'bytecompiler/BytecodeGenerator.h', + 'bytecompiler/NodesCodegen.cpp', 'bytecompiler/Label.h', 'bytecompiler/LabelScope.h', 'bytecompiler/RegisterID.h', @@ -119,6 +120,7 @@ 'jit/JITInlineMethods.h', 'jit/JITOpcodes.cpp', 'jit/JITPropertyAccess.cpp', + 'jit/JITPropertyAccess32_64.cpp', 'jit/JITStubCall.h', 'jit/JITStubs.cpp', 'jit/JITStubs.h', @@ -148,8 +150,6 @@ 'pcre/ucpinternal.h', 'pcre/ucptable.cpp', 'profiler/CallIdentifier.h', - 'profiler/HeavyProfile.cpp', - 'profiler/HeavyProfile.h', 'profiler/Profile.cpp', 'profiler/Profile.h', 'profiler/ProfileGenerator.cpp', @@ -159,8 +159,6 @@ 'profiler/Profiler.cpp', 'profiler/Profiler.h', 'profiler/ProfilerServer.h', - 'profiler/TreeProfile.cpp', - 'profiler/TreeProfile.h', 'runtime/ArgList.cpp', 'runtime/ArgList.h', 'runtime/Arguments.cpp', @@ -332,6 +330,7 @@ 'runtime/Tracing.h', 'runtime/UString.cpp', 'runtime/UString.h', + 'runtime/WeakRandom.h', 'wrec/CharacterClass.cpp', 'wrec/CharacterClass.h', 'wrec/CharacterClassConstructor.cpp', @@ -369,8 +368,8 @@ 'wtf/FastMalloc.h', 'wtf/Forward.h', 'wtf/GetPtr.h', - 'wtf/GOwnPtr.cpp', - 'wtf/GOwnPtr.h', + 'wtf/gtk/GOwnPtr.cpp', + 'wtf/gtk/GOwnPtr.h', 'wtf/gtk/MainThreadGtk.cpp', 'wtf/gtk/ThreadingGtk.cpp', 'wtf/HashCountedSet.h', @@ -400,8 +399,6 @@ 'wtf/PassRefPtr.h', 'wtf/Platform.h', 'wtf/PtrAndFlags.h', - 'wtf/qt/MainThreadQt.cpp', - 'wtf/qt/ThreadingQt.cpp', 'wtf/RandomNumber.cpp', 'wtf/RandomNumber.h', 'wtf/RandomNumberSeed.h', @@ -414,11 +411,16 @@ 'wtf/SegmentedVector.h', 'wtf/StdLibExtras.h', 'wtf/StringExtras.h', + 'wtf/StringHashFunctions.h', 'wtf/TCPackedCache.h', + 'wtf/qt/MainThreadQt.cpp', + 'wtf/qt/ThreadingQt.cpp', 'wtf/TCPageMap.h', 'wtf/TCSpinLock.h', 'wtf/TCSystemAlloc.cpp', 'wtf/TCSystemAlloc.h', + 'wtf/ThreadIdentifierDataPthreads.cpp', + 'wtf/ThreadIdentifierDataPthreads.h', 'wtf/Threading.cpp', 'wtf/Threading.h', 'wtf/ThreadingNone.cpp', @@ -440,6 +442,7 @@ 'wtf/unicode/UTF8.cpp', 'wtf/unicode/UTF8.h', 'wtf/UnusedParam.h', + 'wtf/ValueCheck.h', 'wtf/Vector.h', 'wtf/VectorTraits.h', 'wtf/VMTags.h', diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.order b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.order index 3ae3ec6..d6f6caa 100644 --- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.order +++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.order @@ -1625,7 +1625,6 @@ __ZN3JSC18EmptyStatementNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10Registe __ZN3JSCL27compareByStringPairForQSortEPKvS1_ __Z22jsc_pcre_ucp_othercasej __ZN3JSCL35objectProtoFuncPropertyIsEnumerableEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE -__ZNK3JSC8JSObject21getPropertyAttributesEPNS_9ExecStateERKNS_10IdentifierERj __ZN3WTF7HashMapIjN3JSC7JSValueENS_7IntHashIjEENS_10HashTraitsIjEENS5_IS2_EEE3setERKjRKS2_ __ZN3WTF9HashTableIjSt4pairIjN3JSC7JSValueEENS_18PairFirstExtractorIS4_EENS_7IntHashIjEENS_14PairHashTraitsINS_10HashTraitsIjEE __ZN3JSC12RegisterFile21releaseExcessCapacityEv @@ -1841,7 +1840,6 @@ __ZN3JSC6JSCell14toThisJSStringEPNS_9ExecStateE __ZNK3JSC6JSCell12toThisStringEPNS_9ExecStateE __ZN3JSCL27objectProtoFuncLookupSetterEPNS_9ExecStateEPNS_8JSObjectENS_7JSValueERKNS_7ArgListE __ZN3JSC8JSObject12lookupSetterEPNS_9ExecStateERKNS_10IdentifierE -__ZNK3JSC16JSVariableObject21getPropertyAttributesEPNS_9ExecStateERKNS_10IdentifierERj __ZN3JSC9ExecState22regExpConstructorTableEPS0_ __ZN3JSCL24regExpConstructorDollar7EPNS_9ExecStateERKNS_10IdentifierERKNS_12PropertySlotE __ZN3JSCL24regExpConstructorDollar8EPNS_9ExecStateERKNS_10IdentifierERKNS_12PropertySlotE diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri index bb531e5..d4cfe10 100644 --- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri +++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri @@ -1,14 +1,23 @@ # JavaScriptCore - Qt4 build info VPATH += $$PWD +CONFIG(standalone_package) { + isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = $$PWD/generated +} else { + isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = generated +} + CONFIG(debug, debug|release) { - isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = generated$${QMAKE_DIR_SEP}debug OBJECTS_DIR = obj/debug } else { # Release - isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = generated$${QMAKE_DIR_SEP}release OBJECTS_DIR = obj/release } +symbian: { + # Need to guarantee this comes before system includes of /epoc32/include + MMP_RULES += "USERINCLUDE ../JavaScriptCore/profiler" +} + INCLUDEPATH = \ $$PWD \ $$PWD/.. \ @@ -19,6 +28,7 @@ INCLUDEPATH = \ $$PWD/interpreter \ $$PWD/jit \ $$PWD/parser \ + $$PWD/pcre \ $$PWD/profiler \ $$PWD/runtime \ $$PWD/wrec \ @@ -27,12 +37,11 @@ INCLUDEPATH = \ $$PWD/yarr \ $$PWD/API \ $$PWD/ForwardingHeaders \ - $$GENERATED_SOURCES_DIR \ + $$JSC_GENERATED_SOURCES_DIR \ $$INCLUDEPATH DEFINES += BUILDING_QT__ BUILDING_JavaScriptCore BUILDING_WTF -GENERATED_SOURCES_DIR_SLASH = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP} win32-* { LIBS += -lwinmm } @@ -47,11 +56,6 @@ contains(JAVASCRIPTCORE_JIT,no) { DEFINES+=ENABLE_YARR=0 } -# In debug mode JIT disabled until crash fixed -win32-* { - CONFIG(debug):!contains(DEFINES, ENABLE_JIT=1): DEFINES+=ENABLE_JIT=0 -} - # Rules when JIT enabled (not disabled) !contains(DEFINES, ENABLE_JIT=0) { linux*-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,0) { @@ -68,33 +72,7 @@ wince* { include(pcre/pcre.pri) -LUT_FILES += \ - runtime/DatePrototype.cpp \ - runtime/JSONObject.cpp \ - runtime/NumberConstructor.cpp \ - runtime/StringPrototype.cpp \ - runtime/ArrayPrototype.cpp \ - runtime/MathObject.cpp \ - runtime/RegExpConstructor.cpp \ - runtime/RegExpObject.cpp - -KEYWORDLUT_FILES += \ - parser/Keywords.table - -JSCBISON += \ - parser/Grammar.y - SOURCES += \ - wtf/Assertions.cpp \ - wtf/ByteArray.cpp \ - wtf/HashTable.cpp \ - wtf/MainThread.cpp \ - wtf/RandomNumber.cpp \ - wtf/RefCountedLeakCounter.cpp \ - wtf/TypeTraits.cpp \ - wtf/unicode/CollatorDefault.cpp \ - wtf/unicode/icu/CollatorICU.cpp \ - wtf/unicode/UTF8.cpp \ API/JSBase.cpp \ API/JSCallbackConstructor.cpp \ API/JSCallbackFunction.cpp \ @@ -105,60 +83,40 @@ SOURCES += \ API/JSStringRef.cpp \ API/JSValueRef.cpp \ API/OpaqueJSString.cpp \ - runtime/InitializeThreading.cpp \ - runtime/JSGlobalData.cpp \ - runtime/JSGlobalObject.cpp \ - runtime/JSStaticScopeObject.cpp \ - runtime/JSVariableObject.cpp \ - runtime/JSActivation.cpp \ - runtime/JSNotAnObject.cpp \ - runtime/JSONObject.cpp \ - runtime/LiteralParser.cpp \ - runtime/MarkStack.cpp \ - runtime/TimeoutChecker.cpp \ - bytecode/CodeBlock.cpp \ - bytecode/StructureStubInfo.cpp \ - bytecode/JumpTable.cpp \ assembler/ARMAssembler.cpp \ assembler/MacroAssemblerARM.cpp \ - jit/JIT.cpp \ - jit/JITCall.cpp \ + bytecode/CodeBlock.cpp \ + bytecode/JumpTable.cpp \ + bytecode/Opcode.cpp \ + bytecode/SamplingTool.cpp \ + bytecode/StructureStubInfo.cpp \ + bytecompiler/BytecodeGenerator.cpp \ + bytecompiler/NodesCodegen.cpp \ + debugger/DebuggerActivation.cpp \ + debugger/DebuggerCallFrame.cpp \ + debugger/Debugger.cpp \ + interpreter/CallFrame.cpp \ + interpreter/Interpreter.cpp \ + interpreter/RegisterFile.cpp \ + jit/ExecutableAllocatorPosix.cpp \ + jit/ExecutableAllocatorSymbian.cpp \ + jit/ExecutableAllocatorWin.cpp \ + jit/ExecutableAllocator.cpp \ jit/JITArithmetic.cpp \ + jit/JITCall.cpp \ + jit/JIT.cpp \ jit/JITOpcodes.cpp \ jit/JITPropertyAccess.cpp \ - jit/ExecutableAllocator.cpp \ + jit/JITPropertyAccess32_64.cpp \ jit/JITStubs.cpp \ - bytecompiler/BytecodeGenerator.cpp \ - runtime/ExceptionHelpers.cpp \ - runtime/JSPropertyNameIterator.cpp \ - interpreter/Interpreter.cpp \ - bytecode/Opcode.cpp \ - bytecode/SamplingTool.cpp \ - yarr/RegexCompiler.cpp \ - yarr/RegexInterpreter.cpp \ - yarr/RegexJIT.cpp \ - interpreter/RegisterFile.cpp - -symbian { - SOURCES += jit/ExecutableAllocatorSymbian.cpp \ - runtime/MarkStackSymbian.cpp -} else { - win32-*|wince* { - SOURCES += jit/ExecutableAllocatorWin.cpp \ - runtime/MarkStackWin.cpp - } else { - SOURCES += jit/ExecutableAllocatorPosix.cpp \ - runtime/MarkStackPosix.cpp - } -} - -!contains(DEFINES, USE_SYSTEM_MALLOC) { - SOURCES += wtf/TCSystemAlloc.cpp -} - -# AllInOneFile.cpp helps gcc analize and optimize code -# Other compilers may be able to do this at link time -SOURCES += \ + parser/Lexer.cpp \ + parser/Nodes.cpp \ + parser/ParserArena.cpp \ + parser/Parser.cpp \ + profiler/Profile.cpp \ + profiler/ProfileGenerator.cpp \ + profiler/ProfileNode.cpp \ + profiler/Profiler.cpp \ runtime/ArgList.cpp \ runtime/Arguments.cpp \ runtime/ArrayConstructor.cpp \ @@ -169,62 +127,67 @@ SOURCES += \ runtime/CallData.cpp \ runtime/Collector.cpp \ runtime/CommonIdentifiers.cpp \ + runtime/Completion.cpp \ runtime/ConstructData.cpp \ - wtf/CurrentTime.cpp \ runtime/DateConstructor.cpp \ runtime/DateConversion.cpp \ runtime/DateInstance.cpp \ runtime/DatePrototype.cpp \ - debugger/Debugger.cpp \ - debugger/DebuggerCallFrame.cpp \ - debugger/DebuggerActivation.cpp \ - wtf/dtoa.cpp \ - runtime/Error.cpp \ runtime/ErrorConstructor.cpp \ + runtime/Error.cpp \ runtime/ErrorInstance.cpp \ runtime/ErrorPrototype.cpp \ - interpreter/CallFrame.cpp \ + runtime/ExceptionHelpers.cpp \ runtime/Executable.cpp \ runtime/FunctionConstructor.cpp \ runtime/FunctionPrototype.cpp \ runtime/GetterSetter.cpp \ runtime/GlobalEvalFunction.cpp \ runtime/Identifier.cpp \ + runtime/InitializeThreading.cpp \ runtime/InternalFunction.cpp \ - runtime/Completion.cpp \ - runtime/JSArray.cpp \ + runtime/JSActivation.cpp \ runtime/JSAPIValueWrapper.cpp \ + runtime/JSArray.cpp \ runtime/JSByteArray.cpp \ runtime/JSCell.cpp \ runtime/JSFunction.cpp \ + runtime/JSGlobalData.cpp \ + runtime/JSGlobalObject.cpp \ runtime/JSGlobalObjectFunctions.cpp \ runtime/JSImmediate.cpp \ runtime/JSLock.cpp \ + runtime/JSNotAnObject.cpp \ runtime/JSNumberCell.cpp \ runtime/JSObject.cpp \ + runtime/JSONObject.cpp \ + runtime/JSPropertyNameIterator.cpp \ + runtime/JSStaticScopeObject.cpp \ runtime/JSString.cpp \ runtime/JSValue.cpp \ + runtime/JSVariableObject.cpp \ runtime/JSWrapperObject.cpp \ - parser/Lexer.cpp \ + runtime/LiteralParser.cpp \ runtime/Lookup.cpp \ + runtime/MarkStackPosix.cpp \ + runtime/MarkStackSymbian.cpp \ + runtime/MarkStackWin.cpp \ + runtime/MarkStack.cpp \ runtime/MathObject.cpp \ runtime/NativeErrorConstructor.cpp \ runtime/NativeErrorPrototype.cpp \ - parser/Nodes.cpp \ runtime/NumberConstructor.cpp \ runtime/NumberObject.cpp \ runtime/NumberPrototype.cpp \ runtime/ObjectConstructor.cpp \ runtime/ObjectPrototype.cpp \ runtime/Operations.cpp \ - parser/Parser.cpp \ - parser/ParserArena.cpp \ runtime/PropertyDescriptor.cpp \ runtime/PropertyNameArray.cpp \ runtime/PropertySlot.cpp \ runtime/PrototypeFunction.cpp \ - runtime/RegExp.cpp \ runtime/RegExpConstructor.cpp \ + runtime/RegExp.cpp \ runtime/RegExpObject.cpp \ runtime/RegExpPrototype.cpp \ runtime/ScopeChain.cpp \ @@ -232,50 +195,38 @@ SOURCES += \ runtime/StringConstructor.cpp \ runtime/StringObject.cpp \ runtime/StringPrototype.cpp \ - runtime/Structure.cpp \ runtime/StructureChain.cpp \ + runtime/Structure.cpp \ + runtime/TimeoutChecker.cpp \ runtime/UString.cpp \ - profiler/HeavyProfile.cpp \ - profiler/Profile.cpp \ - profiler/ProfileGenerator.cpp \ - profiler/ProfileNode.cpp \ - profiler/Profiler.cpp \ - profiler/TreeProfile.cpp \ + runtime/UStringImpl.cpp \ + wtf/Assertions.cpp \ + wtf/ByteArray.cpp \ + wtf/CurrentTime.cpp \ wtf/DateMath.cpp \ + wtf/dtoa.cpp \ wtf/FastMalloc.cpp \ + wtf/HashTable.cpp \ + wtf/MainThread.cpp \ + wtf/qt/MainThreadQt.cpp \ + wtf/qt/ThreadingQt.cpp \ + wtf/RandomNumber.cpp \ + wtf/RefCountedLeakCounter.cpp \ + wtf/ThreadingNone.cpp \ wtf/Threading.cpp \ - wtf/qt/MainThreadQt.cpp - -!contains(DEFINES, ENABLE_SINGLE_THREADED=1) { - SOURCES += wtf/qt/ThreadingQt.cpp -} else { - DEFINES += ENABLE_JSC_MULTIPLE_THREADS=0 - SOURCES += wtf/ThreadingNone.cpp -} - -# GENERATOR 1-A: LUT creator -lut.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.lut.h -lut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT} -lut.depend = ${QMAKE_FILE_NAME} -lut.input = LUT_FILES -lut.CONFIG += no_link -addExtraCompiler(lut) + wtf/TypeTraits.cpp \ + wtf/unicode/CollatorDefault.cpp \ + wtf/unicode/icu/CollatorICU.cpp \ + wtf/unicode/UTF8.cpp \ + yarr/RegexCompiler.cpp \ + yarr/RegexInterpreter.cpp \ + yarr/RegexJIT.cpp -# GENERATOR 1-B: particular LUT creator (for 1 file only) -keywordlut.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}Lexer.lut.h -keywordlut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT} -keywordlut.depend = ${QMAKE_FILE_NAME} -keywordlut.input = KEYWORDLUT_FILES -keywordlut.CONFIG += no_link -addExtraCompiler(keywordlut) +# Generated files, simply list them for JavaScriptCore +SOURCES += \ + $${JSC_GENERATED_SOURCES_DIR}/Grammar.cpp -# GENERATOR 2: bison grammar -jscbison.output = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.cpp -jscbison.commands = bison -d -p jscyy ${QMAKE_FILE_NAME} -o $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c && $(MOVE) $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.c ${QMAKE_FILE_OUT} && $(MOVE) $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.tab.h $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP}${QMAKE_FILE_BASE}.h -jscbison.depend = ${QMAKE_FILE_NAME} -jscbison.input = JSCBISON -jscbison.variable_out = GENERATED_SOURCES -jscbison.dependency_type = TYPE_C -jscbison.CONFIG = target_predeps -addExtraCompilerWithHeader(jscbison) +!contains(DEFINES, USE_SYSTEM_MALLOC) { + SOURCES += wtf/TCSystemAlloc.cpp +} diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro index a1affd4..0d6becb 100644 --- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro +++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro @@ -52,17 +52,11 @@ win32-g++ { QMAKE_LIBDIR_POST += $$split(TMPPATH,";") } -DEFINES += WTF_USE_JAVASCRIPTCORE_BINDINGS=1 - DEFINES += WTF_CHANGES=1 include(JavaScriptCore.pri) QMAKE_EXTRA_TARGETS += generated_files -lessThan(QT_MINOR_VERSION, 4) { - DEFINES += QT_BEGIN_NAMESPACE="" QT_END_NAMESPACE="" -} - *-g++*:QMAKE_CXXFLAGS_RELEASE -= -O2 *-g++*:QMAKE_CXXFLAGS_RELEASE += -O3 diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.cpp b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.cpp index 1324586..6dd2b87 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.cpp @@ -26,7 +26,7 @@ #include "config.h" -#if ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL) +#if ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL) #include "ARMAssembler.h" @@ -34,39 +34,6 @@ namespace JSC { // Patching helpers -ARMWord* ARMAssembler::getLdrImmAddress(ARMWord* insn, uint32_t* constPool) -{ - // Must be an ldr ..., [pc +/- imm] - ASSERT((*insn & 0x0f7f0000) == 0x051f0000); - - if (constPool && (*insn & 0x1)) - return reinterpret_cast(constPool + ((*insn & SDT_OFFSET_MASK) >> 1)); - - ARMWord addr = reinterpret_cast(insn) + 2 * sizeof(ARMWord); - if (*insn & DT_UP) - return reinterpret_cast(addr + (*insn & SDT_OFFSET_MASK)); - else - return reinterpret_cast(addr - (*insn & SDT_OFFSET_MASK)); -} - -void ARMAssembler::linkBranch(void* code, JmpSrc from, void* to, int useConstantPool) -{ - ARMWord* insn = reinterpret_cast(code) + (from.m_offset / sizeof(ARMWord)); - - if (!useConstantPool) { - int diff = reinterpret_cast(to) - reinterpret_cast(insn + 2); - - if ((diff <= BOFFSET_MAX && diff >= BOFFSET_MIN)) { - *insn = B | getConditionalField(*insn) | (diff & BRANCH_MASK); - ExecutableAllocator::cacheFlush(insn, sizeof(ARMWord)); - return; - } - } - ARMWord* addr = getLdrImmAddress(insn); - *addr = reinterpret_cast(to); - ExecutableAllocator::cacheFlush(addr, sizeof(ARMWord)); -} - void ARMAssembler::patchConstantPoolLoad(void* loadAddr, void* constPoolAddr) { ARMWord *ldr = reinterpret_cast(loadAddr); @@ -118,7 +85,7 @@ ARMWord ARMAssembler::getOp2(ARMWord imm) if ((imm & 0x00ffffff) == 0) return OP2_IMM | (imm >> 24) | (rol << 8); - return 0; + return INVALID_IMM; } int ARMAssembler::genInt(int reg, ARMWord imm, bool positive) @@ -236,25 +203,18 @@ ARMWord ARMAssembler::getImm(ARMWord imm, int tmpReg, bool invert) // Do it by 1 instruction tmp = getOp2(imm); - if (tmp) + if (tmp != INVALID_IMM) return tmp; tmp = getOp2(~imm); - if (tmp) { + if (tmp != INVALID_IMM) { if (invert) return tmp | OP2_INV_IMM; mvn_r(tmpReg, tmp); return tmpReg; } - // Do it by 2 instruction - if (genInt(tmpReg, imm, true)) - return tmpReg; - if (genInt(tmpReg, ~imm, false)) - return tmpReg; - - ldr_imm(tmpReg, imm); - return tmpReg; + return encodeComplexImm(imm, tmpReg); } void ARMAssembler::moveImm(ARMWord imm, int dest) @@ -263,24 +223,41 @@ void ARMAssembler::moveImm(ARMWord imm, int dest) // Do it by 1 instruction tmp = getOp2(imm); - if (tmp) { + if (tmp != INVALID_IMM) { mov_r(dest, tmp); return; } tmp = getOp2(~imm); - if (tmp) { + if (tmp != INVALID_IMM) { mvn_r(dest, tmp); return; } + encodeComplexImm(imm, dest); +} + +ARMWord ARMAssembler::encodeComplexImm(ARMWord imm, int dest) +{ +#if WTF_ARM_ARCH_AT_LEAST(7) + ARMWord tmp = getImm16Op2(imm); + if (tmp != INVALID_IMM) { + movw_r(dest, tmp); + return dest; + } + movw_r(dest, getImm16Op2(imm & 0xffff)); + movt_r(dest, getImm16Op2(imm >> 16)); + return dest; +#else // Do it by 2 instruction if (genInt(dest, imm, true)) - return; + return dest; if (genInt(dest, ~imm, false)) - return; + return dest; ldr_imm(dest, imm); + return dest; +#endif } // Memory load/store helpers @@ -378,10 +355,17 @@ void* ARMAssembler::executableCopy(ExecutablePool* allocator) // The last bit is set if the constant must be placed on constant pool. int pos = (*iter) & (~0x1); ARMWord* ldrAddr = reinterpret_cast(data + pos); - ARMWord offset = *getLdrImmAddress(ldrAddr); - if (offset != 0xffffffff) { - JmpSrc jmpSrc(pos); - linkBranch(data, jmpSrc, data + offset, ((*iter) & 1)); + ARMWord* addr = getLdrImmAddress(ldrAddr); + if (*addr != 0xffffffff) { + if (!(*iter & 1)) { + int diff = reinterpret_cast(data + *addr) - (ldrAddr + DefaultPrefetching); + + if ((diff <= BOFFSET_MAX && diff >= BOFFSET_MIN)) { + *ldrAddr = B | getConditionalField(*ldrAddr) | (diff & BRANCH_MASK); + continue; + } + } + *addr = reinterpret_cast(data + *addr); } } @@ -390,4 +374,4 @@ void* ARMAssembler::executableCopy(ExecutablePool* allocator) } // namespace JSC -#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL) +#endif // ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL) diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.h index 9f9a450..6967b37 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.h @@ -29,7 +29,7 @@ #include -#if ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL) +#if ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL) #include "AssemblerBufferWithConstantPool.h" #include @@ -121,6 +121,7 @@ namespace JSC { MUL = 0x00000090, MULL = 0x00c00090, FADDD = 0x0e300b00, + FDIVD = 0x0e800b00, FSUBD = 0x0e300b40, FMULD = 0x0e200b00, FCMPD = 0x0eb40b40, @@ -133,12 +134,18 @@ namespace JSC { B = 0x0a000000, BL = 0x0b000000, FMSR = 0x0e000a10, + FMRS = 0x0e100a10, FSITOD = 0x0eb80bc0, + FTOSID = 0x0ebd0b40, FMSTAT = 0x0ef1fa10, -#if ARM_ARCH_VERSION >= 5 +#if WTF_ARM_ARCH_AT_LEAST(5) CLZ = 0x016f0f10, BKPT = 0xe120070, #endif +#if WTF_ARM_ARCH_AT_LEAST(7) + MOVW = 0x03000000, + MOVT = 0x03400000, +#endif }; enum { @@ -175,6 +182,9 @@ namespace JSC { padForAlign32 = 0xee120070, }; + static const ARMWord INVALID_IMM = 0xf0000000; + static const int DefaultPrefetching = 2; + class JmpSrc { friend class ARMAssembler; public: @@ -333,6 +343,20 @@ namespace JSC { emitInst(static_cast(cc) | MOV, rd, ARMRegisters::r0, op2); } +#if WTF_ARM_ARCH_AT_LEAST(7) + void movw_r(int rd, ARMWord op2, Condition cc = AL) + { + ASSERT((op2 | 0xf0fff) == 0xf0fff); + m_buffer.putInt(static_cast(cc) | MOVW | RD(rd) | op2); + } + + void movt_r(int rd, ARMWord op2, Condition cc = AL) + { + ASSERT((op2 | 0xf0fff) == 0xf0fff); + m_buffer.putInt(static_cast(cc) | MOVT | RD(rd) | op2); + } +#endif + void movs_r(int rd, ARMWord op2, Condition cc = AL) { emitInst(static_cast(cc) | MOV | SET_CC, rd, ARMRegisters::r0, op2); @@ -378,6 +402,11 @@ namespace JSC { emitInst(static_cast(cc) | FADDD, dd, dn, dm); } + void fdivd_r(int dd, int dn, int dm, Condition cc = AL) + { + emitInst(static_cast(cc) | FDIVD, dd, dn, dm); + } + void fsubd_r(int dd, int dn, int dm, Condition cc = AL) { emitInst(static_cast(cc) | FSUBD, dd, dn, dm); @@ -482,17 +511,27 @@ namespace JSC { emitInst(static_cast(cc) | FMSR, rn, dd, 0); } + void fmrs_r(int rd, int dn, Condition cc = AL) + { + emitInst(static_cast(cc) | FMRS, rd, dn, 0); + } + void fsitod_r(int dd, int dm, Condition cc = AL) { emitInst(static_cast(cc) | FSITOD, dd, 0, dm); } + void ftosid_r(int fd, int dm, Condition cc = AL) + { + emitInst(static_cast(cc) | FTOSID, fd, 0, dm); + } + void fmstat(Condition cc = AL) { m_buffer.putInt(static_cast(cc) | FMSTAT); } -#if ARM_ARCH_VERSION >= 5 +#if WTF_ARM_ARCH_AT_LEAST(5) void clz_r(int rd, int rm, Condition cc = AL) { m_buffer.putInt(static_cast(cc) | CLZ | RD(rd) | RM(rm)); @@ -501,7 +540,7 @@ namespace JSC { void bkpt(ARMWord value) { -#if ARM_ARCH_VERSION >= 5 +#if WTF_ARM_ARCH_AT_LEAST(5) m_buffer.putInt(BKPT | ((value & 0xff0) << 4) | (value & 0xf)); #else // Cannot access to Zero memory address @@ -594,15 +633,32 @@ namespace JSC { // Patching helpers - static ARMWord* getLdrImmAddress(ARMWord* insn, uint32_t* constPool = 0); - static void linkBranch(void* code, JmpSrc from, void* to, int useConstantPool = 0); + static ARMWord* getLdrImmAddress(ARMWord* insn) + { + // Must be an ldr ..., [pc +/- imm] + ASSERT((*insn & 0x0f7f0000) == 0x051f0000); + + ARMWord addr = reinterpret_cast(insn) + DefaultPrefetching * sizeof(ARMWord); + if (*insn & DT_UP) + return reinterpret_cast(addr + (*insn & SDT_OFFSET_MASK)); + return reinterpret_cast(addr - (*insn & SDT_OFFSET_MASK)); + } + + static ARMWord* getLdrImmAddressOnPool(ARMWord* insn, uint32_t* constPool) + { + // Must be an ldr ..., [pc +/- imm] + ASSERT((*insn & 0x0f7f0000) == 0x051f0000); + + if (*insn & 0x1) + return reinterpret_cast(constPool + ((*insn & SDT_OFFSET_MASK) >> 1)); + return getLdrImmAddress(insn); + } static void patchPointerInternal(intptr_t from, void* to) { ARMWord* insn = reinterpret_cast(from); ARMWord* addr = getLdrImmAddress(insn); *addr = reinterpret_cast(to); - ExecutableAllocator::cacheFlush(addr, sizeof(ARMWord)); } static ARMWord patchConstantPoolLoad(ARMWord load, ARMWord value) @@ -647,12 +703,13 @@ namespace JSC { void linkJump(JmpSrc from, JmpDst to) { ARMWord* insn = reinterpret_cast(m_buffer.data()) + (from.m_offset / sizeof(ARMWord)); - *getLdrImmAddress(insn, m_buffer.poolAddress()) = static_cast(to.m_offset); + ARMWord* addr = getLdrImmAddressOnPool(insn, m_buffer.poolAddress()); + *addr = static_cast(to.m_offset); } static void linkJump(void* code, JmpSrc from, void* to) { - linkBranch(code, from, to); + patchPointerInternal(reinterpret_cast(code) + from.m_offset, to); } static void relinkJump(void* from, void* to) @@ -662,12 +719,12 @@ namespace JSC { static void linkCall(void* code, JmpSrc from, void* to) { - linkBranch(code, from, to, true); + patchPointerInternal(reinterpret_cast(code) + from.m_offset, to); } static void relinkCall(void* from, void* to) { - relinkJump(from, to); + patchPointerInternal(reinterpret_cast(from) - sizeof(ARMWord), to); } // Address operations @@ -708,8 +765,18 @@ namespace JSC { } static ARMWord getOp2(ARMWord imm); + +#if WTF_ARM_ARCH_AT_LEAST(7) + static ARMWord getImm16Op2(ARMWord imm) + { + if (imm <= 0xffff) + return (imm & 0xf000) << 4 | (imm & 0xfff); + return INVALID_IMM; + } +#endif ARMWord getImm(ARMWord imm, int tmpReg, bool invert = false); void moveImm(ARMWord imm, int dest); + ARMWord encodeComplexImm(ARMWord imm, int dest); // Memory load/store helpers @@ -764,6 +831,6 @@ namespace JSC { } // namespace JSC -#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL) +#endif // ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL) #endif // ARMAssembler_h diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h index 02ce2e9..4e394b2 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h @@ -28,7 +28,7 @@ #include -#if ENABLE(ASSEMBLER) && PLATFORM(ARM_THUMB2) +#if ENABLE(ASSEMBLER) && CPU(ARM_THUMB2) #include "AssemblerBuffer.h" #include @@ -201,10 +201,10 @@ class ARMThumbImmediate { ALWAYS_INLINE static void countLeadingZerosPartial(uint32_t& value, int32_t& zeros, const int N) { - if (value & ~((1<>= N; /* if any were set, lose the bottom N */ \ - else /* if none of the top N bits are set, */ \ - zeros += N; /* then we have identified N leading zeros */ + if (value & ~((1 << N) - 1)) /* check for any of the top N bits (of 2N bits) are set */ + value >>= N; /* if any were set, lose the bottom N */ + else /* if none of the top N bits are set, */ + zeros += N; /* then we have identified N leading zeros */ } static int32_t countLeadingZeros(uint32_t value) @@ -236,6 +236,11 @@ class ARMThumbImmediate { ARMThumbImmediate(ThumbImmediateType type, uint16_t value) : m_type(TypeUInt16) { + // Make sure this constructor is only reached with type TypeUInt16; + // this extra parameter makes the code a little clearer by making it + // explicit at call sites which type is being constructed + ASSERT_UNUSED(type, type == TypeUInt16); + m_value.asInt = value; } @@ -1827,6 +1832,6 @@ private: } // namespace JSC -#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM_THUMB2) +#endif // ENABLE(ASSEMBLER) && CPU(ARM_THUMB2) #endif // ARMAssembler_h diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/AbstractMacroAssembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/AbstractMacroAssembler.h index 525fe98..198e8d1 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/AbstractMacroAssembler.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/AbstractMacroAssembler.h @@ -173,16 +173,16 @@ public: struct Imm32 { explicit Imm32(int32_t value) : m_value(value) -#if PLATFORM(ARM) +#if CPU(ARM) , m_isPointer(false) #endif { } -#if !PLATFORM(X86_64) +#if !CPU(X86_64) explicit Imm32(ImmPtr ptr) : m_value(ptr.asIntptr()) -#if PLATFORM(ARM) +#if CPU(ARM) , m_isPointer(true) #endif { @@ -190,7 +190,7 @@ public: #endif int32_t m_value; -#if PLATFORM(ARM) +#if CPU(ARM) // We rely on being able to regenerate code to recover exception handling // information. Since ARMv7 supports 16-bit immediates there is a danger // that if pointer values change the layout of the generated code will change. diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssembler.h index 2743ab4..76bd205 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssembler.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssembler.h @@ -30,19 +30,19 @@ #if ENABLE(ASSEMBLER) -#if PLATFORM(ARM_THUMB2) +#if CPU(ARM_THUMB2) #include "MacroAssemblerARMv7.h" namespace JSC { typedef MacroAssemblerARMv7 MacroAssemblerBase; }; -#elif PLATFORM(ARM_TRADITIONAL) +#elif CPU(ARM_TRADITIONAL) #include "MacroAssemblerARM.h" namespace JSC { typedef MacroAssemblerARM MacroAssemblerBase; }; -#elif PLATFORM(X86) +#elif CPU(X86) #include "MacroAssemblerX86.h" namespace JSC { typedef MacroAssemblerX86 MacroAssemblerBase; }; -#elif PLATFORM(X86_64) +#elif CPU(X86_64) #include "MacroAssemblerX86_64.h" namespace JSC { typedef MacroAssemblerX86_64 MacroAssemblerBase; }; @@ -60,7 +60,7 @@ public: using MacroAssemblerBase::jump; using MacroAssemblerBase::branch32; using MacroAssemblerBase::branch16; -#if PLATFORM(X86_64) +#if CPU(X86_64) using MacroAssemblerBase::branchPtr; using MacroAssemblerBase::branchTestPtr; #endif @@ -133,7 +133,8 @@ public: // Ptr methods // On 32-bit platforms (i.e. x86), these methods directly map onto their 32-bit equivalents. -#if !PLATFORM(X86_64) + // FIXME: should this use a test for 32-bitness instead of this specific exception? +#if !CPU(X86_64) void addPtr(RegisterID src, RegisterID dest) { add32(src, dest); @@ -179,16 +180,6 @@ public: or32(imm, dest); } - void rshiftPtr(RegisterID shift_amount, RegisterID dest) - { - rshift32(shift_amount, dest); - } - - void rshiftPtr(Imm32 imm, RegisterID dest) - { - rshift32(imm, dest); - } - void subPtr(RegisterID src, RegisterID dest) { sub32(src, dest); diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.cpp b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.cpp index d726ecd..b5b20fa 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.cpp @@ -26,11 +26,11 @@ #include "config.h" -#if ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL) +#if ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL) #include "MacroAssemblerARM.h" -#if PLATFORM(LINUX) +#if OS(LINUX) #include #include #include @@ -43,7 +43,7 @@ namespace JSC { static bool isVFPPresent() { -#if PLATFORM(LINUX) +#if OS(LINUX) int fd = open("/proc/self/auxv", O_RDONLY); if (fd > 0) { Elf32_auxv_t aux; @@ -62,7 +62,8 @@ static bool isVFPPresent() const bool MacroAssemblerARM::s_isVFPPresent = isVFPPresent(); -#if defined(ARM_REQUIRE_NATURAL_ALIGNMENT) && ARM_REQUIRE_NATURAL_ALIGNMENT +#if CPU(ARMV5_OR_LOWER) +/* On ARMv5 and below, natural alignment is required. */ void MacroAssemblerARM::load32WithUnalignedHalfWords(BaseIndex address, RegisterID dest) { ARMWord op2; @@ -91,4 +92,4 @@ void MacroAssemblerARM::load32WithUnalignedHalfWords(BaseIndex address, Register } -#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL) +#endif // ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL) diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h index 7a72b06..21b8de8 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h @@ -30,7 +30,7 @@ #include -#if ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL) +#if ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL) #include "ARMAssembler.h" #include "AbstractMacroAssembler.h" @@ -38,6 +38,9 @@ namespace JSC { class MacroAssemblerARM : public AbstractMacroAssembler { + static const int DoubleConditionMask = 0x0f; + static const int DoubleConditionBitSpecial = 0x10; + COMPILE_ASSERT(!(DoubleConditionBitSpecial & DoubleConditionMask), DoubleConditionBitSpecial_should_not_interfere_with_ARMAssembler_Condition_codes); public: enum Condition { Equal = ARMAssembler::EQ, @@ -57,11 +60,20 @@ public: }; enum DoubleCondition { + // These conditions will only evaluate to true if the comparison is ordered - i.e. neither operand is NaN. DoubleEqual = ARMAssembler::EQ, + DoubleNotEqual = ARMAssembler::NE | DoubleConditionBitSpecial, DoubleGreaterThan = ARMAssembler::GT, DoubleGreaterThanOrEqual = ARMAssembler::GE, - DoubleLessThan = ARMAssembler::LT, - DoubleLessThanOrEqual = ARMAssembler::LE, + DoubleLessThan = ARMAssembler::CC, + DoubleLessThanOrEqual = ARMAssembler::LS, + // If either operand is NaN, these conditions always evaluate to true. + DoubleEqualOrUnordered = ARMAssembler::EQ | DoubleConditionBitSpecial, + DoubleNotEqualOrUnordered = ARMAssembler::NE, + DoubleGreaterThanOrUnordered = ARMAssembler::HI, + DoubleGreaterThanOrEqualOrUnordered = ARMAssembler::CS, + DoubleLessThanOrUnordered = ARMAssembler::LT, + DoubleLessThanOrEqualOrUnordered = ARMAssembler::LE, }; static const RegisterID stackPointerRegister = ARMRegisters::sp; @@ -106,14 +118,18 @@ public: m_assembler.ands_r(dest, dest, w); } - void lshift32(Imm32 imm, RegisterID dest) + void lshift32(RegisterID shift_amount, RegisterID dest) { - m_assembler.movs_r(dest, m_assembler.lsl(dest, imm.m_value & 0x1f)); + ARMWord w = ARMAssembler::getOp2(0x1f); + ASSERT(w != ARMAssembler::INVALID_IMM); + m_assembler.and_r(ARMRegisters::S0, shift_amount, w); + + m_assembler.movs_r(dest, m_assembler.lsl_r(dest, ARMRegisters::S0)); } - void lshift32(RegisterID shift_amount, RegisterID dest) + void lshift32(Imm32 imm, RegisterID dest) { - m_assembler.movs_r(dest, m_assembler.lsl_r(dest, shift_amount)); + m_assembler.movs_r(dest, m_assembler.lsl(dest, imm.m_value & 0x1f)); } void mul32(RegisterID src, RegisterID dest) @@ -131,6 +147,11 @@ public: m_assembler.muls_r(dest, src, ARMRegisters::S0); } + void neg32(RegisterID srcDest) + { + m_assembler.rsbs_r(srcDest, srcDest, ARMAssembler::getOp2(0)); + } + void not32(RegisterID dest) { m_assembler.mvns_r(dest, dest); @@ -148,7 +169,11 @@ public: void rshift32(RegisterID shift_amount, RegisterID dest) { - m_assembler.movs_r(dest, m_assembler.asr_r(dest, shift_amount)); + ARMWord w = ARMAssembler::getOp2(0x1f); + ASSERT(w != ARMAssembler::INVALID_IMM); + m_assembler.and_r(ARMRegisters::S0, shift_amount, w); + + m_assembler.movs_r(dest, m_assembler.asr_r(dest, ARMRegisters::S0)); } void rshift32(Imm32 imm, RegisterID dest) @@ -199,7 +224,7 @@ public: m_assembler.baseIndexTransfer32(true, dest, address.base, address.index, static_cast(address.scale), address.offset); } -#if defined(ARM_REQUIRE_NATURAL_ALIGNMENT) && ARM_REQUIRE_NATURAL_ALIGNMENT +#if CPU(ARMV5_OR_LOWER) void load32WithUnalignedHalfWords(BaseIndex address, RegisterID dest); #else void load32WithUnalignedHalfWords(BaseIndex address, RegisterID dest) @@ -505,6 +530,13 @@ public: return Jump(m_assembler.jmp(ARMCondition(cond))); } + Jump branchOr32(Condition cond, RegisterID src, RegisterID dest) + { + ASSERT((cond == Signed) || (cond == Zero) || (cond == NonZero)); + or32(src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + void breakpoint() { m_assembler.bkpt(0); @@ -548,6 +580,25 @@ public: m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond)); } + void set8(Condition cond, RegisterID left, RegisterID right, RegisterID dest) + { + // ARM doesn't have byte registers + set32(cond, left, right, dest); + } + + void set8(Condition cond, Address left, RegisterID right, RegisterID dest) + { + // ARM doesn't have byte registers + load32(left, ARMRegisters::S1); + set32(cond, ARMRegisters::S1, right, dest); + } + + void set8(Condition cond, RegisterID left, Imm32 right, RegisterID dest) + { + // ARM doesn't have byte registers + set32(cond, left, right, dest); + } + void setTest32(Condition cond, Address address, Imm32 mask, RegisterID dest) { load32(address, ARMRegisters::S1); @@ -559,6 +610,12 @@ public: m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond)); } + void setTest8(Condition cond, Address address, Imm32 mask, RegisterID dest) + { + // ARM doesn't have byte registers + setTest32(cond, address, mask, dest); + } + void add32(Imm32 imm, RegisterID src, RegisterID dest) { m_assembler.add_r(dest, src, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); @@ -666,6 +723,12 @@ public: m_assembler.doubleTransfer(true, dest, address.base, address.offset); } + void loadDouble(void* address, FPRegisterID dest) + { + m_assembler.ldr_un_imm(ARMRegisters::S0, (ARMWord)address); + m_assembler.fdtr_u(true, dest, ARMRegisters::S0, 0); + } + void storeDouble(FPRegisterID src, ImplicitAddress address) { m_assembler.doubleTransfer(false, src, address.base, address.offset); @@ -682,6 +745,18 @@ public: addDouble(ARMRegisters::SD0, dest); } + void divDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.fdivd_r(dest, dest, src); + } + + void divDouble(Address src, FPRegisterID dest) + { + ASSERT_NOT_REACHED(); // Untested + loadDouble(src, ARMRegisters::SD0); + divDouble(ARMRegisters::SD0, dest); + } + void subDouble(FPRegisterID src, FPRegisterID dest) { m_assembler.fsubd_r(dest, dest, src); @@ -710,11 +785,30 @@ public: m_assembler.fsitod_r(dest, dest); } + void convertInt32ToDouble(Address src, FPRegisterID dest) + { + ASSERT_NOT_REACHED(); // Untested + // flds does not worth the effort here + load32(src, ARMRegisters::S1); + convertInt32ToDouble(ARMRegisters::S1, dest); + } + + void convertInt32ToDouble(AbsoluteAddress src, FPRegisterID dest) + { + ASSERT_NOT_REACHED(); // Untested + // flds does not worth the effort here + m_assembler.ldr_un_imm(ARMRegisters::S1, (ARMWord)src.m_ptr); + m_assembler.dtr_u(true, ARMRegisters::S1, ARMRegisters::S1, 0); + convertInt32ToDouble(ARMRegisters::S1, dest); + } + Jump branchDouble(DoubleCondition cond, FPRegisterID left, FPRegisterID right) { m_assembler.fcmpd_r(left, right); m_assembler.fmstat(); - return Jump(m_assembler.jmp(static_cast(cond))); + if (cond & DoubleConditionBitSpecial) + m_assembler.cmp_r(ARMRegisters::S0, ARMRegisters::S0, ARMAssembler::VS); + return Jump(m_assembler.jmp(static_cast(cond & ~DoubleConditionMask))); } // Truncates 'src' to an integer, and places the resulting 'dest'. @@ -729,6 +823,29 @@ public: return jump(); } + // Convert 'src' to an integer, and places the resulting 'dest'. + // If the result is not representable as a 32 bit value, branch. + // May also branch for some values that are representable in 32 bits + // (specifically, in this case, 0). + void branchConvertDoubleToInt32(FPRegisterID src, RegisterID dest, JumpList& failureCases, FPRegisterID fpTemp) + { + m_assembler.ftosid_r(ARMRegisters::SD0, src); + m_assembler.fmrs_r(dest, ARMRegisters::SD0); + + // Convert the integer result back to float & compare to the original value - if not equal or unordered (NaN) then jump. + m_assembler.fsitod_r(ARMRegisters::SD0, ARMRegisters::SD0); + failureCases.append(branchDouble(DoubleNotEqualOrUnordered, src, ARMRegisters::SD0)); + + // If the result is zero, it might have been -0.0, and 0.0 equals to -0.0 + failureCases.append(branchTest32(Zero, dest)); + } + + void zeroDouble(FPRegisterID srcDest) + { + m_assembler.mov_r(ARMRegisters::S0, ARMAssembler::getOp2(0)); + convertInt32ToDouble(ARMRegisters::S0, srcDest); + } + protected: ARMAssembler::Condition ARMCondition(Condition cond) { @@ -811,6 +928,6 @@ private: } -#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL) +#endif // ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL) #endif // MacroAssemblerARM_h diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h index c479517..532a9cf 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h @@ -93,13 +93,21 @@ public: Zero = ARMv7Assembler::ConditionEQ, NonZero = ARMv7Assembler::ConditionNE }; - enum DoubleCondition { + // These conditions will only evaluate to true if the comparison is ordered - i.e. neither operand is NaN. DoubleEqual = ARMv7Assembler::ConditionEQ, + DoubleNotEqual = ARMv7Assembler::ConditionVC, // Not the right flag! check for this & handle differently. DoubleGreaterThan = ARMv7Assembler::ConditionGT, DoubleGreaterThanOrEqual = ARMv7Assembler::ConditionGE, DoubleLessThan = ARMv7Assembler::ConditionLO, DoubleLessThanOrEqual = ARMv7Assembler::ConditionLS, + // If either operand is NaN, these conditions always evaluate to true. + DoubleEqualOrUnordered = ARMv7Assembler::ConditionVS, // Not the right flag! check for this & handle differently. + DoubleNotEqualOrUnordered = ARMv7Assembler::ConditionNE, + DoubleGreaterThanOrUnordered = ARMv7Assembler::ConditionHI, + DoubleGreaterThanOrEqualOrUnordered = ARMv7Assembler::ConditionHS, + DoubleLessThanOrUnordered = ARMv7Assembler::ConditionLT, + DoubleLessThanOrEqualOrUnordered = ARMv7Assembler::ConditionLE, }; static const RegisterID stackPointerRegister = ARMRegisters::sp; @@ -189,14 +197,19 @@ public: } } - void lshift32(Imm32 imm, RegisterID dest) + void lshift32(RegisterID shift_amount, RegisterID dest) { - m_assembler.lsl(dest, dest, imm.m_value); + // Clamp the shift to the range 0..31 + ARMThumbImmediate armImm = ARMThumbImmediate::makeEncodedImm(0x1f); + ASSERT(armImm.isValid()); + m_assembler.ARM_and(dataTempRegister, shift_amount, armImm); + + m_assembler.lsl(dest, dest, dataTempRegister); } - void lshift32(RegisterID shift_amount, RegisterID dest) + void lshift32(Imm32 imm, RegisterID dest) { - m_assembler.lsl(dest, dest, shift_amount); + m_assembler.lsl(dest, dest, imm.m_value & 0x1f); } void mul32(RegisterID src, RegisterID dest) @@ -233,12 +246,17 @@ public: void rshift32(RegisterID shift_amount, RegisterID dest) { - m_assembler.asr(dest, dest, shift_amount); + // Clamp the shift to the range 0..31 + ARMThumbImmediate armImm = ARMThumbImmediate::makeEncodedImm(0x1f); + ASSERT(armImm.isValid()); + m_assembler.ARM_and(dataTempRegister, shift_amount, armImm); + + m_assembler.asr(dest, dest, dataTempRegister); } void rshift32(Imm32 imm, RegisterID dest) { - m_assembler.asr(dest, dest, imm.m_value); + m_assembler.asr(dest, dest, imm.m_value & 0x1f); } void sub32(RegisterID src, RegisterID dest) @@ -531,6 +549,23 @@ public: { m_assembler.vcmp_F64(left, right); m_assembler.vmrs_APSR_nzcv_FPSCR(); + + if (cond == DoubleNotEqual) { + // ConditionNE jumps if NotEqual *or* unordered - force the unordered cases not to jump. + Jump unordered = makeBranch(ARMv7Assembler::ConditionVS); + Jump result = makeBranch(ARMv7Assembler::ConditionNE); + unordered.link(this); + return result; + } + if (cond == DoubleEqualOrUnordered) { + Jump unordered = makeBranch(ARMv7Assembler::ConditionVS); + Jump notEqual = makeBranch(ARMv7Assembler::ConditionNE); + unordered.link(this); + // We get here if either unordered, or equal. + Jump result = makeJump(); + notEqual.link(this); + return result; + } return makeBranch(cond); } diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerCodeRef.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerCodeRef.h index 3681af8..cae8bf6 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerCodeRef.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerCodeRef.h @@ -37,7 +37,7 @@ // ASSERT_VALID_CODE_POINTER checks that ptr is a non-null pointer, and that it is a valid // instruction address on the platform (for example, check any alignment requirements). -#if PLATFORM(ARM_THUMB2) +#if CPU(ARM_THUMB2) // ARM/thumb instructions must be 16-bit aligned, but all code pointers to be loaded // into the processor are decorated with the bottom bit set, indicating that this is // thumb code (as oposed to 32-bit traditional ARM). The first test checks for both @@ -130,7 +130,7 @@ public: } explicit MacroAssemblerCodePtr(void* value) -#if PLATFORM(ARM_THUMB2) +#if CPU(ARM_THUMB2) // Decorate the pointer as a thumb code pointer. : m_value(reinterpret_cast(value) + 1) #else @@ -147,7 +147,7 @@ public: } void* executableAddress() const { return m_value; } -#if PLATFORM(ARM_THUMB2) +#if CPU(ARM_THUMB2) // To use this pointer as a data address remove the decoration. void* dataLocation() const { ASSERT_VALID_CODE_POINTER(m_value); return reinterpret_cast(m_value) - 1; } #else diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86.h index 6e96240..ca7c31a 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86.h @@ -28,7 +28,7 @@ #include -#if ENABLE(ASSEMBLER) && PLATFORM(X86) +#if ENABLE(ASSEMBLER) && CPU(X86) #include "MacroAssemblerX86Common.h" diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86Common.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86Common.h index 5ebefa7..449df86 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86Common.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86Common.h @@ -36,6 +36,10 @@ namespace JSC { class MacroAssemblerX86Common : public AbstractMacroAssembler { + static const int DoubleConditionBitInvert = 0x10; + static const int DoubleConditionBitSpecial = 0x20; + static const int DoubleConditionBits = DoubleConditionBitInvert | DoubleConditionBitSpecial; + public: enum Condition { @@ -56,13 +60,24 @@ public: }; enum DoubleCondition { - DoubleEqual = X86Assembler::ConditionE, + // These conditions will only evaluate to true if the comparison is ordered - i.e. neither operand is NaN. + DoubleEqual = X86Assembler::ConditionE | DoubleConditionBitSpecial, DoubleNotEqual = X86Assembler::ConditionNE, DoubleGreaterThan = X86Assembler::ConditionA, DoubleGreaterThanOrEqual = X86Assembler::ConditionAE, - DoubleLessThan = X86Assembler::ConditionB, - DoubleLessThanOrEqual = X86Assembler::ConditionBE, + DoubleLessThan = X86Assembler::ConditionA | DoubleConditionBitInvert, + DoubleLessThanOrEqual = X86Assembler::ConditionAE | DoubleConditionBitInvert, + // If either operand is NaN, these conditions always evaluate to true. + DoubleEqualOrUnordered = X86Assembler::ConditionE, + DoubleNotEqualOrUnordered = X86Assembler::ConditionNE | DoubleConditionBitSpecial, + DoubleGreaterThanOrUnordered = X86Assembler::ConditionB | DoubleConditionBitInvert, + DoubleGreaterThanOrEqualOrUnordered = X86Assembler::ConditionBE | DoubleConditionBitInvert, + DoubleLessThanOrUnordered = X86Assembler::ConditionB, + DoubleLessThanOrEqualOrUnordered = X86Assembler::ConditionBE, }; + COMPILE_ASSERT( + !((X86Assembler::ConditionE | X86Assembler::ConditionNE | X86Assembler::ConditionA | X86Assembler::ConditionAE | X86Assembler::ConditionB | X86Assembler::ConditionBE) & DoubleConditionBits), + DoubleConditionBits_should_not_interfere_with_X86Assembler_Condition_codes); static const RegisterID stackPointerRegister = X86Registers::esp; @@ -416,20 +431,35 @@ public: void convertInt32ToDouble(Address src, FPRegisterID dest) { + ASSERT(isSSE2Present()); m_assembler.cvtsi2sd_mr(src.offset, src.base, dest); } Jump branchDouble(DoubleCondition cond, FPRegisterID left, FPRegisterID right) { ASSERT(isSSE2Present()); - m_assembler.ucomisd_rr(right, left); - return Jump(m_assembler.jCC(x86Condition(cond))); - } - Jump branchDouble(DoubleCondition cond, FPRegisterID left, Address right) - { - m_assembler.ucomisd_mr(right.offset, right.base, left); - return Jump(m_assembler.jCC(x86Condition(cond))); + if (cond & DoubleConditionBitInvert) + m_assembler.ucomisd_rr(left, right); + else + m_assembler.ucomisd_rr(right, left); + + if (cond == DoubleEqual) { + Jump isUnordered(m_assembler.jp()); + Jump result = Jump(m_assembler.je()); + isUnordered.link(this); + return result; + } else if (cond == DoubleNotEqualOrUnordered) { + Jump isUnordered(m_assembler.jp()); + Jump isEqual(m_assembler.je()); + isUnordered.link(this); + Jump result = jump(); + isEqual.link(this); + return result; + } + + ASSERT(!(cond & DoubleConditionBitSpecial)); + return Jump(m_assembler.jCC(static_cast(cond & ~DoubleConditionBits))); } // Truncates 'src' to an integer, and places the resulting 'dest'. @@ -443,6 +473,25 @@ public: return branch32(Equal, dest, Imm32(0x80000000)); } + // Convert 'src' to an integer, and places the resulting 'dest'. + // If the result is not representable as a 32 bit value, branch. + // May also branch for some values that are representable in 32 bits + // (specifically, in this case, 0). + void branchConvertDoubleToInt32(FPRegisterID src, RegisterID dest, JumpList& failureCases, FPRegisterID fpTemp) + { + ASSERT(isSSE2Present()); + m_assembler.cvttsd2si_rr(src, dest); + + // If the result is zero, it might have been -0.0, and the double comparison won't catch this! + failureCases.append(branchTest32(Zero, dest)); + + // Convert the integer result back to float & compare to the original value - if not equal or unordered (NaN) then jump. + convertInt32ToDouble(dest, fpTemp); + m_assembler.ucomisd_rr(fpTemp, src); + failureCases.append(m_assembler.jp()); + failureCases.append(m_assembler.jne()); + } + void zeroDouble(FPRegisterID srcDest) { ASSERT(isSSE2Present()); @@ -493,7 +542,7 @@ public: m_assembler.movl_i32r(imm.m_value, dest); } -#if PLATFORM(X86_64) +#if CPU(X86_64) void move(RegisterID src, RegisterID dest) { // Note: on 64-bit this is is a full register move; perhaps it would be @@ -509,7 +558,8 @@ public: void swap(RegisterID reg1, RegisterID reg2) { - m_assembler.xchgq_rr(reg1, reg2); + if (reg1 != reg2) + m_assembler.xchgq_rr(reg1, reg2); } void signExtend32ToPtr(RegisterID src, RegisterID dest) @@ -889,18 +939,13 @@ protected: return static_cast(cond); } - X86Assembler::Condition x86Condition(DoubleCondition cond) - { - return static_cast(cond); - } - private: // Only MacroAssemblerX86 should be using the following method; SSE2 is always available on // x86_64, and clients & subclasses of MacroAssembler should be using 'supportsFloatingPoint()'. friend class MacroAssemblerX86; -#if PLATFORM(X86) -#if PLATFORM(MAC) +#if CPU(X86) +#if OS(MAC_OS_X) // All X86 Macs are guaranteed to support at least SSE2, static bool isSSE2Present() @@ -908,7 +953,7 @@ private: return true; } -#else // PLATFORM(MAC) +#else // OS(MAC_OS_X) enum SSE2CheckState { NotCheckedSSE2, @@ -951,8 +996,8 @@ private: static SSE2CheckState s_sse2CheckState; -#endif // PLATFORM(MAC) -#elif !defined(NDEBUG) // PLATFORM(X86) +#endif // OS(MAC_OS_X) +#elif !defined(NDEBUG) // CPU(X86) // On x86-64 we should never be checking for SSE2 in a non-debug build, // but non debug add this method to keep the asserts above happy. diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86_64.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86_64.h index 0f95fe6..ec93f8c 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86_64.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86_64.h @@ -28,7 +28,7 @@ #include -#if ENABLE(ASSEMBLER) && PLATFORM(X86_64) +#if ENABLE(ASSEMBLER) && CPU(X86_64) #include "MacroAssemblerX86Common.h" @@ -192,33 +192,6 @@ public: m_assembler.orq_ir(imm.m_value, dest); } - void rshiftPtr(RegisterID shift_amount, RegisterID dest) - { - // On x86 we can only shift by ecx; if asked to shift by another register we'll - // need rejig the shift amount into ecx first, and restore the registers afterwards. - if (shift_amount != X86Registers::ecx) { - swap(shift_amount, X86Registers::ecx); - - // E.g. transform "shll %eax, %eax" -> "xchgl %eax, %ecx; shll %ecx, %ecx; xchgl %eax, %ecx" - if (dest == shift_amount) - m_assembler.sarq_CLr(X86Registers::ecx); - // E.g. transform "shll %eax, %ecx" -> "xchgl %eax, %ecx; shll %ecx, %eax; xchgl %eax, %ecx" - else if (dest == X86Registers::ecx) - m_assembler.sarq_CLr(shift_amount); - // E.g. transform "shll %eax, %ebx" -> "xchgl %eax, %ecx; shll %ecx, %ebx; xchgl %eax, %ecx" - else - m_assembler.sarq_CLr(dest); - - swap(shift_amount, X86Registers::ecx); - } else - m_assembler.sarq_CLr(dest); - } - - void rshiftPtr(Imm32 imm, RegisterID dest) - { - m_assembler.sarq_i8r(imm.m_value, dest); - } - void subPtr(RegisterID src, RegisterID dest) { m_assembler.subq_rr(src, dest); diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/X86Assembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/X86Assembler.h index cbbaaa5..ab3d05f 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/X86Assembler.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/X86Assembler.h @@ -28,7 +28,7 @@ #include -#if ENABLE(ASSEMBLER) && (PLATFORM(X86) || PLATFORM(X86_64)) +#if ENABLE(ASSEMBLER) && (CPU(X86) || CPU(X86_64)) #include "AssemblerBuffer.h" #include @@ -50,7 +50,7 @@ namespace X86Registers { esi, edi, -#if PLATFORM(X86_64) +#if CPU(X86_64) r8, r9, r10, @@ -118,12 +118,12 @@ private: OP_XOR_GvEv = 0x33, OP_CMP_EvGv = 0x39, OP_CMP_GvEv = 0x3B, -#if PLATFORM(X86_64) +#if CPU(X86_64) PRE_REX = 0x40, #endif OP_PUSH_EAX = 0x50, OP_POP_EAX = 0x58, -#if PLATFORM(X86_64) +#if CPU(X86_64) OP_MOVSXD_GvEv = 0x63, #endif PRE_OPERAND_SIZE = 0x66, @@ -296,7 +296,7 @@ public: // Arithmetic operations: -#if !PLATFORM(X86_64) +#if !CPU(X86_64) void adcl_im(int imm, void* addr) { if (CAN_SIGN_EXTEND_8_32(imm)) { @@ -346,7 +346,7 @@ public: } } -#if PLATFORM(X86_64) +#if CPU(X86_64) void addq_rr(RegisterID src, RegisterID dst) { m_formatter.oneByteOp64(OP_ADD_EvGv, src, dst); @@ -423,7 +423,7 @@ public: } } -#if PLATFORM(X86_64) +#if CPU(X86_64) void andq_rr(RegisterID src, RegisterID dst) { m_formatter.oneByteOp64(OP_AND_EvGv, src, dst); @@ -509,7 +509,7 @@ public: } } -#if PLATFORM(X86_64) +#if CPU(X86_64) void orq_rr(RegisterID src, RegisterID dst) { m_formatter.oneByteOp64(OP_OR_EvGv, src, dst); @@ -575,7 +575,7 @@ public: } } -#if PLATFORM(X86_64) +#if CPU(X86_64) void subq_rr(RegisterID src, RegisterID dst) { m_formatter.oneByteOp64(OP_SUB_EvGv, src, dst); @@ -641,7 +641,7 @@ public: } } -#if PLATFORM(X86_64) +#if CPU(X86_64) void xorq_rr(RegisterID src, RegisterID dst) { m_formatter.oneByteOp64(OP_XOR_EvGv, src, dst); @@ -689,7 +689,7 @@ public: m_formatter.oneByteOp(OP_GROUP2_EvCL, GROUP2_OP_SHL, dst); } -#if PLATFORM(X86_64) +#if CPU(X86_64) void sarq_CLr(RegisterID dst) { m_formatter.oneByteOp64(OP_GROUP2_EvCL, GROUP2_OP_SAR, dst); @@ -789,7 +789,7 @@ public: m_formatter.immediate32(imm); } -#if PLATFORM(X86_64) +#if CPU(X86_64) void cmpq_rr(RegisterID src, RegisterID dst) { m_formatter.oneByteOp64(OP_CMP_EvGv, src, dst); @@ -897,7 +897,7 @@ public: m_formatter.immediate32(imm); } -#if PLATFORM(X86_64) +#if CPU(X86_64) void testq_rr(RegisterID src, RegisterID dst) { m_formatter.oneByteOp64(OP_TEST_EvGv, src, dst); @@ -971,7 +971,7 @@ public: m_formatter.oneByteOp(OP_XCHG_EvGv, src, dst); } -#if PLATFORM(X86_64) +#if CPU(X86_64) void xchgq_rr(RegisterID src, RegisterID dst) { m_formatter.oneByteOp64(OP_XCHG_EvGv, src, dst); @@ -1001,7 +1001,7 @@ public: void movl_mEAX(void* addr) { m_formatter.oneByteOp(OP_MOV_EAXOv); -#if PLATFORM(X86_64) +#if CPU(X86_64) m_formatter.immediate64(reinterpret_cast(addr)); #else m_formatter.immediate32(reinterpret_cast(addr)); @@ -1038,14 +1038,14 @@ public: void movl_EAXm(void* addr) { m_formatter.oneByteOp(OP_MOV_OvEAX); -#if PLATFORM(X86_64) +#if CPU(X86_64) m_formatter.immediate64(reinterpret_cast(addr)); #else m_formatter.immediate32(reinterpret_cast(addr)); #endif } -#if PLATFORM(X86_64) +#if CPU(X86_64) void movq_rr(RegisterID src, RegisterID dst) { m_formatter.oneByteOp64(OP_MOV_EvGv, src, dst); @@ -1157,7 +1157,7 @@ public: { m_formatter.oneByteOp(OP_LEA, dst, base, offset); } -#if PLATFORM(X86_64) +#if CPU(X86_64) void leaq_mr(int offset, RegisterID base, RegisterID dst) { m_formatter.oneByteOp64(OP_LEA, dst, base, offset); @@ -1323,7 +1323,7 @@ public: m_formatter.twoByteOp(OP2_CVTSI2SD_VsdEd, (RegisterID)dst, base, offset); } -#if !PLATFORM(X86_64) +#if !CPU(X86_64) void cvtsi2sd_mr(void* address, XMMRegisterID dst) { m_formatter.prefix(PRE_SSE_F2); @@ -1343,7 +1343,7 @@ public: m_formatter.twoByteOp(OP2_MOVD_EdVd, (RegisterID)src, dst); } -#if PLATFORM(X86_64) +#if CPU(X86_64) void movq_rr(XMMRegisterID src, RegisterID dst) { m_formatter.prefix(PRE_SSE_66); @@ -1369,7 +1369,7 @@ public: m_formatter.twoByteOp(OP2_MOVSD_VsdWsd, (RegisterID)dst, base, offset); } -#if !PLATFORM(X86_64) +#if !CPU(X86_64) void movsd_mr(void* address, XMMRegisterID dst) { m_formatter.prefix(PRE_SSE_F2); @@ -1535,7 +1535,7 @@ public: static void repatchLoadPtrToLEA(void* where) { -#if PLATFORM(X86_64) +#if CPU(X86_64) // On x86-64 pointer memory accesses require a 64-bit operand, and as such a REX prefix. // Skip over the prefix byte. where = reinterpret_cast(where) + 1; @@ -1679,7 +1679,7 @@ private: memoryModRM(reg, base, index, scale, offset); } -#if !PLATFORM(X86_64) +#if !CPU(X86_64) void oneByteOp(OneByteOpcodeID opcode, int reg, void* address) { m_buffer.ensureSpace(maxInstructionSize); @@ -1722,7 +1722,7 @@ private: memoryModRM(reg, base, index, scale, offset); } -#if !PLATFORM(X86_64) +#if !CPU(X86_64) void twoByteOp(TwoByteOpcodeID opcode, int reg, void* address) { m_buffer.ensureSpace(maxInstructionSize); @@ -1732,7 +1732,7 @@ private: } #endif -#if PLATFORM(X86_64) +#if CPU(X86_64) // Quad-word-sized operands: // // Used to format 64-bit operantions, planting a REX.w prefix. @@ -1891,7 +1891,7 @@ private: static const RegisterID noBase = X86Registers::ebp; static const RegisterID hasSib = X86Registers::esp; static const RegisterID noIndex = X86Registers::esp; -#if PLATFORM(X86_64) +#if CPU(X86_64) static const RegisterID noBase2 = X86Registers::r13; static const RegisterID hasSib2 = X86Registers::r12; @@ -1967,7 +1967,7 @@ private: void memoryModRM(int reg, RegisterID base, int offset) { // A base of esp or r12 would be interpreted as a sib, so force a sib with no index & put the base in there. -#if PLATFORM(X86_64) +#if CPU(X86_64) if ((base == hasSib) || (base == hasSib2)) { #else if (base == hasSib) { @@ -1982,7 +1982,7 @@ private: m_buffer.putIntUnchecked(offset); } } else { -#if PLATFORM(X86_64) +#if CPU(X86_64) if (!offset && (base != noBase) && (base != noBase2)) #else if (!offset && (base != noBase)) @@ -2001,7 +2001,7 @@ private: void memoryModRM_disp32(int reg, RegisterID base, int offset) { // A base of esp or r12 would be interpreted as a sib, so force a sib with no index & put the base in there. -#if PLATFORM(X86_64) +#if CPU(X86_64) if ((base == hasSib) || (base == hasSib2)) { #else if (base == hasSib) { @@ -2018,7 +2018,7 @@ private: { ASSERT(index != noIndex); -#if PLATFORM(X86_64) +#if CPU(X86_64) if (!offset && (base != noBase) && (base != noBase2)) #else if (!offset && (base != noBase)) @@ -2033,7 +2033,7 @@ private: } } -#if !PLATFORM(X86_64) +#if !CPU(X86_64) void memoryModRM(int reg, void* address) { // noBase + ModRmMemoryNoDisp means noBase + ModRmMemoryDisp32! @@ -2048,6 +2048,6 @@ private: } // namespace JSC -#endif // ENABLE(ASSEMBLER) && PLATFORM(X86) +#endif // ENABLE(ASSEMBLER) && CPU(X86) #endif // X86Assembler_h diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp index c915934..68debb2 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp @@ -49,9 +49,9 @@ namespace JSC { static UString escapeQuotes(const UString& str) { UString result = str; - int pos = 0; - while ((pos = result.find('\"', pos)) >= 0) { - result = result.substr(0, pos) + "\"\\\"\"" + result.substr(pos + 1); + unsigned pos = 0; + while ((pos = result.find('\"', pos)) != UString::NotFound) { + result = makeString(result.substr(0, pos), "\"\\\"\"", result.substr(pos + 1)); pos += 4; } return result; @@ -62,49 +62,50 @@ static UString valueToSourceString(ExecState* exec, JSValue val) if (!val) return "0"; - if (val.isString()) { - UString result("\""); - result += escapeQuotes(val.toString(exec)) + "\""; - return result; - } + if (val.isString()) + return makeString("\"", escapeQuotes(val.toString(exec)), "\""); return val.toString(exec); } -static CString registerName(int r) +static CString constantName(ExecState* exec, int k, JSValue value) { - if (r == missingThisObjectMarker()) - return ""; - - return (UString("r") + UString::from(r)).UTF8String(); + return makeString(valueToSourceString(exec, value), "(@k", UString::from(k - FirstConstantRegisterIndex), ")").UTF8String(); } -static CString constantName(ExecState* exec, int k, JSValue value) +static CString idName(int id0, const Identifier& ident) { - return (valueToSourceString(exec, value) + "(@k" + UString::from(k) + ")").UTF8String(); + return makeString(ident.ustring(), "(@id", UString::from(id0), ")").UTF8String(); } -static CString idName(int id0, const Identifier& ident) +CString CodeBlock::registerName(ExecState* exec, int r) const { - return (ident.ustring() + "(@id" + UString::from(id0) +")").UTF8String(); + if (r == missingThisObjectMarker()) + return ""; + + if (isConstantRegisterIndex(r)) + return constantName(exec, r, getConstant(r)); + + return makeString("r", UString::from(r)).UTF8String(); } static UString regexpToSourceString(RegExp* regExp) { - UString pattern = UString("/") + regExp->pattern() + "/"; + char postfix[5] = { '/', 0, 0, 0, 0 }; + int index = 1; if (regExp->global()) - pattern += "g"; + postfix[index++] = 'g'; if (regExp->ignoreCase()) - pattern += "i"; + postfix[index++] = 'i'; if (regExp->multiline()) - pattern += "m"; + postfix[index] = 'm'; - return pattern; + return makeString("/", regExp->pattern(), postfix); } static CString regexpName(int re, RegExp* regexp) { - return (regexpToSourceString(regexp) + "(@re" + UString::from(re) + ")").UTF8String(); + return makeString(regexpToSourceString(regexp), "(@re", UString::from(re), ")").UTF8String(); } static UString pointerToSourceString(void* p) @@ -135,44 +136,44 @@ NEVER_INLINE static const char* debugHookName(int debugHookID) return ""; } -static void printUnaryOp(int location, Vector::const_iterator& it, const char* op) +void CodeBlock::printUnaryOp(ExecState* exec, int location, Vector::const_iterator& it, const char* op) const { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; - printf("[%4d] %s\t\t %s, %s\n", location, op, registerName(r0).c_str(), registerName(r1).c_str()); + printf("[%4d] %s\t\t %s, %s\n", location, op, registerName(exec, r0).c_str(), registerName(exec, r1).c_str()); } -static void printBinaryOp(int location, Vector::const_iterator& it, const char* op) +void CodeBlock::printBinaryOp(ExecState* exec, int location, Vector::const_iterator& it, const char* op) const { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int r2 = (++it)->u.operand; - printf("[%4d] %s\t\t %s, %s, %s\n", location, op, registerName(r0).c_str(), registerName(r1).c_str(), registerName(r2).c_str()); + printf("[%4d] %s\t\t %s, %s, %s\n", location, op, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str()); } -static void printConditionalJump(const Vector::const_iterator&, Vector::const_iterator& it, int location, const char* op) +void CodeBlock::printConditionalJump(ExecState* exec, const Vector::const_iterator&, Vector::const_iterator& it, int location, const char* op) const { int r0 = (++it)->u.operand; int offset = (++it)->u.operand; - printf("[%4d] %s\t\t %s, %d(->%d)\n", location, op, registerName(r0).c_str(), offset, location + offset); + printf("[%4d] %s\t\t %s, %d(->%d)\n", location, op, registerName(exec, r0).c_str(), offset, location + offset); } -static void printGetByIdOp(int location, Vector::const_iterator& it, const Vector& m_identifiers, const char* op) +void CodeBlock::printGetByIdOp(ExecState* exec, int location, Vector::const_iterator& it, const char* op) const { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int id0 = (++it)->u.operand; - printf("[%4d] %s\t %s, %s, %s\n", location, op, registerName(r0).c_str(), registerName(r1).c_str(), idName(id0, m_identifiers[id0]).c_str()); + printf("[%4d] %s\t %s, %s, %s\n", location, op, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), idName(id0, m_identifiers[id0]).c_str()); it += 4; } -static void printPutByIdOp(int location, Vector::const_iterator& it, const Vector& m_identifiers, const char* op) +void CodeBlock::printPutByIdOp(ExecState* exec, int location, Vector::const_iterator& it, const char* op) const { int r0 = (++it)->u.operand; int id0 = (++it)->u.operand; int r1 = (++it)->u.operand; - printf("[%4d] %s\t %s, %s, %s\n", location, op, registerName(r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(r1).c_str()); + printf("[%4d] %s\t %s, %s, %s\n", location, op, registerName(exec, r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(exec, r1).c_str()); it += 4; } @@ -357,7 +358,7 @@ void CodeBlock::dump(ExecState* exec) const unsigned registerIndex = m_numVars; size_t i = 0; do { - printf(" r%u = %s\n", registerIndex, valueToSourceString(exec, m_constantRegisters[i].jsValue()).ascii()); + printf(" k%u = %s\n", registerIndex, valueToSourceString(exec, m_constantRegisters[i].jsValue()).ascii()); ++i; ++registerIndex; } while (i < m_constantRegisters.size()); @@ -481,7 +482,7 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& } case op_enter_with_activation: { int r0 = (++it)->u.operand; - printf("[%4d] enter_with_activation %s\n", location, registerName(r0).c_str()); + printf("[%4d] enter_with_activation %s\n", location, registerName(exec, r0).c_str()); break; } case op_create_arguments: { @@ -494,148 +495,148 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& } case op_convert_this: { int r0 = (++it)->u.operand; - printf("[%4d] convert_this %s\n", location, registerName(r0).c_str()); + printf("[%4d] convert_this %s\n", location, registerName(exec, r0).c_str()); break; } case op_new_object: { int r0 = (++it)->u.operand; - printf("[%4d] new_object\t %s\n", location, registerName(r0).c_str()); + printf("[%4d] new_object\t %s\n", location, registerName(exec, r0).c_str()); break; } case op_new_array: { int dst = (++it)->u.operand; int argv = (++it)->u.operand; int argc = (++it)->u.operand; - printf("[%4d] new_array\t %s, %s, %d\n", location, registerName(dst).c_str(), registerName(argv).c_str(), argc); + printf("[%4d] new_array\t %s, %s, %d\n", location, registerName(exec, dst).c_str(), registerName(exec, argv).c_str(), argc); break; } case op_new_regexp: { int r0 = (++it)->u.operand; int re0 = (++it)->u.operand; - printf("[%4d] new_regexp\t %s, %s\n", location, registerName(r0).c_str(), regexpName(re0, regexp(re0)).c_str()); + printf("[%4d] new_regexp\t %s, %s\n", location, registerName(exec, r0).c_str(), regexpName(re0, regexp(re0)).c_str()); break; } case op_mov: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; - printf("[%4d] mov\t\t %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str()); + printf("[%4d] mov\t\t %s, %s\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str()); break; } case op_not: { - printUnaryOp(location, it, "not"); + printUnaryOp(exec, location, it, "not"); break; } case op_eq: { - printBinaryOp(location, it, "eq"); + printBinaryOp(exec, location, it, "eq"); break; } case op_eq_null: { - printUnaryOp(location, it, "eq_null"); + printUnaryOp(exec, location, it, "eq_null"); break; } case op_neq: { - printBinaryOp(location, it, "neq"); + printBinaryOp(exec, location, it, "neq"); break; } case op_neq_null: { - printUnaryOp(location, it, "neq_null"); + printUnaryOp(exec, location, it, "neq_null"); break; } case op_stricteq: { - printBinaryOp(location, it, "stricteq"); + printBinaryOp(exec, location, it, "stricteq"); break; } case op_nstricteq: { - printBinaryOp(location, it, "nstricteq"); + printBinaryOp(exec, location, it, "nstricteq"); break; } case op_less: { - printBinaryOp(location, it, "less"); + printBinaryOp(exec, location, it, "less"); break; } case op_lesseq: { - printBinaryOp(location, it, "lesseq"); + printBinaryOp(exec, location, it, "lesseq"); break; } case op_pre_inc: { int r0 = (++it)->u.operand; - printf("[%4d] pre_inc\t\t %s\n", location, registerName(r0).c_str()); + printf("[%4d] pre_inc\t\t %s\n", location, registerName(exec, r0).c_str()); break; } case op_pre_dec: { int r0 = (++it)->u.operand; - printf("[%4d] pre_dec\t\t %s\n", location, registerName(r0).c_str()); + printf("[%4d] pre_dec\t\t %s\n", location, registerName(exec, r0).c_str()); break; } case op_post_inc: { - printUnaryOp(location, it, "post_inc"); + printUnaryOp(exec, location, it, "post_inc"); break; } case op_post_dec: { - printUnaryOp(location, it, "post_dec"); + printUnaryOp(exec, location, it, "post_dec"); break; } case op_to_jsnumber: { - printUnaryOp(location, it, "to_jsnumber"); + printUnaryOp(exec, location, it, "to_jsnumber"); break; } case op_negate: { - printUnaryOp(location, it, "negate"); + printUnaryOp(exec, location, it, "negate"); break; } case op_add: { - printBinaryOp(location, it, "add"); + printBinaryOp(exec, location, it, "add"); ++it; break; } case op_mul: { - printBinaryOp(location, it, "mul"); + printBinaryOp(exec, location, it, "mul"); ++it; break; } case op_div: { - printBinaryOp(location, it, "div"); + printBinaryOp(exec, location, it, "div"); ++it; break; } case op_mod: { - printBinaryOp(location, it, "mod"); + printBinaryOp(exec, location, it, "mod"); break; } case op_sub: { - printBinaryOp(location, it, "sub"); + printBinaryOp(exec, location, it, "sub"); ++it; break; } case op_lshift: { - printBinaryOp(location, it, "lshift"); + printBinaryOp(exec, location, it, "lshift"); break; } case op_rshift: { - printBinaryOp(location, it, "rshift"); + printBinaryOp(exec, location, it, "rshift"); break; } case op_urshift: { - printBinaryOp(location, it, "urshift"); + printBinaryOp(exec, location, it, "urshift"); break; } case op_bitand: { - printBinaryOp(location, it, "bitand"); + printBinaryOp(exec, location, it, "bitand"); ++it; break; } case op_bitxor: { - printBinaryOp(location, it, "bitxor"); + printBinaryOp(exec, location, it, "bitxor"); ++it; break; } case op_bitor: { - printBinaryOp(location, it, "bitor"); + printBinaryOp(exec, location, it, "bitor"); ++it; break; } case op_bitnot: { - printUnaryOp(location, it, "bitnot"); + printUnaryOp(exec, location, it, "bitnot"); break; } case op_instanceof: { @@ -643,59 +644,59 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& int r1 = (++it)->u.operand; int r2 = (++it)->u.operand; int r3 = (++it)->u.operand; - printf("[%4d] instanceof\t\t %s, %s, %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str(), registerName(r2).c_str(), registerName(r3).c_str()); + printf("[%4d] instanceof\t\t %s, %s, %s, %s\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str(), registerName(exec, r3).c_str()); break; } case op_typeof: { - printUnaryOp(location, it, "typeof"); + printUnaryOp(exec, location, it, "typeof"); break; } case op_is_undefined: { - printUnaryOp(location, it, "is_undefined"); + printUnaryOp(exec, location, it, "is_undefined"); break; } case op_is_boolean: { - printUnaryOp(location, it, "is_boolean"); + printUnaryOp(exec, location, it, "is_boolean"); break; } case op_is_number: { - printUnaryOp(location, it, "is_number"); + printUnaryOp(exec, location, it, "is_number"); break; } case op_is_string: { - printUnaryOp(location, it, "is_string"); + printUnaryOp(exec, location, it, "is_string"); break; } case op_is_object: { - printUnaryOp(location, it, "is_object"); + printUnaryOp(exec, location, it, "is_object"); break; } case op_is_function: { - printUnaryOp(location, it, "is_function"); + printUnaryOp(exec, location, it, "is_function"); break; } case op_in: { - printBinaryOp(location, it, "in"); + printBinaryOp(exec, location, it, "in"); break; } case op_resolve: { int r0 = (++it)->u.operand; int id0 = (++it)->u.operand; - printf("[%4d] resolve\t\t %s, %s\n", location, registerName(r0).c_str(), idName(id0, m_identifiers[id0]).c_str()); + printf("[%4d] resolve\t\t %s, %s\n", location, registerName(exec, r0).c_str(), idName(id0, m_identifiers[id0]).c_str()); break; } case op_resolve_skip: { int r0 = (++it)->u.operand; int id0 = (++it)->u.operand; int skipLevels = (++it)->u.operand; - printf("[%4d] resolve_skip\t %s, %s, %d\n", location, registerName(r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), skipLevels); + printf("[%4d] resolve_skip\t %s, %s, %d\n", location, registerName(exec, r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), skipLevels); break; } case op_resolve_global: { int r0 = (++it)->u.operand; JSValue scope = JSValue((++it)->u.jsCell); int id0 = (++it)->u.operand; - printf("[%4d] resolve_global\t %s, %s, %s\n", location, registerName(r0).c_str(), valueToSourceString(exec, scope).ascii(), idName(id0, m_identifiers[id0]).c_str()); + printf("[%4d] resolve_global\t %s, %s, %s\n", location, registerName(exec, r0).c_str(), valueToSourceString(exec, scope).ascii(), idName(id0, m_identifiers[id0]).c_str()); it += 2; break; } @@ -703,125 +704,145 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& int r0 = (++it)->u.operand; int index = (++it)->u.operand; int skipLevels = (++it)->u.operand; - printf("[%4d] get_scoped_var\t %s, %d, %d\n", location, registerName(r0).c_str(), index, skipLevels); + printf("[%4d] get_scoped_var\t %s, %d, %d\n", location, registerName(exec, r0).c_str(), index, skipLevels); break; } case op_put_scoped_var: { int index = (++it)->u.operand; int skipLevels = (++it)->u.operand; int r0 = (++it)->u.operand; - printf("[%4d] put_scoped_var\t %d, %d, %s\n", location, index, skipLevels, registerName(r0).c_str()); + printf("[%4d] put_scoped_var\t %d, %d, %s\n", location, index, skipLevels, registerName(exec, r0).c_str()); break; } case op_get_global_var: { int r0 = (++it)->u.operand; JSValue scope = JSValue((++it)->u.jsCell); int index = (++it)->u.operand; - printf("[%4d] get_global_var\t %s, %s, %d\n", location, registerName(r0).c_str(), valueToSourceString(exec, scope).ascii(), index); + printf("[%4d] get_global_var\t %s, %s, %d\n", location, registerName(exec, r0).c_str(), valueToSourceString(exec, scope).ascii(), index); break; } case op_put_global_var: { JSValue scope = JSValue((++it)->u.jsCell); int index = (++it)->u.operand; int r0 = (++it)->u.operand; - printf("[%4d] put_global_var\t %s, %d, %s\n", location, valueToSourceString(exec, scope).ascii(), index, registerName(r0).c_str()); + printf("[%4d] put_global_var\t %s, %d, %s\n", location, valueToSourceString(exec, scope).ascii(), index, registerName(exec, r0).c_str()); break; } case op_resolve_base: { int r0 = (++it)->u.operand; int id0 = (++it)->u.operand; - printf("[%4d] resolve_base\t %s, %s\n", location, registerName(r0).c_str(), idName(id0, m_identifiers[id0]).c_str()); + printf("[%4d] resolve_base\t %s, %s\n", location, registerName(exec, r0).c_str(), idName(id0, m_identifiers[id0]).c_str()); break; } case op_resolve_with_base: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int id0 = (++it)->u.operand; - printf("[%4d] resolve_with_base %s, %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str(), idName(id0, m_identifiers[id0]).c_str()); + printf("[%4d] resolve_with_base %s, %s, %s\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), idName(id0, m_identifiers[id0]).c_str()); break; } case op_get_by_id: { - printGetByIdOp(location, it, m_identifiers, "get_by_id"); + printGetByIdOp(exec, location, it, "get_by_id"); break; } case op_get_by_id_self: { - printGetByIdOp(location, it, m_identifiers, "get_by_id_self"); + printGetByIdOp(exec, location, it, "get_by_id_self"); break; } case op_get_by_id_self_list: { - printGetByIdOp(location, it, m_identifiers, "get_by_id_self_list"); + printGetByIdOp(exec, location, it, "get_by_id_self_list"); break; } case op_get_by_id_proto: { - printGetByIdOp(location, it, m_identifiers, "get_by_id_proto"); + printGetByIdOp(exec, location, it, "get_by_id_proto"); break; } case op_get_by_id_proto_list: { - printGetByIdOp(location, it, m_identifiers, "op_get_by_id_proto_list"); + printGetByIdOp(exec, location, it, "op_get_by_id_proto_list"); break; } case op_get_by_id_chain: { - printGetByIdOp(location, it, m_identifiers, "get_by_id_chain"); + printGetByIdOp(exec, location, it, "get_by_id_chain"); + break; + } + case op_get_by_id_getter_self: { + printGetByIdOp(exec, location, it, "get_by_id_getter_self"); + break; + } + case op_get_by_id_getter_self_list: { + printGetByIdOp(exec, location, it, "get_by_id_getter_self_list"); + break; + } + case op_get_by_id_getter_proto: { + printGetByIdOp(exec, location, it, "get_by_id_getter_proto"); + break; + } + case op_get_by_id_getter_proto_list: { + printGetByIdOp(exec, location, it, "get_by_id_getter_proto_list"); + break; + } + case op_get_by_id_getter_chain: { + printGetByIdOp(exec, location, it, "get_by_id_getter_chain"); break; } case op_get_by_id_generic: { - printGetByIdOp(location, it, m_identifiers, "get_by_id_generic"); + printGetByIdOp(exec, location, it, "get_by_id_generic"); break; } case op_get_array_length: { - printGetByIdOp(location, it, m_identifiers, "get_array_length"); + printGetByIdOp(exec, location, it, "get_array_length"); break; } case op_get_string_length: { - printGetByIdOp(location, it, m_identifiers, "get_string_length"); + printGetByIdOp(exec, location, it, "get_string_length"); break; } case op_put_by_id: { - printPutByIdOp(location, it, m_identifiers, "put_by_id"); + printPutByIdOp(exec, location, it, "put_by_id"); break; } case op_put_by_id_replace: { - printPutByIdOp(location, it, m_identifiers, "put_by_id_replace"); + printPutByIdOp(exec, location, it, "put_by_id_replace"); break; } case op_put_by_id_transition: { - printPutByIdOp(location, it, m_identifiers, "put_by_id_transition"); + printPutByIdOp(exec, location, it, "put_by_id_transition"); break; } case op_put_by_id_generic: { - printPutByIdOp(location, it, m_identifiers, "put_by_id_generic"); + printPutByIdOp(exec, location, it, "put_by_id_generic"); break; } case op_put_getter: { int r0 = (++it)->u.operand; int id0 = (++it)->u.operand; int r1 = (++it)->u.operand; - printf("[%4d] put_getter\t %s, %s, %s\n", location, registerName(r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(r1).c_str()); + printf("[%4d] put_getter\t %s, %s, %s\n", location, registerName(exec, r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(exec, r1).c_str()); break; } case op_put_setter: { int r0 = (++it)->u.operand; int id0 = (++it)->u.operand; int r1 = (++it)->u.operand; - printf("[%4d] put_setter\t %s, %s, %s\n", location, registerName(r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(r1).c_str()); + printf("[%4d] put_setter\t %s, %s, %s\n", location, registerName(exec, r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(exec, r1).c_str()); break; } case op_method_check: { - printf("[%4d] op_method_check\n", location); + printf("[%4d] method_check\n", location); break; } case op_del_by_id: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int id0 = (++it)->u.operand; - printf("[%4d] del_by_id\t %s, %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str(), idName(id0, m_identifiers[id0]).c_str()); + printf("[%4d] del_by_id\t %s, %s, %s\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), idName(id0, m_identifiers[id0]).c_str()); break; } case op_get_by_val: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int r2 = (++it)->u.operand; - printf("[%4d] get_by_val\t %s, %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str(), registerName(r2).c_str()); + printf("[%4d] get_by_val\t %s, %s, %s\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str()); break; } case op_get_by_pname: { @@ -831,28 +852,28 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& int r3 = (++it)->u.operand; int r4 = (++it)->u.operand; int r5 = (++it)->u.operand; - printf("[%4d] get_by_pname\t %s, %s, %s, %s, %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str(), registerName(r2).c_str(), registerName(r3).c_str(), registerName(r4).c_str(), registerName(r5).c_str()); + printf("[%4d] get_by_pname\t %s, %s, %s, %s, %s, %s\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str(), registerName(exec, r3).c_str(), registerName(exec, r4).c_str(), registerName(exec, r5).c_str()); break; } case op_put_by_val: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int r2 = (++it)->u.operand; - printf("[%4d] put_by_val\t %s, %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str(), registerName(r2).c_str()); + printf("[%4d] put_by_val\t %s, %s, %s\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str()); break; } case op_del_by_val: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int r2 = (++it)->u.operand; - printf("[%4d] del_by_val\t %s, %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str(), registerName(r2).c_str()); + printf("[%4d] del_by_val\t %s, %s, %s\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str()); break; } case op_put_by_index: { int r0 = (++it)->u.operand; unsigned n0 = (++it)->u.operand; int r1 = (++it)->u.operand; - printf("[%4d] put_by_index\t %s, %u, %s\n", location, registerName(r0).c_str(), n0, registerName(r1).c_str()); + printf("[%4d] put_by_index\t %s, %u, %s\n", location, registerName(exec, r0).c_str(), n0, registerName(exec, r1).c_str()); break; } case op_jmp: { @@ -866,91 +887,102 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& break; } case op_jtrue: { - printConditionalJump(begin, it, location, "jtrue"); + printConditionalJump(exec, begin, it, location, "jtrue"); break; } case op_loop_if_true: { - printConditionalJump(begin, it, location, "loop_if_true"); + printConditionalJump(exec, begin, it, location, "loop_if_true"); + break; + } + case op_loop_if_false: { + printConditionalJump(exec, begin, it, location, "loop_if_false"); break; } case op_jfalse: { - printConditionalJump(begin, it, location, "jfalse"); + printConditionalJump(exec, begin, it, location, "jfalse"); break; } case op_jeq_null: { - printConditionalJump(begin, it, location, "jeq_null"); + printConditionalJump(exec, begin, it, location, "jeq_null"); break; } case op_jneq_null: { - printConditionalJump(begin, it, location, "jneq_null"); + printConditionalJump(exec, begin, it, location, "jneq_null"); break; } case op_jneq_ptr: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int offset = (++it)->u.operand; - printf("[%4d] jneq_ptr\t\t %s, %s, %d(->%d)\n", location, registerName(r0).c_str(), registerName(r1).c_str(), offset, location + offset); + printf("[%4d] jneq_ptr\t\t %s, %s, %d(->%d)\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), offset, location + offset); break; } case op_jnless: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int offset = (++it)->u.operand; - printf("[%4d] jnless\t\t %s, %s, %d(->%d)\n", location, registerName(r0).c_str(), registerName(r1).c_str(), offset, location + offset); + printf("[%4d] jnless\t\t %s, %s, %d(->%d)\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), offset, location + offset); break; } case op_jnlesseq: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int offset = (++it)->u.operand; - printf("[%4d] jnlesseq\t\t %s, %s, %d(->%d)\n", location, registerName(r0).c_str(), registerName(r1).c_str(), offset, location + offset); + printf("[%4d] jnlesseq\t\t %s, %s, %d(->%d)\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), offset, location + offset); break; } case op_loop_if_less: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int offset = (++it)->u.operand; - printf("[%4d] loop_if_less\t %s, %s, %d(->%d)\n", location, registerName(r0).c_str(), registerName(r1).c_str(), offset, location + offset); + printf("[%4d] loop_if_less\t %s, %s, %d(->%d)\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), offset, location + offset); + break; + } + case op_jless: { + int r0 = (++it)->u.operand; + int r1 = (++it)->u.operand; + int offset = (++it)->u.operand; + printf("[%4d] jless\t\t %s, %s, %d(->%d)\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), offset, location + offset); break; } case op_loop_if_lesseq: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int offset = (++it)->u.operand; - printf("[%4d] loop_if_lesseq\t %s, %s, %d(->%d)\n", location, registerName(r0).c_str(), registerName(r1).c_str(), offset, location + offset); + printf("[%4d] loop_if_lesseq\t %s, %s, %d(->%d)\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), offset, location + offset); break; } case op_switch_imm: { int tableIndex = (++it)->u.operand; int defaultTarget = (++it)->u.operand; int scrutineeRegister = (++it)->u.operand; - printf("[%4d] switch_imm\t %d, %d(->%d), %s\n", location, tableIndex, defaultTarget, location + defaultTarget, registerName(scrutineeRegister).c_str()); + printf("[%4d] switch_imm\t %d, %d(->%d), %s\n", location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister).c_str()); break; } case op_switch_char: { int tableIndex = (++it)->u.operand; int defaultTarget = (++it)->u.operand; int scrutineeRegister = (++it)->u.operand; - printf("[%4d] switch_char\t %d, %d(->%d), %s\n", location, tableIndex, defaultTarget, location + defaultTarget, registerName(scrutineeRegister).c_str()); + printf("[%4d] switch_char\t %d, %d(->%d), %s\n", location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister).c_str()); break; } case op_switch_string: { int tableIndex = (++it)->u.operand; int defaultTarget = (++it)->u.operand; int scrutineeRegister = (++it)->u.operand; - printf("[%4d] switch_string\t %d, %d(->%d), %s\n", location, tableIndex, defaultTarget, location + defaultTarget, registerName(scrutineeRegister).c_str()); + printf("[%4d] switch_string\t %d, %d(->%d), %s\n", location, tableIndex, defaultTarget, location + defaultTarget, registerName(exec, scrutineeRegister).c_str()); break; } case op_new_func: { int r0 = (++it)->u.operand; int f0 = (++it)->u.operand; - printf("[%4d] new_func\t\t %s, f%d\n", location, registerName(r0).c_str(), f0); + printf("[%4d] new_func\t\t %s, f%d\n", location, registerName(exec, r0).c_str(), f0); break; } case op_new_func_exp: { int r0 = (++it)->u.operand; int f0 = (++it)->u.operand; - printf("[%4d] new_func_exp\t %s, f%d\n", location, registerName(r0).c_str(), f0); + printf("[%4d] new_func_exp\t %s, f%d\n", location, registerName(exec, r0).c_str(), f0); break; } case op_call: { @@ -958,7 +990,7 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& int func = (++it)->u.operand; int argCount = (++it)->u.operand; int registerOffset = (++it)->u.operand; - printf("[%4d] call\t\t %s, %s, %d, %d\n", location, registerName(dst).c_str(), registerName(func).c_str(), argCount, registerOffset); + printf("[%4d] call\t\t %s, %s, %d, %d\n", location, registerName(exec, dst).c_str(), registerName(exec, func).c_str(), argCount, registerOffset); break; } case op_call_eval: { @@ -966,7 +998,7 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& int func = (++it)->u.operand; int argCount = (++it)->u.operand; int registerOffset = (++it)->u.operand; - printf("[%4d] call_eval\t %s, %s, %d, %d\n", location, registerName(dst).c_str(), registerName(func).c_str(), argCount, registerOffset); + printf("[%4d] call_eval\t %s, %s, %d, %d\n", location, registerName(exec, dst).c_str(), registerName(exec, func).c_str(), argCount, registerOffset); break; } case op_call_varargs: { @@ -974,16 +1006,16 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& int func = (++it)->u.operand; int argCount = (++it)->u.operand; int registerOffset = (++it)->u.operand; - printf("[%4d] call_varargs\t %s, %s, %s, %d\n", location, registerName(dst).c_str(), registerName(func).c_str(), registerName(argCount).c_str(), registerOffset); + printf("[%4d] call_varargs\t %s, %s, %s, %d\n", location, registerName(exec, dst).c_str(), registerName(exec, func).c_str(), registerName(exec, argCount).c_str(), registerOffset); break; } case op_load_varargs: { - printUnaryOp(location, it, "load_varargs"); + printUnaryOp(exec, location, it, "load_varargs"); break; } case op_tear_off_activation: { int r0 = (++it)->u.operand; - printf("[%4d] tear_off_activation\t %s\n", location, registerName(r0).c_str()); + printf("[%4d] tear_off_activation\t %s\n", location, registerName(exec, r0).c_str()); break; } case op_tear_off_arguments: { @@ -992,7 +1024,7 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& } case op_ret: { int r0 = (++it)->u.operand; - printf("[%4d] ret\t\t %s\n", location, registerName(r0).c_str()); + printf("[%4d] ret\t\t %s\n", location, registerName(exec, r0).c_str()); break; } case op_construct: { @@ -1002,26 +1034,26 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& int registerOffset = (++it)->u.operand; int proto = (++it)->u.operand; int thisRegister = (++it)->u.operand; - printf("[%4d] construct\t %s, %s, %d, %d, %s, %s\n", location, registerName(dst).c_str(), registerName(func).c_str(), argCount, registerOffset, registerName(proto).c_str(), registerName(thisRegister).c_str()); + printf("[%4d] construct\t %s, %s, %d, %d, %s, %s\n", location, registerName(exec, dst).c_str(), registerName(exec, func).c_str(), argCount, registerOffset, registerName(exec, proto).c_str(), registerName(exec, thisRegister).c_str()); break; } case op_construct_verify: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; - printf("[%4d] construct_verify\t %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str()); + printf("[%4d] construct_verify\t %s, %s\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str()); break; } case op_strcat: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; int count = (++it)->u.operand; - printf("[%4d] op_strcat\t %s, %s, %d\n", location, registerName(r0).c_str(), registerName(r1).c_str(), count); + printf("[%4d] strcat\t\t %s, %s, %d\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), count); break; } case op_to_primitive: { int r0 = (++it)->u.operand; int r1 = (++it)->u.operand; - printf("[%4d] op_to_primitive\t %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str()); + printf("[%4d] to_primitive\t %s, %s\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str()); break; } case op_get_pnames: { @@ -1030,7 +1062,7 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& int r2 = it[3].u.operand; int r3 = it[4].u.operand; int offset = it[5].u.operand; - printf("[%4d] get_pnames\t %s, %s, %s, %s, %d(->%d)\n", location, registerName(r0).c_str(), registerName(r1).c_str(), registerName(r2).c_str(), registerName(r3).c_str(), offset, location + offset); + printf("[%4d] get_pnames\t %s, %s, %s, %s, %d(->%d)\n", location, registerName(exec, r0).c_str(), registerName(exec, r1).c_str(), registerName(exec, r2).c_str(), registerName(exec, r3).c_str(), offset, location + offset); it += OPCODE_LENGTH(op_get_pnames) - 1; break; } @@ -1038,13 +1070,13 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& int dest = it[1].u.operand; int iter = it[4].u.operand; int offset = it[5].u.operand; - printf("[%4d] next_pname\t %s, %s, %d(->%d)\n", location, registerName(dest).c_str(), registerName(iter).c_str(), offset, location + offset); + printf("[%4d] next_pname\t %s, %s, %d(->%d)\n", location, registerName(exec, dest).c_str(), registerName(exec, iter).c_str(), offset, location + offset); it += OPCODE_LENGTH(op_next_pname) - 1; break; } case op_push_scope: { int r0 = (++it)->u.operand; - printf("[%4d] push_scope\t %s\n", location, registerName(r0).c_str()); + printf("[%4d] push_scope\t %s\n", location, registerName(exec, r0).c_str()); break; } case op_pop_scope: { @@ -1055,7 +1087,7 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& int r0 = (++it)->u.operand; int id0 = (++it)->u.operand; int r1 = (++it)->u.operand; - printf("[%4d] push_new_scope \t%s, %s, %s\n", location, registerName(r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(r1).c_str()); + printf("[%4d] push_new_scope \t%s, %s, %s\n", location, registerName(exec, r0).c_str(), idName(id0, m_identifiers[id0]).c_str(), registerName(exec, r1).c_str()); break; } case op_jmp_scopes: { @@ -1066,30 +1098,30 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& } case op_catch: { int r0 = (++it)->u.operand; - printf("[%4d] catch\t\t %s\n", location, registerName(r0).c_str()); + printf("[%4d] catch\t\t %s\n", location, registerName(exec, r0).c_str()); break; } case op_throw: { int r0 = (++it)->u.operand; - printf("[%4d] throw\t\t %s\n", location, registerName(r0).c_str()); + printf("[%4d] throw\t\t %s\n", location, registerName(exec, r0).c_str()); break; } case op_new_error: { int r0 = (++it)->u.operand; int errorType = (++it)->u.operand; int k0 = (++it)->u.operand; - printf("[%4d] new_error\t %s, %d, %s\n", location, registerName(r0).c_str(), errorType, constantName(exec, k0, getConstant(k0)).c_str()); + printf("[%4d] new_error\t %s, %d, %s\n", location, registerName(exec, r0).c_str(), errorType, constantName(exec, k0, getConstant(k0)).c_str()); break; } case op_jsr: { int retAddrDst = (++it)->u.operand; int offset = (++it)->u.operand; - printf("[%4d] jsr\t\t %s, %d(->%d)\n", location, registerName(retAddrDst).c_str(), offset, location + offset); + printf("[%4d] jsr\t\t %s, %d(->%d)\n", location, registerName(exec, retAddrDst).c_str(), offset, location + offset); break; } case op_sret: { int retAddrSrc = (++it)->u.operand; - printf("[%4d] sret\t\t %s\n", location, registerName(retAddrSrc).c_str()); + printf("[%4d] sret\t\t %s\n", location, registerName(exec, retAddrSrc).c_str()); break; } case op_debug: { @@ -1101,17 +1133,17 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& } case op_profile_will_call: { int function = (++it)->u.operand; - printf("[%4d] profile_will_call %s\n", location, registerName(function).c_str()); + printf("[%4d] profile_will_call %s\n", location, registerName(exec, function).c_str()); break; } case op_profile_did_call: { int function = (++it)->u.operand; - printf("[%4d] profile_did_call\t %s\n", location, registerName(function).c_str()); + printf("[%4d] profile_did_call\t %s\n", location, registerName(exec, function).c_str()); break; } case op_end: { int r0 = (++it)->u.operand; - printf("[%4d] end\t\t %s\n", location, registerName(r0).c_str()); + printf("[%4d] end\t\t %s\n", location, registerName(exec, r0).c_str()); break; } } @@ -1343,16 +1375,16 @@ void CodeBlock::derefStructures(Instruction* vPC) const { Interpreter* interpreter = m_globalData->interpreter; - if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self)) { + if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_self)) { vPC[4].u.structure->deref(); return; } - if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_proto)) { + if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_proto) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_proto)) { vPC[4].u.structure->deref(); vPC[5].u.structure->deref(); return; } - if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_chain)) { + if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_chain) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_chain)) { vPC[4].u.structure->deref(); vPC[5].u.structureChain->deref(); return; @@ -1373,7 +1405,9 @@ void CodeBlock::derefStructures(Instruction* vPC) const return; } if ((vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_proto_list)) - || (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self_list))) { + || (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self_list)) + || (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_proto_list)) + || (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_self_list))) { PolymorphicAccessStructureList* polymorphicStructures = vPC[4].u.polymorphicStructures; polymorphicStructures->derefStructures(vPC[5].u.operand); delete polymorphicStructures; @@ -1388,16 +1422,16 @@ void CodeBlock::refStructures(Instruction* vPC) const { Interpreter* interpreter = m_globalData->interpreter; - if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self)) { + if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_self)) { vPC[4].u.structure->ref(); return; } - if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_proto)) { + if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_proto) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_proto)) { vPC[4].u.structure->ref(); vPC[5].u.structure->ref(); return; } - if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_chain)) { + if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_chain) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_chain)) { vPC[4].u.structure->ref(); vPC[5].u.structureChain->ref(); return; diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h index 4ba58d7..d92dc9d 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h @@ -36,7 +36,6 @@ #include "JSGlobalObject.h" #include "JumpTable.h" #include "Nodes.h" -#include "PtrAndFlags.h" #include "RegExp.h" #include "UString.h" #include @@ -110,44 +109,54 @@ namespace JSC { CodeLocationNearCall callReturnLocation; CodeLocationDataLabelPtr hotPathBegin; CodeLocationNearCall hotPathOther; - PtrAndFlags ownerCodeBlock; + CodeBlock* ownerCodeBlock; CodeBlock* callee; - unsigned position; + unsigned position : 31; + unsigned hasSeenShouldRepatch : 1; void setUnlinked() { callee = 0; } bool isLinked() { return callee; } bool seenOnce() { - return ownerCodeBlock.isFlagSet(hasSeenShouldRepatch); + return hasSeenShouldRepatch; } void setSeen() { - ownerCodeBlock.setFlag(hasSeenShouldRepatch); + hasSeenShouldRepatch = true; } }; struct MethodCallLinkInfo { MethodCallLinkInfo() : cachedStructure(0) + , cachedPrototypeStructure(0) { } bool seenOnce() { - return cachedPrototypeStructure.isFlagSet(hasSeenShouldRepatch); + ASSERT(!cachedStructure); + return cachedPrototypeStructure; } void setSeen() { - cachedPrototypeStructure.setFlag(hasSeenShouldRepatch); + ASSERT(!cachedStructure && !cachedPrototypeStructure); + // We use the values of cachedStructure & cachedPrototypeStructure to indicate the + // current state. + // - In the initial state, both are null. + // - Once this transition has been taken once, cachedStructure is + // null and cachedPrototypeStructure is set to a nun-null value. + // - Once the call is linked both structures are set to non-null values. + cachedPrototypeStructure = (Structure*)1; } CodeLocationCall callReturnLocation; CodeLocationDataLabelPtr structureLabel; Structure* cachedStructure; - PtrAndFlags cachedPrototypeStructure; + Structure* cachedPrototypeStructure; }; struct FunctionRegisterInfo { @@ -438,7 +447,7 @@ namespace JSC { size_t numberOfConstantRegisters() const { return m_constantRegisters.size(); } void addConstantRegister(const Register& r) { return m_constantRegisters.append(r); } Register& constantRegister(int index) { return m_constantRegisters[index - FirstConstantRegisterIndex]; } - ALWAYS_INLINE bool isConstantRegisterIndex(int index) { return index >= FirstConstantRegisterIndex; } + ALWAYS_INLINE bool isConstantRegisterIndex(int index) const { return index >= FirstConstantRegisterIndex; } ALWAYS_INLINE JSValue getConstant(int index) const { return m_constantRegisters[index - FirstConstantRegisterIndex].jsValue(); } unsigned addFunctionDecl(NonNullPassRefPtr n) { unsigned size = m_functionDecls.size(); m_functionDecls.append(n); return size; } @@ -482,6 +491,13 @@ namespace JSC { private: #if !defined(NDEBUG) || ENABLE(OPCODE_SAMPLING) void dump(ExecState*, const Vector::const_iterator& begin, Vector::const_iterator&) const; + + CString registerName(ExecState*, int r) const; + void printUnaryOp(ExecState*, int location, Vector::const_iterator&, const char* op) const; + void printBinaryOp(ExecState*, int location, Vector::const_iterator&, const char* op) const; + void printConditionalJump(ExecState*, const Vector::const_iterator&, Vector::const_iterator&, int location, const char* op) const; + void printGetByIdOp(ExecState*, int location, Vector::const_iterator&, const char* op) const; + void printPutByIdOp(ExecState*, int location, Vector::const_iterator&, const char* op) const; #endif void reparseForExceptionInfoIfNecessary(CallFrame*); diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/EvalCodeCache.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/EvalCodeCache.h index 05834fc..a036dd4 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/EvalCodeCache.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/EvalCodeCache.h @@ -65,7 +65,7 @@ namespace JSC { bool isEmpty() const { return m_cacheMap.isEmpty(); } private: - static const int maxCacheableSourceLength = 256; + static const unsigned maxCacheableSourceLength = 256; static const int maxCacheEntries = 64; typedef HashMap, RefPtr > EvalCacheMap; diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h index 4facbef..56555f3 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h @@ -104,6 +104,11 @@ namespace JSC { macro(op_get_by_id_proto, 8) \ macro(op_get_by_id_proto_list, 8) \ macro(op_get_by_id_chain, 8) \ + macro(op_get_by_id_getter_self, 8) \ + macro(op_get_by_id_getter_self_list, 8) \ + macro(op_get_by_id_getter_proto, 8) \ + macro(op_get_by_id_getter_proto_list, 8) \ + macro(op_get_by_id_getter_chain, 8) \ macro(op_get_by_id_generic, 8) \ macro(op_get_array_length, 8) \ macro(op_get_string_length, 8) \ @@ -128,9 +133,11 @@ namespace JSC { macro(op_jneq_ptr, 4) \ macro(op_jnless, 4) \ macro(op_jnlesseq, 4) \ + macro(op_jless, 4) \ macro(op_jmp_scopes, 3) \ macro(op_loop, 2) \ macro(op_loop_if_true, 3) \ + macro(op_loop_if_false, 3) \ macro(op_loop_if_less, 4) \ macro(op_loop_if_lesseq, 4) \ macro(op_switch_imm, 4) \ @@ -194,8 +201,12 @@ namespace JSC { #undef VERIFY_OPCODE_ID #if HAVE(COMPUTED_GOTO) +#if COMPILER(RVCT) typedef void* Opcode; #else + typedef const void* Opcode; +#endif +#else typedef OpcodeID Opcode; #endif diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.cpp b/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.cpp index 865c919..3f0babc 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.cpp @@ -33,7 +33,7 @@ #include "Interpreter.h" #include "Opcode.h" -#if !PLATFORM(WIN_OS) +#if !OS(WINDOWS) #include #endif @@ -91,7 +91,7 @@ void SamplingFlags::stop() {} uint32_t SamplingFlags::s_flags = 1 << 15; -#if PLATFORM(WIN_OS) +#if OS(WINDOWS) static void sleepForMicroseconds(unsigned us) { diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp index 04dae15..f2193b0 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp @@ -616,7 +616,7 @@ PassRefPtr