From 4ffa56ca6763e67f9acdbb59cd8f8112099c97eb Mon Sep 17 00:00:00 2001 From: Sarah Smith Date: Fri, 4 Sep 2009 15:27:51 +1000 Subject: Fix compile breakage Missing inline from private header causes undef symbol error. Also added dep for a private header missing. Reviewed-by: Lincoln Ramsay --- src/gui/painting/painting.pri | 1 + src/gui/painting/qoutlinemapper.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri index 5abac2f..8343cb9 100644 --- a/src/gui/painting/painting.pri +++ b/src/gui/painting/painting.pri @@ -22,6 +22,7 @@ HEADERS += \ painting/qpainter_p.h \ painting/qpainterpath.h \ painting/qpainterpath_p.h \ + painting/qvectorpath_p.h \ painting/qpathclipper_p.h \ painting/qpdf_p.h \ painting/qpen.h \ diff --git a/src/gui/painting/qoutlinemapper.cpp b/src/gui/painting/qoutlinemapper.cpp index 216b8c6..fa2151a 100644 --- a/src/gui/painting/qoutlinemapper.cpp +++ b/src/gui/painting/qoutlinemapper.cpp @@ -45,6 +45,8 @@ #include +#include + QT_BEGIN_NAMESPACE static const qreal aliasedCoordinateDelta = 0.5 - 0.015625; -- cgit v0.12 From 2f8ad3dad31ee96798cb17d8a782b78ae4c1eabc Mon Sep 17 00:00:00 2001 From: Sarah Smith Date: Fri, 4 Sep 2009 15:34:09 +1000 Subject: Remove redundant include Fix race. Reviewed-by: Trust Me --- src/gui/painting/qoutlinemapper.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gui/painting/qoutlinemapper.cpp b/src/gui/painting/qoutlinemapper.cpp index e162f77..8d04a84 100644 --- a/src/gui/painting/qoutlinemapper.cpp +++ b/src/gui/painting/qoutlinemapper.cpp @@ -45,8 +45,6 @@ #include -#include - QT_BEGIN_NAMESPACE static const qreal aliasedCoordinateDelta = 0.5 - 0.015625; -- cgit v0.12 From d3fa072c06dc3ca876ffea2b700f332d4425e56a Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Wed, 16 Sep 2009 10:39:56 +0200 Subject: context()->makeCurrent() is called above, so this is redundant. Reviewed-by: Samuel --- src/opengl/qwindowsurface_gl.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index e89352d..b2420ba 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -443,8 +443,6 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint & QRegion dirtyRegion = QRegion(window()->rect()) - d_ptr->paintedRegion; if (!dirtyRegion.isEmpty()) { - context()->makeCurrent(); - glMatrixMode(GL_MODELVIEW); glLoadIdentity(); -- cgit v0.12 From e7c36fc2e420f1cee4370020b9f50bb5a6dfe92a Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Wed, 16 Sep 2009 20:46:10 +0200 Subject: Add a new wildcard mode similar to bash in QRegExp It is not possible to escape a wildcard character in the Wildcard mode of QRegExp. This follows the kind of wildcard of the CLI of Windows The new WildCardUnix follows the escaping of a unix's bash. Task-number: 241346 Reviewed-by: Olivier Goffart Reviewed-by: Matthew Cattell --- src/corelib/tools/qregexp.cpp | 95 +++++++++++++++++++++++++++++++------- src/corelib/tools/qregexp.h | 8 +++- tests/auto/qregexp/tst_qregexp.cpp | 75 +++++++++++++++++++++++++++++- 3 files changed, 159 insertions(+), 19 deletions(-) diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp index 8d7a75d..1f23211 100644 --- a/src/corelib/tools/qregexp.cpp +++ b/src/corelib/tools/qregexp.cpp @@ -522,6 +522,10 @@ int qFindString(const QChar *haystack, int haystackLen, int from, outside, backslash has no special meaning. \endtable + In the mode Wildcard, the wildcard characters cannot be + escaped. In the mode WildcardUnix, the character '\' escapes the + wildcard. + For example if we are in wildcard mode and have strings which contain filenames we could identify HTML files with \bold{*.html}. This will match zero or more characters followed by a dot followed @@ -751,50 +755,100 @@ static void mergeInto(QVector *a, const QVector &b) /* Translates a wildcard pattern to an equivalent regular expression pattern (e.g., *.cpp to .*\.cpp). + + If enableEscaping is true, it is possible to escape the wildcard + characters with \ */ -static QString wc2rx(const QString &wc_str) +static QString wc2rx(const QString &wc_str, const bool enableEscaping) { - int wclen = wc_str.length(); + const int wclen = wc_str.length(); QString rx; int i = 0; + bool isEscaping = false; // the previous character is '\' const QChar *wc = wc_str.unicode(); + while (i < wclen) { - QChar c = wc[i++]; + const QChar c = wc[i++]; switch (c.unicode()) { + case '\\': + if (enableEscaping) { + if (isEscaping) { + rx += QLatin1String("\\\\"); + } // we insert the \\ later if necessary + if (i+1 == wclen) { // the end + rx += QLatin1String("\\\\"); + } + } else { + rx += QLatin1String("\\\\"); + } + isEscaping = true; + break; case '*': - rx += QLatin1String(".*"); + if (isEscaping) { + rx += QLatin1String("\\*"); + isEscaping = false; + } else { + rx += QLatin1String(".*"); + } break; case '?': - rx += QLatin1Char('.'); + if (isEscaping) { + rx += QLatin1String("\\?"); + isEscaping = false; + } else { + rx += QLatin1Char('.'); + } + break; case '$': case '(': case ')': case '+': case '.': - case '\\': case '^': case '{': case '|': case '}': + if (isEscaping) { + isEscaping = false; + rx += QLatin1String("\\\\"); + } rx += QLatin1Char('\\'); rx += c; break; - case '[': - rx += c; - if (wc[i] == QLatin1Char('^')) - rx += wc[i++]; - if (i < wclen) { - if (rx[i] == QLatin1Char(']')) - rx += wc[i++]; - while (i < wclen && wc[i] != QLatin1Char(']')) { - if (wc[i] == QLatin1Char('\\')) - rx += QLatin1Char('\\'); + case '[': + if (isEscaping) { + isEscaping = false; + rx += QLatin1String("\\["); + } else { + rx += c; + if (wc[i] == QLatin1Char('^')) rx += wc[i++]; + if (i < wclen) { + if (rx[i] == QLatin1Char(']')) + rx += wc[i++]; + while (i < wclen && wc[i] != QLatin1Char(']')) { + if (wc[i] == QLatin1Char('\\')) + rx += QLatin1Char('\\'); + rx += wc[i++]; + } } } + break; + + case ']': + if(isEscaping){ + isEscaping = false; + rx += QLatin1String("\\"); + } + rx += c; break; + default: + if(isEscaping){ + isEscaping = false; + rx += QLatin1String("\\\\"); + } rx += c; } } @@ -1272,7 +1326,10 @@ Q_CORE_EXPORT QString qt_regexp_toCanonical(const QString &pattern, QRegExp::Pat switch (patternSyntax) { #ifndef QT_NO_REGEXP_WILDCARD case QRegExp::Wildcard: - return wc2rx(pattern); + return wc2rx(pattern, false); + break; + case QRegExp::WildcardUnix: + return wc2rx(pattern, true); break; #endif case QRegExp::FixedString: @@ -3715,6 +3772,10 @@ static void invalidateEngine(QRegExpPrivate *priv) similar to that used by shells (command interpreters) for "file globbing". See \l{Wildcard Matching}. + \value WildcardUnix This is similar to Wildcard but with the + behavior of a Unix shell. The wildcard characters can be escaped + with the character "\". + \value FixedString The pattern is a fixed string. This is equivalent to using the RegExp pattern on a string in which all metacharacters are escaped using escape(). diff --git a/src/corelib/tools/qregexp.h b/src/corelib/tools/qregexp.h index c03e9e4..1a7cf53 100644 --- a/src/corelib/tools/qregexp.h +++ b/src/corelib/tools/qregexp.h @@ -61,7 +61,13 @@ class QStringList; class Q_CORE_EXPORT QRegExp { public: - enum PatternSyntax { RegExp, Wildcard, FixedString, RegExp2, W3CXmlSchema11 }; + enum PatternSyntax { + RegExp, + Wildcard, + FixedString, + RegExp2, + WildcardUnix, + W3CXmlSchema11 }; enum CaretMode { CaretAtZero, CaretAtOffset, CaretWontMatch }; QRegExp(); diff --git a/tests/auto/qregexp/tst_qregexp.cpp b/tests/auto/qregexp/tst_qregexp.cpp index 7496ec6..86d831e 100644 --- a/tests/auto/qregexp/tst_qregexp.cpp +++ b/tests/auto/qregexp/tst_qregexp.cpp @@ -70,6 +70,10 @@ private slots: void matchedLength(); void wildcard_data(); void wildcard(); + void testEscapingWildcard_data(); + void testEscapingWildcard(); + void testInvalidWildcard_data(); + void testInvalidWildcard(); void caretAnchoredOptimization(); void isEmpty(); void prepareEngineOptimization(); @@ -909,10 +913,79 @@ void tst_QRegExp::wildcard() QFETCH( int, foundIndex ); QRegExp r( rxp ); - r.setPatternSyntax(QRegExp::Wildcard); + r.setPatternSyntax(QRegExp::WildcardUnix); QCOMPARE( r.indexIn( string ), foundIndex ); } +void tst_QRegExp::testEscapingWildcard_data(){ + QTest::addColumn("pattern"); + QTest::addColumn("teststring"); + QTest::addColumn("isMatching"); + + QTest::newRow("[ Not escaped") << "[Qt;" << "[Qt;" << false; + QTest::newRow("[ Escaped") << "\\[Qt;" << "[Qt;" << true; + + QTest::newRow("] Not escaped") << "]Ik;" << "]Ik;" << false; + QTest::newRow("] Escaped") << "\\]Ip;" << "]Ip;" << true; + + QTest::newRow("? Not escaped valid") << "?Ou:" << ".Ou:" << true; + QTest::newRow("? Not escaped invalid") << "?Tr;" << "Tr;" << false; + QTest::newRow("? Escaped") << "\\?O;" << "?O;" << true; + + QTest::newRow("[] not escaped") << "[lL]" << "l" << true; + QTest::newRow("case [[]") << "[[abc]" << "[" << true; + QTest::newRow("case []abc] match ]") << "[]abc]" << "]" << true; + QTest::newRow("case []abc] match a") << "[]abc]" << "a" << true; + QTest::newRow("case [abc] match a") << "[abc]" << "a" << true; + QTest::newRow("case []] don't match [") << "[]abc]" << "[" << false; + QTest::newRow("case [^]abc] match d") << "[^]abc]" << "d" << true; + QTest::newRow("case [^]abc] don't match ]") << "[^]abc]" << "]" << false; + + QTest::newRow("* Not escaped with char") << "*Te;" << "12345Te;" << true; + QTest::newRow("* Not escaped without char") << "*Ch;" << "Ch;" << true; + QTest::newRow("* Not escaped invalid") << "*Ro;" << "o;" << false; + QTest::newRow("* Escaped") << "\\[Cks;" << "[Cks;" << true; + + QTest::newRow("a true '\\' in input") << "\\Qt;" << "\\Qt;" << true; + QTest::newRow("two true '\\' in input") << "\\\\Qt;" << "\\\\Qt;" << true; + QTest::newRow("a '\\' at the end") << "\\\\Qt;" << "\\\\Qt;" << true; + +} +void tst_QRegExp::testEscapingWildcard(){ + QFETCH(QString, pattern); + + QRegExp re(pattern); + re.setPatternSyntax(QRegExp::WildcardUnix); + + QFETCH(QString, teststring); + QFETCH(bool, isMatching); + QCOMPARE(re.exactMatch(teststring), isMatching); +} + +void tst_QRegExp::testInvalidWildcard_data(){ + QTest::addColumn("pattern"); + QTest::addColumn("isValid"); + + QTest::newRow("valid []") << "[abc]" << true; + QTest::newRow("invalid [") << "[abc" << false; + QTest::newRow("ending [") << "abc[" << false; + QTest::newRow("ending ]") << "abc]" << false; + QTest::newRow("ending [^") << "abc[^" << false; + QTest::newRow("ending [\\") << "abc[\\" << false; + QTest::newRow("ending []") << "abc[]" << false; + QTest::newRow("ending [[") << "abc[[" << false; + +} +void tst_QRegExp::testInvalidWildcard(){ + QFETCH(QString, pattern); + + QRegExp re(pattern); + re.setPatternSyntax(QRegExp::Wildcard); + + QFETCH(bool, isValid); + QCOMPARE(re.isValid(), isValid); +} + void tst_QRegExp::caretAnchoredOptimization() { QString s = "---babnana----"; -- cgit v0.12 From 9cef27f506e15681f9935a1c00c9df3c6271d5f2 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Thu, 17 Sep 2009 09:56:01 +0200 Subject: Update qt eclipse integration version number in docs, fix paths. --- tools/qdoc3/test/eclipse-integration.qdocconf | 6 +++--- tools/qdoc3/test/standalone-eclipse-integration.qdocconf | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/qdoc3/test/eclipse-integration.qdocconf b/tools/qdoc3/test/eclipse-integration.qdocconf index aadaae6..13d8ab9 100644 --- a/tools/qdoc3/test/eclipse-integration.qdocconf +++ b/tools/qdoc3/test/eclipse-integration.qdocconf @@ -2,9 +2,9 @@ include(qt.qdocconf) headerdirs = sourcedirs = -sourcedirs = $QTDIR/../qteclipsetools/main/doc -imagedirs = $QTDIR/../qteclipsetools/main/doc -outputdir = $QTDIR/../qteclipsetools/main/doc/html +sourcedirs = $QTDIR/../qteclipsetools/eclipse_patched/doc +imagedirs = $QTDIR/../qteclipsetools/eclipse_patched/doc +outputdir = $QTDIR/../qteclipsetools/eclipse_patched/doc/html project = Qt Eclipse Integration description = "Qt Eclipse Integration" diff --git a/tools/qdoc3/test/standalone-eclipse-integration.qdocconf b/tools/qdoc3/test/standalone-eclipse-integration.qdocconf index d61db54..b96c541 100644 --- a/tools/qdoc3/test/standalone-eclipse-integration.qdocconf +++ b/tools/qdoc3/test/standalone-eclipse-integration.qdocconf @@ -7,5 +7,5 @@ HTML.footer = "


\n" \ "\n" \ "\n" \ "\n" \ - "\n" \ + "\n" \ "
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt Eclipse Integration 1.5.2
Qt Eclipse Integration 1.5.3
" -- cgit v0.12 From 0ca968d2244214b465f1186628328f28caa33886 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Thu, 17 Sep 2009 10:24:34 +0200 Subject: Skip the multipleFBOInterleavedRendering autotest on when using OpenGL 1 Interleaved rendering to GL targets is going to be flaky with the GL1 engine and wont be supported. Reviewed-by: Trustme --- tests/auto/qgl/tst_qgl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp index 60a3f87..21f7359 100644 --- a/tests/auto/qgl/tst_qgl.cpp +++ b/tests/auto/qgl/tst_qgl.cpp @@ -967,6 +967,11 @@ void tst_QGL::multipleFBOInterleavedRendering() QVERIFY(fbo2Painter.begin(fbo2)); QVERIFY(fbo3Painter.begin(fbo3)); + // Confirm we're using the GL2 engine, as interleaved rendering isn't supported + // on the GL1 engine: + if (fbo1Painter.paintEngine()->type() != QPaintEngine::OpenGL2) + QSKIP("Interleaved GL rendering requires OpenGL 2.0 or higher", SkipSingle); + QPainterPath intersectingPath; intersectingPath.moveTo(0, 0); intersectingPath.lineTo(100, 0); -- cgit v0.12 From 603c423fc2ee2b9393e3c288e76354de0e0c1cc7 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 17 Sep 2009 10:21:49 +0200 Subject: Fix crash or painting error when drawing dashed lines with penWidth > 1 Since the width is multiplied into the dash, it needs to be divided out, otherwise you can get a dashOffset which is greater than the pattern at the index, and the dash can become negative. This will in turn lead to passing a negative width to the rasterizer, which at some point will get cast to an unsigned int and overflow. Depending on the position of the line and size of the buffer, this will either crash or produce garbled output. Task-number: QT-4444 Reviewed-by: Samuel --- src/gui/painting/qpaintengine_raster.cpp | 2 +- src/gui/painting/qrasterizer.cpp | 4 +++- tests/auto/qpainter/tst_qpainter.cpp | 25 +++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index bd12fdb..bcea1ec 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -3564,7 +3564,7 @@ void QRasterPaintEnginePrivate::rasterizeLine_dashed(QLineF line, if (dash >= length) { dash = length; - *dashOffset += dash; + *dashOffset += dash / width; length = 0; } else { *dashOffset = 0; diff --git a/src/gui/painting/qrasterizer.cpp b/src/gui/painting/qrasterizer.cpp index 4500756..2b6791d 100644 --- a/src/gui/painting/qrasterizer.cpp +++ b/src/gui/painting/qrasterizer.cpp @@ -706,10 +706,12 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, if (a == b || width == 0 || d->clipRect.isEmpty()) return; + Q_ASSERT(width > 0.0); + QPointF pa = a; QPointF pb = b; - QPointF offs = QPointF(qAbs(b.y() - a.y()), qAbs(b.x() - a.x())) * width * 0.5; + QPointF offs = QPointF(qAbs(b.y() - a.y()), qAbs(b.x() - a.x())) * width * 0.5; if (squareCap) offs += QPointF(offs.y(), offs.x()); const QRectF clip(d->clipRect.topLeft() - offs, d->clipRect.bottomRight() + QPoint(1, 1) + offs); diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp index e434ed6..c0eac21 100644 --- a/tests/auto/qpainter/tst_qpainter.cpp +++ b/tests/auto/qpainter/tst_qpainter.cpp @@ -230,6 +230,8 @@ private slots: void zeroOpacity(); void emptyClip(); + void taskQT4444_dontOverflowDashOffset(); + private: void fillData(); QColor baseColor( int k, int intensity=255 ); @@ -4239,5 +4241,28 @@ void tst_QPainter::emptyClip() p.fillPath(path, Qt::green); } +void tst_QPainter::taskQT4444_dontOverflowDashOffset() +{ + QPainter p; + + QPen pen; + pen.setWidth(2); + pen.setStyle(Qt::DashDotLine); + + QPointF point[4]; + point[0] = QPointF(182.50868749707968,347.78457234212630); + point[1] = QPointF(182.50868749707968,107.22501998401277); + point[2] = QPointF(182.50868749707968,107.22501998401277); + point[3] = QPointF(520.46600762283651,107.22501998401277); + + QImage crashImage(QSize(1000, 120), QImage::Format_ARGB32_Premultiplied); + p.begin(&crashImage); + p.setPen(pen); + p.drawLines(point, 2); + p.end(); + + QVERIFY(true); // Don't crash +} + QTEST_MAIN(tst_QPainter) #include "tst_qpainter.moc" -- cgit v0.12 From 11566a349f8b9d5b6bcaf1dff64e30266a55411f Mon Sep 17 00:00:00 2001 From: Sarah Smith Date: Thu, 17 Sep 2009 18:42:51 +1000 Subject: Fix qdoc warning about missing file Reviewed-by: TrustMe --- doc/src/getting-started/examples.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc index 1ed1b30..543a2e1 100644 --- a/doc/src/getting-started/examples.qdoc +++ b/doc/src/getting-started/examples.qdoc @@ -1074,7 +1074,7 @@ \nextpage D-Bus Examples \list - \o \l{gestures/imageviewer}{Image Viewer} + \o \l{widgets/imageviewer}{Image Viewer} \endlist */ -- cgit v0.12 From 36ec74d84b3403cc930a8296226ea921a62a277b Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Thu, 17 Sep 2009 11:30:36 +0200 Subject: Revert "Added autotest to demonstrate clipping path problem" This reverts commit e7042dea2431b8f64574d4e97eb896285b328c8b. Alexis : This should never have been here. E-mail is invalid. --- tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 32 -------------------------- 1 file changed, 32 deletions(-) diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 391ccf8..d6605db 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -194,7 +194,6 @@ private slots: void itemClipsToShape(); void itemClipsChildrenToShape(); void itemClipsChildrenToShape2(); - void itemClipsChildrenToShape3(); void itemClipsTextChildToShape(); void itemClippingDiscovery(); void ancestorFlags(); @@ -4692,37 +4691,6 @@ void tst_QGraphicsItem::itemClipsChildrenToShape2() #endif } -void tst_QGraphicsItem::itemClipsChildrenToShape3() -{ - // Construct a scene with nested children, each 50 pixels offset from the elder. - // Set a top-level clipping flag - QGraphicsScene scene; - QGraphicsRectItem *parent = scene.addRect( 0, 0, 150, 150 ); - QGraphicsRectItem *child = scene.addRect( 0, 0, 150, 150 ); - QGraphicsRectItem *grandchild = scene.addRect( 0, 0, 150, 150 ); - child->setParentItem(parent); - grandchild->setParentItem(child); - child->setPos( 50, 50 ); - grandchild->setPos( 50, 50 ); - parent->setFlag(QGraphicsItem::ItemClipsChildrenToShape); - - QCOMPARE(scene.itemAt(25,25), (QGraphicsItem *)parent); - QCOMPARE(scene.itemAt(75,75), (QGraphicsItem *)child); - QCOMPARE(scene.itemAt(125,125), (QGraphicsItem *)grandchild); - QCOMPARE(scene.itemAt(175,175), (QGraphicsItem *)0); - - // Move child to fully overlap the parent. The grandchild should - // now occupy two-thirds of the scene - child->prepareGeometryChange(); - child->setPos( 0, 0 ); - - QCOMPARE(scene.itemAt(25,25), (QGraphicsItem *)child); - QCOMPARE(scene.itemAt(75,75), (QGraphicsItem *)grandchild); - QCOMPARE(scene.itemAt(125,125), (QGraphicsItem *)grandchild); - QCOMPARE(scene.itemAt(175,175), (QGraphicsItem *)0); -} - - void tst_QGraphicsItem::itemClipsTextChildToShape() { // Construct a scene with a rect that clips its children, with one text -- cgit v0.12 From 3db470f76b5e9cc576197164f666bd5d43bfbfbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Thu, 17 Sep 2009 12:31:39 +0200 Subject: Stabilize tst_QGraphicsItem::cacheMode on the Mac. Problem was that the window got activated *after* the items were added to the scene, causing two repaints on the viewport. --- tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index fa163d8..2fc2b49 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -6542,6 +6542,9 @@ void tst_QGraphicsItem::cacheMode() #ifdef Q_WS_X11 qt_x11_wait_for_window_manager(&view); #endif + // Increase the probability of window activation + // not causing another repaint of test items. + QTest::qWait(250); EventTester *tester = new EventTester; EventTester *testerChild = new EventTester; -- cgit v0.12 From a31db11ac224e52d23faeaace3d4213e4fc5e19c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Thu, 17 Sep 2009 12:46:18 +0200 Subject: Stabilize tst_QGraphicsItem::hoverEventsGenerateRepaints. Make the test independent of window activation; we're only interested in the behavior for hover events. --- tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 2fc2b49..a7aaa76 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -2921,18 +2921,16 @@ void tst_QGraphicsItem::hoverEventsGenerateRepaints() Q_CHECK_PAINTEVENTS QGraphicsScene scene; - EventTester *tester = new EventTester; - scene.addItem(tester); - tester->setAcceptsHoverEvents(true); - QGraphicsView view(&scene); view.show(); #ifdef Q_WS_X11 qt_x11_wait_for_window_manager(&view); #endif + QTest::qWait(250); - qApp->processEvents(); - qApp->processEvents(); + EventTester *tester = new EventTester; + scene.addItem(tester); + tester->setAcceptsHoverEvents(true); QTRY_COMPARE(tester->repaints, 1); @@ -2946,7 +2944,7 @@ void tst_QGraphicsItem::hoverEventsGenerateRepaints() int npaints = tester->repaints; qApp->processEvents(); qApp->processEvents(); - QCOMPARE(tester->events.size(), 3); // activate + enter + move + QCOMPARE(tester->events.size(), 2); // enter + move QCOMPARE(tester->repaints, npaints + 1); QCOMPARE(tester->events.last(), QEvent::GraphicsSceneHoverMove); @@ -2960,7 +2958,7 @@ void tst_QGraphicsItem::hoverEventsGenerateRepaints() qApp->processEvents(); qApp->processEvents(); - QCOMPARE(tester->events.size(), 4); + QCOMPARE(tester->events.size(), 3); QCOMPARE(tester->repaints, npaints + 1); QCOMPARE(tester->events.last(), QEvent::GraphicsSceneHoverMove); @@ -2974,7 +2972,7 @@ void tst_QGraphicsItem::hoverEventsGenerateRepaints() qApp->processEvents(); qApp->processEvents(); - QCOMPARE(tester->events.size(), 5); + QCOMPARE(tester->events.size(), 4); QCOMPARE(tester->repaints, npaints + 2); QCOMPARE(tester->events.last(), QEvent::GraphicsSceneHoverLeave); } -- cgit v0.12 From 5ff6081d542b7a2e13bd7c75aff327f75b271b86 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 17 Sep 2009 13:53:35 +0300 Subject: Fixed QFileInfo autotest absolute path tests not to expect C-drive. Changed absolute path tests so that they will work from any drive. Reviewed-by: Shane Kearns --- tests/auto/qfileinfo/tst_qfileinfo.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp index 853bf88..71e38df 100644 --- a/tests/auto/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp @@ -411,10 +411,14 @@ void tst_QFileInfo::absolutePath_data() QString drivePrefix; #if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN) drivePrefix = QDir::currentPath().left(2); + QString nonCurrentDrivePrefix = + drivePrefix.left(1).compare("X", Qt::CaseInsensitive) == 0 ? QString("Y:") : QString("X:"); // Make sure drive-relative paths return correct absolute paths (task 255326) - QTest::newRow("c:my.dll") << "c:my.dll" << QDir::currentPath() << "my.dll"; - QTest::newRow("x:my.dll") << "x:my.dll" << "X:/" << "my.dll"; + QTest::newRow(":my.dll") << drivePrefix + "my.dll" << QDir::currentPath() << "my.dll"; + QTest::newRow(":my.dll") << nonCurrentDrivePrefix + "my.dll" + << nonCurrentDrivePrefix + "/" + << "my.dll"; #endif QTest::newRow("0") << "/machine/share/dir1/" << drivePrefix + "/machine/share/dir1" << ""; QTest::newRow("1") << "/machine/share/dir1" << drivePrefix + "/machine/share" << "dir1"; @@ -450,13 +454,19 @@ void tst_QFileInfo::absFilePath_data() QTest::newRow("relativeFileInSubDir") << "temp/tmp.txt" << QDir::currentPath() + "/" + "temp/tmp.txt"; #if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN) QString curr = QDir::currentPath(); + curr.remove(0, 2); // Make it a absolute path with no drive specifier: \depot\qt-4.2\tests\auto\qfileinfo QTest::newRow(".") << curr << QDir::currentPath(); QTest::newRow("absFilePath") << "c:\\home\\andy\\tmp.txt" << "C:/home/andy/tmp.txt"; // Make sure drive-relative paths return correct absolute paths (task 255326) - QTest::newRow("c:my.dll") << "c:temp/my.dll" << QDir::currentPath() + "/temp/my.dll"; - QTest::newRow("x:my.dll") << "x:temp/my.dll" << "X:/temp/my.dll"; + QString drivePrefix = QDir::currentPath().left(2); + QString nonCurrentDrivePrefix = + drivePrefix.left(1).compare("X", Qt::CaseInsensitive) == 0 ? QString("Y:") : QString("X:"); + + QTest::newRow(":my.dll") << drivePrefix + "temp/my.dll" << QDir::currentPath() + "/temp/my.dll"; + QTest::newRow(":my.dll") << nonCurrentDrivePrefix + "temp/my.dll" + << nonCurrentDrivePrefix + "/temp/my.dll"; #else QTest::newRow("absFilePath") << "/home/andy/tmp.txt" << "/home/andy/tmp.txt"; #endif -- cgit v0.12 From 7e3cd08a4e3f8ffd01b2acf2cfbf71c49b8eda76 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Thu, 17 Sep 2009 20:56:40 +1000 Subject: Fix license headers. Reviewed-by: Trust Me --- doc/src/snippets/audio/main.cpp | 40 +++++++++++++++++++++ tests/manual/qcursor/allcursors/main.cpp | 41 +++++++++++++++++++++ tests/manual/qcursor/allcursors/mainwindow.cpp | 41 +++++++++++++++++++++ tests/manual/qcursor/allcursors/mainwindow.h | 44 +++++++++++++++++++++-- tests/manual/qcursor/grab_override/main.cpp | 41 +++++++++++++++++++++ tests/manual/qcursor/grab_override/mainwindow.cpp | 41 +++++++++++++++++++++ tests/manual/qcursor/grab_override/mainwindow.h | 41 +++++++++++++++++++++ 7 files changed, 287 insertions(+), 2 deletions(-) diff --git a/doc/src/snippets/audio/main.cpp b/doc/src/snippets/audio/main.cpp index a215d43..e663115 100644 --- a/doc/src/snippets/audio/main.cpp +++ b/doc/src/snippets/audio/main.cpp @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2009 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$ +** +****************************************************************************/ #include diff --git a/tests/manual/qcursor/allcursors/main.cpp b/tests/manual/qcursor/allcursors/main.cpp index 9fb7510..4ab8116 100644 --- a/tests/manual/qcursor/allcursors/main.cpp +++ b/tests/manual/qcursor/allcursors/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 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$ +** +****************************************************************************/ + #include #include "mainwindow.h" diff --git a/tests/manual/qcursor/allcursors/mainwindow.cpp b/tests/manual/qcursor/allcursors/mainwindow.cpp index 0046ddb..cb903ae 100644 --- a/tests/manual/qcursor/allcursors/mainwindow.cpp +++ b/tests/manual/qcursor/allcursors/mainwindow.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 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$ +** +****************************************************************************/ + #include "mainwindow.h" #include "ui_mainwindow.h" diff --git a/tests/manual/qcursor/allcursors/mainwindow.h b/tests/manual/qcursor/allcursors/mainwindow.h index e5c731c..25a317a 100644 --- a/tests/manual/qcursor/allcursors/mainwindow.h +++ b/tests/manual/qcursor/allcursors/mainwindow.h @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 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$ +** +****************************************************************************/ + #ifndef MAINWINDOW_H #define MAINWINDOW_H @@ -20,8 +61,7 @@ public: private: void keyPressEvent(QKeyEvent* event); - -private: + Ui::MainWindow *ui; }; diff --git a/tests/manual/qcursor/grab_override/main.cpp b/tests/manual/qcursor/grab_override/main.cpp index 9fb7510..4ab8116 100644 --- a/tests/manual/qcursor/grab_override/main.cpp +++ b/tests/manual/qcursor/grab_override/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 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$ +** +****************************************************************************/ + #include #include "mainwindow.h" diff --git a/tests/manual/qcursor/grab_override/mainwindow.cpp b/tests/manual/qcursor/grab_override/mainwindow.cpp index 27dd0e7..4afa9da 100644 --- a/tests/manual/qcursor/grab_override/mainwindow.cpp +++ b/tests/manual/qcursor/grab_override/mainwindow.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 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$ +** +****************************************************************************/ + #include "mainwindow.h" #include "ui_mainwindow.h" diff --git a/tests/manual/qcursor/grab_override/mainwindow.h b/tests/manual/qcursor/grab_override/mainwindow.h index 0b1f694..34b5d73 100644 --- a/tests/manual/qcursor/grab_override/mainwindow.h +++ b/tests/manual/qcursor/grab_override/mainwindow.h @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 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$ +** +****************************************************************************/ + #ifndef MAINWINDOW_H #define MAINWINDOW_H -- cgit v0.12 From 26e5792c84d15ca8fb90c2f3b0ba3a53e52f242d Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Thu, 17 Sep 2009 11:53:14 +0200 Subject: Add a QMAKE_LFLAGS_EGL and QMAKE_LFLAGS_OPENGL When you link cross-compiled applications on Linux, the linker needs to be able to find not just the libraries the application links against (like libQtGui.so), but the libraries' dependencies. E.g. examples/widgets/wiggly links against QtGui. QtGui links against libEGL.so. Therefore, when you link wiggly, the linker has to be able to find libEGL.so, even though wiggly doesn't use EGL directly. To facilitate this, -Wl,rpath-link=/path/to/egl needs to be added to QMAKE_PRL_LIBS in libQtGui.prl and -Wl,rpath-link=/path/to/gl needs to be added to QMAKE_PRL_LIBS in libQtOpenGL.prl. This only needs to be done when the EGL/GL libs are not in the default search directories. As the paths will also change depending on the mkspec, two new variables have been added: QMAKE_LFLAGS_EGL & QMAKE_LFLAGS_OPENGL. These can be set in the mkspec and will be added to the relevent prls. E.g. QMAKE_LFLAGS_EGL += -Wl,-rpath-link=$${QMAKE_LIBDIR_EGL} QMAKE_LFLAGS_OPENGL += -Wl,-rpath-link=$${QMAKE_LIBDIR_OPENGL} Reviewed-by: Marius Storm-Olsen --- src/gui/egl/egl.pri | 1 + src/opengl/opengl.pro | 1 + 2 files changed, 2 insertions(+) diff --git a/src/gui/egl/egl.pri b/src/gui/egl/egl.pri index 22c8bd7..ba991bd 100644 --- a/src/gui/egl/egl.pri +++ b/src/gui/egl/egl.pri @@ -26,3 +26,4 @@ for(p, QMAKE_LIBDIR_EGL) { !isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL !isEmpty(QMAKE_LIBS_EGL): LIBS_PRIVATE += $$QMAKE_LIBS_EGL +!isEmpty(QMAKE_LFLAGS_EGL): LIBS += $$QMAKE_LFLAGS_EGL diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro index da30e3d..d434725 100644 --- a/src/opengl/opengl.pro +++ b/src/opengl/opengl.pro @@ -159,4 +159,5 @@ wince*: { } else { LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL + LIBS += $$QMAKE_LFLAGS_OPENGL } -- cgit v0.12 From 0644e3dce532b1df00a77d3a30c61d6b75d3ff30 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Thu, 17 Sep 2009 13:07:30 +0200 Subject: Control-drag header selection behaved wierdly. The QItemSelectionModel::Current was not set in QTableViewPrivate::selectColumn(). However, Control-drag selection in QTableView behaved differently than other software such as OpenOffice's spreadsheet. Now the behaviour when Control-dragging is that the selection will be set to the opposite of the selection state of the first cell. If that cell is selected, we will deselected the cells while dragging, and conversely, if it isn't selected, the cells will be selected. Reviewed-by: Olivier Task-number: QT-1435 Task-number: 191545 --- src/gui/itemviews/qabstractitemview.cpp | 12 ++++ src/gui/itemviews/qabstractitemview_p.h | 1 + src/gui/itemviews/qtableview.cpp | 28 +++++++- tests/auto/qtableview/tst_qtableview.cpp | 114 +++++++++++++++++++++++++++++++ 4 files changed, 153 insertions(+), 2 deletions(-) diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index 9d977a5..757ded9 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -69,6 +69,7 @@ QAbstractItemViewPrivate::QAbstractItemViewPrivate() : model(QAbstractItemModelPrivate::staticEmptyModel()), itemDelegate(0), selectionModel(0), + ctrlDragSelectionFlag(QItemSelectionModel::NoUpdate), selectionMode(QAbstractItemView::ExtendedSelection), selectionBehavior(QAbstractItemView::SelectItems), currentlyCommittingEditor(0), @@ -1589,6 +1590,11 @@ void QAbstractItemView::mousePressEvent(QMouseEvent *event) d->selectionModel->setCurrentIndex(index, QItemSelectionModel::NoUpdate); d->autoScroll = autoScroll; QRect rect(d->pressedPosition - offset, pos); + if (command.testFlag(QItemSelectionModel::Toggle)) { + command &= ~QItemSelectionModel::Toggle; + d->ctrlDragSelectionFlag = d->selectionModel->isSelected(index) ? QItemSelectionModel::Deselect : QItemSelectionModel::Select; + command |= d->ctrlDragSelectionFlag; + } setSelection(rect, command); // signal handlers may change the model @@ -1659,6 +1665,10 @@ void QAbstractItemView::mouseMoveEvent(QMouseEvent *event) if ((event->buttons() & Qt::LeftButton) && d->selectionAllowed(index) && d->selectionModel) { setState(DragSelectingState); QItemSelectionModel::SelectionFlags command = selectionCommand(index, event); + if (command.testFlag(QItemSelectionModel::Toggle)) { + command &= ~QItemSelectionModel::Toggle; + command |= d->ctrlDragSelectionFlag; + } // Do the normalize ourselves, since QRect::normalized() is flawed QRect selectionRect = QRect(topLeft, bottomRight); @@ -1699,6 +1709,8 @@ void QAbstractItemView::mouseReleaseEvent(QMouseEvent *event) EditTrigger trigger = (selectedClicked ? SelectedClicked : NoEditTriggers); bool edited = edit(index, trigger, event); + d->ctrlDragSelectionFlag = QItemSelectionModel::NoUpdate; + //in the case the user presses on no item we might decide to clear the selection if (d->selectionModel && !index.isValid()) d->selectionModel->select(QModelIndex(), selectionCommand(index, event)); diff --git a/src/gui/itemviews/qabstractitemview_p.h b/src/gui/itemviews/qabstractitemview_p.h index 725d0a9..6b1ec8e 100644 --- a/src/gui/itemviews/qabstractitemview_p.h +++ b/src/gui/itemviews/qabstractitemview_p.h @@ -342,6 +342,7 @@ public: QMap > rowDelegates; QMap > columnDelegates; QPointer selectionModel; + QItemSelectionModel::SelectionFlag ctrlDragSelectionFlag; QAbstractItemView::SelectionMode selectionMode; QAbstractItemView::SelectionBehavior selectionBehavior; diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp index 684da3f..f1ffaa6 100644 --- a/src/gui/itemviews/qtableview.cpp +++ b/src/gui/itemviews/qtableview.cpp @@ -2519,9 +2519,21 @@ void QTableViewPrivate::selectRow(int row, bool anchor) QModelIndex index = model->index(row, column, root); QItemSelectionModel::SelectionFlags command = q->selectionCommand(index); selectionModel->setCurrentIndex(index, QItemSelectionModel::NoUpdate); - if ((!(command & QItemSelectionModel::Current) && anchor) + if ((anchor && !(command & QItemSelectionModel::Current)) || (q->selectionMode() == QTableView::SingleSelection)) rowSectionAnchor = row; + + if (q->selectionMode() != QTableView::SingleSelection + && command.testFlag(QItemSelectionModel::Toggle)) { + if (anchor) + ctrlDragSelectionFlag = verticalHeader->selectionModel()->selectedRows().contains(index) + ? QItemSelectionModel::Deselect : QItemSelectionModel::Select; + command &= ~QItemSelectionModel::Toggle; + command |= ctrlDragSelectionFlag; + if (!anchor) + command |= QItemSelectionModel::Current; + } + QModelIndex tl = model->index(qMin(rowSectionAnchor, row), 0, root); QModelIndex br = model->index(qMax(rowSectionAnchor, row), model->columnCount(root) - 1, root); if (verticalHeader->sectionsMoved() && tl.row() != br.row()) @@ -2545,9 +2557,21 @@ void QTableViewPrivate::selectColumn(int column, bool anchor) QModelIndex index = model->index(row, column, root); QItemSelectionModel::SelectionFlags command = q->selectionCommand(index); selectionModel->setCurrentIndex(index, QItemSelectionModel::NoUpdate); - if ((!(command & QItemSelectionModel::Current) && anchor) + if ((anchor && !(command & QItemSelectionModel::Current)) || (q->selectionMode() == QTableView::SingleSelection)) columnSectionAnchor = column; + + if (q->selectionMode() != QTableView::SingleSelection + && command.testFlag(QItemSelectionModel::Toggle)) { + if (anchor) + ctrlDragSelectionFlag = horizontalHeader->selectionModel()->selectedColumns().contains(index) + ? QItemSelectionModel::Deselect : QItemSelectionModel::Select; + command &= ~QItemSelectionModel::Toggle; + command |= ctrlDragSelectionFlag; + if (!anchor) + command |= QItemSelectionModel::Current; + } + QModelIndex tl = model->index(0, qMin(columnSectionAnchor, column), root); QModelIndex br = model->index(model->rowCount(root) - 1, qMax(columnSectionAnchor, column), root); diff --git a/tests/auto/qtableview/tst_qtableview.cpp b/tests/auto/qtableview/tst_qtableview.cpp index 8d9a50c..48fcb3e 100644 --- a/tests/auto/qtableview/tst_qtableview.cpp +++ b/tests/auto/qtableview/tst_qtableview.cpp @@ -43,6 +43,7 @@ #include #include #include "../../shared/util.h" +#include "private/qapplication_p.h" //TESTED_CLASS= //TESTED_FILES= @@ -179,6 +180,7 @@ private slots: void task240266_veryBigColumn(); void task248688_autoScrollNavigation(); void task259308_scrollVerticalHeaderSwappedSections(); + void task191545_dragSelectRows(); void mouseWheel_data(); void mouseWheel(); @@ -3300,5 +3302,117 @@ void tst_QTableView::task259308_scrollVerticalHeaderSwappedSections() QTRY_COMPARE(tv.rowAt(tv.viewport()->height() - 1), tv.verticalHeader()->logicalIndex(model.rowCount() - 1)); } +template +struct ValueSaver { + T &var, value; + ValueSaver(T &v) : var(v), value(v) { } + ~ValueSaver() { var = value; } +}; + +void tst_QTableView::task191545_dragSelectRows() +{ + QStandardItemModel model(10, 10); + QTableView table; + table.setModel(&model); + table.setSelectionBehavior(QAbstractItemView::SelectItems); + table.setSelectionMode(QAbstractItemView::ExtendedSelection); + table.setMinimumSize(1000, 400); + table.show(); + QTest::qWait(200); + + ValueSaver saver(QApplicationPrivate::modifier_buttons); + QApplicationPrivate::modifier_buttons = Qt::ControlModifier; + + { + QRect cellRect = table.visualRect(model.index(3, 0)); + QHeaderView *vHeader = table.verticalHeader(); + QWidget *vHeaderVp = vHeader->viewport(); + QPoint rowPos(5, (cellRect.top() + cellRect.bottom()) / 2); + QMouseEvent rowPressEvent(QEvent::MouseButtonPress, rowPos, Qt::LeftButton, Qt::NoButton, Qt::ControlModifier); + qApp->sendEvent(vHeaderVp, &rowPressEvent); + + for (int i = 0; i < 4; ++i) { + rowPos.setY(rowPos.y() + cellRect.height()); + QMouseEvent moveEvent(QEvent::MouseMove, rowPos, Qt::NoButton, Qt::LeftButton, Qt::ControlModifier); + qApp->sendEvent(vHeaderVp, &moveEvent); + } + QMouseEvent rowReleaseEvent(QEvent::MouseButtonRelease, rowPos, Qt::LeftButton, Qt::NoButton, Qt::ControlModifier); + qApp->sendEvent(vHeaderVp, &rowReleaseEvent); + + for (int i = 0; i < 4; ++i) { + QModelIndex index = model.index(3 + i, 0, table.rootIndex()); + QVERIFY(vHeader->selectionModel()->selectedRows().contains(index)); + } + } + + { + QRect cellRect = table.visualRect(model.index(0, 3)); + QHeaderView *hHeader = table.horizontalHeader(); + QWidget *hHeaderVp = hHeader->viewport(); + QPoint colPos((cellRect.left() + cellRect.right()) / 2, 5); + QMouseEvent colPressEvent(QEvent::MouseButtonPress, colPos, Qt::LeftButton, Qt::NoButton, Qt::ControlModifier); + qApp->sendEvent(hHeaderVp, &colPressEvent); + + for (int i = 0; i < 4; ++i) { + colPos.setX(colPos.x() + cellRect.width()); + QMouseEvent moveEvent(QEvent::MouseMove, colPos, Qt::NoButton, Qt::LeftButton, Qt::ControlModifier); + qApp->sendEvent(hHeaderVp, &moveEvent); + } + QMouseEvent colReleaseEvent(QEvent::MouseButtonRelease, colPos, Qt::LeftButton, Qt::NoButton, Qt::ControlModifier); + qApp->sendEvent(hHeaderVp, &colReleaseEvent); + + for (int i = 0; i < 4; ++i) { + QModelIndex index = model.index(0, 3 + i, table.rootIndex()); + QVERIFY(hHeader->selectionModel()->selectedColumns().contains(index)); + } + } + + { + QRect cellRect = table.visualRect(model.index(2, 2)); + QWidget *tableVp = table.viewport(); + QPoint cellPos = cellRect.center(); + QMouseEvent cellPressEvent(QEvent::MouseButtonPress, cellPos, Qt::LeftButton, Qt::NoButton, Qt::ControlModifier); + qApp->sendEvent(tableVp, &cellPressEvent); + + for (int i = 0; i < 6; ++i) { + cellPos.setX(cellPos.x() + cellRect.width()); + cellPos.setY(cellPos.y() + cellRect.height()); + QMouseEvent moveEvent(QEvent::MouseMove, cellPos, Qt::NoButton, Qt::LeftButton, Qt::ControlModifier); + qApp->sendEvent(tableVp, &moveEvent); + } + QMouseEvent cellReleaseEvent(QEvent::MouseButtonRelease, cellPos, Qt::LeftButton, Qt::NoButton, Qt::ControlModifier); + qApp->sendEvent(tableVp, &cellReleaseEvent); + + for (int i = 0; i < 6; ++i) + for (int j = 0; j < 6; ++j) { + QModelIndex index = model.index(2 + i, 2 + j, table.rootIndex()); + QVERIFY(table.selectionModel()->isSelected(index)); + } + } + + { + QRect cellRect = table.visualRect(model.index(3, 3)); + QWidget *tableVp = table.viewport(); + QPoint cellPos = cellRect.center(); + QMouseEvent cellPressEvent(QEvent::MouseButtonPress, cellPos, Qt::LeftButton, Qt::NoButton, Qt::ControlModifier); + qApp->sendEvent(tableVp, &cellPressEvent); + + for (int i = 0; i < 6; ++i) { + cellPos.setX(cellPos.x() + cellRect.width()); + cellPos.setY(cellPos.y() + cellRect.height()); + QMouseEvent moveEvent(QEvent::MouseMove, cellPos, Qt::NoButton, Qt::LeftButton, Qt::ControlModifier); + qApp->sendEvent(tableVp, &moveEvent); + } + QMouseEvent cellReleaseEvent(QEvent::MouseButtonRelease, cellPos, Qt::LeftButton, Qt::NoButton, Qt::ControlModifier); + qApp->sendEvent(tableVp, &cellReleaseEvent); + + for (int i = 0; i < 6; ++i) + for (int j = 0; j < 6; ++j) { + QModelIndex index = model.index(3 + i, 3 + j, table.rootIndex()); + QVERIFY(!table.selectionModel()->isSelected(index)); + } + } +} + QTEST_MAIN(tst_QTableView) #include "tst_qtableview.moc" -- cgit v0.12 From 17607be158a8d5605ea2426ec4aa9925bd628a2a Mon Sep 17 00:00:00 2001 From: "Eduardo M. Fleury" Date: Fri, 11 Sep 2009 17:59:46 -0300 Subject: QGraphicsAnchorLayout: Fix anchor creation heuristics Fixing the case where creating an anchor between the layout Left edge and an item Right edge (or vice-versa) would have different behaviors depending on the argument order. Now both calls below have the same meaning: addAnchor(layout, Qt::AnchorLeft, widget, Qt::AnchorRight) addAnchor(widget, Qt::AnchorRight, layout, Qt::AnchorLeft) Signed-off-by: Eduardo M. Fleury Reviewed-by: Jesus Sanchez-Palencia --- src/gui/graphicsview/qgraphicsanchorlayout_p.cpp | 36 +++++++++++------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp index a37ec96..11e28ac 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp @@ -1360,25 +1360,23 @@ void QGraphicsAnchorLayoutPrivate::correctEdgeDirection(QGraphicsLayoutItem *&fi { Q_Q(QGraphicsAnchorLayout); - Qt::AnchorPoint effectiveFirst = firstEdge; - Qt::AnchorPoint effectiveSecond = secondEdge; - - if (firstItem == q) - effectiveFirst = QGraphicsAnchorLayoutPrivate::oppositeEdge(firstEdge); - if (secondItem == q) - effectiveSecond = QGraphicsAnchorLayoutPrivate::oppositeEdge(secondEdge); - - if (effectiveFirst < effectiveSecond) { - - // ### DEBUG - /* printf("Swapping Anchor from %s %d --to--> %s %d\n", - firstItem->isLayout() ? "" : - qPrintable(static_cast(firstItem)->data(0).toString()), - firstEdge, - secondItem->isLayout() ? "" : - qPrintable(static_cast(secondItem)->data(0).toString()), - secondEdge); - */ + if ((firstItem != q) && (secondItem != q)) { + // If connection is between widgets (not the layout itself) + // Ensure that "right-edges" sit to the left of "left-edges". + if (firstEdge < secondEdge) { + qSwap(firstItem, secondItem); + qSwap(firstEdge, secondEdge); + } + } else if (firstItem == q) { + // If connection involves the right or bottom of a layout, ensure + // the layout is the second item. + if ((firstEdge == Qt::AnchorRight) || (firstEdge == Qt::AnchorBottom)) { + qSwap(firstItem, secondItem); + qSwap(firstEdge, secondEdge); + } + } else if ((secondEdge != Qt::AnchorRight) && (secondEdge != Qt::AnchorBottom)) { + // If connection involves the left, center or top of layout, ensure + // the layout is the first item. qSwap(firstItem, secondItem); qSwap(firstEdge, secondEdge); } -- cgit v0.12 From 26d3ead5771a67a15a672441ce30359aa355b911 Mon Sep 17 00:00:00 2001 From: "Eduardo M. Fleury" Date: Fri, 11 Sep 2009 18:21:08 -0300 Subject: QGraphicsAnchorLayout: Handle negative spacing in "setAnchorSpacing" The simplex solver cannot handle negative-sized anchors. Those should be handled by the layout itself. This is done by inverting such anchors and making their size positive again. Ie. A --> B with size -10 becomes B --> A with size 10 Signed-off-by: Eduardo M. Fleury Reviewed-by: Jesus Sanchez-Palencia --- src/gui/graphicsview/qgraphicsanchorlayout_p.cpp | 27 ++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp index 11e28ac..50d1a61 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp @@ -1225,12 +1225,35 @@ void QGraphicsAnchorLayoutPrivate::setAnchorSize(AnchorData *data, const qreal * // search recursively through all composite anchors Q_ASSERT(data); restoreSimplifiedGraph(edgeOrientation(data->from->m_edge)); + + QGraphicsLayoutItem *firstItem = data->from->m_item; + QGraphicsLayoutItem *secondItem = data->to->m_item; + Qt::AnchorPoint firstEdge = data->from->m_edge; + Qt::AnchorPoint secondEdge = data->to->m_edge; + + // Use heuristics to find out what the user meant with this anchor. + correctEdgeDirection(firstItem, firstEdge, secondItem, secondEdge); + if (data->from->m_item != firstItem) + qSwap(data->from, data->to); + if (anchorSize) { - data->setFixedSize(*anchorSize); + // ### The current implementation makes "setAnchorSize" behavior + // dependent on the argument order for cases where we have + // no heuristic. Ie. two widgets, same anchor point. + + // We cannot have negative sizes inside the graph. This would cause + // the simplex solver to fail because all simplex variables are + // positive by definition. + // "negative spacing" is handled by inverting the standard item order. + if (*anchorSize >= 0) { + data->setFixedSize(*anchorSize); + } else { + data->setFixedSize(-*anchorSize); + qSwap(data->from, data->to); + } } else { data->unsetSize(); } - q->invalidate(); } -- cgit v0.12 From 312efdc70059562b1a782d5432ef06d08e002631 Mon Sep 17 00:00:00 2001 From: Jesus Sanchez-Palencia Date: Tue, 15 Sep 2009 16:28:56 -0300 Subject: QGraphicsAnchorLayout: Removing methods names inconsistencies on private class QGraphicsAnchorLayoutPrivate now has addAnchor() replacing anchor() and addAnchor_helper() replacing addAnchor(). With this changes we are respecting the API behavior, where anchor() is a "getter" instead of a "setter". Signed-off-by: Jesus Sanchez-Palencia Reviewed-by: Eduardo M. Fleury --- src/gui/graphicsview/qgraphicsanchorlayout.cpp | 6 +++--- src/gui/graphicsview/qgraphicsanchorlayout_p.cpp | 24 ++++++++++++------------ src/gui/graphicsview/qgraphicsanchorlayout_p.h | 8 ++++---- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp index 5897ae4..efad259 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp @@ -194,7 +194,7 @@ QGraphicsAnchorLayout::addAnchor(QGraphicsLayoutItem *firstItem, Qt::AnchorPoint QGraphicsLayoutItem *secondItem, Qt::AnchorPoint secondEdge) { Q_D(QGraphicsAnchorLayout); - QGraphicsAnchor *a = d->anchor(firstItem, firstEdge, secondItem, secondEdge); + QGraphicsAnchor *a = d->addAnchor(firstItem, firstEdge, secondItem, secondEdge); invalidate(); return a; } @@ -246,12 +246,12 @@ void QGraphicsAnchorLayout::addCornerAnchors(QGraphicsLayoutItem *firstItem, // Horizontal anchor Qt::AnchorPoint firstEdge = (firstCorner & 1 ? Qt::AnchorRight: Qt::AnchorLeft); Qt::AnchorPoint secondEdge = (secondCorner & 1 ? Qt::AnchorRight: Qt::AnchorLeft); - d->anchor(firstItem, firstEdge, secondItem, secondEdge); + d->addAnchor(firstItem, firstEdge, secondItem, secondEdge); // Vertical anchor firstEdge = (firstCorner & 2 ? Qt::AnchorBottom: Qt::AnchorTop); secondEdge = (secondCorner & 2 ? Qt::AnchorBottom: Qt::AnchorTop); - d->anchor(firstItem, firstEdge, secondItem, secondEdge); + d->addAnchor(firstItem, firstEdge, secondItem, secondEdge); invalidate(); } diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp index 50d1a61..6c93a28 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp @@ -790,7 +790,7 @@ void QGraphicsAnchorLayoutPrivate::createLayoutEdges() // Horizontal AnchorData *data = new AnchorData(0, 0, QWIDGETSIZE_MAX); - addAnchor(layout, Qt::AnchorLeft, layout, + addAnchor_helper(layout, Qt::AnchorLeft, layout, Qt::AnchorRight, data); data->skipInPreferred = 1; @@ -800,7 +800,7 @@ void QGraphicsAnchorLayoutPrivate::createLayoutEdges() // Vertical data = new AnchorData(0, 0, QWIDGETSIZE_MAX); - addAnchor(layout, Qt::AnchorTop, layout, + addAnchor_helper(layout, Qt::AnchorTop, layout, Qt::AnchorBottom, data); data->skipInPreferred = 1; @@ -832,7 +832,7 @@ void QGraphicsAnchorLayoutPrivate::createItemEdges(QGraphicsLayoutItem *item) int maximumSize = item->maximumWidth(); AnchorData *data = new AnchorData(minimumSize, preferredSize, maximumSize); - addAnchor(item, Qt::AnchorLeft, item, + addAnchor_helper(item, Qt::AnchorLeft, item, Qt::AnchorRight, data); // Vertical @@ -841,7 +841,7 @@ void QGraphicsAnchorLayoutPrivate::createItemEdges(QGraphicsLayoutItem *item) maximumSize = item->maximumHeight(); data = new AnchorData(minimumSize, preferredSize, maximumSize); - addAnchor(item, Qt::AnchorTop, item, + addAnchor_helper(item, Qt::AnchorTop, item, Qt::AnchorBottom, data); } @@ -904,11 +904,11 @@ void QGraphicsAnchorLayoutPrivate::createCenterAnchors( QSimplexConstraint *c = new QSimplexConstraint; AnchorData *data = new AnchorData(minimumSize, preferredSize, maximumSize); c->variables.insert(data, 1.0); - addAnchor(item, firstEdge, item, centerEdge, data); + addAnchor_helper(item, firstEdge, item, centerEdge, data); data = new AnchorData(minimumSize, preferredSize, maximumSize); c->variables.insert(data, -1.0); - addAnchor(item, centerEdge, item, lastEdge, data); + addAnchor_helper(item, centerEdge, item, lastEdge, data); itemCenterConstraints[orientation].append(c); @@ -976,7 +976,7 @@ void QGraphicsAnchorLayoutPrivate::removeCenterAnchors( int maximumSize = oldData->maxSize * 2; AnchorData *data = new AnchorData(minimumSize, preferredSize, maximumSize); - addAnchor(item, firstEdge, item, lastEdge, data); + addAnchor_helper(item, firstEdge, item, lastEdge, data); // Remove old anchors removeAnchor(item, firstEdge, item, centerEdge); @@ -1039,7 +1039,7 @@ void QGraphicsAnchorLayoutPrivate::removeCenterConstraints(QGraphicsLayoutItem * * Helper function that is called from the anchor functions in the public API. * If \a spacing is 0, it will pick up the spacing defined by the style. */ -QGraphicsAnchor *QGraphicsAnchorLayoutPrivate::anchor(QGraphicsLayoutItem *firstItem, +QGraphicsAnchor *QGraphicsAnchorLayoutPrivate::addAnchor(QGraphicsLayoutItem *firstItem, Qt::AnchorPoint firstEdge, QGraphicsLayoutItem *secondItem, Qt::AnchorPoint secondEdge, @@ -1112,18 +1112,18 @@ QGraphicsAnchor *QGraphicsAnchorLayoutPrivate::anchor(QGraphicsLayoutItem *first } else { data = new AnchorData(0); // spacing should be 0 } - addAnchor(firstItem, firstEdge, secondItem, secondEdge, data); + addAnchor_helper(firstItem, firstEdge, secondItem, secondEdge, data); } else if (*spacing >= 0) { data = new AnchorData(*spacing); - addAnchor(firstItem, firstEdge, secondItem, secondEdge, data); + addAnchor_helper(firstItem, firstEdge, secondItem, secondEdge, data); } else { data = new AnchorData(-*spacing); - addAnchor(secondItem, secondEdge, firstItem, firstEdge, data); + addAnchor_helper(secondItem, secondEdge, firstItem, firstEdge, data); } return acquireGraphicsAnchor(data); } -void QGraphicsAnchorLayoutPrivate::addAnchor(QGraphicsLayoutItem *firstItem, +void QGraphicsAnchorLayoutPrivate::addAnchor_helper(QGraphicsLayoutItem *firstItem, Qt::AnchorPoint firstEdge, QGraphicsLayoutItem *secondItem, Qt::AnchorPoint secondEdge, diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h index f701c3f..9316847 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h @@ -403,15 +403,15 @@ public: return data->graphicsAnchor; } - // helper function used by the 4 API functions - QGraphicsAnchor *anchor(QGraphicsLayoutItem *firstItem, + // function used by the 4 API functions + QGraphicsAnchor *addAnchor(QGraphicsLayoutItem *firstItem, Qt::AnchorPoint firstEdge, QGraphicsLayoutItem *secondItem, Qt::AnchorPoint secondEdge, qreal *spacing = 0); - // Anchor Manipulation methods - void addAnchor(QGraphicsLayoutItem *firstItem, + // Helper for Anchor Manipulation methods + void addAnchor_helper(QGraphicsLayoutItem *firstItem, Qt::AnchorPoint firstEdge, QGraphicsLayoutItem *secondItem, Qt::AnchorPoint secondEdge, -- cgit v0.12 From 6cadb9004c10ca3b7b69311c1f885d60ed2afe8b Mon Sep 17 00:00:00 2001 From: Jesus Sanchez-Palencia Date: Tue, 15 Sep 2009 16:59:20 -0300 Subject: QGraphicsAnchorLayoutPrivate: Removing method removeAnchor() All method calls were replaced by calling removeAnchor_helper(), with internalVertex() calls Signed-off-by: Jesus Sanchez-Palencia Reviewed-by: Eduardo M. Fleury --- src/gui/graphicsview/qgraphicsanchorlayout_p.cpp | 30 ++++++++++-------------- src/gui/graphicsview/qgraphicsanchorlayout_p.h | 4 ---- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp index 6c93a28..f1b9fe5 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp @@ -816,8 +816,10 @@ void QGraphicsAnchorLayoutPrivate::deleteLayoutEdges() Q_ASSERT(internalVertex(q, Qt::AnchorHorizontalCenter) == NULL); Q_ASSERT(internalVertex(q, Qt::AnchorVerticalCenter) == NULL); - removeAnchor(q, Qt::AnchorLeft, q, Qt::AnchorRight); - removeAnchor(q, Qt::AnchorTop, q, Qt::AnchorBottom); + removeAnchor_helper(internalVertex(q, Qt::AnchorLeft), + internalVertex(q, Qt::AnchorRight)); + removeAnchor_helper(internalVertex(q, Qt::AnchorTop), + internalVertex(q, Qt::AnchorBottom)); } void QGraphicsAnchorLayoutPrivate::createItemEdges(QGraphicsLayoutItem *item) @@ -913,7 +915,7 @@ void QGraphicsAnchorLayoutPrivate::createCenterAnchors( itemCenterConstraints[orientation].append(c); // Remove old one - removeAnchor(item, firstEdge, item, lastEdge); + removeAnchor_helper(first, last); } void QGraphicsAnchorLayoutPrivate::removeCenterAnchors( @@ -979,8 +981,8 @@ void QGraphicsAnchorLayoutPrivate::removeCenterAnchors( addAnchor_helper(item, firstEdge, item, lastEdge, data); // Remove old anchors - removeAnchor(item, firstEdge, item, centerEdge); - removeAnchor(item, centerEdge, item, lastEdge); + removeAnchor_helper(first, center); + removeAnchor_helper(center, internalVertex(item, lastEdge)); } else { // this is only called from removeAnchors() @@ -989,13 +991,13 @@ void QGraphicsAnchorLayoutPrivate::removeCenterAnchors( for (int i = 0; i < adjacents.count(); ++i) { AnchorVertex *v = adjacents.at(i); if (v->m_item != item) { - removeAnchor(item, centerEdge, v->m_item, v->m_edge); + removeAnchor_helper(center, internalVertex(v->m_item, v->m_edge)); } } // when all non-internal anchors is removed it will automatically merge the // center anchor into a left-right (or top-bottom) anchor. We must also delete that. // by this time, the center vertex is deleted and merged into a non-centered internal anchor - removeAnchor(item, firstEdge, item, lastEdge); + removeAnchor_helper(first, internalVertex(item, lastEdge)); } } @@ -1142,8 +1144,9 @@ void QGraphicsAnchorLayoutPrivate::addAnchor_helper(QGraphicsLayoutItem *firstIt // Remove previous anchor // ### Could we update the existing edgeData rather than creating a new one? - if (graph[edgeOrientation(firstEdge)].edgeData(v1, v2)) - removeAnchor(firstItem, firstEdge, secondItem, secondEdge); + if (graph[edgeOrientation(firstEdge)].edgeData(v1, v2)) { + removeAnchor_helper(v1, v2); + } // Create a bi-directional edge in the sense it can be transversed both // from v1 or v2. "data" however is shared between the two references @@ -1178,15 +1181,6 @@ QGraphicsAnchor *QGraphicsAnchorLayoutPrivate::getAnchor(QGraphicsLayoutItem *fi return graphicsAnchor; } -void QGraphicsAnchorLayoutPrivate::removeAnchor(QGraphicsLayoutItem *firstItem, - Qt::AnchorPoint firstEdge, - QGraphicsLayoutItem *secondItem, - Qt::AnchorPoint secondEdge) -{ - removeAnchor_helper(internalVertex(firstItem, firstEdge), - internalVertex(secondItem, secondEdge)); -} - void QGraphicsAnchorLayoutPrivate::removeAnchor_helper(AnchorVertex *v1, AnchorVertex *v2) { Q_ASSERT(v1 && v2); diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h index 9316847..89b49af 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h @@ -420,10 +420,6 @@ public: QGraphicsAnchor *getAnchor(QGraphicsLayoutItem *firstItem, Qt::AnchorPoint firstEdge, QGraphicsLayoutItem *secondItem, Qt::AnchorPoint secondEdge); - void removeAnchor(QGraphicsLayoutItem *firstItem, - Qt::AnchorPoint firstEdge, - QGraphicsLayoutItem *secondItem, - Qt::AnchorPoint secondEdge); void removeAnchor_helper(AnchorVertex *v1, AnchorVertex *v2); void deleteAnchorData(AnchorData *data); void setAnchorSize(AnchorData *data, const qreal *anchorSize); -- cgit v0.12 From ecb7f47897049014d2956396d5634e3d418bdcb9 Mon Sep 17 00:00:00 2001 From: Jesus Sanchez-Palencia Date: Tue, 15 Sep 2009 17:10:32 -0300 Subject: QGraphicsAnchorLayoutPrivate: Removing item from layout when there are no more anchors Now the removeAnchor() method has returned and it is ready for being use in the API for ensure that items are removed from the layout when they have no more external anchors. Signed-off-by: Jesus Sanchez-Palencia Reviewed-by: Eduardo M. Fleury --- src/gui/graphicsview/qgraphicsanchorlayout_p.cpp | 76 ++++++++++++++++++++++++ src/gui/graphicsview/qgraphicsanchorlayout_p.h | 1 + 2 files changed, 77 insertions(+) diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp index f1b9fe5..f2eddde 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp @@ -1181,6 +1181,82 @@ QGraphicsAnchor *QGraphicsAnchorLayoutPrivate::getAnchor(QGraphicsLayoutItem *fi return graphicsAnchor; } +/*! + * \internal + * + * Implements the high level "removeAnchor" feature. Called by + * the QAnchorData destructor. + */ +void QGraphicsAnchorLayoutPrivate::removeAnchor(AnchorVertex *firstVertex, + AnchorVertex *secondVertex) +{ + Q_Q(QGraphicsAnchorLayout); + + // Actually delete the anchor + removeAnchor_helper(firstVertex, secondVertex); + + QGraphicsLayoutItem *firstItem = firstVertex->m_item; + QGraphicsLayoutItem *secondItem = secondVertex->m_item; + + // Checking if the item stays in the layout or not + bool keepFirstItem = false; + bool keepSecondItem = false; + + QPair v; + int refcount = -1; + + if (firstItem != q) { + for (int i = Qt::AnchorLeft; i <= Qt::AnchorBottom; ++i) { + v = m_vertexList.value(qMakePair(firstItem, static_cast(i))); + if (v.first) { + if (i == Qt::AnchorHorizontalCenter || i == Qt::AnchorVerticalCenter) + refcount = 2; + else + refcount = 1; + + if (v.second > refcount) { + keepFirstItem = true; + break; + } + } + } + } else + keepFirstItem = true; + + if (secondItem != q) { + for (int i = Qt::AnchorLeft; i <= Qt::AnchorBottom; ++i) { + v = m_vertexList.value(qMakePair(secondItem, static_cast(i))); + if (v.first) { + if (i == Qt::AnchorHorizontalCenter || i == Qt::AnchorVerticalCenter) + refcount = 2; + else + refcount = 1; + + if (v.second > refcount) { + keepSecondItem = true; + break; + } + } + } + } else + keepSecondItem = true; + + if (!keepFirstItem) + q->removeAt(items.indexOf(firstItem)); + + if (!keepSecondItem) + q->removeAt(items.indexOf(secondItem)); + + // Removing anchors invalidates the layout + q->invalidate(); +} + +/* + \internal + + Implements the low level "removeAnchor" feature. Called by + private methods. +*/ void QGraphicsAnchorLayoutPrivate::removeAnchor_helper(AnchorVertex *v1, AnchorVertex *v2) { Q_ASSERT(v1 && v2); diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h index 89b49af..5a91baa 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h @@ -420,6 +420,7 @@ public: QGraphicsAnchor *getAnchor(QGraphicsLayoutItem *firstItem, Qt::AnchorPoint firstEdge, QGraphicsLayoutItem *secondItem, Qt::AnchorPoint secondEdge); + void removeAnchor(AnchorVertex *firstVertex, AnchorVertex *secondVertex); void removeAnchor_helper(AnchorVertex *v1, AnchorVertex *v2); void deleteAnchorData(AnchorData *data); void setAnchorSize(AnchorData *data, const qreal *anchorSize); -- cgit v0.12 From eafa92ec86c61d6da6700f832de263829cb84dd3 Mon Sep 17 00:00:00 2001 From: "Eduardo M. Fleury" Date: Tue, 15 Sep 2009 20:01:45 -0300 Subject: QGraphicsAnchorLayout: Remove QGALPrivate::deleteAnchorData() This method, formerly called by the QGraphicsAnchor destructor, to remove the anchor associated to it, is no longer needed. That destructor now calls QGALPrivate::removeAnchor(), a method analagous to addAnchor(), that provides the high level feature of "anchor removal". Signed-off-by: Eduardo M. Fleury Reviewed-by: Jesus Sanchez-Palencia --- src/gui/graphicsview/qgraphicsanchorlayout_p.cpp | 13 +------------ src/gui/graphicsview/qgraphicsanchorlayout_p.h | 1 - 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp index f2eddde..b02adf4 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp @@ -59,7 +59,7 @@ QGraphicsAnchorPrivate::QGraphicsAnchorPrivate(int version) QGraphicsAnchorPrivate::~QGraphicsAnchorPrivate() { - layoutPrivate->deleteAnchorData(data); + layoutPrivate->removeAnchor(data->from, data->to); } void QGraphicsAnchorPrivate::setSpacing(qreal value) @@ -1277,17 +1277,6 @@ void QGraphicsAnchorLayoutPrivate::removeAnchor_helper(AnchorVertex *v1, AnchorV \internal Only called from outside. (calls invalidate()) */ -void QGraphicsAnchorLayoutPrivate::deleteAnchorData(AnchorData *data) -{ - Q_Q(QGraphicsAnchorLayout); - removeAnchor_helper(data->from, data->to); - q->invalidate(); -} - -/*! - \internal - Only called from outside. (calls invalidate()) -*/ void QGraphicsAnchorLayoutPrivate::setAnchorSize(AnchorData *data, const qreal *anchorSize) { Q_Q(QGraphicsAnchorLayout); diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h index 5a91baa..4d746bf 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h @@ -422,7 +422,6 @@ public: void removeAnchor(AnchorVertex *firstVertex, AnchorVertex *secondVertex); void removeAnchor_helper(AnchorVertex *v1, AnchorVertex *v2); - void deleteAnchorData(AnchorData *data); void setAnchorSize(AnchorData *data, const qreal *anchorSize); void anchorSize(const AnchorData *data, qreal *minSize = 0, -- cgit v0.12 From 884a044f3d71616d317ea58a1ed364ee57220fe7 Mon Sep 17 00:00:00 2001 From: Jesus Sanchez-Palencia Date: Wed, 16 Sep 2009 14:37:50 -0300 Subject: QGraphicsAnchorLayout: Added new autotests file Several autotests written by the Orbit team were added as a new QGraphicsAnchorLayout autotests file. Signed-off-by: Jesus Sanchez-Palencia Reviewed-by: Eduardo M. Fleury --- tests/auto/auto.pro | 1 + .../qgraphicsanchorlayout1.pro | 3 + .../tst_qgraphicsanchorlayout1.cpp | 3063 ++++++++++++++++++++ 3 files changed, 3067 insertions(+) create mode 100644 tests/auto/qgraphicsanchorlayout1/qgraphicsanchorlayout1.pro create mode 100644 tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index 6a5ac9e..e2a67af 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -143,6 +143,7 @@ SUBDIRS += \ qgraphicsitem \ qgraphicsitemanimation \ qgraphicsanchorlayout \ + qgraphicsanchorlayout1 \ qgraphicslayout \ qgraphicslayoutitem \ qgraphicslinearlayout \ diff --git a/tests/auto/qgraphicsanchorlayout1/qgraphicsanchorlayout1.pro b/tests/auto/qgraphicsanchorlayout1/qgraphicsanchorlayout1.pro new file mode 100644 index 0000000..27f48e0 --- /dev/null +++ b/tests/auto/qgraphicsanchorlayout1/qgraphicsanchorlayout1.pro @@ -0,0 +1,3 @@ +load(qttest_p4) +SOURCES += tst_qgraphicsanchorlayout1.cpp + diff --git a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp new file mode 100644 index 0000000..44c74d0 --- /dev/null +++ b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp @@ -0,0 +1,3063 @@ +/**************************************************************************** + * ** + * ** Copyright (C) 2009 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$ + * ** + * ****************************************************************************/ + +#include +#include +#include +#include +#include + +#define TEST_COMPLEX_CASES + + +//---------------------- AnchorLayout helper class ---------------------------- +class TheAnchorLayout : public QGraphicsAnchorLayout +{ +public: + TheAnchorLayout() : QGraphicsAnchorLayout() + { + setContentsMargins( 0,0,0,0 ); + setSpacing( 0 ); + } + + // ###: Remove me when isValid() is supported + bool isValid() + { + return true; + } + + void setAnchor( + QGraphicsLayoutItem *startItem, + Qt::AnchorPoint startEdge, + QGraphicsLayoutItem *endItem, + Qt::AnchorPoint endEdge, + qreal value) + { + QGraphicsAnchor *anchor = addAnchor( startItem, startEdge, endItem, endEdge); + if (anchor) + anchor->setSpacing(value); + } + + int indexOf(const QGraphicsLayoutItem* item) const + { + for ( int i=0; i< count(); i++) { + if ( itemAt(i) == item ) { + return i; + } + } + return -1; + } + + void removeItem(QGraphicsLayoutItem* item) + { + removeAt(indexOf(item)); + } + + void removeAnchor( + QGraphicsLayoutItem *startItem, + Qt::AnchorPoint startEdge, + QGraphicsLayoutItem *endItem, + Qt::AnchorPoint endEdge) + { + delete QGraphicsAnchorLayout::anchor(startItem, startEdge, endItem, endEdge); + } +}; +//----------------------------------------------------------------------------- + + +struct BasicLayoutTestData +{ + inline BasicLayoutTestData( + int index1, Qt::AnchorPoint edge1, + int index2, Qt::AnchorPoint edge2, + qreal distance) + : firstIndex(index1), firstEdge(edge1), + secondIndex(index2), secondEdge(edge2), + spacing(distance) + { + } + + int firstIndex; + Qt::AnchorPoint firstEdge; + int secondIndex; + Qt::AnchorPoint secondEdge; + qreal spacing; +}; + +struct AnchorItemSizeHint +{ + inline AnchorItemSizeHint( + qreal hmin, qreal hpref, qreal hmax, + qreal vmin, qreal vpref, qreal vmax ) + : hmin(hmin), hpref(hpref), hmax(hmax), vmin(vmin), vpref(vpref), vmax(vmax) + { + } + qreal hmin, hpref, hmax; + qreal vmin, vpref, vmax; +}; + +// some test results + +struct BasicLayoutTestResult +{ + inline BasicLayoutTestResult( + int resultIndex, const QRectF& resultRect ) + : index(resultIndex), rect(resultRect) + { + } + + int index; + QRectF rect; +}; + +typedef QList BasicLayoutTestDataList; +Q_DECLARE_METATYPE(BasicLayoutTestDataList) + +typedef QList BasicLayoutTestResultList; +Q_DECLARE_METATYPE(BasicLayoutTestResultList) + +typedef QList AnchorItemSizeHintList; +Q_DECLARE_METATYPE(AnchorItemSizeHintList) + + +//---------------------- Test Widget used on all tests ------------------------ +class TestWidget : public QGraphicsWidget +{ +public: + inline TestWidget(QGraphicsItem *parent = 0) + : QGraphicsWidget(parent) + { + setContentsMargins( 0,0,0,0 ); + } + ~TestWidget() + { + } + +protected: + QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const; +}; + +QSizeF TestWidget::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const +{ + Q_UNUSED( constraint ); + if (which == Qt::MinimumSize) { + return QSizeF(5,5); + } + + if (which == Qt::PreferredSize) { + return QSizeF(50,50); + } + + return QSizeF(500,500); +} +//----------------------------------------------------------------------------- + + + +//----------------------------- Test class ------------------------------------ +class TestGraphicsAnchorLayout : public QObject +{ + Q_OBJECT + +private slots: + void testCount(); + + void testRemoveAt(); + void testRemoveItem(); + + void testItemAt(); + void testIndexOf(); + + void testAddAndRemoveAnchor(); + void testIsValid(); + void testSpecialCases(); + + void testBasicLayout_data(); + void testBasicLayout(); + + void testNegativeSpacing_data(); + void testNegativeSpacing(); + + void testMixedSpacing_data(); + void testMixedSpacing(); + + void testMulti_data(); + void testMulti(); + + void testCenterAnchors_data(); + void testCenterAnchors(); + + void testRemoveCenterAnchor_data(); + void testRemoveCenterAnchor(); + + void testSingleSizePolicy_data(); + void testSingleSizePolicy(); + + void testDoubleSizePolicy_data(); + void testDoubleSizePolicy(); + + void testSizeDistribution_data(); + void testSizeDistribution(); + + void testSizeHint(); + +#ifdef TEST_COMPLEX_CASES + void testComplexCases_data(); + void testComplexCases(); +#endif +}; + + +void TestGraphicsAnchorLayout::testCount() +{ + QGraphicsWidget *widget = new QGraphicsWidget; + + TheAnchorLayout *layout = new TheAnchorLayout(); + QVERIFY( layout->count() == 0 ); + + TestWidget *widget1 = new TestWidget(); + layout->setAnchor(layout, Qt::AnchorLeft, widget1, Qt::AnchorLeft, 1); + QCOMPARE( layout->count(), 1 ); + + // adding one more anchor for already added widget should not increase the count + layout->setAnchor(layout, Qt::AnchorRight, widget1, Qt::AnchorRight, 1); + QCOMPARE( layout->count(), 1 ); + + // create one more widget and attach with anchor layout + TestWidget *widget2 = new TestWidget(); + layout->setAnchor(layout, Qt::AnchorLeft, widget2, Qt::AnchorLeft, 1); + QCOMPARE( layout->count(), 2 ); + + widget->setLayout(layout); + delete widget; +} + +void TestGraphicsAnchorLayout::testRemoveAt() +{ + TheAnchorLayout *layout = new TheAnchorLayout(); + QVERIFY( layout->count() == 0 ); + + TestWidget *widget1 = new TestWidget(); + layout->setAnchor(layout, Qt::AnchorLeft, widget1, Qt::AnchorLeft, 2); + QVERIFY( layout->count() == 1 ); + + TestWidget *widget2 = new TestWidget(); + layout->setAnchor(widget2, Qt::AnchorLeft, layout, Qt::AnchorLeft, 0.1); + QVERIFY( layout->count() == 2 ); + + layout->removeAt(0); + QVERIFY( layout->count() == 1 ); + + layout->removeAt(-55); + layout->removeAt(55); + QVERIFY( layout->count() == 1 ); + + layout->removeAt(0); + QVERIFY( layout->count() == 0 ); + + delete layout; + delete widget1; + delete widget2; +} + +void TestGraphicsAnchorLayout::testRemoveItem() +{ + TheAnchorLayout *layout = new TheAnchorLayout(); + QCOMPARE( layout->count(), 0 ); + + TestWidget *widget1 = new TestWidget(); + layout->setAnchor(layout, Qt::AnchorLeft, widget1, Qt::AnchorLeft, 2); + QCOMPARE( layout->count(), 1 ); + + TestWidget *widget2 = new TestWidget(); + layout->setAnchor(layout, Qt::AnchorLeft, widget2, Qt::AnchorLeft, 0.1); + QCOMPARE( layout->count(), 2 ); + + layout->removeItem(0); + QCOMPARE( layout->count(), 2 ); + + layout->removeItem(widget1); + QCOMPARE( layout->count(), 1 ); + QCOMPARE( layout->indexOf(widget1), -1 ); + QCOMPARE( layout->indexOf(widget2), 0 ); + + layout->removeItem(widget1); + QCOMPARE( layout->count(), 1 ); + + layout->removeItem(widget2); + QVERIFY( layout->count() == 0 ); + + delete layout; + delete widget1; + delete widget2; +} + +void TestGraphicsAnchorLayout::testItemAt() +{ + QGraphicsWidget *widget = new QGraphicsWidget; + + TheAnchorLayout *layout = new TheAnchorLayout(); + + TestWidget *widget1 = new TestWidget(); + TestWidget *widget2 = new TestWidget(); + TestWidget *widget3 = new TestWidget(); + TestWidget *widget4 = new TestWidget(); + + layout->setAnchor(layout, Qt::AnchorLeft, widget1, Qt::AnchorLeft, 0.1); + layout->setAnchor(layout, Qt::AnchorLeft, widget2, Qt::AnchorLeft, 0.1); + layout->setAnchor(layout, Qt::AnchorLeft, widget3, Qt::AnchorLeft, 0.1); + layout->setAnchor(layout, Qt::AnchorLeft, widget4, Qt::AnchorLeft, 0.1); + + QVERIFY( layout->itemAt(0) == widget1 ); + + layout->removeAt(0); + + QVERIFY( layout->itemAt(0) == widget2 ); + + widget->setLayout(layout); + delete widget; +} + +void TestGraphicsAnchorLayout::testIndexOf() +{ + QGraphicsWidget *widget = new QGraphicsWidget; + + TheAnchorLayout *layout = new TheAnchorLayout(); + + TestWidget *widget1 = new TestWidget(); + TestWidget *widget2 = new TestWidget(); + TestWidget *widget3 = new TestWidget(); + TestWidget *widget4 = new TestWidget(); + + QCOMPARE( layout->indexOf(widget1), -1 ); + + layout->setAnchor(layout, Qt::AnchorLeft, widget1, Qt::AnchorLeft, 0.1); + layout->setAnchor(layout, Qt::AnchorLeft, widget2, Qt::AnchorLeft, 0.1); + layout->setAnchor(layout, Qt::AnchorLeft, widget3, Qt::AnchorLeft, 0.1); + + QCOMPARE( layout->indexOf(widget4), -1 ); + layout->setAnchor(layout, Qt::AnchorLeft, widget4, Qt::AnchorLeft, 0.1); + + QCOMPARE( layout->count(), 4 ); + for (int i = 0; i < layout->count(); ++i) { + QCOMPARE(layout->indexOf(layout->itemAt(i)), i); + } + + QCOMPARE( layout->indexOf(0), -1 ); + widget->setLayout(layout); + delete widget; +} + +void TestGraphicsAnchorLayout::testAddAndRemoveAnchor() +{ + QGraphicsWidget *widget = new QGraphicsWidget; + + TheAnchorLayout *layout = new TheAnchorLayout(); + + TestWidget *widget1 = new TestWidget(); + TestWidget *widget2 = new TestWidget(); + TestWidget *widget3 = new TestWidget(); + TestWidget *widget4 = new TestWidget(); + TestWidget *widget5 = new TestWidget(); + + layout->setAnchor(layout, Qt::AnchorLeft, widget1, Qt::AnchorLeft, 0.1); + layout->setAnchor(layout, Qt::AnchorLeft, widget2, Qt::AnchorLeft, 0.5); + layout->setAnchor(layout, Qt::AnchorLeft, widget3, Qt::AnchorLeft, 10); + layout->setAnchor(layout, Qt::AnchorLeft, widget4, Qt::AnchorLeft, 0.1); + QCOMPARE( layout->count(), 4 ); + + // test setting invalid anchors + layout->setAnchor(0, Qt::AnchorLeft, widget1, Qt::AnchorLeft, 1); + layout->setAnchor(layout, Qt::AnchorLeft, 0, Qt::AnchorLeft, 1); + QCOMPARE( layout->count(), 4 ); + + // test removing invalid anchors + layout->removeAnchor(widget4, Qt::AnchorRight, widget1, Qt::AnchorRight); + + // anchor one horizontal edge with vertical edge. it should not add this widget as a child + layout->setAnchor(layout, Qt::AnchorLeft, widget5, Qt::AnchorTop, 10); + QCOMPARE( layout->count(), 4 ); + + // ###: NOT SUPPORTED + // anchor two edges of a widget (to define width / height) + layout->setAnchor(widget5, Qt::AnchorLeft, widget5, Qt::AnchorRight, 10); + // QCOMPARE( layout->count(), 5 ); + QCOMPARE( layout->count(), 4 ); + + // anchor yet new widget properly + layout->setAnchor(layout, Qt::AnchorRight, widget5, Qt::AnchorRight, 20 ); + QCOMPARE( layout->count(), 5 ); + + // remove anchor for widget1. widget1 should be removed from layout since the + // last anchor was removed. + layout->removeAnchor(layout, Qt::AnchorLeft, widget1, Qt::AnchorLeft); + + QCOMPARE( layout->count(), 4 ); + QCOMPARE( (int)widget1->parentLayoutItem(), 0 ); + + // test that item is not removed from layout if other anchors remain set + layout->setAnchor(widget2, Qt::AnchorLeft, widget3, Qt::AnchorRight, 10); + layout->removeAnchor(layout, Qt::AnchorLeft, widget2, Qt::AnchorLeft); + QCOMPARE( layout->count(), 4 ); + + // remove all the anchors + layout->removeAnchor(widget2, Qt::AnchorLeft, widget3, Qt::AnchorRight); + layout->removeAnchor(layout, Qt::AnchorLeft, widget3, Qt::AnchorLeft); + layout->removeAnchor(layout, Qt::AnchorLeft, widget4, Qt::AnchorLeft); + layout->removeAnchor(widget5, Qt::AnchorLeft, widget5, Qt::AnchorRight); + layout->removeAnchor(layout, Qt::AnchorRight, widget5, Qt::AnchorRight); + + QCOMPARE( layout->count(), 0 ); + + // set one anchor "another way round" to get full coverage for "removeAnchor" + layout->setAnchor(widget1, Qt::AnchorLeft, layout, Qt::AnchorLeft, 0.1); + layout->removeAnchor(widget1, Qt::AnchorLeft, layout, Qt::AnchorLeft); + + QCOMPARE( layout->count(), 0 ); + + widget->setLayout(layout); + delete widget; +} + +void TestGraphicsAnchorLayout::testIsValid() +{ + // ###: REMOVE ME + return; + + // Empty, valid + { + QGraphicsWidget *widget = new QGraphicsWidget; + TheAnchorLayout *layout = new TheAnchorLayout(); + widget->setLayout(layout); + widget->setGeometry(QRectF(0,0,100,100)); + + QCOMPARE(layout->isValid(), true); + delete widget; + } + + // One widget, valid + { + QGraphicsWidget *widget = new QGraphicsWidget; + TheAnchorLayout *layout = new TheAnchorLayout(); + + TestWidget *widget1 = new TestWidget(); + + layout->setAnchor(layout, Qt::AnchorLeft, widget1, Qt::AnchorLeft, 0.1); + layout->setAnchor(layout, Qt::AnchorTop, widget1, Qt::AnchorTop, 0.1); + layout->setAnchor(widget1, Qt::AnchorRight, layout, Qt::AnchorRight, 0.1); + layout->setAnchor(widget1, Qt::AnchorBottom, layout, Qt::AnchorBottom, 0.1); + + widget->setLayout(layout); + + widget->setGeometry(QRectF(0,0,100,100)); + QCOMPARE(layout->isValid(), true); + delete widget; + } + + // Overconstrained one widget, invalid + // ### Our understanding is that this case is valid. What happens though, + // is that the layout minimum and maximum vertical size hints become + // the same, 10.1. That means its height is fixed. + // What will "fail" then is the "setGeometry(0, 0, 100, 100)" call, + // after which the layout geometry will be (0, 0, 100, 10.1). + + { + QGraphicsWidget *widget = new QGraphicsWidget; + TheAnchorLayout *layout = new TheAnchorLayout(); + + TestWidget *widget1 = new TestWidget(); + + layout->setAnchor(layout, Qt::AnchorLeft, widget1, Qt::AnchorLeft, 0.1); + layout->setAnchor(layout, Qt::AnchorTop, widget1, Qt::AnchorTop, 0.1); + layout->setAnchor(widget1, Qt::AnchorRight, layout, Qt::AnchorRight, 0.1); + layout->setAnchor(widget1, Qt::AnchorBottom, layout, Qt::AnchorBottom, 0.1); + + layout->setAnchor(widget1, Qt::AnchorTop, layout, Qt::AnchorBottom, 10); + + widget->setLayout(layout); + + widget->setGeometry(QRectF(0,0,100,100)); + // ###: this shall change once isValid() is ready + // QCOMPARE(layout->isValid(), false); + QCOMPARE(layout->isValid(), true); + delete widget; + } + + // Underconstrained two widgets, valid + { + QGraphicsWidget *widget = new QGraphicsWidget; + TheAnchorLayout *layout = new TheAnchorLayout(); + + TestWidget *widget1 = new TestWidget(); + TestWidget *widget2 = new TestWidget(); + + layout->setAnchor(layout, Qt::AnchorLeft, widget1, Qt::AnchorLeft, 0.1); + layout->setAnchor(layout, Qt::AnchorRight, widget1, Qt::AnchorRight, -0.1); + + layout->setAnchor(layout, Qt::AnchorTop, widget2, Qt::AnchorTop, 0.1); + layout->setAnchor(layout, Qt::AnchorBottom, widget2, Qt::AnchorBottom, -0.1); + + widget->setLayout(layout); + + widget->setGeometry(QRectF(0,0,100,100)); + QCOMPARE(layout->isValid(), true); + delete widget; + } +} + +void TestGraphicsAnchorLayout::testSpecialCases() +{ + // One widget, setLayout before defining layouts + { + QGraphicsWidget *widget = new QGraphicsWidget; + TheAnchorLayout *layout = new TheAnchorLayout(); + widget->setLayout(layout); + + TestWidget *widget1 = new TestWidget(); + + layout->setAnchor(layout, Qt::AnchorLeft, widget1, Qt::AnchorLeft, 1); + layout->setAnchor(layout, Qt::AnchorTop, widget1, Qt::AnchorTop, 1); + layout->setAnchor(widget1, Qt::AnchorRight, layout, Qt::AnchorRight, 1); + layout->setAnchor(widget1, Qt::AnchorBottom, layout, Qt::AnchorBottom, 1); + widget->setGeometry(QRectF(0,0,100,100)); + QCOMPARE(widget1->geometry(), QRectF(1,1,98,98)); + delete widget1; + delete widget; + } + + // One widget, layout inside layout, layout inside layout inside layout + { + QGraphicsWidget *widget = new QGraphicsWidget; + TheAnchorLayout *layout = new TheAnchorLayout(); + widget->setLayout(layout); + + TheAnchorLayout *layout1 = new TheAnchorLayout(); + TestWidget *widget1 = new TestWidget(); + layout1->setAnchor(layout1, Qt::AnchorLeft, widget1, Qt::AnchorLeft, 1); + layout1->setAnchor(layout1, Qt::AnchorTop, widget1, Qt::AnchorTop, 1); + layout1->setAnchor(widget1, Qt::AnchorRight, layout1, Qt::AnchorRight, 1); + layout1->setAnchor(widget1, Qt::AnchorBottom, layout1, Qt::AnchorBottom, 1); + + TheAnchorLayout *layout2 = new TheAnchorLayout(); + TestWidget *widget2 = new TestWidget(); + layout2->setAnchor(layout2, Qt::AnchorLeft, widget2, Qt::AnchorLeft, 1); + layout2->setAnchor(layout2, Qt::AnchorTop, widget2, Qt::AnchorTop, 1); + layout2->setAnchor(widget2, Qt::AnchorRight, layout2, Qt::AnchorRight, 1); + layout2->setAnchor(widget2, Qt::AnchorBottom, layout2, Qt::AnchorBottom, 1); + + layout1->setAnchor(layout1, Qt::AnchorLeft, layout2, Qt::AnchorLeft, 1); + layout1->setAnchor(layout1, Qt::AnchorTop, layout2, Qt::AnchorTop, 1); + layout1->setAnchor(layout2, Qt::AnchorRight, layout1, Qt::AnchorRight, 1); + layout1->setAnchor(layout2, Qt::AnchorBottom, layout1, Qt::AnchorBottom, 1); + + layout->setAnchor(layout, Qt::AnchorLeft, layout1, Qt::AnchorLeft, 1); + layout->setAnchor(layout, Qt::AnchorTop, layout1, Qt::AnchorTop, 1); + layout->setAnchor(layout1, Qt::AnchorRight, layout, Qt::AnchorRight, 1); + layout->setAnchor(layout1, Qt::AnchorBottom, layout, Qt::AnchorBottom, 1); + + // remove and add again to improve test coverage. + layout->removeItem(layout1); + + layout->setAnchor(layout, Qt::AnchorLeft, layout1, Qt::AnchorLeft, 1); + layout->setAnchor(layout, Qt::AnchorTop, layout1, Qt::AnchorTop, 1); + layout->setAnchor(layout1, Qt::AnchorRight, layout, Qt::AnchorRight, 1); + layout->setAnchor(layout1, Qt::AnchorBottom, layout, Qt::AnchorBottom, 1); + + widget->setGeometry(QRectF(0,0,100,100)); + QCOMPARE(widget1->geometry(), QRectF(2,2,96,96)); + QCOMPARE(widget2->geometry(), QRectF(3,3,94,94)); + delete widget; + } + + // One widget, layout inside layout, setLayout after layout definition + { + QGraphicsWidget *widget = new QGraphicsWidget; + TheAnchorLayout *layout = new TheAnchorLayout(); + + TheAnchorLayout *layout1 = new TheAnchorLayout(); + + TestWidget *widget1 = new TestWidget(); + layout1->setAnchor(layout1, Qt::AnchorLeft, widget1, Qt::AnchorLeft, 1); + layout1->setAnchor(layout1, Qt::AnchorTop, widget1, Qt::AnchorTop, 1); + layout1->setAnchor(widget1, Qt::AnchorRight, layout1, Qt::AnchorRight, 1); + layout1->setAnchor(widget1, Qt::AnchorBottom, layout1, Qt::AnchorBottom, 1); + + layout->setAnchor(layout, Qt::AnchorLeft, layout1, Qt::AnchorLeft, 1); + layout->setAnchor(layout, Qt::AnchorTop, layout1, Qt::AnchorTop, 1); + layout->setAnchor(layout1, Qt::AnchorRight, layout, Qt::AnchorRight, 1); + layout->setAnchor(layout1, Qt::AnchorBottom, layout, Qt::AnchorBottom, 1); + + widget->setLayout(layout); + widget->setGeometry(QRectF(0,0,100,100)); + QCOMPARE(widget1->geometry(), QRectF(2,2,96,96)); + delete widget; + } + + // One widget, layout inside layout, setLayout after layout definition, widget transferred from + // one layout to another + { + QGraphicsWidget *widget = new QGraphicsWidget; + TheAnchorLayout *layout = new TheAnchorLayout(); + widget->setLayout(layout); + + TheAnchorLayout *layout1 = new TheAnchorLayout(); + TestWidget *widget1 = new TestWidget(); + + // Additional layout + widget to improve coverage. + TheAnchorLayout *layout0 = new TheAnchorLayout(); + TestWidget *widget0 = new TestWidget(); + + // widget0 to layout0 + layout0->setAnchor(layout0, Qt::AnchorLeft, widget0, Qt::AnchorLeft, 1); + layout0->setAnchor(layout0, Qt::AnchorTop, widget0, Qt::AnchorTop, 1); + layout0->setAnchor(widget0, Qt::AnchorRight, layout0, Qt::AnchorRight, 1); + layout0->setAnchor(widget0, Qt::AnchorBottom, layout0, Qt::AnchorBottom, 1); + + // layout0 to layout + layout->setAnchor(layout, Qt::AnchorLeft, layout0, Qt::AnchorLeft, 1); + layout->setAnchor(layout, Qt::AnchorTop, layout0, Qt::AnchorTop, 1); + layout->setAnchor(layout0, Qt::AnchorRight, layout, Qt::AnchorRight, 50); + layout->setAnchor(layout0, Qt::AnchorBottom, layout, Qt::AnchorBottom, 1); + + // widget1 to layout1 + layout1->setAnchor(layout1, Qt::AnchorLeft, widget1, Qt::AnchorLeft, 1); + layout1->setAnchor(layout1, Qt::AnchorTop, widget1, Qt::AnchorTop, 1); + layout1->setAnchor(widget1, Qt::AnchorRight, layout1, Qt::AnchorRight, 1); + layout1->setAnchor(widget1, Qt::AnchorBottom, layout1, Qt::AnchorBottom, 1); + + // layout1 to layout + layout->setAnchor(layout, Qt::AnchorLeft, layout1, Qt::AnchorLeft, 1); + layout->setAnchor(layout, Qt::AnchorTop, layout1, Qt::AnchorTop, 1); + layout->setAnchor(layout1, Qt::AnchorRight, layout, Qt::AnchorRight, 50); + layout->setAnchor(layout1, Qt::AnchorBottom, layout, Qt::AnchorBottom, 1); + + TheAnchorLayout *layout2 = new TheAnchorLayout(); + + // layout2 to layout + layout->setAnchor(layout, Qt::AnchorLeft, layout2, Qt::AnchorLeft, 50); + layout->setAnchor(layout, Qt::AnchorTop, layout2, Qt::AnchorTop, 1); + layout->setAnchor(layout2, Qt::AnchorRight, layout, Qt::AnchorRight, 1); + layout->setAnchor(layout2, Qt::AnchorBottom, layout, Qt::AnchorBottom, 1); + + // transfer widget1 to layout2 + layout2->setAnchor(layout2, Qt::AnchorLeft, widget1, Qt::AnchorLeft, 1); + layout2->setAnchor(layout2, Qt::AnchorTop, widget1, Qt::AnchorTop, 1); + layout2->setAnchor(widget1, Qt::AnchorRight, layout2, Qt::AnchorRight, 1); + layout2->setAnchor(widget1, Qt::AnchorBottom, layout2, Qt::AnchorBottom, 1); + + // ###: uncomment when simplification bug is solved + //widget->setGeometry(QRectF(0,0,100,100)); + //QCOMPARE(widget1->geometry(), QRectF(51,2,47,96)); + delete widget; + } + + // One widget, set first to one layout then to another. Child reparented. + // In addition widget as a direct child of another widget. Child reparented. + { + QGraphicsWidget *widget1 = new QGraphicsWidget; + TheAnchorLayout *layout1 = new TheAnchorLayout(); + widget1->setLayout(layout1); + + TestWidget *childWidget = new TestWidget(); + + // childWidget to layout1 + layout1->setAnchor(layout1, Qt::AnchorLeft, childWidget, Qt::AnchorLeft, 1); + layout1->setAnchor(layout1, Qt::AnchorTop, childWidget, Qt::AnchorTop, 1); + layout1->setAnchor(childWidget, Qt::AnchorRight, layout1, Qt::AnchorRight, 1); + layout1->setAnchor(childWidget, Qt::AnchorBottom, layout1, Qt::AnchorBottom, 1); + + widget1->setGeometry(QRectF(0,0,100,100)); + QCOMPARE(childWidget->geometry(), QRectF(1,1,98,98)); + QVERIFY(childWidget->parentLayoutItem() == layout1); + QGraphicsWidget *widget2 = new QGraphicsWidget; + TheAnchorLayout *layout2 = new TheAnchorLayout(); + widget2->setLayout(layout2); + + // childWidget to layout2 + layout2->setAnchor(layout2, Qt::AnchorLeft, childWidget, Qt::AnchorLeft, 1); + layout2->setAnchor(layout2, Qt::AnchorTop, childWidget, Qt::AnchorTop, 1); + layout2->setAnchor(childWidget, Qt::AnchorRight, layout2, Qt::AnchorRight, 1); + layout2->setAnchor(childWidget, Qt::AnchorBottom, layout2, Qt::AnchorBottom, 1); + + QGraphicsWidget *widget3 = new QGraphicsWidget; + QGraphicsWidget *widget4 = new QGraphicsWidget; + // widget4 is a direct child of widget3 (i.e. not in any layout) + widget4->setParentItem(widget3); + + // widget4 to layout2 + layout2->setAnchor(layout2, Qt::AnchorLeft, widget4, Qt::AnchorLeft, 1); + layout2->setAnchor(layout2, Qt::AnchorTop, widget4, Qt::AnchorTop, 1); + layout2->setAnchor(widget4, Qt::AnchorRight, layout2, Qt::AnchorRight, 1); + layout2->setAnchor(widget4, Qt::AnchorBottom, layout2, Qt::AnchorBottom, 1); + + widget2->setGeometry(QRectF(0,0,100,100)); + QCOMPARE(childWidget->geometry(), QRectF(1,1,98,98)); + QVERIFY(childWidget->parentLayoutItem() == layout2); + QCOMPARE(widget4->geometry(), QRectF(1,1,98,98)); + QVERIFY(widget4->parentLayoutItem() == layout2); + QVERIFY(widget4->parentItem() == widget2); + + delete widget4; + delete widget3; + delete widget1; + delete childWidget; + delete widget2; + } +} + +void TestGraphicsAnchorLayout::testBasicLayout_data() +{ + QTest::addColumn("size"); + QTest::addColumn("data"); + QTest::addColumn("result"); + + typedef BasicLayoutTestData BasicData; + typedef BasicLayoutTestResult BasicResult; + + // One widget, basic + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorTop, 10) + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 20) + << BasicData(0, Qt::AnchorRight, -1, Qt::AnchorRight, 30) + << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorBottom, 40) + ; + + theResult + << BasicResult(0, QRectF(20, 10, 150, 50) ) + ; + + QTest::newRow("One, simple") << QSizeF(200, 100) << theData << theResult; + } + + // One widget, duplicates + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorTop, 10) + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 20) + << BasicData(0, Qt::AnchorRight, -1, Qt::AnchorRight, 30) + << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorBottom, 40) + + << BasicData(0, Qt::AnchorTop, -1, Qt::AnchorTop, 0) + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 0) + << BasicData(-1, Qt::AnchorRight, 0, Qt::AnchorRight, 0) + << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorBottom, 0) + ; + + theResult + << BasicResult(0, QRectF(0, 0, 200, 100) ) + ; + + QTest::newRow("One, duplicates") << QSizeF(200, 100) << theData << theResult; + } + + // One widget, mixed + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorBottom, 80) + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorRight, 150) + << BasicData(0, Qt::AnchorLeft, -1, Qt::AnchorRight, 150) + << BasicData(0, Qt::AnchorTop, -1, Qt::AnchorBottom, 80) + ; + + theResult + << BasicResult(0, QRectF(50, 20, 100, 60) ) + ; + + QTest::newRow("One, mixed") << QSizeF(200, 100) << theData << theResult; + } + + // Basic case - two widgets (same layout), different ordering + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorTop, 10) + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 10) + << BasicData(0, Qt::AnchorRight, -1, Qt::AnchorRight, 10) + << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorBottom, 10) + + << BasicData(1, Qt::AnchorBottom, -1, Qt::AnchorBottom, 10) + << BasicData(-1, Qt::AnchorLeft, 1, Qt::AnchorLeft, 10) + << BasicData(-1, Qt::AnchorTop, 1, Qt::AnchorTop, 10) + << BasicData(1, Qt::AnchorRight, -1, Qt::AnchorRight, 10) + ; + + theResult + << BasicResult(0, QRectF(10, 10, 180, 80) ) + << BasicResult(1, QRectF(10, 10, 180, 80) ) + ; + + QTest::newRow("Two, orderings") << QSizeF(200, 100) << theData << theResult; + } + + // Basic case - two widgets, duplicate anchors + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorTop, 10) + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 10) + << BasicData(0, Qt::AnchorRight, -1, Qt::AnchorRight, 10) + << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorBottom, 10) + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 30) + << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorBottom, 20) + + << BasicData(1, Qt::AnchorBottom, -1, Qt::AnchorBottom, 10) + << BasicData(-1, Qt::AnchorLeft, 1, Qt::AnchorLeft, 10) + << BasicData(-1, Qt::AnchorTop, 1, Qt::AnchorTop, 10) + << BasicData(1, Qt::AnchorRight, -1, Qt::AnchorRight, 10) + << BasicData(1, Qt::AnchorTop, -1, Qt::AnchorTop, 0) + << BasicData(-1, Qt::AnchorRight, 1, Qt::AnchorRight, 0) + ; + + theResult + << BasicResult(0, QRectF(30, 10, 160, 70) ) + << BasicResult(1, QRectF(10, 0, 190, 90) ) + ; + + QTest::newRow("Two, duplicates") << QSizeF(200, 100) << theData << theResult; + } + + // Basic case - two widgets, mixed + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorBottom, 90) + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorRight, 190) + << BasicData(0, Qt::AnchorLeft, -1, Qt::AnchorRight, 190) + << BasicData(0, Qt::AnchorTop, -1, Qt::AnchorBottom, 90) + + << BasicData(1, Qt::AnchorTop, -1, Qt::AnchorBottom, 20) + << BasicData(1, Qt::AnchorBottom, -1, Qt::AnchorBottom, 10) + << BasicData(-1, Qt::AnchorLeft, 1, Qt::AnchorLeft, 10) + << BasicData(-1, Qt::AnchorLeft, 1, Qt::AnchorRight, 20) + ; + + // ### SIMPLIFICATION BUG FOR ITEM 1 + // ### remove this when bug is solved + + theResult + << BasicResult(0, QRectF(10, 10, 180, 80) ) + << BasicResult(1, QRectF(10, 80, 10, 10) ) + ; + + QTest::newRow("Two, mixed") << QSizeF(200, 100) << theData << theResult; + } + + // Basic case - two widgets, 1 horizontal connection, first completely defined + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorTop, 10) + << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorBottom, 10) + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 10) + << BasicData(0, Qt::AnchorRight, -1, Qt::AnchorRight, 180) + + << BasicData(0, Qt::AnchorRight, 1, Qt::AnchorLeft, 10) + << BasicData(1, Qt::AnchorRight, -1, Qt::AnchorRight, 10) + << BasicData(-1, Qt::AnchorTop, 1, Qt::AnchorTop, 10) + << BasicData(1, Qt::AnchorBottom, -1, Qt::AnchorBottom, 20) + ; + + theResult + << BasicResult(0, QRectF(10, 10, 10, 80) ) + << BasicResult(1, QRectF(30, 10, 160, 70) ) + ; + + QTest::newRow("Two, 1h connected") << QSizeF(200, 100) << theData << theResult; + } + + // Basic case - two widgets, 2 horizontal connections, first completely defined + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorTop, 10) + << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorBottom, 10) + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 10) + << BasicData(0, Qt::AnchorRight, -1, Qt::AnchorRight, 180) + + // ### QGAL is not sensible to the argument order in this case + // To achieve the desired result we must explicitly set a negative + // spacing. + // << BasicData(0, Qt::AnchorLeft, 1, Qt::AnchorRight, 100) + << BasicData(0, Qt::AnchorLeft, 1, Qt::AnchorRight, -100) + + << BasicData(0, Qt::AnchorRight, 1, Qt::AnchorLeft, 30) + << BasicData(-1, Qt::AnchorTop, 1, Qt::AnchorTop, 10) + << BasicData(1, Qt::AnchorBottom, -1, Qt::AnchorBottom, 20) + ; + + theResult + << BasicResult(0, QRectF(10, 10, 10, 80) ) + << BasicResult(1, QRectF(50, 10, 60, 70) ) + ; + + QTest::newRow("Two, 2h connected") << QSizeF(200, 100) << theData << theResult; + } + + // Basic case - two widgets, 1 vertical connection, first completely defined + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorTop, 10) + << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorBottom, 10) + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 10) + << BasicData(0, Qt::AnchorRight, -1, Qt::AnchorRight, 180) + + << BasicData(-1, Qt::AnchorLeft, 1, Qt::AnchorLeft, 30) + << BasicData(1, Qt::AnchorRight, -1, Qt::AnchorRight, 10) + << BasicData(0, Qt::AnchorTop, 1, Qt::AnchorTop, 10) + << BasicData(1, Qt::AnchorBottom, -1, Qt::AnchorBottom, 20) + ; + + theResult + << BasicResult(0, QRectF(10, 10, 10, 80) ) + << BasicResult(1, QRectF(30, 20, 160, 60) ) + ; + + QTest::newRow("Two, 1v connected") << QSizeF(200, 100) << theData << theResult; + } + + // Basic case - two widgets, 2 vertical connections, first completely defined + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorTop, 10) + << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorBottom, 10) + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 10) + << BasicData(0, Qt::AnchorRight, -1, Qt::AnchorRight, 180) + + << BasicData(-1, Qt::AnchorLeft, 1, Qt::AnchorLeft, 30) + << BasicData(1, Qt::AnchorRight, -1, Qt::AnchorRight, 10) + << BasicData(0, Qt::AnchorTop, 1, Qt::AnchorTop, 10) + << BasicData(1, Qt::AnchorBottom, 0, Qt::AnchorBottom, 20) + ; + + theResult + << BasicResult(0, QRectF(10, 10, 10, 80) ) + << BasicResult(1, QRectF(30, 20, 160, 50) ) + ; + + QTest::newRow("Two, 2v connected") << QSizeF(200, 100) << theData << theResult; + } + + // Basic case - two widgets, 1 horizontal and 1 vertical connection, first completely defined + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorTop, 10) + << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorBottom, 10) + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 10) + << BasicData(0, Qt::AnchorRight, -1, Qt::AnchorRight, 180) + + << BasicData(-1, Qt::AnchorLeft, 1, Qt::AnchorLeft, 80) + << BasicData(0, Qt::AnchorRight, 1, Qt::AnchorRight, 100) + << BasicData(-1, Qt::AnchorTop, 1, Qt::AnchorTop, 10) + << BasicData(1, Qt::AnchorBottom, 0, Qt::AnchorBottom, 10) + ; + + theResult + << BasicResult(0, QRectF(10, 10, 10, 80) ) + << BasicResult(1, QRectF(80, 10, 40, 70) ) + ; + + QTest::newRow("Two, 1h+1v connected") << QSizeF(200, 100) << theData << theResult; + } + + // Basic case - two widgets, 2 horizontal and 2 vertical connections, first completely defined + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorTop, 10) + << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorBottom, 10) + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 10) + << BasicData(0, Qt::AnchorRight, -1, Qt::AnchorRight, 180) + + << BasicData(0, Qt::AnchorLeft, 1, Qt::AnchorLeft, 80) + << BasicData(0, Qt::AnchorRight, 1, Qt::AnchorRight, 100) + << BasicData(0, Qt::AnchorTop, 1, Qt::AnchorTop, 10) + << BasicData(1, Qt::AnchorBottom, 0, Qt::AnchorBottom, 10) + ; + + theResult + << BasicResult(0, QRectF(10, 10, 10, 80) ) + << BasicResult(1, QRectF(90, 20, 30, 60) ) + ; + + QTest::newRow("Two, 2h+2v connected") << QSizeF(200, 100) << theData << theResult; + } + + // Basic case - two widgets, 2 horizontal and 2 vertical connections, dependent on each other. + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 10) + << BasicData(0, Qt::AnchorRight, 1, Qt::AnchorRight, 150) + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorTop, 10) + << BasicData(0, Qt::AnchorBottom, 1, Qt::AnchorBottom, 10) + + << BasicData(0, Qt::AnchorLeft, 1, Qt::AnchorLeft, 90) + << BasicData(1, Qt::AnchorRight, -1, Qt::AnchorRight, 10) + << BasicData(0, Qt::AnchorTop, 1, Qt::AnchorTop, 10) + << BasicData(1, Qt::AnchorBottom, -1, Qt::AnchorBottom, 20) + ; + + theResult + << BasicResult(0, QRectF(10, 10, 30, 60) ) + << BasicResult(1, QRectF(100, 20, 90, 60) ) + ; + + QTest::newRow("Two, 2h+2v connected2") << QSizeF(200, 100) << theData << theResult; + } + + // Basic case - two widgets, connected, overlapping + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 10) + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorTop, 10) + // << BasicData(1, Qt::AnchorLeft, 0, Qt::AnchorRight, 30) + // ### QGAL has different semantics and assumes right edges are always + // to the left of left edges. Thus we need the minus sign here. + << BasicData(1, Qt::AnchorLeft, 0, Qt::AnchorRight, -30) + << BasicData(0, Qt::AnchorBottom, 1, Qt::AnchorBottom, 40) + + << BasicData(-1, Qt::AnchorLeft, 1, Qt::AnchorLeft, 40) + << BasicData(-1, Qt::AnchorTop, 1, Qt::AnchorTop, 20) + << BasicData(1, Qt::AnchorRight, -1, Qt::AnchorRight, 10) + << BasicData(1, Qt::AnchorBottom, -1, Qt::AnchorBottom, 10) + ; + + theResult + << BasicResult(0, QRectF(10, 10, 60, 40) ) + << BasicResult(1, QRectF(40, 20, 150, 70) ) + ; + + QTest::newRow("Two, connected overlapping") << QSizeF(200, 100) << theData << theResult; + } +} + +void TestGraphicsAnchorLayout::testNegativeSpacing_data() +{ + QTest::addColumn("size"); + QTest::addColumn("data"); + QTest::addColumn("result"); + + typedef BasicLayoutTestData BasicData; + typedef BasicLayoutTestResult BasicResult; + + // One widget, negative spacing + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + /// ### QGAL assumes items are always inside the layout. + // In this case, the negative spacing would make the item + // grow beyond the layout edges, which is OK, but gives a + // different result. + // Changing the direction of anchors (-1 to 0 or vice-versa) + // has no effect in this case. + + theData + // << BasicData(0, Qt::AnchorTop, -1, Qt::AnchorTop, -10) + // << BasicData(0, Qt::AnchorLeft, -1, Qt::AnchorLeft, -20) + // << BasicData(-1, Qt::AnchorRight, 0, Qt::AnchorRight, -30) + // << BasicData(-1, Qt::AnchorBottom, 0, Qt::AnchorBottom, -40) + + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorTop, -10) + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, -20) + << BasicData(0, Qt::AnchorRight, -1, Qt::AnchorRight, -30) + << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorBottom, -40) + + ; + + theResult + // << BasicResult(0, QRectF(20, 10, 150, 50) ) + << BasicResult(0, QRectF(-20, -10, 250, 150) ) + ; + + QTest::newRow("One, simple (n)") << QSizeF(200, 100) << theData << theResult; + } + + // One widget, duplicates, negative spacing + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(0, Qt::AnchorTop, -1, Qt::AnchorTop, -20) + << BasicData(0, Qt::AnchorLeft, -1, Qt::AnchorLeft, -20) + << BasicData(-1, Qt::AnchorRight, 0, Qt::AnchorRight, -30) + << BasicData(-1, Qt::AnchorBottom, 0, Qt::AnchorBottom, -40) + + << BasicData(0, Qt::AnchorTop, -1, Qt::AnchorTop, -10) + << BasicData(0, Qt::AnchorLeft, -1, Qt::AnchorLeft, -10) + << BasicData(-1, Qt::AnchorRight, 0, Qt::AnchorRight, -10) + << BasicData(-1, Qt::AnchorBottom, 0, Qt::AnchorBottom, -10) + ; + + theResult + // ### Same as above... + // << BasicResult(0, QRectF(10, 10, 180, 80) ) + << BasicResult(0, QRectF(-10, -10, 220, 120) ) + ; + + QTest::newRow("One, duplicates (n)") << QSizeF(200, 100) << theData << theResult; + } + + // One widget, mixed, negative spacing + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + // ### All anchors of negative spacing between the layout and an + // item are handled as to make sure the item is _outside_ the + // layout. + // To keep it inside, one _must_ use positive spacings. + // << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorTop, -80) + // << BasicData(0, Qt::AnchorRight, -1, Qt::AnchorLeft, -150) + // << BasicData(-1, Qt::AnchorRight, 0, Qt::AnchorLeft, -150) + // << BasicData(-1, Qt::AnchorBottom, 0, Qt::AnchorTop, -80) + + << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorTop, 80) + << BasicData(0, Qt::AnchorRight, -1, Qt::AnchorLeft, 150) + << BasicData(-1, Qt::AnchorRight, 0, Qt::AnchorLeft, 150) + << BasicData(-1, Qt::AnchorBottom, 0, Qt::AnchorTop, 80) + ; + + theResult + << BasicResult(0, QRectF(50, 20, 100, 60) ) + ; + + QTest::newRow("One, mixed (n)") << QSizeF(200, 100) << theData << theResult; + } + + // Basic case - two widgets, 1 horizontal connection, first completely defined, negative spacing + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + // << BasicData(0, Qt::AnchorTop, -1, Qt::AnchorTop, -10) + // << BasicData(-1, Qt::AnchorBottom, 0, Qt::AnchorBottom, -10) + // << BasicData(0, Qt::AnchorLeft, -1, Qt::AnchorLeft, -10) + // << BasicData(-1, Qt::AnchorRight, 0, Qt::AnchorRight, -180) + + // << BasicData(1, Qt::AnchorLeft, 0, Qt::AnchorRight, -10) + // << BasicData(-1, Qt::AnchorRight, 1, Qt::AnchorRight, -10) + // << BasicData(1, Qt::AnchorTop, -1, Qt::AnchorTop, -10) + // << BasicData(-1, Qt::AnchorBottom, 1, Qt::AnchorBottom, -20) + + << BasicData(0, Qt::AnchorTop, -1, Qt::AnchorTop, -10) + << BasicData(-1, Qt::AnchorBottom, 0, Qt::AnchorBottom, -10) + << BasicData(0, Qt::AnchorLeft, -1, Qt::AnchorLeft, -10) + << BasicData(-1, Qt::AnchorRight, 0, Qt::AnchorRight, 180) + + << BasicData(1, Qt::AnchorLeft, 0, Qt::AnchorRight, -10) + << BasicData(-1, Qt::AnchorRight, 1, Qt::AnchorRight, -10) + << BasicData(1, Qt::AnchorTop, -1, Qt::AnchorTop, -10) + << BasicData(-1, Qt::AnchorBottom, 1, Qt::AnchorBottom, -20) + + ; + + theResult + // << BasicResult(0, QRectF(10, 10, 10, 80) ) + // << BasicResult(1, QRectF(30, 10, 160, 70) ) + + << BasicResult(0, QRectF(-10, -10, 30, 120) ) + << BasicResult(1, QRectF(10, -10, 200, 130) ) + ; + + QTest::newRow("Two, 1h connected (n)") << QSizeF(200, 100) << theData << theResult; + } + + // Basic case - two widgets, 2 horizontal and 2 vertical connections, dependent on each other, negative spacing + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(0, Qt::AnchorLeft, -1, Qt::AnchorLeft, -10) + << BasicData(1, Qt::AnchorRight, 0, Qt::AnchorRight, -150) + << BasicData(0, Qt::AnchorTop, -1, Qt::AnchorTop, -10) + << BasicData(1, Qt::AnchorBottom, 0, Qt::AnchorBottom, -10) + + << BasicData(1, Qt::AnchorLeft, 0, Qt::AnchorLeft, -90) + << BasicData(-1, Qt::AnchorRight, 1, Qt::AnchorRight, -10) + << BasicData(1, Qt::AnchorTop, 0, Qt::AnchorTop, -10) + << BasicData(-1, Qt::AnchorBottom, 1, Qt::AnchorBottom, -20) + ; + + theResult + // << BasicResult(0, QRectF(10, 10, 30, 60) ) + // << BasicResult(1, QRectF(100, 20, 90, 60) ) + << BasicResult(0, QRectF(-10, -10, 70, 120) ) + << BasicResult(1, QRectF(80, 0, 130, 120) ) + ; + + QTest::newRow("Two, 2h+2v connected2 (n)") << QSizeF(200, 100) << theData << theResult; + } +} + +void TestGraphicsAnchorLayout::testMixedSpacing_data() +{ + QTest::addColumn("size"); + QTest::addColumn("data"); + QTest::addColumn("result"); + + typedef BasicLayoutTestData BasicData; + typedef BasicLayoutTestResult BasicResult; + + // Two widgets, partial overlapping + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorTop, 10) + << BasicData(0, Qt::AnchorLeft, -1, Qt::AnchorLeft, -50) + << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorBottom, 50) + << BasicData(1, Qt::AnchorRight, 0, Qt::AnchorRight, 15) + + // << BasicData(1, Qt::AnchorTop, 0, Qt::AnchorBottom, 5) + << BasicData(1, Qt::AnchorTop, 0, Qt::AnchorBottom, -5) + << BasicData(0, Qt::AnchorLeft, 1, Qt::AnchorLeft, -10) + << BasicData(1, Qt::AnchorRight, -1, Qt::AnchorRight, 20) + << BasicData(-1, Qt::AnchorBottom, 1, Qt::AnchorBottom, -5) + ; + + theResult + // << BasicResult(0, QRectF(50, 10, 45, 40) ) + // << BasicResult(1, QRectF(40, 45, 40, 50) ) + << BasicResult(0, QRectF(-50, 10, 145, 40) ) + << BasicResult(1, QRectF(-60, 45, 140, 60) ) + ; + + QTest::newRow("Two, partial overlap") << QSizeF(100, 100) << theData << theResult; + } + + // Two widgets, complete overlapping + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorTop, 5) + << BasicData(0, Qt::AnchorRight, 1, Qt::AnchorRight, 0) + << BasicData(0, Qt::AnchorTop, 1, Qt::AnchorTop, 0) + << BasicData(1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 25) + + << BasicData(1, Qt::AnchorBottom, 0, Qt::AnchorBottom, 0) + << BasicData(1, Qt::AnchorBottom, -1, Qt::AnchorBottom, 5) + << BasicData(1, Qt::AnchorLeft, -1, Qt::AnchorRight, 50) + << BasicData(-1, Qt::AnchorRight, 1, Qt::AnchorRight, -10) + ; + + theResult + << BasicResult(0, QRectF(65, 5, 35, 35) ) + << BasicResult(1, QRectF(40, 5, 60, 35) ) + ; + + QTest::newRow("Two, complete overlap") << QSizeF(90, 45) << theData << theResult; + } + + // Five widgets, v shaped, edges shared + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + // edges shared + << BasicData(0, Qt::AnchorRight, 1, Qt::AnchorLeft, 0) + << BasicData(1, Qt::AnchorRight, 2, Qt::AnchorLeft, 0) + << BasicData(2, Qt::AnchorRight, 3, Qt::AnchorLeft, 0) + << BasicData(3, Qt::AnchorRight, 4, Qt::AnchorLeft, 0) + << BasicData(1, Qt::AnchorBottom, 2, Qt::AnchorTop, 0) + << BasicData(0, Qt::AnchorBottom, 1, Qt::AnchorTop, 0) + << BasicData(3, Qt::AnchorBottom, 2, Qt::AnchorTop, 0) + << BasicData(4, Qt::AnchorBottom, 3, Qt::AnchorTop, 0) + << BasicData(0, Qt::AnchorBottom, 4, Qt::AnchorBottom, 0) + << BasicData(1, Qt::AnchorBottom, 3, Qt::AnchorBottom, 0) + << BasicData(0, Qt::AnchorTop, 4, Qt::AnchorTop, 0) + << BasicData(1, Qt::AnchorTop, 3, Qt::AnchorTop, 0) + + // margins + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 5) + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorTop, 5) + << BasicData(2, Qt::AnchorBottom, -1, Qt::AnchorBottom, 5) + // << BasicData(-1, Qt::AnchorRight, 4, Qt::AnchorRight, -5) + << BasicData(-1, Qt::AnchorRight, 4, Qt::AnchorRight, 5) + + // additional details for exact size determination easily + << BasicData(-1, Qt::AnchorLeft, 1, Qt::AnchorLeft, 25) + << BasicData(-1, Qt::AnchorLeft, 1, Qt::AnchorRight, 50) + // << BasicData(-1, Qt::AnchorRight, 3, Qt::AnchorRight, -25) + // << BasicData(-1, Qt::AnchorRight, 2, Qt::AnchorRight, -50) + << BasicData(-1, Qt::AnchorRight, 3, Qt::AnchorRight, 25) + << BasicData(-1, Qt::AnchorRight, 2, Qt::AnchorRight, 50) + << BasicData(-1, Qt::AnchorTop, 3, Qt::AnchorBottom, 50) + // << BasicData(-1, Qt::AnchorBottom, 3, Qt::AnchorTop, -50) + << BasicData(-1, Qt::AnchorBottom, 3, Qt::AnchorTop, 50) + + ; + + theResult + << BasicResult(0, QRectF(5,5,20,20)) + << BasicResult(1, QRectF(25,25,25,25)) + << BasicResult(2, QRectF(50,50,25,20)) + << BasicResult(3, QRectF(75,25,25,25)) + << BasicResult(4, QRectF(100,5,20,20)) + ; + + QTest::newRow("Five, V shape") << QSizeF(125, 75) << theData << theResult; + } + + // ### The behavior is different in QGraphicsAnchorLayout. What happens here is + // that when the above anchors are set, the layout size hints are changed. + // In the example, the minimum item width is 5, thus the minimum layout width + // becomes 105 (50 + 5 + 50). Once that size hint is set, trying to set + // the widget size to (10, 10) is not possible because + // QGraphicsWidget::setGeometry() will enforce the minimum is respected. + if (0) + // One widget, unsolvable + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 50) + << BasicData(0, Qt::AnchorRight, -1, Qt::AnchorRight, 50) + ; + theResult + << BasicResult(0, QRectF(0,0,0,0)) + ; + + QTest::newRow("One widget, unsolvable") << QSizeF(10, 10) << theData << theResult; + } + + // ### BUG. We are not handling "floating" elements properly. Ie. elements that + // have no anchors in a given orientation. + if (0) + // Two widgets, one has fixed size + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 50) + << BasicData(0, Qt::AnchorRight, -1, Qt::AnchorRight, 50) + // not supported, use sizePolicy instead + // << BasicData(0, Qt::AnchorLeft, 0, Qt::AnchorRight, 50) + + << BasicData(-1, Qt::AnchorLeft, 1, Qt::AnchorLeft, 50) + << BasicData(1, Qt::AnchorRight, -1, Qt::AnchorRight, 50) + ; + theResult + << BasicResult(0, QRectF(50,0,50,50)) + << BasicResult(1, QRectF(50,0,50,50)) + ; + + QTest::newRow("Two widgets, one has fixed size") << QSizeF(150, 150) << theData << theResult; + } +} + +void TestGraphicsAnchorLayout::testMulti_data() +{ + QTest::addColumn("size"); + QTest::addColumn("data"); + QTest::addColumn("result"); + + typedef BasicLayoutTestData BasicData; + typedef BasicLayoutTestResult BasicResult; + + // Multiple widgets, all overllapping + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + const int n = 30; + for ( int i = 0 ; i < n; i++ ) { + theData + << BasicData(-1, Qt::AnchorTop, i, Qt::AnchorTop, 20) + << BasicData(-1, Qt::AnchorLeft, i, Qt::AnchorLeft, 10) + // << BasicData(-1, Qt::AnchorBottom, i, Qt::AnchorBottom, -40) + // << BasicData(-1, Qt::AnchorRight, i, Qt::AnchorRight, -30); + << BasicData(-1, Qt::AnchorBottom, i, Qt::AnchorBottom, 40) + << BasicData(-1, Qt::AnchorRight, i, Qt::AnchorRight, 30); + + theResult + << BasicResult(i, QRectF(10, 20, 160, 40) ); + } + + + QTest::newRow("Overlapping multi") << QSizeF(200, 100) << theData << theResult; + } + + // Multiple widgets, linear order + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + const qreal height = 1000.f; + const qreal width = 2000.f; + + const int n = 30; + + const qreal verticalStep = height/qreal(n+2); + const qreal horizontalStep = width/qreal(n+2); + + for ( int i = 0 ; i < n; i++ ) { + + if ( i == 0 ) { + // First item + theData + << BasicData(-1, Qt::AnchorTop, i, Qt::AnchorTop, verticalStep) + << BasicData(-1, Qt::AnchorLeft, i, Qt::AnchorLeft, horizontalStep) + << BasicData(i+1, Qt::AnchorBottom, i, Qt::AnchorBottom, -verticalStep) + << BasicData(i+1, Qt::AnchorRight, i, Qt::AnchorRight, -horizontalStep); + + } else if ( i == n-1 ) { + // Last item + theData + << BasicData(i-1, Qt::AnchorTop, i, Qt::AnchorTop, verticalStep) + << BasicData(i-1, Qt::AnchorLeft, i, Qt::AnchorLeft, horizontalStep) + << BasicData(-1, Qt::AnchorBottom, i, Qt::AnchorBottom, verticalStep) + << BasicData(-1, Qt::AnchorRight, i, Qt::AnchorRight, horizontalStep); + // << BasicData(-1, Qt::AnchorBottom, i, Qt::AnchorBottom, -verticalStep) + // << BasicData(-1, Qt::AnchorRight, i, Qt::AnchorRight, -horizontalStep); + + } else { + // items in the middle + theData + << BasicData(i-1, Qt::AnchorTop, i, Qt::AnchorTop, verticalStep) + << BasicData(i-1, Qt::AnchorLeft, i, Qt::AnchorLeft, horizontalStep) + << BasicData(i+1, Qt::AnchorBottom, i, Qt::AnchorBottom, -verticalStep) + << BasicData(i+1, Qt::AnchorRight, i, Qt::AnchorRight, -horizontalStep); + // << BasicData(i+1, Qt::AnchorBottom, i, Qt::AnchorBottom, -verticalStep) + // << BasicData(i+1, Qt::AnchorRight, i, Qt::AnchorRight, -horizontalStep); + + } + + theResult + << BasicResult(i, QRectF((i+1)*horizontalStep, (i+1)*verticalStep, horizontalStep, verticalStep) ); + } + + + QTest::newRow("Linear multi") << QSizeF(width, height) << theData << theResult; + } + + // Multiple widgets, V shape + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + const qreal height = 100.f; + const qreal width = 200.f; + + const int n = 31; // odd number please (3,5,7... ) + + const qreal verticalStep = height/(2.f+(n+1)/2.f); + const qreal horizontalStep = width/(n+2.f); + + for ( int i = 0 ; i < n; i++ ) { + + if ( i == 0 ) { + // First item + theData + << BasicData(-1, Qt::AnchorTop, i, Qt::AnchorTop, verticalStep) + << BasicData(-1, Qt::AnchorLeft, i, Qt::AnchorLeft, horizontalStep) + << BasicData(i+1, Qt::AnchorBottom, i, Qt::AnchorBottom, -verticalStep) + << BasicData(i, Qt::AnchorRight, i+1, Qt::AnchorRight, horizontalStep); + + } else if ( i == n-1 ) { + // Last item + theData + << BasicData(i-1, Qt::AnchorTop, i, Qt::AnchorTop, -verticalStep) + << BasicData(i-1, Qt::AnchorLeft, i, Qt::AnchorLeft, horizontalStep) + << BasicData(i-1, Qt::AnchorBottom, i, Qt::AnchorBottom, -verticalStep) + << BasicData(i, Qt::AnchorRight, -1, Qt::AnchorRight, horizontalStep); + } else if ( i == ((n-1)/2) ) { + // midway + theData + << BasicData(i-1, Qt::AnchorTop, i, Qt::AnchorTop, verticalStep) + << BasicData(i-1, Qt::AnchorLeft, i, Qt::AnchorLeft, horizontalStep) + // << BasicData(-1, Qt::AnchorBottom, i, Qt::AnchorBottom, -verticalStep) + << BasicData(-1, Qt::AnchorBottom, i, Qt::AnchorBottom, verticalStep) + << BasicData(i, Qt::AnchorRight, i+1, Qt::AnchorRight, horizontalStep); + } else if ( i < ((n-1)/2) ) { + // before midway - going down + theData + << BasicData(i-1, Qt::AnchorTop, i, Qt::AnchorTop, verticalStep) + << BasicData(i-1, Qt::AnchorLeft, i, Qt::AnchorLeft, horizontalStep) + << BasicData(i+1, Qt::AnchorBottom, i, Qt::AnchorBottom, -verticalStep) + << BasicData(i, Qt::AnchorRight, i+1, Qt::AnchorRight, horizontalStep); + + } else { + // after midway - going up + theData + << BasicData(i-1, Qt::AnchorTop, i, Qt::AnchorTop, -verticalStep) + << BasicData(i-1, Qt::AnchorLeft, i, Qt::AnchorLeft, horizontalStep) + << BasicData(i-1, Qt::AnchorBottom, i, Qt::AnchorBottom, -verticalStep) + << BasicData(i, Qt::AnchorRight, i+1, Qt::AnchorRight, horizontalStep); + + } + + if ( i <= ((n-1)/2) ) { + // until midway + theResult + << BasicResult(i, QRectF((i+1)*horizontalStep, (i+1)*verticalStep, horizontalStep, verticalStep) ); + } else { + // after midway + theResult + << BasicResult(i, QRectF((i+1)*horizontalStep, (n-i)*verticalStep, horizontalStep, verticalStep) ); + } + + } + QTest::newRow("V multi") << QSizeF(width, height) << theData << theResult; + } + + // Multiple widgets, grid + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + const qreal height = 100.f; + const qreal width = 200.f; + + const int d = 10; // items per dimension + const int n = d*d; + + const qreal verticalStep = height/(d+2.f); + const qreal horizontalStep = width/(d+2.f); + + for ( int i = 0 ; i < n; i++ ) { + if ( i%d == 0 ) { + // left side item + theData + << BasicData(-1, Qt::AnchorLeft, i, Qt::AnchorLeft, horizontalStep) + << BasicData(i+1, Qt::AnchorRight, i, Qt::AnchorRight, -horizontalStep); + } else if ( (i+1)%d == 0 ) { + // rigth side item + theData + << BasicData(i-1, Qt::AnchorLeft, i, Qt::AnchorLeft, horizontalStep) + // << BasicData(-1, Qt::AnchorRight, i, Qt::AnchorRight, -horizontalStep); + << BasicData(-1, Qt::AnchorRight, i, Qt::AnchorRight, horizontalStep); + } else { + // horizontal middle + theData + << BasicData(i-1, Qt::AnchorLeft, i, Qt::AnchorLeft, horizontalStep) + << BasicData(i+1, Qt::AnchorRight, i, Qt::AnchorRight, -horizontalStep); + } + + if ( i < d ) { + // top line + theData + << BasicData(-1, Qt::AnchorTop, i, Qt::AnchorTop, verticalStep) + << BasicData(i+d, Qt::AnchorBottom, i, Qt::AnchorBottom, -verticalStep); + } else if ( i >= (d-1)*d ){ + // bottom line + theData + << BasicData(i-d, Qt::AnchorTop, i, Qt::AnchorTop, verticalStep) + // << BasicData(-1, Qt::AnchorBottom, i, Qt::AnchorBottom, -verticalStep) + << BasicData(-1, Qt::AnchorBottom, i, Qt::AnchorBottom, verticalStep); + } else { + // vertical middle + theData + << BasicData(i-d, Qt::AnchorTop, i, Qt::AnchorTop, verticalStep) + << BasicData(i+d, Qt::AnchorBottom, i, Qt::AnchorBottom, -verticalStep); + } + + theResult + << BasicResult(i, QRectF(((i%d)+1)*horizontalStep, ((i/d)+1)*verticalStep, horizontalStep, verticalStep) ); + } + + QTest::newRow("Grid multi") << QSizeF(200, 100) << theData << theResult; + } +} + +inline QGraphicsLayoutItem *getItem( + int index, + const QList& widgets, + QGraphicsLayoutItem *defaultItem) +{ + if (index < 0) { + return defaultItem; + } + + return widgets[index]; +} + +void TestGraphicsAnchorLayout::testBasicLayout() +{ + QFETCH(QSizeF, size); + QFETCH(BasicLayoutTestDataList, data); + QFETCH(BasicLayoutTestResultList, result); + + QGraphicsWidget *widget = new QGraphicsWidget; + + // Determine amount of widgets to add. + int widgetCount = -1; + for (int i = 0; i < data.count(); ++i) { + const BasicLayoutTestData item = data[i]; + widgetCount = qMax(widgetCount, item.firstIndex); + widgetCount = qMax(widgetCount, item.secondIndex); + } + ++widgetCount; // widgetCount is max of indices. + + // Create dummy widgets + QList widgets; + for (int i = 0; i < widgetCount; ++i) { + TestWidget *w = new TestWidget; + widgets << w; + } + + // Setup anchor layout + TheAnchorLayout *layout = new TheAnchorLayout; + + for (int i = 0; i < data.count(); ++i) { + const BasicLayoutTestData item = data[i]; + layout->setAnchor( + getItem(item.firstIndex, widgets, layout), + item.firstEdge, + getItem(item.secondIndex, widgets, layout), + item.secondEdge, + item.spacing ); + } + + widget->setLayout(layout); + widget->setContentsMargins(0,0,0,0); + + widget->setMinimumSize(size); + widget->setMaximumSize(size); + +// QTest::qWait(500); // layouting is asynchronous.. + + // Validate + for (int i = 0; i < result.count(); ++i) { + const BasicLayoutTestResult item = result[i]; + QCOMPARE(widgets[item.index]->geometry(), item.rect); + } + + // ###: not supported yet +/* + // Test mirrored mode + widget->setLayoutDirection(Qt::RightToLeft); + layout->activate(); + // Validate + for (int j = 0; j < result.count(); ++j) { + const BasicLayoutTestResult item = result[j]; + QRectF mirroredRect(item.rect); + // only valid cases are mirrored + if (mirroredRect.isValid()){ + mirroredRect.moveLeft(size.width()-item.rect.width()-item.rect.left()); + } + QCOMPARE(widgets[item.index]->geometry(), mirroredRect); + delete widgets[item.index]; + } +*/ + delete widget; +} + +void TestGraphicsAnchorLayout::testNegativeSpacing() +{ + // use the same frame + testBasicLayout(); +} + +void TestGraphicsAnchorLayout::testMixedSpacing() +{ + // use the same frame + testBasicLayout(); +} + +void TestGraphicsAnchorLayout::testMulti() +{ + // use the same frame + testBasicLayout(); +} + +void TestGraphicsAnchorLayout::testCenterAnchors_data() +{ + QTest::addColumn("size"); + QTest::addColumn("data"); + QTest::addColumn("result"); + + typedef BasicLayoutTestData BasicData; + typedef BasicLayoutTestResult BasicResult; + + // Basic center case + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + // << BasicData(-1, Qt::AnchorRight, 0, Qt::AnchorHorizontalCenter, -10) + << BasicData(-1, Qt::AnchorRight, 0, Qt::AnchorHorizontalCenter, 10) + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorRight, 15) + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorVerticalCenter, 10) + << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorBottom, 5); + + theResult + << BasicResult(0, QRectF(5, 5, 10, 10) ); + + QTest::newRow("center, basic") << QSizeF(20, 20) << theData << theResult; + } + + // Basic center case, with invalid (shouldn't affect on result) + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + // << BasicData(-1, Qt::AnchorRight, 0, Qt::AnchorHorizontalCenter, -10) + << BasicData(-1, Qt::AnchorRight, 0, Qt::AnchorHorizontalCenter, 10) + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorRight, 15) + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorVerticalCenter, 10) + << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorBottom, 5) + + // bogus definitions + << BasicData(0, Qt::AnchorHorizontalCenter, -1, Qt::AnchorBottom, 5) + << BasicData(0, Qt::AnchorHorizontalCenter, 1, Qt::AnchorVerticalCenter, 5) + << BasicData(0, Qt::AnchorVerticalCenter, -1, Qt::AnchorRight, 5) + << BasicData(0, Qt::AnchorVerticalCenter, 0, Qt::AnchorVerticalCenter, 666) + << BasicData(0, Qt::AnchorHorizontalCenter, 0, Qt::AnchorHorizontalCenter, 999) + << BasicData(0, Qt::AnchorLeft, 0, Qt::AnchorLeft, 333) + << BasicData(-1, Qt::AnchorRight, -1, Qt::AnchorRight, 222) + << BasicData(0, Qt::AnchorTop, 0, Qt::AnchorTop, 111) + << BasicData(0, Qt::AnchorBottom, 0, Qt::AnchorBottom, 444); + + theResult + << BasicResult(0, QRectF(5, 5, 10, 10) ); + + QTest::newRow("center, basic with invalid") << QSizeF(20, 20) << theData << theResult; + } + + // Basic center case 2 + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorHorizontalCenter, 0, Qt::AnchorHorizontalCenter, 0) + // Not supported << BasicData(0, Qt::AnchorHorizontalCenter, 0, Qt::AnchorRight, 5) + << BasicData(-1, Qt::AnchorHorizontalCenter, 0, Qt::AnchorRight, 5) + << BasicData(-1, Qt::AnchorVerticalCenter, 0, Qt::AnchorVerticalCenter, 0) + << BasicData(-1, Qt::AnchorVerticalCenter, 0, Qt::AnchorTop, -5); + + theResult + << BasicResult(0, QRectF(5, 5, 10, 10) ); + + QTest::newRow("center, basic 2") << QSizeF(20, 20) << theData << theResult; + } + + // Basic center case, overrides + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorHorizontalCenter, 0, Qt::AnchorHorizontalCenter, 10) + << BasicData(-1, Qt::AnchorVerticalCenter, 0, Qt::AnchorVerticalCenter, 20) + << BasicData(0, Qt::AnchorHorizontalCenter, -1, Qt::AnchorHorizontalCenter, 30) + << BasicData(0, Qt::AnchorVerticalCenter, -1, Qt::AnchorVerticalCenter, 40) + // actual data: + << BasicData(-1, Qt::AnchorHorizontalCenter, 0, Qt::AnchorHorizontalCenter, 0) + << BasicData(-1, Qt::AnchorVerticalCenter, 0, Qt::AnchorVerticalCenter, 0) + // << BasicData(0, Qt::AnchorHorizontalCenter, 0, Qt::AnchorRight, 5) + << BasicData(-1, Qt::AnchorHorizontalCenter, 0, Qt::AnchorRight, 5) + << BasicData(-1, Qt::AnchorVerticalCenter, 0, Qt::AnchorTop, -5); + + theResult + << BasicResult(0, QRectF(5, 5, 10, 10) ); + + QTest::newRow("center, overrides") << QSizeF(20, 20) << theData << theResult; + } + + // Two nested + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorHorizontalCenter, 0, Qt::AnchorLeft, 0) + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorTop, 0) + << BasicData(-1, Qt::AnchorBottom, 0, Qt::AnchorBottom, 0) + << BasicData(-1, Qt::AnchorRight, 0, Qt::AnchorRight, 0) + << BasicData(0, Qt::AnchorVerticalCenter, 1, Qt::AnchorTop, 0) + << BasicData(0, Qt::AnchorLeft, 1, Qt::AnchorLeft, 0) + << BasicData(0, Qt::AnchorRight, 1, Qt::AnchorRight, 0) + << BasicData(0, Qt::AnchorBottom, 1, Qt::AnchorBottom, 0); + + theResult + << BasicResult(0, QRectF(20, 0, 20, 40)) + << BasicResult(1, QRectF(20, 20, 20, 20)); + + QTest::newRow("center, two nested") << QSizeF(40, 40) << theData << theResult; + } + + // Two overlap + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + // theData + // // horizontal + // << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 20) + // << BasicData(0, Qt::AnchorHorizontalCenter, 1, Qt::AnchorLeft, 0) + // << BasicData(1, Qt::AnchorHorizontalCenter, 0, Qt::AnchorRight, -5) + // << BasicData(1, Qt::AnchorRight, -1, Qt::AnchorRight, 10) + // << BasicData(0, Qt::AnchorHorizontalCenter, 0, Qt::AnchorRight, 10) + // // vertical is pretty much same as horizontal, just roles swapped + // << BasicData(-1, Qt::AnchorTop, 1, Qt::AnchorTop, 20) + // << BasicData(1, Qt::AnchorVerticalCenter, 0, Qt::AnchorTop, 0) + // << BasicData(0, Qt::AnchorVerticalCenter, 1, Qt::AnchorBottom, -5) + // << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorBottom, 10) + // << BasicData(1, Qt::AnchorVerticalCenter, 1, Qt::AnchorBottom, 10); + + theData + // horizontal + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 20) + << BasicData(0, Qt::AnchorHorizontalCenter, 1, Qt::AnchorLeft, 0) + << BasicData(0, Qt::AnchorRight, 1, Qt::AnchorHorizontalCenter, 5) + << BasicData(0, Qt::AnchorRight, 1, Qt::AnchorRight, 20) + // vertical + << BasicData(-1, Qt::AnchorTop, 1, Qt::AnchorTop, 20) + << BasicData(1, Qt::AnchorVerticalCenter, 0, Qt::AnchorTop, 0) + << BasicData(1, Qt::AnchorBottom, 0, Qt::AnchorVerticalCenter, 5) + << BasicData(1, Qt::AnchorBottom, 0, Qt::AnchorBottom, 20); + + theResult + << BasicResult(0, QRectF(20, 30, 20, 30)) + << BasicResult(1, QRectF(30, 20, 30, 20)); + + QTest::newRow("center, two overlap") << QSizeF(70, 70) << theData << theResult; + } + + // Three + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 0) + << BasicData(0, Qt::AnchorHorizontalCenter, 2, Qt::AnchorHorizontalCenter, 75) + << BasicData(1, Qt::AnchorRight, 2, Qt::AnchorLeft, 10) + << BasicData(1, Qt::AnchorHorizontalCenter, 0, Qt::AnchorHorizontalCenter, -30) + << BasicData(2, Qt::AnchorRight, -1, Qt::AnchorRight, 0) + << BasicData(1, Qt::AnchorLeft, 1, Qt::AnchorRight, 30) + << BasicData(0, Qt::AnchorRight, 1, Qt::AnchorLeft, 10) + + << BasicData(1, Qt::AnchorTop, -1, Qt::AnchorTop, 0) + << BasicData(1, Qt::AnchorVerticalCenter, 0, Qt::AnchorVerticalCenter, 35) + << BasicData(1, Qt::AnchorVerticalCenter, 2, Qt::AnchorVerticalCenter, 15) + << BasicData(1, Qt::AnchorBottom, 2, Qt::AnchorTop, 5) + << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorBottom, 0) + << BasicData(2, Qt::AnchorBottom, 0, Qt::AnchorTop, 5) + << BasicData(0, Qt::AnchorTop, 0, Qt::AnchorBottom, 20); + + theResult + << BasicResult(0, QRectF(0, 30, 10, 20)) + << BasicResult(1, QRectF(20, 0, 30, 10)) + << BasicResult(2, QRectF(60, 15, 40, 10)); + + QTest::newRow("center, three") << QSizeF(100, 50) << theData << theResult; + } + + // Two, parent center + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + // vertical is pretty much same as horizontal, just roles swapped + << BasicData(-1, Qt::AnchorVerticalCenter, 1, Qt::AnchorVerticalCenter, -15) + << BasicData(-1, Qt::AnchorVerticalCenter, 0, Qt::AnchorVerticalCenter, 10) + << BasicData(-1, Qt::AnchorBottom, 0, Qt::AnchorBottom, 0) + << BasicData(1, Qt::AnchorTop, 0, Qt::AnchorTop, 0) + // horizontal + << BasicData(-1, Qt::AnchorHorizontalCenter, 0, Qt::AnchorHorizontalCenter, -15) + << BasicData(-1, Qt::AnchorHorizontalCenter, 1, Qt::AnchorHorizontalCenter, 10) + << BasicData(-1, Qt::AnchorRight, 1, Qt::AnchorRight, 0) + << BasicData(0, Qt::AnchorLeft, 1, Qt::AnchorLeft, 0); + + theResult + << BasicResult(0, QRectF(20, 20, 30, 80)) + << BasicResult(1, QRectF(20, 20, 80, 30)); + + QTest::newRow("center, parent") << QSizeF(100, 100) << theData << theResult; + } + + // Two, parent center 2 + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + // << BasicData(1, Qt::AnchorLeft, -1, Qt::AnchorHorizontalCenter, 15) + << BasicData(1, Qt::AnchorLeft, -1, Qt::AnchorHorizontalCenter, -15) + << BasicData(1, Qt::AnchorRight, 0, Qt::AnchorLeft, 10) + << BasicData(0, Qt::AnchorRight, -1, Qt::AnchorRight, 5) + << BasicData(-1, Qt::AnchorHorizontalCenter, 1, Qt::AnchorRight, -5) + // vertical + << BasicData(0, Qt::AnchorVerticalCenter, 1, Qt::AnchorVerticalCenter, 20) + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorTop, 10) + << BasicData(0, Qt::AnchorBottom, 1, Qt::AnchorBottom, 20) + << BasicData(0, Qt::AnchorTop, 1, Qt::AnchorTop, 20) + << BasicData(0, Qt::AnchorBottom, 1, Qt::AnchorTop, 10); + + theResult + << BasicResult(0, QRectF(30, 10, 15, 10)) + << BasicResult(1, QRectF(10, 30, 10, 10)); + + QTest::newRow("center, parent 2") << QSizeF(50, 50) << theData << theResult; + } + + // Two, parent center 3 + { + BasicLayoutTestDataList theData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorHorizontalCenter, 0, Qt::AnchorRight, -5) + << BasicData(-1, Qt::AnchorHorizontalCenter, 1, Qt::AnchorLeft, 5) + // << BasicData(0, Qt::AnchorLeft, 1, Qt::AnchorRight, 100) + << BasicData(0, Qt::AnchorLeft, 1, Qt::AnchorRight, -100) + << BasicData(0, Qt::AnchorLeft, -1, Qt::AnchorLeft, 0) + + // vertical + << BasicData(0, Qt::AnchorVerticalCenter, 1, Qt::AnchorVerticalCenter, 55) + << BasicData(0, Qt::AnchorTop, -1, Qt::AnchorTop, 0) + << BasicData(1, Qt::AnchorBottom, -1, Qt::AnchorBottom, 0) + << BasicData(0, Qt::AnchorBottom, 1, Qt::AnchorTop, 10) + // << BasicData(0, Qt::AnchorTop, 0, Qt::AnchorBottom, 45) + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorBottom, 45) + ; + + theResult + << BasicResult(0, QRectF(0, 0, 45, 45)) + << BasicResult(1, QRectF(55, 55, 45, 45)); + + QTest::newRow("center, parent 3") << QSizeF(100, 100) << theData << theResult; + } + +} + +void TestGraphicsAnchorLayout::testCenterAnchors() +{ + // use the same frame + testBasicLayout(); +} + +void TestGraphicsAnchorLayout::testRemoveCenterAnchor_data() +{ + QTest::addColumn("size"); + QTest::addColumn("data"); + QTest::addColumn("removeData"); + QTest::addColumn("result"); + + typedef BasicLayoutTestData BasicData; + typedef BasicLayoutTestResult BasicResult; + + { + BasicLayoutTestDataList theData; + BasicLayoutTestDataList theRemoveData; + BasicLayoutTestResultList theResult; + + theData + // << BasicData(-1, Qt::AnchorRight, 0, Qt::AnchorHorizontalCenter, -10) + << BasicData(-1, Qt::AnchorRight, 0, Qt::AnchorHorizontalCenter, 10) + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorRight, 15) + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorVerticalCenter, 10) + << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorBottom, 5) + + << BasicData(-1, Qt::AnchorHorizontalCenter, 1, Qt::AnchorHorizontalCenter, 66) + << BasicData(1, Qt::AnchorVerticalCenter, -1, Qt::AnchorVerticalCenter, 99) + << BasicData(0, Qt::AnchorHorizontalCenter, 1, Qt::AnchorHorizontalCenter, 33) + ; + + theRemoveData + << BasicData(-1, Qt::AnchorHorizontalCenter, 1, Qt::AnchorHorizontalCenter, 0) + << BasicData(1, Qt::AnchorVerticalCenter, -1, Qt::AnchorVerticalCenter, 0) + << BasicData(0, Qt::AnchorHorizontalCenter, 1, Qt::AnchorHorizontalCenter, 0); + + theResult + << BasicResult(0, QRectF(5, 5, 10, 10) ); + + QTest::newRow("remove, center, basic") << QSizeF(20, 20) << theData + << theRemoveData << theResult; + } + + { + BasicLayoutTestDataList theData; + BasicLayoutTestDataList theRemoveData; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 0) + << BasicData(0, Qt::AnchorHorizontalCenter, 2, Qt::AnchorHorizontalCenter, 75) + << BasicData(1, Qt::AnchorRight, 2, Qt::AnchorLeft, 10) + << BasicData(1, Qt::AnchorHorizontalCenter, 0, Qt::AnchorHorizontalCenter, -30) + << BasicData(2, Qt::AnchorRight, -1, Qt::AnchorRight, 0) + << BasicData(1, Qt::AnchorLeft, 1, Qt::AnchorRight, 30) + << BasicData(0, Qt::AnchorRight, 1, Qt::AnchorLeft, 10) + + // extra: + << BasicData(-1, Qt::AnchorVerticalCenter, 0, Qt::AnchorVerticalCenter, 66) + << BasicData(-1, Qt::AnchorHorizontalCenter, 0, Qt::AnchorHorizontalCenter, 33) + << BasicData(0, Qt::AnchorHorizontalCenter, 0, Qt::AnchorHorizontalCenter, 55) + << BasicData(1, Qt::AnchorVerticalCenter, 1, Qt::AnchorVerticalCenter, 55) + + << BasicData(1, Qt::AnchorTop, -1, Qt::AnchorTop, 0) + << BasicData(1, Qt::AnchorVerticalCenter, 0, Qt::AnchorVerticalCenter, 35) + << BasicData(1, Qt::AnchorVerticalCenter, 2, Qt::AnchorVerticalCenter, 15) + << BasicData(1, Qt::AnchorBottom, 2, Qt::AnchorTop, 5) + << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorBottom, 0) + << BasicData(2, Qt::AnchorBottom, 0, Qt::AnchorTop, 5) + << BasicData(0, Qt::AnchorTop, 0, Qt::AnchorBottom, 20); + + theRemoveData + << BasicData(-1, Qt::AnchorVerticalCenter, 0, Qt::AnchorVerticalCenter, 66) + << BasicData(-1, Qt::AnchorHorizontalCenter, 0, Qt::AnchorHorizontalCenter, 33) + << BasicData(0, Qt::AnchorHorizontalCenter, 0, Qt::AnchorHorizontalCenter, 55) + << BasicData(1, Qt::AnchorVerticalCenter, 1, Qt::AnchorVerticalCenter, 55); + + theResult + << BasicResult(0, QRectF(0, 30, 10, 20)) + << BasicResult(1, QRectF(20, 0, 30, 10)) + << BasicResult(2, QRectF(60, 15, 40, 10)); + + QTest::newRow("remove, center, three") << QSizeF(100, 50) << theData << theRemoveData << theResult; + } + + // add edge (item0,edge0,item1,edge1), remove (item1,edge1,item0,edge0) + { + BasicLayoutTestDataList theData; + BasicLayoutTestDataList theRemoveData; + BasicLayoutTestResultList theResult; + + theData + // << BasicData(-1, Qt::AnchorRight, 0, Qt::AnchorHorizontalCenter, -10) + << BasicData(-1, Qt::AnchorRight, 0, Qt::AnchorHorizontalCenter, 10) + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorRight, 15) + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorVerticalCenter, 10) + << BasicData(0, Qt::AnchorBottom, -1, Qt::AnchorBottom, 5) + + << BasicData(-1, Qt::AnchorHorizontalCenter, 1, Qt::AnchorHorizontalCenter, 66) + << BasicData(1, Qt::AnchorVerticalCenter, -1, Qt::AnchorVerticalCenter, 99) + << BasicData(0, Qt::AnchorHorizontalCenter, 1, Qt::AnchorHorizontalCenter, 33) + << BasicData(0, Qt::AnchorLeft, 0, Qt::AnchorRight, 22) + << BasicData(0, Qt::AnchorTop, 0, Qt::AnchorBottom, 11) + ; + + theRemoveData + << BasicData(1, Qt::AnchorHorizontalCenter, -1, Qt::AnchorHorizontalCenter, 0) + << BasicData(-1, Qt::AnchorVerticalCenter, 1, Qt::AnchorVerticalCenter, 0) + << BasicData(1, Qt::AnchorHorizontalCenter, 0, Qt::AnchorHorizontalCenter, 0) + << BasicData(0, Qt::AnchorRight, 0, Qt::AnchorLeft, 0) + << BasicData(0, Qt::AnchorBottom, 0, Qt::AnchorTop, 0) + ; + + theResult + << BasicResult(0, QRectF(5, 5, 10, 10) ); + + QTest::newRow("remove, center, basic 2") << QSizeF(20, 20) << theData + << theRemoveData << theResult; + } + +} + +void TestGraphicsAnchorLayout::testRemoveCenterAnchor() +{ + QFETCH(QSizeF, size); + QFETCH(BasicLayoutTestDataList, data); + QFETCH(BasicLayoutTestDataList, removeData); + QFETCH(BasicLayoutTestResultList, result); + + QGraphicsWidget *widget = new QGraphicsWidget; + + // Determine amount of widgets to add. + int widgetCount = -1; + for (int i = 0; i < data.count(); ++i) { + const BasicLayoutTestData item = data[i]; + widgetCount = qMax(widgetCount, item.firstIndex); + widgetCount = qMax(widgetCount, item.secondIndex); + } + ++widgetCount; // widgetCount is max of indices. + + // Create dummy widgets + QList widgets; + for (int i = 0; i < widgetCount; ++i) { + TestWidget *w = new TestWidget; + widgets << w; + } + + // Setup anchor layout + TheAnchorLayout *layout = new TheAnchorLayout; + + for (int i = 0; i < data.count(); ++i) { + const BasicLayoutTestData item = data[i]; + layout->setAnchor( + getItem(item.firstIndex, widgets, layout), + item.firstEdge, + getItem(item.secondIndex, widgets, layout), + item.secondEdge, + item.spacing ); + } + + for (int i = 0; i < removeData.count(); ++i) { + const BasicLayoutTestData item = removeData[i]; + layout->removeAnchor( + getItem(item.firstIndex, widgets, layout), + item.firstEdge, + getItem(item.secondIndex, widgets, layout), + item.secondEdge); + } + + widget->setLayout(layout); + widget->setContentsMargins(0,0,0,0); + + widget->setMinimumSize(size); + widget->setMaximumSize(size); + + // Validate + for (int i = 0; i < result.count(); ++i) { + const BasicLayoutTestResult item = result[i]; + + QCOMPARE(widgets[item.index]->geometry(), item.rect); + delete widgets[item.index]; + } + delete widget; +} + +void TestGraphicsAnchorLayout::testSingleSizePolicy_data() +{ + QTest::addColumn("size"); + QTest::addColumn("policy"); + QTest::addColumn("valid"); + +// FIXED + { + QSizePolicy sizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); + QTest::newRow("single size policy: fixed ok") << QSizeF(70, 70) << sizePolicy << true; + } +/* + { + QSizePolicy sizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); + QTest::newRow("single size policy: fixed too big") << QSizeF(100, 100) << sizePolicy << false; + } + + { + QSizePolicy sizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); + QTest::newRow("single size policy: fixed too small") << QSizeF(50, 50) << sizePolicy << false; + } +*/ +// MINIMUM + { + QSizePolicy sizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ); + QTest::newRow("single size policy: minimum bigger ok") << QSizeF(100, 100) << sizePolicy << true; + } + + { + QSizePolicy sizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ); + QTest::newRow("single size policy: minimum limit ok") << QSizeF(70, 70) << sizePolicy << true; + } +/* + { + QSizePolicy sizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ); + QTest::newRow("single size policy: minimum too small") << QSizeF(50, 50) << sizePolicy << false; + } +*/ +// MAXIMUM + { + QSizePolicy sizePolicy( QSizePolicy::Maximum, QSizePolicy::Maximum ); + QTest::newRow("single size policy: maximum small ok") << QSizeF(50, 50) << sizePolicy << true; + } + + { + QSizePolicy sizePolicy( QSizePolicy::Maximum, QSizePolicy::Maximum ); + QTest::newRow("single size policy: maximum limit ok") << QSizeF(70, 70) << sizePolicy << true; + } +/* + { + QSizePolicy sizePolicy( QSizePolicy::Maximum, QSizePolicy::Maximum ); + QTest::newRow("single size policy: maximum bigger fail") << QSizeF(100, 100) << sizePolicy << false; + } +*/ +// PREFERRED + { + QSizePolicy sizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ); + QTest::newRow("single size policy: preferred bigger ok") << QSizeF(100, 100) << sizePolicy << true; + } + + { + QSizePolicy sizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ); + QTest::newRow("single size policy: preferred smaller ok") << QSizeF(50, 50) << sizePolicy << true; + } +/* + { + QSizePolicy sizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ); + QTest::newRow("single size policy: preferred too big") << QSizeF(700, 700) << sizePolicy << false; + } + + { + QSizePolicy sizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ); + QTest::newRow("single size policy: preferred too small") << QSizeF(21, 21) << sizePolicy << false; + } +*/ +// MINIMUMEXPANDING + + { + QSizePolicy sizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ); + QTest::newRow("single size policy: min.expanding bigger ok") << QSizeF(100, 100) << sizePolicy << true; + } + + { + QSizePolicy sizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ); + QTest::newRow("single size policy: min.expanding limit ok") << QSizeF(70, 70) << sizePolicy << true; + } + + /*{ + QSizePolicy sizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ); + QTest::newRow("single size policy: min.expanding too small") << QSizeF(50, 50) << sizePolicy << false; + }*/ + +// EXPANDING + + { + QSizePolicy sizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); + QTest::newRow("single size policy: expanding bigger ok") << QSizeF(100, 100) << sizePolicy << true; + } + + { + QSizePolicy sizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); + QTest::newRow("single size policy: expanding smaller ok") << QSizeF(50, 50) << sizePolicy << true; + } + + // IGNORED + + { + QSizePolicy sizePolicy( QSizePolicy::Ignored, QSizePolicy::Ignored ); + QTest::newRow("single size policy: ignored bigger ok") << QSizeF(100, 100) << sizePolicy << true; + } + + { + QSizePolicy sizePolicy( QSizePolicy::Ignored, QSizePolicy::Ignored ); + QTest::newRow("single size policy: ignored smaller ok") << QSizeF(50, 50) << sizePolicy << true; + } +} + +void TestGraphicsAnchorLayout::testSingleSizePolicy() +{ + QFETCH(QSizeF, size); + QFETCH(QSizePolicy, policy); + QFETCH(bool, valid); + + // create objects + QGraphicsWidget *widget = new QGraphicsWidget; + TheAnchorLayout *layout = new TheAnchorLayout; + TestWidget *childWidget = new TestWidget; + + // set anchors + layout->setAnchor( layout, Qt::AnchorLeft, childWidget, Qt::AnchorLeft, 10 ); + layout->setAnchor( childWidget, Qt::AnchorRight, layout, Qt::AnchorRight, 10 ); + layout->setAnchor( layout, Qt::AnchorTop, childWidget, Qt::AnchorTop, 10 ); + layout->setAnchor( childWidget, Qt::AnchorBottom, layout, Qt::AnchorBottom, 10 ); + + widget->setLayout( layout ); + + // set test case specific: policy and size + childWidget->setSizePolicy( policy ); + widget->setGeometry( QRectF( QPoint(0,0), size ) ); + + QCOMPARE( layout->isValid() , valid ); + + const QRectF childRect = childWidget->geometry(); + Q_UNUSED( childRect ); +} + +void TestGraphicsAnchorLayout::testDoubleSizePolicy_data() +{ + // tests only horizontal direction + QTest::addColumn("policy1"); + QTest::addColumn("policy2"); + QTest::addColumn("width1"); + QTest::addColumn("width2"); + + // layout size always 100x100 and size hints for items are 5<50<500 + // gabs: 10-item1-10-item2-10 + + { + QSizePolicy sizePolicy1( QSizePolicy::Fixed, QSizePolicy::Fixed ); + QSizePolicy sizePolicy2( QSizePolicy::Preferred, QSizePolicy::Preferred ); + const qreal width1 = 50; + const qreal width2 = 100-10-10-10-width1; + QTest::newRow("double size policy: fixed-preferred") << sizePolicy1 << sizePolicy2 << width1 << width2; + } + + { + QSizePolicy sizePolicy1( QSizePolicy::Minimum, QSizePolicy::Minimum ); + QSizePolicy sizePolicy2( QSizePolicy::Preferred, QSizePolicy::Preferred ); + const qreal width1 = 50; + const qreal width2 = 100-10-10-10-width1; + QTest::newRow("double size policy: minimum-preferred") << sizePolicy1 << sizePolicy2 << width1 << width2; + } + + { + QSizePolicy sizePolicy1( QSizePolicy::Maximum, QSizePolicy::Maximum ); + QSizePolicy sizePolicy2( QSizePolicy::Preferred, QSizePolicy::Preferred ); + const qreal width1 = 35; + const qreal width2 = 100-10-10-10-width1; + QTest::newRow("double size policy: maximum-preferred") << sizePolicy1 << sizePolicy2 << width1 << width2; + } + + { + QSizePolicy sizePolicy1( QSizePolicy::Preferred, QSizePolicy::Preferred ); + QSizePolicy sizePolicy2( QSizePolicy::Preferred, QSizePolicy::Preferred ); + const qreal width1 = 35; + const qreal width2 = 100-10-10-10-width1; + QTest::newRow("double size policy: preferred-preferred") << sizePolicy1 << sizePolicy2 << width1 << width2; + } + + { + QSizePolicy sizePolicy1( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ); + QSizePolicy sizePolicy2( QSizePolicy::Preferred, QSizePolicy::Preferred ); + const qreal width1 = 50; + const qreal width2 = 100-10-10-10-width1; + QTest::newRow("double size policy: min.expanding-preferred") << sizePolicy1 << sizePolicy2 << width1 << width2; + } + + { + QSizePolicy sizePolicy1( QSizePolicy::Expanding, QSizePolicy::Expanding ); + QSizePolicy sizePolicy2( QSizePolicy::Preferred, QSizePolicy::Preferred ); + const qreal width1 = 35; + const qreal width2 = 100-10-10-10-width1; + QTest::newRow("double size policy: expanding-preferred") << sizePolicy1 << sizePolicy2 << width1 << width2; + } + + { + QSizePolicy sizePolicy1( QSizePolicy::Ignored, QSizePolicy::Ignored ); + QSizePolicy sizePolicy2( QSizePolicy::Preferred, QSizePolicy::Preferred ); + const qreal width1 = 35; + const qreal width2 = 100-10-10-10-width1; + QTest::newRow("double size policy: ignored-preferred") << sizePolicy1 << sizePolicy2 << width1 << width2; + } + + /*{ + QSizePolicy sizePolicy1( QSizePolicy::Fixed, QSizePolicy::Fixed ); + QSizePolicy sizePolicy2( QSizePolicy::Fixed, QSizePolicy::Fixed ); + const qreal width1 = -1; + const qreal width2 = 100-10-10-10-width1; + QTest::newRow("double size policy: fixed-fixed invalid") << sizePolicy1 << sizePolicy2 << width1 << width2; + }*/ + + /*{ + QSizePolicy sizePolicy1( QSizePolicy::Minimum, QSizePolicy::Minimum ); + QSizePolicy sizePolicy2( QSizePolicy::Fixed, QSizePolicy::Fixed ); + const qreal width1 = -1; + const qreal width2 = 100-10-10-10-width1; + QTest::newRow("double size policy: minimum-fixed invalid") << sizePolicy1 << sizePolicy2 << width1 << width2; + }*/ + + { + QSizePolicy sizePolicy1( QSizePolicy::Maximum, QSizePolicy::Maximum ); + QSizePolicy sizePolicy2( QSizePolicy::Fixed, QSizePolicy::Fixed ); + const qreal width1 = 20; + const qreal width2 = 100-10-10-10-width1; + QTest::newRow("double size policy: maximum-fixed") << sizePolicy1 << sizePolicy2 << width1 << width2; + } + + { + QSizePolicy sizePolicy1( QSizePolicy::Preferred, QSizePolicy::Preferred ); + QSizePolicy sizePolicy2( QSizePolicy::Fixed, QSizePolicy::Fixed ); + const qreal width1 = 20; + const qreal width2 = 100-10-10-10-width1; + QTest::newRow("double size policy: preferred-fixed") << sizePolicy1 << sizePolicy2 << width1 << width2; + } + + /*{ + QSizePolicy sizePolicy1( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ); + QSizePolicy sizePolicy2( QSizePolicy::Fixed, QSizePolicy::Fixed ); + const qreal width1 = -1; + const qreal width2 = 100-10-10-10-width1; + QTest::newRow("double size policy: min.expanding-fixed invalid") << sizePolicy1 << sizePolicy2 << width1 << width2; + }*/ + + { + QSizePolicy sizePolicy1( QSizePolicy::Expanding, QSizePolicy::Expanding ); + QSizePolicy sizePolicy2( QSizePolicy::Fixed, QSizePolicy::Fixed ); + const qreal width1 = 20; + const qreal width2 = 100-10-10-10-width1; + QTest::newRow("double size policy: expanding-fixed") << sizePolicy1 << sizePolicy2 << width1 << width2; + } + + { + QSizePolicy sizePolicy1( QSizePolicy::Ignored, QSizePolicy::Ignored ); + QSizePolicy sizePolicy2( QSizePolicy::Fixed, QSizePolicy::Fixed ); + const qreal width1 = 20; + const qreal width2 = 100-10-10-10-width1; + QTest::newRow("double size policy: ignored-fixed") << sizePolicy1 << sizePolicy2 << width1 << width2; + } +} + +void TestGraphicsAnchorLayout::testDoubleSizePolicy() +{ + // ### Size policy is not yet supported + return; + + QFETCH(QSizePolicy, policy1); + QFETCH(QSizePolicy, policy2); + QFETCH(qreal, width1); + QFETCH(qreal, width2); + + // create objects + QGraphicsWidget *widget = new QGraphicsWidget; + TheAnchorLayout *layout = new TheAnchorLayout; + TestWidget *childWidget1 = new TestWidget; + TestWidget *childWidget2 = new TestWidget; + + // set anchors + layout->setAnchor( layout, Qt::AnchorLeft, childWidget1, Qt::AnchorLeft, 10 ); + layout->setAnchor( childWidget1, Qt::AnchorRight, childWidget2, Qt::AnchorLeft, 10 ); + layout->setAnchor( childWidget2, Qt::AnchorRight, layout, Qt::AnchorRight, 10 ); + + widget->setLayout( layout ); + + // set test case specific: policy + childWidget1->setSizePolicy( policy1 ); + childWidget2->setSizePolicy( policy2 ); + + widget->setGeometry( QRectF( QPoint(0,0), QSize( 100,100 ) ) ); + + // check results: + if ( width1 == -1.0f ) { + // invalid + QCOMPARE( layout->isValid() , false ); + } else { + // valid + QCOMPARE( childWidget1->geometry().width(), width1 ); + QCOMPARE( childWidget2->geometry().width(), width2 ); + } +} + +typedef QMap SizeHintArray; +Q_DECLARE_METATYPE(SizeHintArray) + +void TestGraphicsAnchorLayout::testSizeDistribution_data() +{ + // tests only horizontal direction + QTest::addColumn("sizeHints1"); + QTest::addColumn("sizeHints2"); + QTest::addColumn("width1"); + QTest::addColumn("width2"); + + // layout size always 100x100 and size policy for items is preferred-preferred + // gabs: 10-item1-10-item2-10 + + { + SizeHintArray sizeHints1; + sizeHints1.insert( Qt::MinimumSize, 30 ); + sizeHints1.insert( Qt::PreferredSize, 35 ); + sizeHints1.insert( Qt::MaximumSize, 40 ); + Q_ASSERT( sizeHints1.value( Qt::MinimumSize ) <= sizeHints1.value( Qt::PreferredSize ) ); + Q_ASSERT( sizeHints1.value( Qt::PreferredSize ) <= sizeHints1.value( Qt::MaximumSize ) ); + + SizeHintArray sizeHints2; + sizeHints2.insert( Qt::MinimumSize, 5 ); + sizeHints2.insert( Qt::PreferredSize, 35 ); + sizeHints2.insert( Qt::MaximumSize, 300 ); + Q_ASSERT( sizeHints2.value( Qt::MinimumSize ) <= sizeHints2.value( Qt::PreferredSize ) ); + Q_ASSERT( sizeHints2.value( Qt::PreferredSize ) <= sizeHints2.value( Qt::MaximumSize ) ); + + const qreal width1 = 35; + const qreal width2 = 100-10-10-10-width1; + QTest::newRow("size distribution: preferred equal") << sizeHints1 << sizeHints2 << width1 << width2; + } + + { + SizeHintArray sizeHints1; + sizeHints1.insert( Qt::MinimumSize, 0 ); + sizeHints1.insert( Qt::PreferredSize, 20 ); + sizeHints1.insert( Qt::MaximumSize, 100 ); + Q_ASSERT( sizeHints1.value( Qt::MinimumSize ) <= sizeHints1.value( Qt::PreferredSize ) ); + Q_ASSERT( sizeHints1.value( Qt::PreferredSize ) <= sizeHints1.value( Qt::MaximumSize ) ); + + SizeHintArray sizeHints2; + sizeHints2.insert( Qt::MinimumSize, 0 ); + sizeHints2.insert( Qt::PreferredSize, 50 ); + sizeHints2.insert( Qt::MaximumSize, 100 ); + Q_ASSERT( sizeHints2.value( Qt::MinimumSize ) <= sizeHints2.value( Qt::PreferredSize ) ); + Q_ASSERT( sizeHints2.value( Qt::PreferredSize ) <= sizeHints2.value( Qt::MaximumSize ) ); + + const qreal width1 = 20; + const qreal width2 = 100-10-10-10-width1; + QTest::newRow("size distribution: preferred non-equal") << sizeHints1 << sizeHints2 << width1 << width2; + } + + { + SizeHintArray sizeHints1; + sizeHints1.insert( Qt::MinimumSize, 0 ); + sizeHints1.insert( Qt::PreferredSize, 40 ); + sizeHints1.insert( Qt::MaximumSize, 100 ); + Q_ASSERT( sizeHints1.value( Qt::MinimumSize ) <= sizeHints1.value( Qt::PreferredSize ) ); + Q_ASSERT( sizeHints1.value( Qt::PreferredSize ) <= sizeHints1.value( Qt::MaximumSize ) ); + + SizeHintArray sizeHints2; + sizeHints2.insert( Qt::MinimumSize, 0 ); + sizeHints2.insert( Qt::PreferredSize, 60 ); + sizeHints2.insert( Qt::MaximumSize, 100 ); + Q_ASSERT( sizeHints2.value( Qt::MinimumSize ) <= sizeHints2.value( Qt::PreferredSize ) ); + Q_ASSERT( sizeHints2.value( Qt::PreferredSize ) <= sizeHints2.value( Qt::MaximumSize ) ); + + const qreal width1 = 28; // got from manual calculation + const qreal width2 = 100-10-10-10-width1; + QTest::newRow("size distribution: below preferred") << sizeHints1 << sizeHints2 << width1 << width2; + } + + { + SizeHintArray sizeHints1; + sizeHints1.insert( Qt::MinimumSize, 0 ); + sizeHints1.insert( Qt::PreferredSize, 10 ); + sizeHints1.insert( Qt::MaximumSize, 100 ); + Q_ASSERT( sizeHints1.value( Qt::MinimumSize ) <= sizeHints1.value( Qt::PreferredSize ) ); + Q_ASSERT( sizeHints1.value( Qt::PreferredSize ) <= sizeHints1.value( Qt::MaximumSize ) ); + + SizeHintArray sizeHints2; + sizeHints2.insert( Qt::MinimumSize, 0 ); + sizeHints2.insert( Qt::PreferredSize, 40 ); + sizeHints2.insert( Qt::MaximumSize, 100 ); + Q_ASSERT( sizeHints2.value( Qt::MinimumSize ) <= sizeHints2.value( Qt::PreferredSize ) ); + Q_ASSERT( sizeHints2.value( Qt::PreferredSize ) <= sizeHints2.value( Qt::MaximumSize ) ); + + const qreal width1 = 22; // got from manual calculation + const qreal width2 = 100-10-10-10-width1; + QTest::newRow("size distribution: above preferred") << sizeHints1 << sizeHints2 << width1 << width2; + } + +} + +void TestGraphicsAnchorLayout::testSizeDistribution() +{ + QFETCH(SizeHintArray, sizeHints1); + QFETCH(SizeHintArray, sizeHints2); + QFETCH(qreal, width1); + QFETCH(qreal, width2); + + // create objects + QGraphicsWidget *widget = new QGraphicsWidget; + TheAnchorLayout *layout = new TheAnchorLayout; + TestWidget *childWidget1 = new TestWidget; + TestWidget *childWidget2 = new TestWidget; + + // set anchors + layout->setAnchor( layout, Qt::AnchorLeft, childWidget1, Qt::AnchorLeft, 10 ); + layout->setAnchor( childWidget1, Qt::AnchorRight, childWidget2, Qt::AnchorLeft, 10 ); + layout->setAnchor( childWidget2, Qt::AnchorRight, layout, Qt::AnchorRight, 10 ); + + widget->setLayout( layout ); + + // set test case specific: size hints + childWidget1->setMinimumWidth( sizeHints1.value( Qt::MinimumSize ) ); + childWidget1->setPreferredWidth( sizeHints1.value( Qt::PreferredSize ) ); + childWidget1->setMaximumWidth( sizeHints1.value( Qt::MaximumSize ) ); + + childWidget2->setMinimumWidth( sizeHints2.value( Qt::MinimumSize ) ); + childWidget2->setPreferredWidth( sizeHints2.value( Qt::PreferredSize ) ); + childWidget2->setMaximumWidth( sizeHints2.value( Qt::MaximumSize ) ); + + widget->setGeometry( QRectF( QPoint(0,0), QSize( 100,100 ) ) ); + + // check results: + if ( width1 == -1.0f ) { + // invalid + QCOMPARE( layout->isValid() , false ); + } else { + // valid + QCOMPARE( float(childWidget1->geometry().width()), float(width1) ); + QCOMPARE( float(childWidget2->geometry().width()), float(width2) ); + } +} + +void TestGraphicsAnchorLayout::testSizeHint() +{ + QGraphicsWidget *widget[5]; + + for( int i = 0; i < 5; i++ ) { + widget[i] = new QGraphicsWidget; + widget[i]->setMinimumSize( 10, 10 ); + widget[i]->setPreferredSize( 20, 20 ); + widget[i]->setMaximumSize( 40, 40 ); + } + + // one, basic + { + TheAnchorLayout *layout = new TheAnchorLayout(); + + + layout->setAnchor(layout, Qt::AnchorLeft, widget[0], Qt::AnchorLeft, 0 ); + layout->setAnchor(layout, Qt::AnchorRight, widget[0], Qt::AnchorRight, 0 ); + + layout->setAnchor(layout, Qt::AnchorTop, widget[0], Qt::AnchorTop, 0 ); + layout->setAnchor(layout, Qt::AnchorBottom, widget[0], Qt::AnchorBottom, 0 ); + + QCOMPARE( layout->minimumSize(), widget[0]->minimumSize() ); + QCOMPARE( layout->preferredSize(), widget[0]->preferredSize() ); + QCOMPARE( layout->maximumSize(), widget[0]->maximumSize() ); + + + delete layout; + } + + // one, basic again + { + TheAnchorLayout *layout = new TheAnchorLayout(); + + + layout->setAnchor(layout, Qt::AnchorLeft, widget[0], Qt::AnchorLeft, 10 ); + // layout->setAnchor(layout, Qt::AnchorRight, widget[0], Qt::AnchorRight, -10 ); + layout->setAnchor(layout, Qt::AnchorRight, widget[0], Qt::AnchorRight, 10 ); + + layout->setAnchor(layout, Qt::AnchorTop, widget[0], Qt::AnchorTop, 10 ); + // layout->setAnchor(layout, Qt::AnchorBottom, widget[0], Qt::AnchorBottom, -10 ); + layout->setAnchor(layout, Qt::AnchorBottom, widget[0], Qt::AnchorBottom, 10 ); + + QCOMPARE( layout->minimumSize(), widget[0]->minimumSize() + QSizeF( 20, 20 ) ); + QCOMPARE( layout->preferredSize(), widget[0]->preferredSize() + QSizeF( 20, 20 ) ); + QCOMPARE( layout->maximumSize(), widget[0]->maximumSize() + QSizeF( 20, 20 ) ); + + delete layout; + } + + // two, serial + { + TheAnchorLayout *layout = new TheAnchorLayout(); + + + layout->setAnchor(layout, Qt::AnchorLeft, widget[0], Qt::AnchorLeft, 0 ); + layout->setAnchor(layout, Qt::AnchorTop, widget[0], Qt::AnchorTop, 0 ); + layout->setAnchor(layout, Qt::AnchorBottom, widget[0], Qt::AnchorBottom, 0 ); + + layout->setAnchor(widget[0], Qt::AnchorRight, widget[1], Qt::AnchorLeft, 0 ); + layout->setAnchor(widget[1], Qt::AnchorRight, layout, Qt::AnchorRight, 0 ); + + + QCOMPARE( layout->minimumSize(), widget[0]->minimumSize() + QSizeF( widget[1]->minimumWidth(), 0 ) ); + QCOMPARE( layout->preferredSize(), widget[0]->preferredSize() + QSizeF( widget[1]->preferredWidth(), 0 ) ); + QCOMPARE( layout->maximumSize(), widget[0]->maximumSize() + QSizeF( widget[1]->maximumWidth(), 0 ) ); + + delete layout; + } + + // two, parallel + { + TheAnchorLayout *layout = new TheAnchorLayout(); + + + layout->setAnchor(layout, Qt::AnchorLeft, widget[0], Qt::AnchorLeft, 0 ); + layout->setAnchor(layout, Qt::AnchorTop, widget[0], Qt::AnchorTop, 0 ); + layout->setAnchor(layout, Qt::AnchorBottom, widget[0], Qt::AnchorBottom, 0 ); + layout->setAnchor(layout, Qt::AnchorRight, widget[0], Qt::AnchorRight, 0 ); + + layout->setAnchor(layout, Qt::AnchorLeft, widget[1], Qt::AnchorLeft, 0 ); + layout->setAnchor(layout, Qt::AnchorTop, widget[1], Qt::AnchorTop, 0 ); + layout->setAnchor(layout, Qt::AnchorBottom, widget[1], Qt::AnchorBottom, 0 ); + layout->setAnchor(layout, Qt::AnchorRight, widget[1], Qt::AnchorRight, 0 ); + + QCOMPARE( layout->minimumSize(), widget[0]->minimumSize() ); + QCOMPARE( layout->preferredSize(), widget[0]->preferredSize() ); + QCOMPARE( layout->maximumSize(), widget[0]->maximumSize() ); + + delete layout; + } + + // five, serial + { + TheAnchorLayout *layout = new TheAnchorLayout(); + + + layout->setAnchor(layout, Qt::AnchorLeft, widget[0], Qt::AnchorLeft, 0 ); + layout->setAnchor(layout, Qt::AnchorTop, widget[0], Qt::AnchorTop, 0 ); + layout->setAnchor(layout, Qt::AnchorBottom, widget[0], Qt::AnchorBottom, 0 ); + + layout->setAnchor(widget[0], Qt::AnchorRight, widget[1], Qt::AnchorLeft, 0 ); + layout->setAnchor(widget[1], Qt::AnchorRight, widget[2], Qt::AnchorLeft, 0 ); + layout->setAnchor(widget[2], Qt::AnchorRight, widget[3], Qt::AnchorLeft, 0 ); + layout->setAnchor(widget[3], Qt::AnchorRight, widget[4], Qt::AnchorLeft, 0 ); + layout->setAnchor(widget[4], Qt::AnchorRight, layout, Qt::AnchorRight, 0 ); + + + QCOMPARE( layout->minimumSize(), widget[0]->minimumSize() + + QSizeF( widget[1]->minimumWidth() + + widget[2]->minimumWidth() + + widget[3]->minimumWidth() + + widget[4]->minimumWidth(), 0 ) ); + + QCOMPARE( layout->preferredSize(), widget[0]->preferredSize() + + QSizeF( widget[1]->preferredWidth() + + widget[2]->preferredWidth() + + widget[3]->preferredWidth() + + widget[4]->preferredWidth(), 0 ) ); + + QCOMPARE( layout->maximumSize(), widget[0]->maximumSize() + + QSizeF( widget[1]->maximumWidth() + + widget[2]->maximumWidth() + + widget[3]->maximumWidth() + + widget[4]->maximumWidth(), 0 ) ); + + delete layout; + } + + + for( int i = 0; i < 5; i++ ) { + delete widget[i]; + } +} + +#ifdef TEST_COMPLEX_CASES + +void TestGraphicsAnchorLayout::testComplexCases_data() +{ + QTest::addColumn("size"); + QTest::addColumn("data"); + QTest::addColumn("sizehint"); + QTest::addColumn("result"); + + typedef BasicLayoutTestData BasicData; + typedef BasicLayoutTestResult BasicResult; + + // Three widgets, the same sizehint + { + BasicLayoutTestDataList theData; + AnchorItemSizeHintList theSizeHint; + BasicLayoutTestResultList theResult1; + BasicLayoutTestResultList theResult2; + + theData + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 10) + << BasicData(0, Qt::AnchorRight, 1, Qt::AnchorLeft, 10) + << BasicData(0, Qt::AnchorRight, 2, Qt::AnchorLeft, 10) + + << BasicData(1, Qt::AnchorRight, -1, Qt::AnchorRight, 10) + << BasicData(2, Qt::AnchorRight, -1, Qt::AnchorRight, 10) + + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorTop, 0) + << BasicData(-1, Qt::AnchorTop, 1, Qt::AnchorTop, 0) + << BasicData(-1, Qt::AnchorTop, 2, Qt::AnchorTop, 0) + ; + + theSizeHint + << AnchorItemSizeHint( 0, 50, 100, 0, 50, 100 ) + << AnchorItemSizeHint( 0, 50, 100, 0, 50, 100 ) + << AnchorItemSizeHint( 0, 50, 100, 0, 50, 100 ) + ; + theResult1 + << BasicResult(0, QRectF(10, 0, 30, 50) ) + << BasicResult(1, QRectF(50, 0, 30, 50) ) + << BasicResult(2, QRectF(50, 0, 30, 50) ) + ; + + theResult2 + << BasicResult(0, QRectF(10, 0, 60, 50) ) + << BasicResult(1, QRectF(80, 0, 60, 50) ) + << BasicResult(2, QRectF(80, 0, 60, 50) ) + ; + + QTest::newRow("Three, the same sizehint(1)") << QSizeF(90, 50) << theData << theSizeHint << theResult1; + QTest::newRow("Three, the same sizehint(2)") << QSizeF(150, 50) << theData << theSizeHint << theResult2; + } + + // Three widgets, serial is bigger + { + BasicLayoutTestDataList theData; + AnchorItemSizeHintList theSizeHint; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 10) + << BasicData(0, Qt::AnchorRight, 1, Qt::AnchorLeft, 10) + << BasicData(0, Qt::AnchorRight, 2, Qt::AnchorLeft, 10) + + << BasicData(1, Qt::AnchorRight, -1, Qt::AnchorRight, 10) + << BasicData(2, Qt::AnchorRight, -1, Qt::AnchorRight, 10) + + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorTop, 0) + << BasicData(-1, Qt::AnchorTop, 1, Qt::AnchorTop, 0) + << BasicData(-1, Qt::AnchorTop, 2, Qt::AnchorTop, 0) + ; + + theSizeHint + << AnchorItemSizeHint( 0, 100, 200, 0, 50, 100 ) + << AnchorItemSizeHint( 0, 50, 100, 0, 50, 100 ) + << AnchorItemSizeHint( 0, 50, 100, 0, 50, 100 ) + ; + + theResult + << BasicResult(0, QRectF(10, 0, 70, 50) ) + << BasicResult(1, QRectF(90, 0, 35, 50) ) + << BasicResult(2, QRectF(90, 0, 35, 50) ); + + QTest::newRow("Three, serial is bigger") << QSizeF(135, 50) << theData << theSizeHint << theResult; + + // theResult + // << BasicResult(0, QRectF(10, 0, 80, 50) ) + // << BasicResult(1, QRectF(100, 0, 60, 50) ) + // << BasicResult(2, QRectF(100, 0, 60, 50) ) + // ; + + // QTest::newRow("Three, serial is bigger") << QSizeF(170, 50) << theData << theSizeHint << theResult; + } + + + // Three widgets, parallel is bigger + { + BasicLayoutTestDataList theData; + AnchorItemSizeHintList theSizeHint; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 10) + << BasicData(0, Qt::AnchorRight, 1, Qt::AnchorLeft, 10) + << BasicData(0, Qt::AnchorRight, 2, Qt::AnchorLeft, 10) + + << BasicData(1, Qt::AnchorRight, -1, Qt::AnchorRight, 10) + << BasicData(2, Qt::AnchorRight, -1, Qt::AnchorRight, 10) + + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorTop, 0) + << BasicData(-1, Qt::AnchorTop, 1, Qt::AnchorTop, 0) + << BasicData(-1, Qt::AnchorTop, 2, Qt::AnchorTop, 0) + ; + + theSizeHint + << AnchorItemSizeHint( 0, 50, 100, 0, 50, 100 ) + << AnchorItemSizeHint( 0, 100, 200, 0, 50, 100 ) + << AnchorItemSizeHint( 0, 50, 100, 0, 50, 100 ) + ; + + // ### QGAL uses a different preferred size calculation algorithm. + // This algorithm was discussed with Jan-Arve and tries to grow + // items instead of shrinking them. + // In this case, the preferred size of each item becomes: + // Item 0: 50 + // Item 1: 100 (grows to avoid shrinking item 2) + // Item 2: 100 + // Therefore, the preferred size of the parent widget becomes + // 180 == (10 + 50 + 10 + 100 + 10) + // As we set its size to 150, each widget is shrinked in the same + // ratio, in order to achieve the width of 150 == (10 + 40 + 10 + 80 + 10) + + theResult + << BasicResult(0, QRectF(10, 0, 40, 50) ) + << BasicResult(1, QRectF(60, 0, 80, 50) ) + << BasicResult(2, QRectF(60, 0, 80, 50) ) + ; + + QTest::newRow("Three, parallel is bigger") << QSizeF(150, 50) << theData << theSizeHint << theResult; + + // #ifdef PREFERRED_IS_AVERAGE + // theResult + // << BasicResult(0, QRectF(10, 0, 50, 50) ) + // << BasicResult(1, QRectF(70, 0, 75, 50) ) + // << BasicResult(2, QRectF(70, 0, 75, 50) ) + // ; + + // QTest::newRow("Three, parallel is bigger") << QSizeF(155, 50) << theData << theSizeHint << theResult; + // #else + // theResult + // << BasicResult(0, QRectF(10, 0, 50, 50) ) + // << BasicResult(1, QRectF(70, 0, 66.66666666666666, 50) ) + // << BasicResult(2, QRectF(70, 0, 60.66666666666666, 50) ) + // ; + + // QTest::newRow("Three, parallel is bigger") << QSizeF(146.66666666666666, 50) << theData << theSizeHint << theResult; + // #endif + } + + // Three widgets, the same sizehint, one center anchor + { + BasicLayoutTestDataList theData; + AnchorItemSizeHintList theSizeHint; + BasicLayoutTestResultList theResult; + + theData + << BasicData(-1, Qt::AnchorLeft, 0, Qt::AnchorLeft, 10) + << BasicData(0, Qt::AnchorRight, 1, Qt::AnchorLeft, 10) + << BasicData(0, Qt::AnchorHorizontalCenter, 2, Qt::AnchorLeft, 10) + + << BasicData(1, Qt::AnchorRight, -1, Qt::AnchorRight, 10) + << BasicData(2, Qt::AnchorRight, -1, Qt::AnchorRight, 10) + + << BasicData(-1, Qt::AnchorTop, 0, Qt::AnchorTop, 0) + << BasicData(-1, Qt::AnchorTop, 1, Qt::AnchorTop, 0) + << BasicData(-1, Qt::AnchorTop, 2, Qt::AnchorTop, 0) + ; + + theSizeHint + << AnchorItemSizeHint( 0, 50, 100, 0, 50, 100 ) + << AnchorItemSizeHint( 0, 50, 100, 0, 50, 100 ) + << AnchorItemSizeHint( 0, 50, 100, 0, 50, 100 ) + ; + theResult + << BasicResult(0, QRectF(10, 0, 40, 50) ) + << BasicResult(1, QRectF(60, 0, 40, 50) ) + << BasicResult(2, QRectF(40, 0, 60, 50) ) + ; + + ; + + QTest::newRow("Three, the same sizehint, one center anchor") << QSizeF(110, 50) << theData << theSizeHint << theResult; + } +} + +void TestGraphicsAnchorLayout::testComplexCases() +{ + QFETCH(QSizeF, size); + QFETCH(BasicLayoutTestDataList, data); + QFETCH(AnchorItemSizeHintList, sizehint); + QFETCH(BasicLayoutTestResultList, result); + + QGraphicsWidget *widget = new QGraphicsWidget; + + // Determine amount of widgets to add. + int widgetCount = -1; + for (int i = 0; i < data.count(); ++i) { + const BasicLayoutTestData item = data[i]; + widgetCount = qMax(widgetCount, item.firstIndex); + widgetCount = qMax(widgetCount, item.secondIndex); + } + ++widgetCount; // widgetCount is max of indices. + + // Create dummy widgets + QList widgets; + for (int i = 0; i < widgetCount; ++i) { + TestWidget *w = new TestWidget; + + w->setMinimumWidth( sizehint[i].hmin ); + w->setPreferredWidth( sizehint[i].hpref ); + w->setMaximumWidth( sizehint[i].hmax ); + + w->setMinimumHeight( sizehint[i].vmin ); + w->setPreferredHeight( sizehint[i].vpref ); + w->setMaximumHeight( sizehint[i].vmax ); + + widgets << w; + } + + // Setup anchor layout + TheAnchorLayout *layout = new TheAnchorLayout; + + for (int i = 0; i < data.count(); ++i) { + const BasicLayoutTestData item = data[i]; + layout->setAnchor( + getItem(item.firstIndex, widgets, layout), + item.firstEdge, + getItem(item.secondIndex, widgets, layout), + item.secondEdge, + item.spacing ); + } + + widget->setLayout(layout); + widget->setContentsMargins(0,0,0,0); + + widget->setMinimumSize(size); + widget->setMaximumSize(size); + +// QTest::qWait(500); // layouting is asynchronous.. + + // Validate + for (int i = 0; i < result.count(); ++i) { + const BasicLayoutTestResult item = result[i]; + QCOMPARE(widgets[item.index]->geometry(), item.rect); + } + + // Test mirrored mode + widget->setLayoutDirection(Qt::RightToLeft); + layout->activate(); + // Validate + for (int j = 0; j < result.count(); ++j) { + const BasicLayoutTestResult item = result[j]; + QRectF mirroredRect(item.rect); + // only valid cases are mirrored + if (mirroredRect.isValid()){ + mirroredRect.moveLeft(size.width()-item.rect.width()-item.rect.left()); + } + QCOMPARE(widgets[item.index]->geometry(), mirroredRect); + delete widgets[item.index]; + } + + delete widget; +} +#endif //TEST_COMPLEX_CASES + + +QTEST_MAIN(TestGraphicsAnchorLayout) +#include "tst_qgraphicsanchorlayout1.moc" +//----------------------------------------------------------------------------- + -- cgit v0.12 From a05d2ad1f34303b4ec9b982c75d3a046384364df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Thu, 17 Sep 2009 12:58:16 +0200 Subject: Add QTest::ignoreMessage() calls in order to reduce some console noise. --- .../tst_qgraphicsanchorlayout1.cpp | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp index 44c74d0..79d7beb 100644 --- a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp +++ b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp @@ -405,7 +405,9 @@ void TestGraphicsAnchorLayout::testAddAndRemoveAnchor() QCOMPARE( layout->count(), 4 ); // test setting invalid anchors + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor NULL items"); layout->setAnchor(0, Qt::AnchorLeft, widget1, Qt::AnchorLeft, 1); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor NULL items"); layout->setAnchor(layout, Qt::AnchorLeft, 0, Qt::AnchorLeft, 1); QCOMPARE( layout->count(), 4 ); @@ -413,11 +415,13 @@ void TestGraphicsAnchorLayout::testAddAndRemoveAnchor() layout->removeAnchor(widget4, Qt::AnchorRight, widget1, Qt::AnchorRight); // anchor one horizontal edge with vertical edge. it should not add this widget as a child + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor edges of different orientations"); layout->setAnchor(layout, Qt::AnchorLeft, widget5, Qt::AnchorTop, 10); QCOMPARE( layout->count(), 4 ); // ###: NOT SUPPORTED // anchor two edges of a widget (to define width / height) + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); layout->setAnchor(widget5, Qt::AnchorLeft, widget5, Qt::AnchorRight, 10); // QCOMPARE( layout->count(), 5 ); QCOMPARE( layout->count(), 4 ); @@ -547,6 +551,9 @@ void TestGraphicsAnchorLayout::testSpecialCases() { // One widget, setLayout before defining layouts { + QTest::ignoreMessage(QtWarningMsg, "QGraphicsLayout::addChildLayoutItem: QGraphicsWidget \"\"" + " in wrong parent; moved to correct parent"); + QGraphicsWidget *widget = new QGraphicsWidget; TheAnchorLayout *layout = new TheAnchorLayout(); widget->setLayout(layout); @@ -565,6 +572,8 @@ void TestGraphicsAnchorLayout::testSpecialCases() // One widget, layout inside layout, layout inside layout inside layout { + QTest::ignoreMessage(QtWarningMsg, "QGraphicsLayout::addChildLayoutItem: QGraphicsWidget \"\"" + " in wrong parent; moved to correct parent"); QGraphicsWidget *widget = new QGraphicsWidget; TheAnchorLayout *layout = new TheAnchorLayout(); widget->setLayout(layout); @@ -1798,6 +1807,15 @@ void TestGraphicsAnchorLayout::testCenterAnchors_data() theResult << BasicResult(0, QRectF(5, 5, 10, 10) ); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor edges of different orientations"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor edges of different orientations"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor edges of different orientations"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); QTest::newRow("center, basic with invalid") << QSizeF(20, 20) << theData << theResult; } @@ -1929,6 +1947,9 @@ void TestGraphicsAnchorLayout::testCenterAnchors_data() << BasicResult(1, QRectF(20, 0, 30, 10)) << BasicResult(2, QRectF(60, 15, 40, 10)); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::newRow("center, three") << QSizeF(100, 50) << theData << theResult; } @@ -2095,6 +2116,11 @@ void TestGraphicsAnchorLayout::testRemoveCenterAnchor_data() << BasicResult(1, QRectF(20, 0, 30, 10)) << BasicResult(2, QRectF(60, 15, 40, 10)); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::newRow("remove, center, three") << QSizeF(100, 50) << theData << theRemoveData << theResult; } @@ -2129,6 +2155,8 @@ void TestGraphicsAnchorLayout::testRemoveCenterAnchor_data() theResult << BasicResult(0, QRectF(5, 5, 10, 10) ); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); + QTest::ignoreMessage(QtWarningMsg, "QGraphicsAnchorLayout::addAnchor(): Cannot anchor the item to itself"); QTest::newRow("remove, center, basic 2") << QSizeF(20, 20) << theData << theRemoveData << theResult; } -- cgit v0.12 From c2443b9d2cadb220012d37e4ed6a5973a6cc6abe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Thu, 17 Sep 2009 13:40:15 +0200 Subject: Add QEXPECT_FAIL for the one test that fails. Note that t does not fail with simplification turned off (QT_ANCHORLAYOUT_NO_SIMPLIFICATION=1) --- tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp index 79d7beb..1216b76 100644 --- a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp +++ b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp @@ -1712,6 +1712,8 @@ void TestGraphicsAnchorLayout::testBasicLayout() // Validate for (int i = 0; i < result.count(); ++i) { + if (i == 1) + QEXPECT_FAIL("Two, mixed", "Works with simplification disabled.", Continue); const BasicLayoutTestResult item = result[i]; QCOMPARE(widgets[item.index]->geometry(), item.rect); } -- cgit v0.12 From ddf9e97d6700b78711632d352f84c469d000f97b Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 17 Sep 2009 13:53:36 +0200 Subject: Designer: tab order in DeviceProfileDialog corrected Reviewed-by: Friedemann Kleint --- .../components/formeditor/deviceprofiledialog.ui | 84 ++++++++++++---------- 1 file changed, 46 insertions(+), 38 deletions(-) diff --git a/tools/designer/src/components/formeditor/deviceprofiledialog.ui b/tools/designer/src/components/formeditor/deviceprofiledialog.ui index 3186c57..17ee966 100644 --- a/tools/designer/src/components/formeditor/deviceprofiledialog.ui +++ b/tools/designer/src/components/formeditor/deviceprofiledialog.ui @@ -1,7 +1,8 @@ - - DeviceProfileDialog - - + + + dialog + + 0 0 @@ -9,78 +10,78 @@ 209 - + - - - - - + + + + + &Family - + m_systemFontComboBox - - + + - - - + + + &Point Size - + m_systemFontSizeCombo - - + + - - - + + + Style - + m_styleCombo - - + + - - - + + + Device DPI - - + + - - - + + + Name - - + + - - + + Qt::Horizontal - + QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Open|QDialogButtonBox::Save @@ -95,6 +96,13 @@ 1 + + m_nameLineEdit + m_systemFontComboBox + m_systemFontSizeCombo + m_styleCombo + buttonBox + -- cgit v0.12 From 5a29ceba42840add7a1dcf205c76e39065bee18d Mon Sep 17 00:00:00 2001 From: Takumi ASAKI Date: Thu, 17 Sep 2009 13:30:18 +0200 Subject: compile fix for embedded Linux and defined QT_COORD_TYPE If we define QT_COORD_TYPE, src/testlib doesn't compile for embedded Linux. Reviewed-By: joerg --- src/testlib/qtestcase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/testlib/qtestcase.h b/src/testlib/qtestcase.h index edc6219..4f11f66 100644 --- a/src/testlib/qtestcase.h +++ b/src/testlib/qtestcase.h @@ -218,7 +218,7 @@ namespace QTest template bool qCompare(T1 const &, T2 const &, const char *, const char *, const char *, int); -#if defined(QT_ARCH_WINDOWSCE) && defined(QT_COORD_TYPE) +#if defined(QT_COORD_TYPE) && (defined(QT_ARCH_ARM) || defined(QT_NO_FPU) || defined(QT_ARCH_WINDOWSCE)) template <> inline bool qCompare(qreal const &t1, float const &t2, const char *actual, const char *expected, const char *file, int line) -- cgit v0.12 From d8a862b403ea0801088f0be7ba8223743172702f Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Thu, 17 Sep 2009 14:12:12 +0200 Subject: Wrong string when setting formula through menu in demos/spreadsheet. Reviewed-by: TrustMe Task-number: 260975 Task-number: QT-4506 --- demos/spreadsheet/spreadsheet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/spreadsheet/spreadsheet.cpp b/demos/spreadsheet/spreadsheet.cpp index 0449a91..7f057a2 100644 --- a/demos/spreadsheet/spreadsheet.cpp +++ b/demos/spreadsheet/spreadsheet.cpp @@ -420,7 +420,7 @@ void SpreadSheet::actionMath_helper(const QString &title, const QString &op) &cell1, &cell2, &out)) { int row, col; decode_pos(out, &row, &col); - table->item(row, col)->setText(tr("%1, %2, %3").arg(op, cell1, cell2)); + table->item(row, col)->setText(tr("%1 %2 %3").arg(op, cell1, cell2)); } } -- cgit v0.12 From 992f1b36dc7c246bb978c9c60b11369e3d1cce9d Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 17 Sep 2009 13:21:14 +0200 Subject: Fix glyph selection in symbol fonts that contain unicode cmap table Some symbol fonts will contain a unicode cmap table in addition to the microsoft symbol cmap table that maps the symbol range (private range 0xf000 - 0xf100) into the correct glyphs. This is essentially a broken unicode table, and we should not prefer it if these conditions are true. In the strict cases where these conditions apply, we fall back to the symbol table instead. Task-number: QT-2354 Done-with: Lars Reviewed by: Lars --- src/gui/text/qfontengine.cpp | 77 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 63 insertions(+), 14 deletions(-) diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index 8dd01d7..e5a88fc 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -946,48 +946,60 @@ const uchar *QFontEngine::getCMap(const uchar *table, uint tableSize, bool *isSy if (maps + 8 * numTables > endPtr) return 0; + enum { + Invalid, + Symbol, + AppleRoman, + Unicode11, + Unicode, + MicrosoftUnicode, + MicrosoftUnicodeExtended + }; + + int symbolTable = -1; int tableToUse = -1; - int score = 0; + int score = Invalid; for (int n = 0; n < numTables; ++n) { const quint16 platformId = qFromBigEndian(maps + 8 * n); const quint16 platformSpecificId = qFromBigEndian(maps + 8 * n + 2); switch (platformId) { case 0: // Unicode - if (score < 4 && + if (score < Unicode && (platformSpecificId == 0 || platformSpecificId == 2 || platformSpecificId == 3)) { tableToUse = n; - score = 4; - } else if (score < 3 && platformSpecificId == 1) { + score = Unicode; + } else if (score < Unicode11 && platformSpecificId == 1) { tableToUse = n; - score = 3; + score = Unicode11; } break; case 1: // Apple - if (score < 2 && platformSpecificId == 0) { // Apple Roman + if (score < AppleRoman && platformSpecificId == 0) { // Apple Roman tableToUse = n; - score = 2; + score = AppleRoman; } break; case 3: // Microsoft switch (platformSpecificId) { case 0: - if (score < 1) { + symbolTable = n; + if (score < Symbol) { tableToUse = n; - score = 1; + score = Symbol; } break; case 1: - if (score < 5) { + if (score < MicrosoftUnicode) { tableToUse = n; - score = 5; + score = MicrosoftUnicode; } break; case 0xa: - if (score < 6) { + if (score < MicrosoftUnicodeExtended) { tableToUse = n; - score = 6; + score = MicrosoftUnicodeExtended; } break; default: @@ -999,7 +1011,9 @@ const uchar *QFontEngine::getCMap(const uchar *table, uint tableSize, bool *isSy } if(tableToUse < 0) return 0; - *isSymbolFont = (score == 1); + +resolveTable: + *isSymbolFont = (score == Symbol); unsigned int unicode_table = qFromBigEndian(maps + 8*tableToUse + 4); @@ -1019,6 +1033,41 @@ const uchar *QFontEngine::getCMap(const uchar *table, uint tableSize, bool *isSy if (table + unicode_table + length > endPtr) return 0; *cmapSize = length; + + // To support symbol fonts that contain a unicode table for the symbol area + // we check the cmap tables and fall back to symbol font unless that would + // involve losing information from the unicode table + if (symbolTable > -1 && ((score == Unicode) || (score == Unicode11))) { + const uchar *selectedTable = table + unicode_table; + + // Check that none of the latin1 range are in the unicode table + bool unicodeTableHasLatin1 = false; + for (int uc=0x00; uc<0x100; ++uc) { + if (getTrueTypeGlyphIndex(selectedTable, uc) != 0) { + unicodeTableHasLatin1 = true; + break; + } + } + + // Check that at least one symbol char is in the unicode table + bool unicodeTableHasSymbols = false; + if (!unicodeTableHasLatin1) { + for (int uc=0xf000; uc<0xf100; ++uc) { + if (getTrueTypeGlyphIndex(selectedTable, uc) != 0) { + unicodeTableHasSymbols = true; + break; + } + } + } + + // Fall back to symbol table + if (!unicodeTableHasLatin1 && unicodeTableHasSymbols) { + tableToUse = symbolTable; + score = Symbol; + goto resolveTable; + } + } + return table + unicode_table; } -- cgit v0.12 From 00d172411920920fa3cb120506a898889e724148 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Thu, 17 Sep 2009 09:45:52 +0200 Subject: Enable compiling Symbian port with QT_NO_CURSOR Added some missing #ifdef QT_NO_CURSOR, so the symbian port still compiles if this feature is configured out. Reviewed-by: Jason Barron --- src/gui/kernel/qapplication_s60.cpp | 10 +++++++--- src/gui/kernel/qcursor_s60.cpp | 4 +++- src/gui/kernel/qdnd_s60.cpp | 10 ++++++++++ src/gui/kernel/qt_s60_p.h | 2 ++ src/gui/kernel/qwidget_s60.cpp | 3 ++- 5 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index fd889fc..c7cba2b 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -439,7 +439,7 @@ void QSymbianControl::HandlePointerEvent(const TPointerEvent& pEvent) } } S60->lastCursorPos = globalPos; -#ifndef Q_SYMBIAN_FIXED_POINTER_CURSORS +#if !defined(QT_NO_CURSOR) && !defined(Q_SYMBIAN_FIXED_POINTER_CURSORS) if (S60->brokenPointerCursors) qt_symbian_move_cursor_sprite(); #endif @@ -888,6 +888,7 @@ void qt_init(QApplicationPrivate * /* priv */, int) QApplicationPrivate::navigationMode = Qt::NavigationModeKeypadDirectional; } +#ifndef QT_NO_CURSOR //Check if window server pointer cursors are supported or not #ifndef Q_SYMBIAN_FIXED_POINTER_CURSORS //In generic binary, use the HAL and OS version @@ -912,6 +913,7 @@ void qt_init(QApplicationPrivate * /* priv */, int) #endif S60->wsSession().SetPointerCursorMode(EPointerCursorNormal); } +#endif /* ### Commented out for now as parameter handling not needed in SOS(yet). Code below will break testlib with -o flag @@ -1275,7 +1277,7 @@ int QApplication::s60ProcessEvent(TWsEvent *event) } break; case EEventFocusGained: - RDebug::Printf("focus gained %x", control); +#ifndef QT_NO_CURSOR //re-enable mouse interaction if (S60->mouseInteractionEnabled) { #ifndef Q_SYMBIAN_FIXED_POINTER_CURSORS @@ -1285,9 +1287,10 @@ int QApplication::s60ProcessEvent(TWsEvent *event) #endif S60->wsSession().SetPointerCursorMode(EPointerCursorNormal); } +#endif break; case EEventFocusLost: - RDebug::Printf("focus lost %x", control); +#ifndef QT_NO_CURSOR //disable mouse as may be moving to application that does not support it if (S60->mouseInteractionEnabled) { #ifndef Q_SYMBIAN_FIXED_POINTER_CURSORS @@ -1297,6 +1300,7 @@ int QApplication::s60ProcessEvent(TWsEvent *event) #endif S60->wsSession().SetPointerCursorMode(EPointerCursorNone); } +#endif break; default: break; diff --git a/src/gui/kernel/qcursor_s60.cpp b/src/gui/kernel/qcursor_s60.cpp index 757eaa8..b50eb71 100644 --- a/src/gui/kernel/qcursor_s60.cpp +++ b/src/gui/kernel/qcursor_s60.cpp @@ -52,8 +52,10 @@ QT_BEGIN_NAMESPACE +#ifndef QT_NO_CURSOR static QCursor cursorSprite; -static int cursorSpriteVisible; +static int cursorSpriteVisible; +#endif //pos and setpos are required whether cursors are configured or not. QPoint QCursor::pos() diff --git a/src/gui/kernel/qdnd_s60.cpp b/src/gui/kernel/qdnd_s60.cpp index 2456185..3d6ecd2 100644 --- a/src/gui/kernel/qdnd_s60.cpp +++ b/src/gui/kernel/qdnd_s60.cpp @@ -214,11 +214,13 @@ bool QDragManager::eventFilter(QObject *o, QEvent *e) case QEvent::MouseButtonRelease: { qApp->removeEventFilter(this); +#ifndef QT_NO_CURSOR if (restoreCursor) { QApplication::restoreOverrideCursor(); willDrop = false; restoreCursor = false; } +#endif if (object && object->target()) { QMouseEvent *me = (QMouseEvent *)e; @@ -267,7 +269,9 @@ Qt::DropAction QDragManager::drag(QDrag *o) updatePixmap(); updateCursor(); +#ifndef QT_NO_CURSOR qt_symbian_set_cursor_visible(true); //force cursor on even for touch phone +#endif object->d_func()->target = 0; @@ -282,10 +286,12 @@ Qt::DropAction QDragManager::drag(QDrag *o) delete eventLoop; eventLoop = 0; +#ifndef QT_NO_CURSOR qt_symbian_set_cursor_visible(false); overrideCursor = QCursor(); //deref the cursor data qt_symbian_dnd_dragging = false; +#endif return global_accepted_action; } @@ -306,10 +312,12 @@ void QDragManager::cancel(bool deleteSource) drag_object = object = 0; } +#ifndef QT_NO_CURSOR if (restoreCursor) { QApplication::restoreOverrideCursor(); restoreCursor = false; } +#endif global_accepted_action = Qt::IgnoreAction; } @@ -317,10 +325,12 @@ void QDragManager::cancel(bool deleteSource) void QDragManager::drop() { +#ifndef QT_NO_CURSOR if (restoreCursor) { QApplication::restoreOverrideCursor(); restoreCursor = false; } +#endif } QVariant QDropData::retrieveData_sys(const QString &mimetype, QVariant::Type type) const diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index 794d15a..67084c4 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -304,11 +304,13 @@ static inline QImage::Format qt_TDisplayMode2Format(TDisplayMode mode) return format; } +#ifndef QT_NO_CURSOR void qt_symbian_setWindowCursor(const QCursor &cursor, const CCoeControl* wid); void qt_symbian_setWindowGroupCursor(const QCursor &cursor, RWindowTreeNode &node); void qt_symbian_setGlobalCursor(const QCursor &cursor); void qt_symbian_set_cursor_visible(bool visible); bool qt_symbian_is_cursor_visible(); +#endif QT_END_NAMESPACE diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 522ce33..3744377 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -1222,8 +1222,9 @@ void QWidget::releaseMouse() WId id = effectiveWinId(); id->SetPointerCapture(false); QWidgetPrivate::mouseGrabber = 0; - +#ifndef QT_NO_CURSOR QApplication::restoreOverrideCursor(); +#endif } } -- cgit v0.12 From ba60db073755e2e60cfc0899355b45bcb2bce639 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Thu, 17 Sep 2009 09:48:07 +0200 Subject: Fix unused variable compiler warning Removed UID that wasn't used. Reviewed-by: Jason Barron --- src/gui/kernel/qapplication_s60.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index c7cba2b..4573c71 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -855,7 +855,6 @@ void qt_init(QApplicationPrivate * /* priv */, int) //Check if mouse interaction is supported (either EMouse=1 in the HAL, or EMachineUID is one of the phones known to support this) const TInt KMachineUidSamsungI8510 = 0x2000C51E; - const TInt KMachineUidSamsungI550 = 0x2000A678; TInt machineUID; TInt mouse; TInt touch; -- cgit v0.12 From 585a70c45d69b8abbea5f8f6ff117484247e95eb Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Thu, 17 Sep 2009 10:09:27 +0200 Subject: Update def files DEF files for ARMv5 UREL, that include the autotest exports. Note that Q_AUTOTEST_EXPORT is only on by default in internal builds Reviewed-by: Iain --- src/s60installs/eabi/QtCoreu.def | 99 +++++++- src/s60installs/eabi/QtGuiu.def | 452 ++++++++++++++++++++++++++++++++- src/s60installs/eabi/QtMultimediau.def | 132 ++++++++++ src/s60installs/eabi/QtNetworku.def | 30 +++ src/s60installs/eabi/QtSqlu.def | 6 + src/s60installs/eabi/QtSvgu.def | 9 + src/s60installs/eabi/QtTestu.def | 21 ++ src/s60installs/eabi/phononu.def | 12 + 8 files changed, 749 insertions(+), 12 deletions(-) diff --git a/src/s60installs/eabi/QtCoreu.def b/src/s60installs/eabi/QtCoreu.def index 0ef2f8c..dc41f85 100644 --- a/src/s60installs/eabi/QtCoreu.def +++ b/src/s60installs/eabi/QtCoreu.def @@ -2066,7 +2066,7 @@ EXPORTS _ZNK13QFSFileEngine12isSequentialEv @ 2065 NONAME _ZNK13QFSFileEngine13caseSensitiveEv @ 2066 NONAME _ZNK13QFSFileEngine14isRelativePathEv @ 2067 NONAME - _ZNK13QFSFileEngine15fileNameSymbianEN19QAbstractFileEngine8FileNameE @ 2068 NONAME + _ZNK13QFSFileEngine15fileNameSymbianEN19QAbstractFileEngine8FileNameE @ 2068 NONAME ABSENT _ZNK13QFSFileEngine17supportsExtensionEN19QAbstractFileEngine9ExtensionE @ 2069 NONAME _ZNK13QFSFileEngine3posEv @ 2070 NONAME _ZNK13QFSFileEngine4sizeEv @ 2071 NONAME @@ -3723,4 +3723,101 @@ EXPORTS _ZNK19QProcessEnvironment8containsERK7QString @ 3722 NONAME _ZNK19QProcessEnvironmenteqERKS_ @ 3723 NONAME _ZNK8QProcess18processEnvironmentEv @ 3724 NONAME + _Z20qt_symbianLocaleNamei @ 3725 NONAME + _ZN10QByteArray6insertEiPKci @ 3726 NONAME + _ZN10QByteArray7prependEPKci @ 3727 NONAME + _ZN10QEventLoop19getStaticMetaObjectEv @ 3728 NONAME + _ZN11QFinalState19getStaticMetaObjectEv @ 3729 NONAME + _ZN11QThreadPool19getStaticMetaObjectEv @ 3730 NONAME + _ZN11QTranslator19getStaticMetaObjectEv @ 3731 NONAME + _ZN12QEasingCurve19getStaticMetaObjectEv @ 3732 NONAME + _ZN13QHistoryState19getStaticMetaObjectEv @ 3733 NONAME + _ZN13QPluginLoader19getStaticMetaObjectEv @ 3734 NONAME + _ZN13QSharedMemory19getStaticMetaObjectEv @ 3735 NONAME + _ZN13QSignalMapper19getStaticMetaObjectEv @ 3736 NONAME + _ZN13QStateMachine19getStaticMetaObjectEv @ 3737 NONAME + _ZN14QAbstractState19getStaticMetaObjectEv @ 3738 NONAME + _ZN14QFactoryLoader19getStaticMetaObjectEv @ 3739 NONAME + _ZN14QTemporaryFile19getStaticMetaObjectEv @ 3740 NONAME + _ZN15QAnimationGroup19getStaticMetaObjectEv @ 3741 NONAME + _ZN15QPauseAnimation19getStaticMetaObjectEv @ 3742 NONAME + _ZN15QSocketNotifier19getStaticMetaObjectEv @ 3743 NONAME + _ZN16QCoreApplication19getStaticMetaObjectEv @ 3744 NONAME + _ZN16QEventTransition19getStaticMetaObjectEv @ 3745 NONAME + _ZN16QTextCodecPlugin19getStaticMetaObjectEv @ 3746 NONAME + _ZN17QSignalTransition19getStaticMetaObjectEv @ 3747 NONAME + _ZN17QVariantAnimation19getStaticMetaObjectEv @ 3748 NONAME + _ZN18QAbstractAnimation19getStaticMetaObjectEv @ 3749 NONAME + _ZN18QAbstractItemModel11endMoveRowsEv @ 3750 NONAME + _ZN18QAbstractItemModel12columnsMovedERK11QModelIndexiiS2_i @ 3751 NONAME + _ZN18QAbstractItemModel13beginMoveRowsERK11QModelIndexiiS2_i @ 3752 NONAME + _ZN18QAbstractItemModel13endResetModelEv @ 3753 NONAME + _ZN18QAbstractItemModel14endMoveColumnsEv @ 3754 NONAME + _ZN18QAbstractItemModel15beginResetModelEv @ 3755 NONAME + _ZN18QAbstractItemModel16beginMoveColumnsERK11QModelIndexiiS2_i @ 3756 NONAME + _ZN18QAbstractItemModel18rowsAboutToBeMovedERK11QModelIndexiiS2_i @ 3757 NONAME + _ZN18QAbstractItemModel19getStaticMetaObjectEv @ 3758 NONAME + _ZN18QAbstractItemModel21columnsAboutToBeMovedERK11QModelIndexiiS2_i @ 3759 NONAME + _ZN18QAbstractItemModel9rowsMovedERK11QModelIndexiiS2_i @ 3760 NONAME + _ZN18QAbstractListModel19getStaticMetaObjectEv @ 3761 NONAME + _ZN18QFileSystemWatcher19getStaticMetaObjectEv @ 3762 NONAME + _ZN18QPropertyAnimation19getStaticMetaObjectEv @ 3763 NONAME + _ZN19QAbstractTableModel19getStaticMetaObjectEv @ 3764 NONAME + _ZN19QAbstractTransition19getStaticMetaObjectEv @ 3765 NONAME + _ZN21QObjectCleanupHandler19getStaticMetaObjectEv @ 3766 NONAME + _ZN23QParallelAnimationGroup19getStaticMetaObjectEv @ 3767 NONAME + _ZN24QAbstractEventDispatcher19getStaticMetaObjectEv @ 3768 NONAME + _ZN24QNonContiguousByteDevice19getStaticMetaObjectEv @ 3769 NONAME + _ZN25QAbstractItemModelPrivate10itemsMovedERK11QModelIndexiiS2_iN2Qt11OrientationE @ 3770 NONAME + _ZN25QAbstractItemModelPrivate19itemsAboutToBeMovedERK11QModelIndexiiS2_iN2Qt11OrientationE @ 3771 NONAME + _ZN25QAbstractItemModelPrivate21movePersistentIndexesE7QVectorIP25QPersistentModelIndexDataEiRK11QModelIndexN2Qt11OrientationE @ 3772 NONAME + _ZN25QAbstractItemModelPrivate9allowMoveERK11QModelIndexiiS2_iN2Qt11OrientationE @ 3773 NONAME + _ZN25QSequentialAnimationGroup19getStaticMetaObjectEv @ 3774 NONAME + _ZN5QFile19getStaticMetaObjectEv @ 3775 NONAME + _ZN6QEvent19getStaticMetaObjectEv @ 3776 NONAME + _ZN6QState19getStaticMetaObjectEv @ 3777 NONAME + _ZN6QTimer19getStaticMetaObjectEv @ 3778 NONAME + _ZN7QBuffer19getStaticMetaObjectEv @ 3779 NONAME + _ZN7QLocale19getStaticMetaObjectEv @ 3780 NONAME + _ZN7QObject19getStaticMetaObjectEv @ 3781 NONAME + _ZN7QThread19getStaticMetaObjectEv @ 3782 NONAME + _ZN8QLibrary19getStaticMetaObjectEv @ 3783 NONAME + _ZN8QProcess19getStaticMetaObjectEv @ 3784 NONAME + _ZN9QIODevice19getStaticMetaObjectEv @ 3785 NONAME + _ZN9QListData7append2ERKS_ @ 3786 NONAME + _ZN9QListData7detach3Ev @ 3787 NONAME + _ZN9QMimeData19getStaticMetaObjectEv @ 3788 NONAME + _ZN9QSettings19getStaticMetaObjectEv @ 3789 NONAME + _ZN9QTimeLine19getStaticMetaObjectEv @ 3790 NONAME + _ZTI13QUnifiedTimer @ 3791 NONAME ; ## + _ZTI14QProcessActive @ 3792 NONAME ; ## + _ZTI18QNotifyChangeEvent @ 3793 NONAME ; ## + _ZTI20QEasingCurveFunction @ 3794 NONAME ; ## + _ZTI21QFactoryLoaderPrivate @ 3795 NONAME ; ## + _ZTI21QSignalEventGenerator @ 3796 NONAME ; ## + _ZTI22QAnimationGroupPrivate @ 3797 NONAME ; ## + _ZTI23QProcessManagerMediator @ 3798 NONAME ; ## + _ZTI24QSignalTransitionPrivate @ 3799 NONAME ; ## + _ZTI27QByteDeviceWrappingIoDevice @ 3800 NONAME ; ## + _ZTI32QSequentialAnimationGroupPrivate @ 3801 NONAME ; ## + _ZTI34QNonContiguousByteDeviceBufferImpl @ 3802 NONAME ; ## + _ZTI36QNonContiguousByteDeviceIoDeviceImpl @ 3803 NONAME ; ## + _ZTI37QNonContiguousByteDeviceByteArrayImpl @ 3804 NONAME ; ## + _ZTI38QNonContiguousByteDeviceRingBufferImpl @ 3805 NONAME ; ## + _ZTV13QUnifiedTimer @ 3806 NONAME ; ## + _ZTV14QProcessActive @ 3807 NONAME ; ## + _ZTV18QNotifyChangeEvent @ 3808 NONAME ; ## + _ZTV20QEasingCurveFunction @ 3809 NONAME ; ## + _ZTV21QFactoryLoaderPrivate @ 3810 NONAME ; ## + _ZTV21QSignalEventGenerator @ 3811 NONAME ; ## + _ZTV22QAnimationGroupPrivate @ 3812 NONAME ; ## + _ZTV23QProcessManagerMediator @ 3813 NONAME ; ## + _ZTV24QSignalTransitionPrivate @ 3814 NONAME ; ## + _ZTV27QByteDeviceWrappingIoDevice @ 3815 NONAME ; ## + _ZTV32QSequentialAnimationGroupPrivate @ 3816 NONAME ; ## + _ZTV34QNonContiguousByteDeviceBufferImpl @ 3817 NONAME ; ## + _ZTV36QNonContiguousByteDeviceIoDeviceImpl @ 3818 NONAME ; ## + _ZTV37QNonContiguousByteDeviceByteArrayImpl @ 3819 NONAME ; ## + _ZTV38QNonContiguousByteDeviceRingBufferImpl @ 3820 NONAME ; ## + _Zls6QDebugRK8QMargins @ 3821 NONAME diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index 0019187..a605f6f 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -4195,7 +4195,7 @@ EXPORTS _ZN19QApplicationPrivate15graphics_systemE @ 4194 NONAME DATA 4 _ZN19QApplicationPrivate15process_cmdlineEv @ 4195 NONAME _ZN19QApplicationPrivate16isBlockedByModalEP7QWidget @ 4196 NONAME - _ZN19QApplicationPrivate16keypadNavigationE @ 4197 NONAME DATA 1 + _ZN19QApplicationPrivate16keypadNavigationE @ 4197 NONAME DATA 1 ABSENT _ZN19QApplicationPrivate16modifier_buttonsE @ 4198 NONAME DATA 4 _ZN19QApplicationPrivate16setSystemPaletteERK8QPalette @ 4199 NONAME _ZN19QApplicationPrivate17cursor_flash_timeE @ 4200 NONAME DATA 4 @@ -11925,12 +11925,12 @@ EXPORTS _ZN19QKeyEventTransitionD1Ev @ 11924 NONAME _ZN19QKeyEventTransitionD2Ev @ 11925 NONAME _ZN20QGraphicsItemPrivate11removeChildEP13QGraphicsItem @ 11926 NONAME - _ZN20QGraphicsItemPrivate11setSubFocusEv @ 11927 NONAME - _ZN20QGraphicsItemPrivate13clearSubFocusEv @ 11928 NONAME + _ZN20QGraphicsItemPrivate11setSubFocusEv @ 11927 NONAME ABSENT + _ZN20QGraphicsItemPrivate13clearSubFocusEv @ 11928 NONAME ABSENT _ZN20QGraphicsItemPrivate15resetFocusProxyEv @ 11929 NONAME _ZN20QGraphicsItemPrivate18setTransformHelperERK10QTransform @ 11930 NONAME _ZN20QGraphicsItemPrivate19setParentItemHelperEP13QGraphicsItem @ 11931 NONAME - _ZN20QGraphicsItemPrivate20ensureSceneTransformEv @ 11932 NONAME + _ZN20QGraphicsItemPrivate20ensureSceneTransformEv @ 11932 NONAME ABSENT _ZN20QGraphicsItemPrivate23appendGraphicsTransformEP18QGraphicsTransform @ 11933 NONAME _ZN20QGraphicsItemPrivate26childrenBoundingRectHelperEP10QTransformP6QRectF @ 11934 NONAME _ZN20QGraphicsItemPrivate29ensureSceneTransformRecursiveEPP13QGraphicsItem @ 11935 NONAME @@ -11988,7 +11988,7 @@ EXPORTS _ZN25QGraphicsSceneLinearIndex11qt_metacallEN11QMetaObject4CallEiPPv @ 11987 NONAME _ZN25QGraphicsSceneLinearIndex11qt_metacastEPKc @ 11988 NONAME _ZN25QGraphicsSceneLinearIndex16staticMetaObjectE @ 11989 NONAME DATA 16 - _ZN26QAbstractScrollAreaPrivate19_q_gestureTriggeredEv @ 11990 NONAME + _ZN26QAbstractScrollAreaPrivate19_q_gestureTriggeredEv @ 11990 NONAME ABSENT _ZN26QBasicMouseEventTransition11qt_metacallEN11QMetaObject4CallEiPPv @ 11991 NONAME _ZN26QBasicMouseEventTransition11qt_metacastEPKc @ 11992 NONAME _ZN26QBasicMouseEventTransition12onTransitionEP6QEvent @ 11993 NONAME @@ -12046,7 +12046,7 @@ EXPORTS _ZN8QGesture5resetEv @ 12045 NONAME _ZN8QGesture7startedEv @ 12046 NONAME _ZN8QGesture8finishedEv @ 12047 NONAME - _ZN8QGesture9cancelledEv @ 12048 NONAME + _ZN8QGesture8canceledEv @ 12048 NONAME _ZN8QGesture9triggeredEv @ 12049 NONAME _ZN8QGestureC2EP7QObject @ 12050 NONAME ABSENT _ZN8QGestureC2ER15QGesturePrivateP7QObject @ 12051 NONAME ABSENT @@ -12140,7 +12140,7 @@ EXPORTS _ZNK11QTouchEvent10TouchPoint9isPrimaryEv @ 12139 NONAME _ZNK11QTouchEvent10TouchPoint9sceneRectEv @ 12140 NONAME _ZNK11QTouchEvent10TouchPoint9screenPosEv @ 12141 NONAME - _ZNK11QVectorPath20convertToPainterPathEv @ 12142 NONAME + _ZNK11QVectorPath20convertToPainterPathEv @ 12142 NONAME ABSENT _ZNK12QLineControl10cursorRectEv @ 12143 NONAME _ZNK12QLineControl10findInMaskEibb5QChar @ 12144 NONAME _ZNK12QLineControl10maskStringEjRK7QStringb @ 12145 NONAME @@ -12364,11 +12364,11 @@ EXPORTS _ZN21QGraphicsAnchorLayout10invalidateEv @ 12363 NONAME _ZN21QGraphicsAnchorLayout10setSpacingEf @ 12364 NONAME _ZN21QGraphicsAnchorLayout11setGeometryERK6QRectF @ 12365 NONAME - _ZN21QGraphicsAnchorLayout12removeAnchorEP19QGraphicsLayoutItemN2Qt11AnchorPointES1_S3_ @ 12366 NONAME + _ZN21QGraphicsAnchorLayout12removeAnchorEP19QGraphicsLayoutItemN2Qt11AnchorPointES1_S3_ @ 12366 NONAME ABSENT _ZN21QGraphicsAnchorLayout16addCornerAnchorsEP19QGraphicsLayoutItemN2Qt6CornerES1_S3_ @ 12367 NONAME - _ZN21QGraphicsAnchorLayout16setAnchorSpacingEPK19QGraphicsLayoutItemN2Qt11AnchorPointES2_S4_f @ 12368 NONAME + _ZN21QGraphicsAnchorLayout16setAnchorSpacingEPK19QGraphicsLayoutItemN2Qt11AnchorPointES2_S4_f @ 12368 NONAME ABSENT _ZN21QGraphicsAnchorLayout18setVerticalSpacingEf @ 12369 NONAME - _ZN21QGraphicsAnchorLayout18unsetAnchorSpacingEPK19QGraphicsLayoutItemN2Qt11AnchorPointES2_S4_ @ 12370 NONAME + _ZN21QGraphicsAnchorLayout18unsetAnchorSpacingEPK19QGraphicsLayoutItemN2Qt11AnchorPointES2_S4_ @ 12370 NONAME ABSENT _ZN21QGraphicsAnchorLayout20setHorizontalSpacingEf @ 12371 NONAME _ZN21QGraphicsAnchorLayout8removeAtEi @ 12372 NONAME _ZN21QGraphicsAnchorLayout9addAnchorEP19QGraphicsLayoutItemN2Qt11AnchorPointES1_S3_ @ 12373 NONAME @@ -12461,7 +12461,7 @@ EXPORTS _ZNK20QGraphicsItemPrivate21effectiveBoundingRectEv @ 12460 NONAME _ZNK20QGraphicsItemPrivate26sceneEffectiveBoundingRectEv @ 12461 NONAME _ZNK20QGraphicsItemPrivate5depthEv @ 12462 NONAME - _ZNK21QGraphicsAnchorLayout13anchorSpacingEPK19QGraphicsLayoutItemN2Qt11AnchorPointES2_S4_ @ 12463 NONAME + _ZNK21QGraphicsAnchorLayout13anchorSpacingEPK19QGraphicsLayoutItemN2Qt11AnchorPointES2_S4_ @ 12463 NONAME ABSENT _ZNK21QGraphicsAnchorLayout15verticalSpacingEv @ 12464 NONAME _ZNK21QGraphicsAnchorLayout17horizontalSpacingEv @ 12465 NONAME _ZNK21QGraphicsAnchorLayout5countEv @ 12466 NONAME @@ -12510,4 +12510,434 @@ EXPORTS _ZTV23QGraphicsPixelizeEffect @ 12509 NONAME _ZTV24QGraphicsGrayscaleEffect @ 12510 NONAME _ZTV25QGraphicsDropShadowEffect @ 12511 NONAME + _ZN10QBoxLayout19getStaticMetaObjectEv @ 12512 NONAME + _ZN10QClipboard19getStaticMetaObjectEv @ 12513 NONAME + _ZN10QCompleter19getStaticMetaObjectEv @ 12514 NONAME + _ZN10QLCDNumber19getStaticMetaObjectEv @ 12515 NONAME + _ZN10QScrollBar19getStaticMetaObjectEv @ 12516 NONAME + _ZN10QStatusBar19getStaticMetaObjectEv @ 12517 NONAME + _ZN10QTabWidget19getStaticMetaObjectEv @ 12518 NONAME + _ZN10QTableView19getStaticMetaObjectEv @ 12519 NONAME + _ZN10QTextFrame19getStaticMetaObjectEv @ 12520 NONAME + _ZN10QTextTable19getStaticMetaObjectEv @ 12521 NONAME + _ZN10QUndoGroup19getStaticMetaObjectEv @ 12522 NONAME + _ZN10QUndoStack19getStaticMetaObjectEv @ 12523 NONAME + _ZN10QValidator19getStaticMetaObjectEv @ 12524 NONAME + _ZN10QWorkspace19getStaticMetaObjectEv @ 12525 NONAME + _ZN11QColumnView19getStaticMetaObjectEv @ 12526 NONAME + _ZN11QDockWidget19getStaticMetaObjectEv @ 12527 NONAME + _ZN11QFileDialog19getStaticMetaObjectEv @ 12528 NONAME + _ZN11QFocusFrame19getStaticMetaObjectEv @ 12529 NONAME + _ZN11QFontDialog19getStaticMetaObjectEv @ 12530 NONAME + _ZN11QFormLayout19getStaticMetaObjectEv @ 12531 NONAME + _ZN11QGridLayout19getStaticMetaObjectEv @ 12532 NONAME + _ZN11QHBoxLayout19getStaticMetaObjectEv @ 12533 NONAME + _ZN11QHeaderView19getStaticMetaObjectEv @ 12534 NONAME + _ZN11QListWidget19getStaticMetaObjectEv @ 12535 NONAME + _ZN11QMainWindow19getStaticMetaObjectEv @ 12536 NONAME + _ZN11QMessageBox19getStaticMetaObjectEv @ 12537 NONAME + _ZN11QPanGesture19getStaticMetaObjectEv @ 12538 NONAME + _ZN11QPixmapData8fromDataEPKhjPKc6QFlagsIN2Qt19ImageConversionFlagEE @ 12539 NONAME + _ZN11QProxyModel19getStaticMetaObjectEv @ 12540 NONAME + _ZN11QProxyStyle19getStaticMetaObjectEv @ 12541 NONAME + _ZN11QPushButton19getStaticMetaObjectEv @ 12542 NONAME + _ZN11QRubberBand19getStaticMetaObjectEv @ 12543 NONAME + _ZN11QScrollArea19getStaticMetaObjectEv @ 12544 NONAME + _ZN11QSizePolicy19getStaticMetaObjectEv @ 12545 NONAME + _ZN11QTextFormat19getStaticMetaObjectEv @ 12546 NONAME + _ZN11QTextObject19getStaticMetaObjectEv @ 12547 NONAME + _ZN11QToolButton19getStaticMetaObjectEv @ 12548 NONAME + _ZN11QTreeWidget19getStaticMetaObjectEv @ 12549 NONAME + _ZN11QVBoxLayout19getStaticMetaObjectEv @ 12550 NONAME + _ZN11QWizardPage19getStaticMetaObjectEv @ 12551 NONAME + _ZN12QActionGroup19getStaticMetaObjectEv @ 12552 NONAME + _ZN12QApplication14navigationModeEv @ 12553 NONAME + _ZN12QApplication14overrideCursorEv @ 12554 NONAME + _ZN12QApplication17setNavigationModeEN2Qt14NavigationModeE @ 12555 NONAME + _ZN12QApplication17setOverrideCursorERK7QCursor @ 12556 NONAME + _ZN12QApplication19getStaticMetaObjectEv @ 12557 NONAME + _ZN12QApplication20changeOverrideCursorERK7QCursor @ 12558 NONAME + _ZN12QApplication21restoreOverrideCursorEv @ 12559 NONAME + _ZN12QButtonGroup19getStaticMetaObjectEv @ 12560 NONAME + _ZN12QColorDialog19getStaticMetaObjectEv @ 12561 NONAME + _ZN12QCommonStyle19getStaticMetaObjectEv @ 12562 NONAME + _ZN12QImageReader26setDecideFormatFromContentEb @ 12563 NONAME + _ZN12QInputDialog19getStaticMetaObjectEv @ 12564 NONAME + _ZN12QLineControl19getStaticMetaObjectEv @ 12565 NONAME + _ZN12QPaintBuffer13beginNewFrameEv @ 12566 NONAME + _ZN12QPaintBuffer15setBoundingRectERK6QRectF @ 12567 NONAME + _ZN12QPaintBufferC1ERKS_ @ 12568 NONAME + _ZN12QPaintBufferC1Ev @ 12569 NONAME + _ZN12QPaintBufferC2ERKS_ @ 12570 NONAME + _ZN12QPaintBufferC2Ev @ 12571 NONAME + _ZN12QPaintBufferD0Ev @ 12572 NONAME + _ZN12QPaintBufferD1Ev @ 12573 NONAME + _ZN12QPaintBufferD2Ev @ 12574 NONAME + _ZN12QPaintBufferaSERKS_ @ 12575 NONAME + _ZN12QProgressBar19getStaticMetaObjectEv @ 12576 NONAME + _ZN12QRadioButton19getStaticMetaObjectEv @ 12577 NONAME + _ZN12QStylePlugin19getStaticMetaObjectEv @ 12578 NONAME + _ZN12QTableWidget19getStaticMetaObjectEv @ 12579 NONAME + _ZN12QTextBrowser19getStaticMetaObjectEv @ 12580 NONAME + _ZN12QTextControl19getStaticMetaObjectEv @ 12581 NONAME + _ZN13QDateTimeEdit19getStaticMetaObjectEv @ 12582 NONAME + _ZN13QErrorMessage19getStaticMetaObjectEv @ 12583 NONAME + _ZN13QFontComboBox19getStaticMetaObjectEv @ 12584 NONAME + _ZN13QFontDatabase19getStaticMetaObjectEv @ 12585 NONAME + _ZN13QGraphicsItem11unsetCursorEv @ 12586 NONAME + _ZN13QGraphicsItem9setActiveEb @ 12587 NONAME + _ZN13QGraphicsItem9setCursorERK7QCursor @ 12588 NONAME + _ZN13QGraphicsView19getStaticMetaObjectEv @ 12589 NONAME + _ZN13QInputContext19getStaticMetaObjectEv @ 12590 NONAME + _ZN13QIntValidator19getStaticMetaObjectEv @ 12591 NONAME + _ZN13QItemDelegate19getStaticMetaObjectEv @ 12592 NONAME + _ZN13QMdiSubWindow19getStaticMetaObjectEv @ 12593 NONAME + _ZN13QPinchGesture19getStaticMetaObjectEv @ 12594 NONAME + _ZN13QPixmapFilter19getStaticMetaObjectEv @ 12595 NONAME + _ZN13QSplashScreen19getStaticMetaObjectEv @ 12596 NONAME + _ZN13QSwipeGesture11eventFilterEP7QObjectP6QEvent @ 12597 NONAME + _ZN13QSwipeGesture11filterEventEP6QEvent @ 12598 NONAME + _ZN13QSwipeGesture11qt_metacallEN11QMetaObject4CallEiPPv @ 12599 NONAME + _ZN13QSwipeGesture11qt_metacastEPKc @ 12600 NONAME + _ZN13QSwipeGesture16staticMetaObjectE @ 12601 NONAME DATA 16 + _ZN13QSwipeGesture19getStaticMetaObjectEv @ 12602 NONAME + _ZN13QSwipeGesture5resetEv @ 12603 NONAME + _ZN13QSwipeGestureC1EP7QWidgetP7QObject @ 12604 NONAME + _ZN13QSwipeGestureC2EP7QWidgetP7QObject @ 12605 NONAME + _ZN13QTextDocument19getStaticMetaObjectEv @ 12606 NONAME + _ZN13QWidgetAction19getStaticMetaObjectEv @ 12607 NONAME + _ZN13QWindowsStyle19getStaticMetaObjectEv @ 12608 NONAME + _ZN14QDesktopWidget19getStaticMetaObjectEv @ 12609 NONAME + _ZN14QDoubleSpinBox19getStaticMetaObjectEv @ 12610 NONAME + _ZN14QGraphicsScale19getStaticMetaObjectEv @ 12611 NONAME + _ZN14QGraphicsScene14setActivePanelEP13QGraphicsItem @ 12612 NONAME + _ZN14QGraphicsScene19getStaticMetaObjectEv @ 12613 NONAME + _ZN14QImageIOPlugin19getStaticMetaObjectEv @ 12614 NONAME + _ZN14QPlainTextEdit19getStaticMetaObjectEv @ 12615 NONAME + _ZN14QStackedLayout19getStaticMetaObjectEv @ 12616 NONAME + _ZN14QStackedWidget19getStaticMetaObjectEv @ 12617 NONAME + _ZN14QWidgetPrivate13setCursor_sysERK7QCursor @ 12618 NONAME + _ZN14QWidgetPrivate15unsetCursor_sysEv @ 12619 NONAME + _ZN15QAbstractButton19getStaticMetaObjectEv @ 12620 NONAME + _ZN15QAbstractSlider19getStaticMetaObjectEv @ 12621 NONAME + _ZN15QCalendarWidget19getStaticMetaObjectEv @ 12622 NONAME + _ZN15QColumnViewGrip19getStaticMetaObjectEv @ 12623 NONAME + _ZN15QGraphicsAnchor10setSpacingEf @ 12624 NONAME + _ZN15QGraphicsAnchor11qt_metacallEN11QMetaObject4CallEiPPv @ 12625 NONAME + _ZN15QGraphicsAnchor11qt_metacastEPKc @ 12626 NONAME + _ZN15QGraphicsAnchor12unsetSpacingEv @ 12627 NONAME + _ZN15QGraphicsAnchor16staticMetaObjectE @ 12628 NONAME DATA 16 + _ZN15QGraphicsAnchor19getStaticMetaObjectEv @ 12629 NONAME + _ZN15QGraphicsAnchorC1EP21QGraphicsAnchorLayout @ 12630 NONAME + _ZN15QGraphicsAnchorC2EP21QGraphicsAnchorLayout @ 12631 NONAME + _ZN15QGraphicsAnchorD0Ev @ 12632 NONAME + _ZN15QGraphicsAnchorD1Ev @ 12633 NONAME + _ZN15QGraphicsAnchorD2Ev @ 12634 NONAME + _ZN15QGraphicsEffect19getStaticMetaObjectEv @ 12635 NONAME + _ZN15QGraphicsEffect6updateEv @ 12636 NONAME + _ZN15QGraphicsObject19getStaticMetaObjectEv @ 12637 NONAME + _ZN15QGraphicsWidget19getStaticMetaObjectEv @ 12638 NONAME + _ZN15QProgressDialog19getStaticMetaObjectEv @ 12639 NONAME + _ZN15QSessionManager19getStaticMetaObjectEv @ 12640 NONAME + _ZN15QSplitterHandle19getStaticMetaObjectEv @ 12641 NONAME + _ZN15QTextBlockGroup19getStaticMetaObjectEv @ 12642 NONAME + _ZN16QAbstractSpinBox19getStaticMetaObjectEv @ 12643 NONAME + _ZN16QDialogButtonBox19getStaticMetaObjectEv @ 12644 NONAME + _ZN16QDoubleValidator19getStaticMetaObjectEv @ 12645 NONAME + _ZN16QFileSystemModel19getStaticMetaObjectEv @ 12646 NONAME + _ZN16QPainterReplayer14setupTransformEP8QPainter @ 12647 NONAME + _ZN16QPainterReplayer4drawERK12QPaintBufferP8QPainteri @ 12648 NONAME + _ZN16QPainterReplayer7processERK19QPaintBufferCommand @ 12649 NONAME + _ZN16QRegExpValidator19getStaticMetaObjectEv @ 12650 NONAME + _ZN16QStringListModel19getStaticMetaObjectEv @ 12651 NONAME + _ZN16QStyleSheetStyle19getStaticMetaObjectEv @ 12652 NONAME + _ZN17QAbstractItemView19getStaticMetaObjectEv @ 12653 NONAME + _ZN17QDataWidgetMapper19getStaticMetaObjectEv @ 12654 NONAME + _ZN17QDockWidgetLayout19getStaticMetaObjectEv @ 12655 NONAME + _ZN17QFileInfoGatherer19getStaticMetaObjectEv @ 12656 NONAME + _ZN17QGraphicsRotation19getStaticMetaObjectEv @ 12657 NONAME + _ZN17QGraphicsTextItem19getStaticMetaObjectEv @ 12658 NONAME + _ZN17QIconEnginePlugin19getStaticMetaObjectEv @ 12659 NONAME + _ZN17QMainWindowLayout19getStaticMetaObjectEv @ 12660 NONAME + _ZN17QPixmapBlurFilter19getStaticMetaObjectEv @ 12661 NONAME + _ZN18QCommandLinkButton19getStaticMetaObjectEv @ 12662 NONAME + _ZN18QGraphicsTransform19getStaticMetaObjectEv @ 12663 NONAME + _ZN18QStandardItemModel19getStaticMetaObjectEv @ 12664 NONAME + _ZN18QSyntaxHighlighter19getStaticMetaObjectEv @ 12665 NONAME + _ZN19QAbstractProxyModel19getStaticMetaObjectEv @ 12666 NONAME + _ZN19QAbstractScrollArea19getStaticMetaObjectEv @ 12667 NONAME + _ZN19QApplicationPrivate14navigationModeE @ 12668 NONAME DATA 4 + _ZN19QApplicationPrivate17setNavigationModeEN2Qt14NavigationModeE @ 12669 NONAME + _ZN19QCoeFepInputContext19getStaticMetaObjectEv @ 12670 NONAME + _ZN19QEventDispatcherS6019getStaticMetaObjectEv @ 12671 NONAME + _ZN19QGraphicsBlurEffect19getStaticMetaObjectEv @ 12672 NONAME + _ZN19QGraphicsSceneIndex19getStaticMetaObjectEv @ 12673 NONAME + _ZN19QIconEnginePluginV219getStaticMetaObjectEv @ 12674 NONAME + _ZN19QInputContextPlugin19getStaticMetaObjectEv @ 12675 NONAME + _ZN19QItemSelectionModel19getStaticMetaObjectEv @ 12676 NONAME + _ZN19QKeyEventTransition19getStaticMetaObjectEv @ 12677 NONAME + _ZN19QStyledItemDelegate19getStaticMetaObjectEv @ 12678 NONAME + _ZN19QTextDocumentLayout19getStaticMetaObjectEv @ 12679 NONAME + _ZN20QGraphicsItemPrivate11setSubFocusEP13QGraphicsItem @ 12680 NONAME + _ZN20QGraphicsItemPrivate13clearSubFocusEP13QGraphicsItem @ 12681 NONAME + _ZN20QGraphicsItemPrivate14setFocusHelperEN2Qt11FocusReasonEb @ 12682 NONAME + _ZN20QGraphicsItemPrivate18subFocusItemChangeEv @ 12683 NONAME + _ZN20QGraphicsProxyWidget19getStaticMetaObjectEv @ 12684 NONAME + _ZN20QGraphicsViewPrivate20_q_setViewportCursorERK7QCursor @ 12685 NONAME + _ZN20QGraphicsViewPrivate22_q_unsetViewportCursorEv @ 12686 NONAME + _ZN20QPaintBufferResource11qt_metacallEN11QMetaObject4CallEiPPv @ 12687 NONAME + _ZN20QPaintBufferResource11qt_metacastEPKc @ 12688 NONAME + _ZN20QPaintBufferResource16staticMetaObjectE @ 12689 NONAME DATA 16 + _ZN20QPaintBufferResource19getStaticMetaObjectEv @ 12690 NONAME + _ZN20QPaintBufferResource5valueEPK19QPaintBufferPrivate @ 12691 NONAME + _ZN20QPaintBufferResource6insertEPK19QPaintBufferPrivatePv @ 12692 NONAME + _ZN20QPaintBufferResource6removeEPK19QPaintBufferPrivate @ 12693 NONAME + _ZN20QPaintBufferResourceC1EPFvPvEP7QObject @ 12694 NONAME + _ZN20QPaintBufferResourceC2EPFvPvEP7QObject @ 12695 NONAME + _ZN20QPaintBufferResourceD0Ev @ 12696 NONAME + _ZN20QPaintBufferResourceD1Ev @ 12697 NONAME + _ZN20QPaintBufferResourceD2Ev @ 12698 NONAME + _ZN20QPictureFormatPlugin19getStaticMetaObjectEv @ 12699 NONAME + _ZN20QWidgetResizeHandler19getStaticMetaObjectEv @ 12700 NONAME + _ZN21QAbstractItemDelegate19getStaticMetaObjectEv @ 12701 NONAME + _ZN21QGraphicsAnchorLayout10addAnchorsEP19QGraphicsLayoutItemS1_6QFlagsIN2Qt11OrientationEE @ 12702 NONAME + _ZN21QGraphicsAnchorLayout6anchorEP19QGraphicsLayoutItemN2Qt11AnchorPointES1_S3_ @ 12703 NONAME + _ZN21QGraphicsEffectSource19getStaticMetaObjectEv @ 12704 NONAME + _ZN21QGraphicsSystemPlugin19getStaticMetaObjectEv @ 12705 NONAME + _ZN21QMouseEventTransition19getStaticMetaObjectEv @ 12706 NONAME + _ZN21QPixmapColorizeFilter11setStrengthEf @ 12707 NONAME + _ZN21QPixmapColorizeFilter19getStaticMetaObjectEv @ 12708 NONAME + _ZN21QSortFilterProxyModel19getStaticMetaObjectEv @ 12709 NONAME + _ZN22QGraphicsItemAnimation19getStaticMetaObjectEv @ 12710 NONAME + _ZN22QGraphicsOpacityEffect10setOpacityEf @ 12711 NONAME + _ZN22QGraphicsOpacityEffect11qt_metacallEN11QMetaObject4CallEiPPv @ 12712 NONAME + _ZN22QGraphicsOpacityEffect11qt_metacastEPKc @ 12713 NONAME + _ZN22QGraphicsOpacityEffect14opacityChangedEf @ 12714 NONAME + _ZN22QGraphicsOpacityEffect14setOpacityMaskERK6QBrush @ 12715 NONAME + _ZN22QGraphicsOpacityEffect16staticMetaObjectE @ 12716 NONAME DATA 16 + _ZN22QGraphicsOpacityEffect18opacityMaskChangedERK6QBrush @ 12717 NONAME + _ZN22QGraphicsOpacityEffect19getStaticMetaObjectEv @ 12718 NONAME + _ZN22QGraphicsOpacityEffect4drawEP8QPainterP21QGraphicsEffectSource @ 12719 NONAME + _ZN22QGraphicsOpacityEffectC1EP7QObject @ 12720 NONAME + _ZN22QGraphicsOpacityEffectC2EP7QObject @ 12721 NONAME + _ZN22QGraphicsOpacityEffectD0Ev @ 12722 NONAME + _ZN22QGraphicsOpacityEffectD1Ev @ 12723 NONAME + _ZN22QGraphicsOpacityEffectD2Ev @ 12724 NONAME + _ZN22QPaintEngineExReplayer7processERK19QPaintBufferCommand @ 12725 NONAME + _ZN23QGraphicsColorizeEffect11setStrengthEf @ 12726 NONAME + _ZN23QGraphicsColorizeEffect15strengthChangedEf @ 12727 NONAME + _ZN23QGraphicsColorizeEffect19getStaticMetaObjectEv @ 12728 NONAME + _ZN23QGraphicsPixelizeEffect19getStaticMetaObjectEv @ 12729 NONAME + _ZN23QPaintBufferSignalProxy11qt_metacallEN11QMetaObject4CallEiPPv @ 12730 NONAME + _ZN23QPaintBufferSignalProxy11qt_metacastEPKc @ 12731 NONAME + _ZN23QPaintBufferSignalProxy14aboutToDestroyEPK19QPaintBufferPrivate @ 12732 NONAME + _ZN23QPaintBufferSignalProxy16staticMetaObjectE @ 12733 NONAME DATA 16 + _ZN23QPaintBufferSignalProxy19getStaticMetaObjectEv @ 12734 NONAME + _ZN23QPaintBufferSignalProxy8instanceEv @ 12735 NONAME + _ZN23QPixmapDropShadowFilter19getStaticMetaObjectEv @ 12736 NONAME + _ZN24QBasicKeyEventTransition19getStaticMetaObjectEv @ 12737 NONAME + _ZN24QComboBoxPrivateScroller19getStaticMetaObjectEv @ 12738 NONAME + _ZN24QGraphicsGrayscaleEffect11setStrengthEf @ 12739 NONAME + _ZN24QGraphicsGrayscaleEffect15strengthChangedEf @ 12740 NONAME + _ZN24QGraphicsGrayscaleEffect19getStaticMetaObjectEv @ 12741 NONAME + _ZN24QPixmapConvolutionFilter19getStaticMetaObjectEv @ 12742 NONAME + _ZN24QPlainTextDocumentLayout19getStaticMetaObjectEv @ 12743 NONAME + _ZN25QComboBoxPrivateContainer19getStaticMetaObjectEv @ 12744 NONAME + _ZN25QGraphicsDropShadowEffect19getStaticMetaObjectEv @ 12745 NONAME + _ZN25QGraphicsSceneLinearIndex19getStaticMetaObjectEv @ 12746 NONAME + _ZN26QBasicMouseEventTransition19getStaticMetaObjectEv @ 12747 NONAME + _ZN26QGraphicsSceneBspTreeIndex19getStaticMetaObjectEv @ 12748 NONAME + _ZN27QAbstractTextDocumentLayout19getStaticMetaObjectEv @ 12749 NONAME + _ZN5QDial19getStaticMetaObjectEv @ 12750 NONAME + _ZN5QDrag19getStaticMetaObjectEv @ 12751 NONAME + _ZN5QFont19getStaticMetaObjectEv @ 12752 NONAME + _ZN5QMenu19getStaticMetaObjectEv @ 12753 NONAME + _ZN6QColor6setHslEiiii @ 12754 NONAME + _ZN6QColor7fromHslEiiii @ 12755 NONAME + _ZN6QColor7setHslFEffff @ 12756 NONAME + _ZN6QColor8fromHslFEffff @ 12757 NONAME + _ZN6QFrame19getStaticMetaObjectEv @ 12758 NONAME + _ZN6QLabel19getStaticMetaObjectEv @ 12759 NONAME + _ZN6QMovie19getStaticMetaObjectEv @ 12760 NONAME + _ZN6QSound19getStaticMetaObjectEv @ 12761 NONAME + _ZN6QStyle19getStaticMetaObjectEv @ 12762 NONAME + _ZN7QAction19getStaticMetaObjectEv @ 12763 NONAME + _ZN7QCursor8setShapeEN2Qt11CursorShapeE @ 12764 NONAME + _ZN7QCursorC1EN2Qt11CursorShapeE @ 12765 NONAME + _ZN7QCursorC1ERK7QBitmapS2_ii @ 12766 NONAME + _ZN7QCursorC1ERK7QPixmapii @ 12767 NONAME + _ZN7QCursorC1ERKS_ @ 12768 NONAME + _ZN7QCursorC1Ev @ 12769 NONAME + _ZN7QCursorC2EN2Qt11CursorShapeE @ 12770 NONAME + _ZN7QCursorC2ERK7QBitmapS2_ii @ 12771 NONAME + _ZN7QCursorC2ERK7QPixmapii @ 12772 NONAME + _ZN7QCursorC2ERKS_ @ 12773 NONAME + _ZN7QCursorC2Ev @ 12774 NONAME + _ZN7QCursorD1Ev @ 12775 NONAME + _ZN7QCursorD2Ev @ 12776 NONAME + _ZN7QCursoraSERKS_ @ 12777 NONAME + _ZN7QDialog19getStaticMetaObjectEv @ 12778 NONAME + _ZN7QLayout19getStaticMetaObjectEv @ 12779 NONAME + _ZN7QSlider19getStaticMetaObjectEv @ 12780 NONAME + _ZN7QTabBar19getStaticMetaObjectEv @ 12781 NONAME + _ZN7QWidget11unsetCursorEv @ 12782 NONAME + _ZN7QWidget18setContentsMarginsERK8QMargins @ 12783 NONAME + _ZN7QWidget19getStaticMetaObjectEv @ 12784 NONAME + _ZN7QWidget9grabMouseERK7QCursor @ 12785 NONAME + _ZN7QWidget9setCursorERK7QCursor @ 12786 NONAME + _ZN7QWizard19getStaticMetaObjectEv @ 12787 NONAME + _ZN8QGesture19getStaticMetaObjectEv @ 12788 NONAME + _ZN8QMdiArea19getStaticMetaObjectEv @ 12789 NONAME + _ZN8QMenuBar19getStaticMetaObjectEv @ 12790 NONAME + _ZN8QPainter17endNativePaintingEv @ 12791 NONAME + _ZN8QPainter19beginNativePaintingEv @ 12792 NONAME + _ZN8QPainter19getStaticMetaObjectEv @ 12793 NONAME + _ZN8QPalette19getStaticMetaObjectEv @ 12794 NONAME + _ZN8QSidebar19getStaticMetaObjectEv @ 12795 NONAME + _ZN8QSpinBox19getStaticMetaObjectEv @ 12796 NONAME + _ZN8QToolBar19getStaticMetaObjectEv @ 12797 NONAME + _ZN8QToolBox19getStaticMetaObjectEv @ 12798 NONAME + _ZN9QCheckBox19getStaticMetaObjectEv @ 12799 NONAME + _ZN9QComboBox19getStaticMetaObjectEv @ 12800 NONAME + _ZN9QDateEdit19getStaticMetaObjectEv @ 12801 NONAME + _ZN9QDirModel19getStaticMetaObjectEv @ 12802 NONAME + _ZN9QGradient19getStaticMetaObjectEv @ 12803 NONAME + _ZN9QGroupBox19getStaticMetaObjectEv @ 12804 NONAME + _ZN9QLineEdit19getStaticMetaObjectEv @ 12805 NONAME + _ZN9QListView19getStaticMetaObjectEv @ 12806 NONAME + _ZN9QS60Style19getStaticMetaObjectEv @ 12807 NONAME + _ZN9QS60Style5eventEP6QEvent @ 12808 NONAME + _ZN9QShortcut19getStaticMetaObjectEv @ 12809 NONAME + _ZN9QSizeGrip19getStaticMetaObjectEv @ 12810 NONAME + _ZN9QSplitter19getStaticMetaObjectEv @ 12811 NONAME + _ZN9QTextEdit19getStaticMetaObjectEv @ 12812 NONAME + _ZN9QTextList19getStaticMetaObjectEv @ 12813 NONAME + _ZN9QTimeEdit19getStaticMetaObjectEv @ 12814 NONAME + _ZN9QTreeView19getStaticMetaObjectEv @ 12815 NONAME + _ZN9QUndoView19getStaticMetaObjectEv @ 12816 NONAME + _ZN9QUrlModel19getStaticMetaObjectEv @ 12817 NONAME + _ZNK11QPanGesture6offsetEv @ 12818 NONAME + _ZNK12QImageReader23decideFormatFromContentEv @ 12819 NONAME + _ZNK12QPaintBuffer11paintEngineEv @ 12820 NONAME + _ZNK12QPaintBuffer12boundingRectEv @ 12821 NONAME + _ZNK12QPaintBuffer4drawEP8QPainteri @ 12822 NONAME + _ZNK12QPaintBuffer6metricEN12QPaintDevice17PaintDeviceMetricE @ 12823 NONAME + _ZNK12QPaintBuffer7devTypeEv @ 12824 NONAME + _ZNK12QPaintBuffer7isEmptyEv @ 12825 NONAME + _ZNK12QPaintBuffer9numFramesEv @ 12826 NONAME + _ZNK13QGraphicsItem14focusScopeItemEv @ 12827 NONAME + _ZNK13QGraphicsItem5panelEv @ 12828 NONAME + _ZNK13QGraphicsItem6cursorEv @ 12829 NONAME + _ZNK13QGraphicsItem7isPanelEv @ 12830 NONAME + _ZNK13QGraphicsItem8isActiveEv @ 12831 NONAME + _ZNK13QGraphicsItem9hasCursorEv @ 12832 NONAME + _ZNK13QPinchGesture11whatChangedEv @ 12833 NONAME + _ZNK13QPinchGesture16totalScaleFactorEv @ 12834 NONAME + _ZNK13QPinchGesture18totalRotationAngleEv @ 12835 NONAME + _ZNK13QSwipeGesture10metaObjectEv @ 12836 NONAME + _ZNK13QSwipeGesture10swipeAngleEv @ 12837 NONAME + _ZNK13QSwipeGesture17verticalDirectionEv @ 12838 NONAME + _ZNK13QSwipeGesture19horizontalDirectionEv @ 12839 NONAME + _ZNK14QGraphicsScene11activePanelEv @ 12840 NONAME + _ZNK14QGraphicsScene8isActiveEv @ 12841 NONAME + _ZNK15QGraphicsAnchor10metaObjectEv @ 12842 NONAME + _ZNK15QGraphicsAnchor7spacingEv @ 12843 NONAME + _ZNK20QPaintBufferResource10metaObjectEv @ 12844 NONAME + _ZNK21QPixmapColorizeFilter8strengthEv @ 12845 NONAME + _ZNK22QGraphicsOpacityEffect10metaObjectEv @ 12846 NONAME + _ZNK22QGraphicsOpacityEffect11opacityMaskEv @ 12847 NONAME + _ZNK22QGraphicsOpacityEffect7opacityEv @ 12848 NONAME + _ZNK23QGraphicsColorizeEffect8strengthEv @ 12849 NONAME + _ZNK23QPaintBufferSignalProxy10metaObjectEv @ 12850 NONAME + _ZNK24QGraphicsGrayscaleEffect8strengthEv @ 12851 NONAME + _ZNK6QColor10lightnessFEv @ 12852 NONAME + _ZNK6QColor13hslSaturationEv @ 12853 NONAME + _ZNK6QColor13hsvSaturationEv @ 12854 NONAME + _ZNK6QColor14hslSaturationFEv @ 12855 NONAME + _ZNK6QColor14hsvSaturationFEv @ 12856 NONAME + _ZNK6QColor5toHslEv @ 12857 NONAME + _ZNK6QColor6getHslEPiS0_S0_S0_ @ 12858 NONAME + _ZNK6QColor6hslHueEv @ 12859 NONAME + _ZNK6QColor6hsvHueEv @ 12860 NONAME + _ZNK6QColor7getHslFEPfS0_S0_S0_ @ 12861 NONAME + _ZNK6QColor7hslHueFEv @ 12862 NONAME + _ZNK6QColor7hsvHueFEv @ 12863 NONAME + _ZNK6QColor9lightnessEv @ 12864 NONAME + _ZNK7QCursor4maskEv @ 12865 NONAME + _ZNK7QCursor5shapeEv @ 12866 NONAME + _ZNK7QCursor6bitmapEv @ 12867 NONAME + _ZNK7QCursor6handleEv @ 12868 NONAME + _ZNK7QCursor6pixmapEv @ 12869 NONAME + _ZNK7QCursor7hotSpotEv @ 12870 NONAME + _ZNK7QCursorcv8QVariantEv @ 12871 NONAME + _ZNK7QWidget15contentsMarginsEv @ 12872 NONAME + _ZNK7QWidget6cursorEv @ 12873 NONAME + _ZTI10AnchorData @ 12874 NONAME ; ## + _ZTI11PixmapEntry @ 12875 NONAME ; ## + _ZTI12QPaintBuffer @ 12876 NONAME ; ## + _ZTI13QS60MainAppUi @ 12877 NONAME ; ## + _ZTI13QSwipeGesture @ 12878 NONAME ; ## + _ZTI13ScalableEntry @ 12879 NONAME ; ## + _ZTI15QGesturePrivate @ 12880 NONAME ; ## + _ZTI15QGraphicsAnchor @ 12881 NONAME ; ## + _ZTI16QPainterReplayer @ 12882 NONAME ; ## + _ZTI16QS60MainDocument @ 12883 NONAME ; ## + _ZTI16QTreeViewPrivate @ 12884 NONAME ; ## + _ZTI17QIconLoaderEngine @ 12885 NONAME ; ## + _ZTI17QIconModeViewBase @ 12886 NONAME ; ## + _ZTI17QListModeViewBase @ 12887 NONAME ; ## + _ZTI18ParallelAnchorData @ 12888 NONAME ; ## + _ZTI18QHeaderViewPrivate @ 12889 NONAME ; ## + _ZTI18QPaintBufferEngine @ 12890 NONAME ; ## + _ZTI18QPanGesturePrivate @ 12891 NONAME ; ## + _ZTI19QCommonListViewBase @ 12892 NONAME ; ## + _ZTI19QS60MainApplication @ 12893 NONAME ; ## + _ZTI20QPaintBufferResource @ 12894 NONAME ; ## + _ZTI20QPinchGesturePrivate @ 12895 NONAME ; ## + _ZTI20QSwipeGesturePrivate @ 12896 NONAME ; ## + _ZTI20SequentialAnchorData @ 12897 NONAME ; ## + _ZTI22QGraphicsAnchorPrivate @ 12898 NONAME ; ## + _ZTI22QGraphicsOpacityEffect @ 12899 NONAME ; ## + _ZTI22QPaintEngineExReplayer @ 12900 NONAME ; ## + _ZTI23QPaintBufferSignalProxy @ 12901 NONAME ; ## + _ZTI26QGraphicsSceneIndexPrivate @ 12902 NONAME ; ## + _ZTI26QWidgetEffectSourcePrivate @ 12903 NONAME ; ## + _ZTI32QGraphicsItemEffectSourcePrivate @ 12904 NONAME ; ## + _ZTI8QSimplex @ 12905 NONAME ; ## + _ZTV10AnchorData @ 12906 NONAME ; ## + _ZTV11PixmapEntry @ 12907 NONAME ; ## + _ZTV12QPaintBuffer @ 12908 NONAME ; ## + _ZTV13QS60MainAppUi @ 12909 NONAME ; ## + _ZTV13QSwipeGesture @ 12910 NONAME ; ## + _ZTV13ScalableEntry @ 12911 NONAME ; ## + _ZTV15QGesturePrivate @ 12912 NONAME ; ## + _ZTV15QGraphicsAnchor @ 12913 NONAME ; ## + _ZTV16QPainterReplayer @ 12914 NONAME ; ## + _ZTV16QS60MainDocument @ 12915 NONAME ; ## + _ZTV16QTreeViewPrivate @ 12916 NONAME ; ## + _ZTV17QIconLoaderEngine @ 12917 NONAME ; ## + _ZTV17QIconModeViewBase @ 12918 NONAME ; ## + _ZTV17QListModeViewBase @ 12919 NONAME ; ## + _ZTV18ParallelAnchorData @ 12920 NONAME ; ## + _ZTV18QHeaderViewPrivate @ 12921 NONAME ; ## + _ZTV18QPaintBufferEngine @ 12922 NONAME ; ## + _ZTV18QPanGesturePrivate @ 12923 NONAME ; ## + _ZTV19QCommonListViewBase @ 12924 NONAME ; ## + _ZTV19QS60MainApplication @ 12925 NONAME ; ## + _ZTV20QPaintBufferResource @ 12926 NONAME ; ## + _ZTV20QPinchGesturePrivate @ 12927 NONAME ; ## + _ZTV20QSwipeGesturePrivate @ 12928 NONAME ; ## + _ZTV20SequentialAnchorData @ 12929 NONAME ; ## + _ZTV22QGraphicsAnchorPrivate @ 12930 NONAME ; ## + _ZTV22QGraphicsOpacityEffect @ 12931 NONAME ; ## + _ZTV22QPaintEngineExReplayer @ 12932 NONAME ; ## + _ZTV23QPaintBufferSignalProxy @ 12933 NONAME ; ## + _ZTV26QGraphicsSceneIndexPrivate @ 12934 NONAME ; ## + _ZTV26QWidgetEffectSourcePrivate @ 12935 NONAME ; ## + _ZTV32QGraphicsItemEffectSourcePrivate @ 12936 NONAME ; ## + _ZTV8QSimplex @ 12937 NONAME ; ## + _ZlsR11QDataStreamRK12QPaintBuffer @ 12938 NONAME + _ZlsR11QDataStreamRK7QCursor @ 12939 NONAME + _ZrsR11QDataStreamR12QPaintBuffer @ 12940 NONAME + _ZrsR11QDataStreamR7QCursor @ 12941 NONAME diff --git a/src/s60installs/eabi/QtMultimediau.def b/src/s60installs/eabi/QtMultimediau.def index b1cd682..6e5e8ba 100644 --- a/src/s60installs/eabi/QtMultimediau.def +++ b/src/s60installs/eabi/QtMultimediau.def @@ -156,4 +156,136 @@ EXPORTS _ZThn8_N18QAudioEnginePluginD1Ev @ 155 NONAME _ZlsR11QDataStreamRK14QAudioDeviceId @ 156 NONAME _ZrsR11QDataStreamR14QAudioDeviceId @ 157 NONAME + _ZN11QAudioInput19getStaticMetaObjectEv @ 158 NONAME + _ZN11QVideoFrame10setEndTimeEx @ 159 NONAME + _ZN11QVideoFrame12setFieldTypeENS_9FieldTypeE @ 160 NONAME + _ZN11QVideoFrame12setStartTimeEx @ 161 NONAME + _ZN11QVideoFrame21equivalentImageFormatENS_11PixelFormatE @ 162 NONAME + _ZN11QVideoFrame21equivalentPixelFormatEN6QImage6FormatE @ 163 NONAME + _ZN11QVideoFrame3mapEN20QAbstractVideoBuffer7MapModeE @ 164 NONAME + _ZN11QVideoFrame4bitsEv @ 165 NONAME + _ZN11QVideoFrame5unmapEv @ 166 NONAME + _ZN11QVideoFrameC1EP20QAbstractVideoBufferRK5QSizeNS_11PixelFormatE @ 167 NONAME + _ZN11QVideoFrameC1ERK6QImage @ 168 NONAME + _ZN11QVideoFrameC1ERKS_ @ 169 NONAME + _ZN11QVideoFrameC1EiRK5QSizeiNS_11PixelFormatE @ 170 NONAME + _ZN11QVideoFrameC1Ev @ 171 NONAME + _ZN11QVideoFrameC2EP20QAbstractVideoBufferRK5QSizeNS_11PixelFormatE @ 172 NONAME + _ZN11QVideoFrameC2ERK6QImage @ 173 NONAME + _ZN11QVideoFrameC2ERKS_ @ 174 NONAME + _ZN11QVideoFrameC2EiRK5QSizeiNS_11PixelFormatE @ 175 NONAME + _ZN11QVideoFrameC2Ev @ 176 NONAME + _ZN11QVideoFrameD1Ev @ 177 NONAME + _ZN11QVideoFrameD2Ev @ 178 NONAME + _ZN11QVideoFrameaSERKS_ @ 179 NONAME + _ZN12QAudioOutput19getStaticMetaObjectEv @ 180 NONAME + _ZN16QAudioDeviceInfo19getStaticMetaObjectEv @ 181 NONAME + _ZN17QImageVideoBuffer3mapEN20QAbstractVideoBuffer7MapModeEPiS2_ @ 182 NONAME + _ZN17QImageVideoBuffer5unmapEv @ 183 NONAME + _ZN17QImageVideoBufferC1ERK6QImage @ 184 NONAME + _ZN17QImageVideoBufferC2ERK6QImage @ 185 NONAME + _ZN17QImageVideoBufferD0Ev @ 186 NONAME + _ZN17QImageVideoBufferD1Ev @ 187 NONAME + _ZN17QImageVideoBufferD2Ev @ 188 NONAME + _ZN18QAudioEnginePlugin19getStaticMetaObjectEv @ 189 NONAME + _ZN18QMemoryVideoBuffer3mapEN20QAbstractVideoBuffer7MapModeEPiS2_ @ 190 NONAME + _ZN18QMemoryVideoBuffer5unmapEv @ 191 NONAME + _ZN18QMemoryVideoBufferC1ERK10QByteArrayi @ 192 NONAME + _ZN18QMemoryVideoBufferC2ERK10QByteArrayi @ 193 NONAME + _ZN18QMemoryVideoBufferD0Ev @ 194 NONAME + _ZN18QMemoryVideoBufferD1Ev @ 195 NONAME + _ZN18QMemoryVideoBufferD2Ev @ 196 NONAME + _ZN19QAbstractAudioInput19getStaticMetaObjectEv @ 197 NONAME + _ZN19QVideoSurfaceFormat11setPropertyEPKcRK8QVariant @ 198 NONAME + _ZN19QVideoSurfaceFormat11setViewportERK5QRect @ 199 NONAME + _ZN19QVideoSurfaceFormat12setFrameRateERK5QPairIiiE @ 200 NONAME + _ZN19QVideoSurfaceFormat12setFrameRateEii @ 201 NONAME + _ZN19QVideoSurfaceFormat12setFrameSizeERK5QSizeNS_12ViewportModeE @ 202 NONAME + _ZN19QVideoSurfaceFormat12setFrameSizeEiiNS_12ViewportModeE @ 203 NONAME + _ZN19QVideoSurfaceFormat16setYuvColorSpaceENS_13YuvColorSpaceE @ 204 NONAME + _ZN19QVideoSurfaceFormat19setPixelAspectRatioERK5QSize @ 205 NONAME + _ZN19QVideoSurfaceFormat19setPixelAspectRatioEii @ 206 NONAME + _ZN19QVideoSurfaceFormat20setScanLineDirectionENS_9DirectionE @ 207 NONAME + _ZN19QVideoSurfaceFormatC1ERK5QSizeN11QVideoFrame11PixelFormatEN20QAbstractVideoBuffer10HandleTypeE @ 208 NONAME + _ZN19QVideoSurfaceFormatC1ERKS_ @ 209 NONAME + _ZN19QVideoSurfaceFormatC1Ev @ 210 NONAME + _ZN19QVideoSurfaceFormatC2ERK5QSizeN11QVideoFrame11PixelFormatEN20QAbstractVideoBuffer10HandleTypeE @ 211 NONAME + _ZN19QVideoSurfaceFormatC2ERKS_ @ 212 NONAME + _ZN19QVideoSurfaceFormatC2Ev @ 213 NONAME + _ZN19QVideoSurfaceFormatD1Ev @ 214 NONAME + _ZN19QVideoSurfaceFormatD2Ev @ 215 NONAME + _ZN19QVideoSurfaceFormataSERKS_ @ 216 NONAME + _ZN20QAbstractAudioOutput19getStaticMetaObjectEv @ 217 NONAME + _ZN20QAbstractVideoBufferC2ENS_10HandleTypeE @ 218 NONAME + _ZN20QAbstractVideoBufferC2ER27QAbstractVideoBufferPrivateNS_10HandleTypeE @ 219 NONAME + _ZN20QAbstractVideoBufferD0Ev @ 220 NONAME + _ZN20QAbstractVideoBufferD1Ev @ 221 NONAME + _ZN20QAbstractVideoBufferD2Ev @ 222 NONAME + _ZN21QAbstractVideoSurface11qt_metacallEN11QMetaObject4CallEiPPv @ 223 NONAME + _ZN21QAbstractVideoSurface11qt_metacastEPKc @ 224 NONAME + _ZN21QAbstractVideoSurface14startedChangedEb @ 225 NONAME + _ZN21QAbstractVideoSurface16staticMetaObjectE @ 226 NONAME DATA 16 + _ZN21QAbstractVideoSurface19getStaticMetaObjectEv @ 227 NONAME + _ZN21QAbstractVideoSurface20surfaceFormatChangedERK19QVideoSurfaceFormat @ 228 NONAME + _ZN21QAbstractVideoSurface23supportedFormatsChangedEv @ 229 NONAME + _ZN21QAbstractVideoSurface4stopEv @ 230 NONAME + _ZN21QAbstractVideoSurface5startERK19QVideoSurfaceFormat @ 231 NONAME + _ZN21QAbstractVideoSurface8setErrorENS_5ErrorE @ 232 NONAME + _ZN21QAbstractVideoSurfaceC2EP7QObject @ 233 NONAME + _ZN21QAbstractVideoSurfaceC2ER28QAbstractVideoSurfacePrivateP7QObject @ 234 NONAME + _ZN21QAbstractVideoSurfaceD0Ev @ 235 NONAME + _ZN21QAbstractVideoSurfaceD1Ev @ 236 NONAME + _ZN21QAbstractVideoSurfaceD2Ev @ 237 NONAME + _ZN24QAbstractAudioDeviceInfo19getStaticMetaObjectEv @ 238 NONAME + _ZNK11QVideoFrame10handleTypeEv @ 239 NONAME + _ZNK11QVideoFrame10isReadableEv @ 240 NONAME + _ZNK11QVideoFrame10isWritableEv @ 241 NONAME + _ZNK11QVideoFrame11pixelFormatEv @ 242 NONAME + _ZNK11QVideoFrame12bytesPerLineEv @ 243 NONAME + _ZNK11QVideoFrame4bitsEv @ 244 NONAME + _ZNK11QVideoFrame4sizeEv @ 245 NONAME + _ZNK11QVideoFrame5widthEv @ 246 NONAME + _ZNK11QVideoFrame6handleEv @ 247 NONAME + _ZNK11QVideoFrame6heightEv @ 248 NONAME + _ZNK11QVideoFrame7endTimeEv @ 249 NONAME + _ZNK11QVideoFrame7isValidEv @ 250 NONAME + _ZNK11QVideoFrame7mapModeEv @ 251 NONAME + _ZNK11QVideoFrame8isMappedEv @ 252 NONAME + _ZNK11QVideoFrame8numBytesEv @ 253 NONAME + _ZNK11QVideoFrame9fieldTypeEv @ 254 NONAME + _ZNK11QVideoFrame9startTimeEv @ 255 NONAME + _ZNK17QImageVideoBuffer7mapModeEv @ 256 NONAME + _ZNK18QMemoryVideoBuffer7mapModeEv @ 257 NONAME + _ZNK19QVideoSurfaceFormat10frameWidthEv @ 258 NONAME + _ZNK19QVideoSurfaceFormat10handleTypeEv @ 259 NONAME + _ZNK19QVideoSurfaceFormat11frameHeightEv @ 260 NONAME + _ZNK19QVideoSurfaceFormat11pixelFormatEv @ 261 NONAME + _ZNK19QVideoSurfaceFormat13propertyNamesEv @ 262 NONAME + _ZNK19QVideoSurfaceFormat13yuvColorSpaceEv @ 263 NONAME + _ZNK19QVideoSurfaceFormat16pixelAspectRatioEv @ 264 NONAME + _ZNK19QVideoSurfaceFormat17scanLineDirectionEv @ 265 NONAME + _ZNK19QVideoSurfaceFormat7isValidEv @ 266 NONAME + _ZNK19QVideoSurfaceFormat8propertyEPKc @ 267 NONAME + _ZNK19QVideoSurfaceFormat8sizeHintEv @ 268 NONAME + _ZNK19QVideoSurfaceFormat8viewportEv @ 269 NONAME + _ZNK19QVideoSurfaceFormat9frameRateEv @ 270 NONAME + _ZNK19QVideoSurfaceFormat9frameSizeEv @ 271 NONAME + _ZNK19QVideoSurfaceFormateqERKS_ @ 272 NONAME + _ZNK19QVideoSurfaceFormatneERKS_ @ 273 NONAME + _ZNK20QAbstractVideoBuffer10handleTypeEv @ 274 NONAME + _ZNK20QAbstractVideoBuffer6handleEv @ 275 NONAME + _ZNK21QAbstractVideoSurface10metaObjectEv @ 276 NONAME + _ZNK21QAbstractVideoSurface13surfaceFormatEv @ 277 NONAME + _ZNK21QAbstractVideoSurface17isFormatSupportedERK19QVideoSurfaceFormatPS0_ @ 278 NONAME + _ZNK21QAbstractVideoSurface5errorEv @ 279 NONAME + _ZNK21QAbstractVideoSurface9isStartedEv @ 280 NONAME + _ZTI17QImageVideoBuffer @ 281 NONAME ; ## + _ZTI18QMemoryVideoBuffer @ 282 NONAME ; ## + _ZTI20QAbstractVideoBuffer @ 283 NONAME ; ## + _ZTI21QAbstractVideoSurface @ 284 NONAME ; ## + _ZTV17QImageVideoBuffer @ 285 NONAME ; ## + _ZTV18QMemoryVideoBuffer @ 286 NONAME ; ## + _ZTV20QAbstractVideoBuffer @ 287 NONAME ; ## + _ZTV21QAbstractVideoSurface @ 288 NONAME ; ## + _Zls6QDebugRK19QVideoSurfaceFormat @ 289 NONAME diff --git a/src/s60installs/eabi/QtNetworku.def b/src/s60installs/eabi/QtNetworku.def index d03e3f8..bd026e0 100644 --- a/src/s60installs/eabi/QtNetworku.def +++ b/src/s60installs/eabi/QtNetworku.def @@ -1364,4 +1364,34 @@ EXPORTS _ZNK13QNetworkReply9isRunningEv @ 1363 NONAME _ZNK17QHttpNetworkReply23bytesAvailableNextBlockEv @ 1364 NONAME _ZNK19QHttpNetworkRequest16uploadByteDeviceEv @ 1365 NONAME + _ZN10QSslSocket19getStaticMetaObjectEv @ 1366 NONAME + _ZN10QTcpServer19getStaticMetaObjectEv @ 1367 NONAME + _ZN10QTcpSocket19getStaticMetaObjectEv @ 1368 NONAME + _ZN10QUdpSocket19getStaticMetaObjectEv @ 1369 NONAME + _ZN12QLocalServer19getStaticMetaObjectEv @ 1370 NONAME + _ZN12QLocalSocket19getStaticMetaObjectEv @ 1371 NONAME + _ZN13QNetworkReply19getStaticMetaObjectEv @ 1372 NONAME + _ZN15QAbstractSocket19getStaticMetaObjectEv @ 1373 NONAME + _ZN17QHttpNetworkReply19getStaticMetaObjectEv @ 1374 NONAME + _ZN17QHttpSocketEngine19getStaticMetaObjectEv @ 1375 NONAME + _ZN17QNetworkCookieJar19getStaticMetaObjectEv @ 1376 NONAME + _ZN17QNetworkDiskCache19getStaticMetaObjectEv @ 1377 NONAME + _ZN19QHttpNetworkRequest20setPipeliningAllowedEb @ 1378 NONAME + _ZN19QNativeSocketEngine19getStaticMetaObjectEv @ 1379 NONAME + _ZN19QSocks5SocketEngine19getStaticMetaObjectEv @ 1380 NONAME + _ZN20QNetworkProxyFactory32setUseSystemConfigurationEnabledEb @ 1381 NONAME + _ZN21QAbstractNetworkCache19getStaticMetaObjectEv @ 1382 NONAME + _ZN21QAbstractSocketEngine19getStaticMetaObjectEv @ 1383 NONAME + _ZN21QNetworkAccessManager19getStaticMetaObjectEv @ 1384 NONAME + _ZN22QHttpNetworkConnection19getStaticMetaObjectEv @ 1385 NONAME + _ZN22QHttpNetworkConnectionC1EtRK7QStringtbP7QObject @ 1386 NONAME + _ZN22QHttpNetworkConnectionC2EtRK7QStringtbP7QObject @ 1387 NONAME + _ZN4QFtp19getStaticMetaObjectEv @ 1388 NONAME + _ZN5QHttp19getStaticMetaObjectEv @ 1389 NONAME + _ZNK17QHttpNetworkReply16isPipeliningUsedEv @ 1390 NONAME + _ZNK19QHttpNetworkRequest19isPipeliningAllowedEv @ 1391 NONAME + _ZTI24QNetworkReplyImplPrivate @ 1392 NONAME ; ## + _ZTI29QHttpNetworkConnectionChannel @ 1393 NONAME ; ## + _ZTV24QNetworkReplyImplPrivate @ 1394 NONAME ; ## + _ZTV29QHttpNetworkConnectionChannel @ 1395 NONAME ; ## diff --git a/src/s60installs/eabi/QtSqlu.def b/src/s60installs/eabi/QtSqlu.def index 4822dce..0dbfc55 100644 --- a/src/s60installs/eabi/QtSqlu.def +++ b/src/s60installs/eabi/QtSqlu.def @@ -473,4 +473,10 @@ EXPORTS _ZNK10QSqlDriver24numericalPrecisionPolicyEv @ 472 NONAME _ZNK10QSqlResult24numericalPrecisionPolicyEv @ 473 NONAME _ZNK12QSqlDatabase24numericalPrecisionPolicyEv @ 474 NONAME + _ZN10QSqlDriver19getStaticMetaObjectEv @ 475 NONAME + _ZN13QSQLiteDriver19getStaticMetaObjectEv @ 476 NONAME + _ZN14QSqlQueryModel19getStaticMetaObjectEv @ 477 NONAME + _ZN14QSqlTableModel19getStaticMetaObjectEv @ 478 NONAME + _ZN16QSqlDriverPlugin19getStaticMetaObjectEv @ 479 NONAME + _ZN24QSqlRelationalTableModel19getStaticMetaObjectEv @ 480 NONAME diff --git a/src/s60installs/eabi/QtSvgu.def b/src/s60installs/eabi/QtSvgu.def index ce93613..4dd3da5 100644 --- a/src/s60installs/eabi/QtSvgu.def +++ b/src/s60installs/eabi/QtSvgu.def @@ -202,4 +202,13 @@ EXPORTS _ZThn8_N16QGraphicsSvgItem5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 201 NONAME _ZThn8_NK16QGraphicsSvgItem12boundingRectEv @ 202 NONAME _ZThn8_NK16QGraphicsSvgItem4typeEv @ 203 NONAME + _ZN10QSvgWidget19getStaticMetaObjectEv @ 204 NONAME + _ZN12QSvgRenderer19getStaticMetaObjectEv @ 205 NONAME + _ZN16QGraphicsSvgItem19getStaticMetaObjectEv @ 206 NONAME + _ZN16QSvgTinyDocument12addNamedNodeERK7QStringP8QSvgNode @ 207 NONAME + _ZN16QSvgTinyDocument13addNamedStyleERK7QStringP21QSvgFillStyleProperty @ 208 NONAME + _ZNK16QSvgTinyDocument10namedStyleERK7QString @ 209 NONAME + _ZNK16QSvgTinyDocument9namedNodeERK7QString @ 210 NONAME + _ZTI21QSvgFillStyleProperty @ 211 NONAME ; ## + _ZTV21QSvgFillStyleProperty @ 212 NONAME ; ## diff --git a/src/s60installs/eabi/QtTestu.def b/src/s60installs/eabi/QtTestu.def index f4cc77f..ea1b3e1 100644 --- a/src/s60installs/eabi/QtTestu.def +++ b/src/s60installs/eabi/QtTestu.def @@ -80,4 +80,25 @@ EXPORTS _ZTV22QBenchmarkTimeMeasurer @ 79 NONAME ABSENT _ZN5QTest29QBenchmarkIterationControllerC1ENS0_7RunModeE @ 80 NONAME _ZN5QTest29QBenchmarkIterationControllerC2ENS0_7RunModeE @ 81 NONAME + _ZN14QTestEventLoop19getStaticMetaObjectEv @ 82 NONAME + _ZTI11QTestLogger @ 83 NONAME ; ## + _ZTI12QTestElement @ 84 NONAME ; ## + _ZTI13QTestCoreListI12QTestElementE @ 85 NONAME ; ## + _ZTI13QTestCoreListI21QTestElementAttributeE @ 86 NONAME ; ## + _ZTI16QTestCoreElementI12QTestElementE @ 87 NONAME ; ## + _ZTI16QTestXmlStreamer @ 88 NONAME ; ## + _ZTI18QTestBasicStreamer @ 89 NONAME ; ## + _ZTI18QTestXunitStreamer @ 90 NONAME ; ## + _ZTI21QTestElementAttribute @ 91 NONAME ; ## + _ZTI21QTestLightXmlStreamer @ 92 NONAME ; ## + _ZTV11QTestLogger @ 93 NONAME ; ## + _ZTV12QTestElement @ 94 NONAME ; ## + _ZTV13QTestCoreListI12QTestElementE @ 95 NONAME ; ## + _ZTV13QTestCoreListI21QTestElementAttributeE @ 96 NONAME ; ## + _ZTV16QTestCoreElementI12QTestElementE @ 97 NONAME ; ## + _ZTV16QTestXmlStreamer @ 98 NONAME ; ## + _ZTV18QTestBasicStreamer @ 99 NONAME ; ## + _ZTV18QTestXunitStreamer @ 100 NONAME ; ## + _ZTV21QTestElementAttribute @ 101 NONAME ; ## + _ZTV21QTestLightXmlStreamer @ 102 NONAME ; ## diff --git a/src/s60installs/eabi/phononu.def b/src/s60installs/eabi/phononu.def index dde254e..d407ba4 100644 --- a/src/s60installs/eabi/phononu.def +++ b/src/s60installs/eabi/phononu.def @@ -558,4 +558,16 @@ EXPORTS _ZThn8_N6Phonon19AbstractAudioOutputD1Ev @ 557 NONAME _ZThn8_N6Phonon6EffectD0Ev @ 558 NONAME _ZThn8_N6Phonon6EffectD1Ev @ 559 NONAME + _ZN6Phonon10SeekSlider19getStaticMetaObjectEv @ 560 NONAME + _ZN6Phonon11AudioOutput19getStaticMetaObjectEv @ 561 NONAME + _ZN6Phonon11MediaObject19getStaticMetaObjectEv @ 562 NONAME + _ZN6Phonon11VideoPlayer19getStaticMetaObjectEv @ 563 NONAME + _ZN6Phonon11VideoWidget19getStaticMetaObjectEv @ 564 NONAME + _ZN6Phonon12EffectWidget19getStaticMetaObjectEv @ 565 NONAME + _ZN6Phonon12VolumeSlider19getStaticMetaObjectEv @ 566 NONAME + _ZN6Phonon15MediaController19getStaticMetaObjectEv @ 567 NONAME + _ZN6Phonon17VolumeFaderEffect19getStaticMetaObjectEv @ 568 NONAME + _ZN6Phonon19AbstractAudioOutput19getStaticMetaObjectEv @ 569 NONAME + _ZN6Phonon19AbstractMediaStream19getStaticMetaObjectEv @ 570 NONAME + _ZN6Phonon6Effect19getStaticMetaObjectEv @ 571 NONAME -- cgit v0.12 From 37b9577f00bfba78915dfd659499efbf04acce4e Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Thu, 17 Sep 2009 14:28:16 +0200 Subject: Fix regression after code review The branch maintained its own set of native windows. This was commented to be a duplication of the native window list kept by QWidgetPrivate, and changed. Unfortunately, the set maintained on the branch contained only window owning controls, while the list kept by QWidgetPrivate contains all widgets that have a CCoeControl. Added a check for whether the control is window owning before using its DrawableWindow() to avoid getting a null pointer. Reviewed-by: Jason Barron --- src/gui/kernel/qapplication_s60.cpp | 4 +++- src/gui/kernel/qcursor_s60.cpp | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 4573c71..6a381f5 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1537,7 +1537,9 @@ void QApplication::restoreOverrideCursor() QListIterator iter(QWidgetPrivate::mapper->uniqueKeys()); while (iter.hasNext()) { CCoeControl *ctrl = iter.next(); - ctrl->DrawableWindow()->ClearPointerCursor(); + if(ctrl->OwnsWindow()) { + ctrl->DrawableWindow()->ClearPointerCursor(); + } } if (w) qt_symbian_setWindowCursor(w->cursor(), w->effectiveWinId()); diff --git a/src/gui/kernel/qcursor_s60.cpp b/src/gui/kernel/qcursor_s60.cpp index b50eb71..0d8283d 100644 --- a/src/gui/kernel/qcursor_s60.cpp +++ b/src/gui/kernel/qcursor_s60.cpp @@ -522,8 +522,10 @@ void qt_symbian_setGlobalCursor(const QCursor &cursor) while(iter.hasNext()) { CCoeControl *ctrl = iter.next(); - RWindowTreeNode *node = ctrl->DrawableWindow(); - qt_symbian_setWindowGroupCursor(cursor, *node); + if(ctrl->OwnsWindow()) { + RWindowTreeNode *node = ctrl->DrawableWindow(); + qt_symbian_setWindowGroupCursor(cursor, *node); + } } } } -- cgit v0.12 From d267c0946b65e0c93cb97ebb3dea1035ff390280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Wed, 9 Sep 2009 13:23:31 +0200 Subject: Implement hasConflicts(). --- src/gui/graphicsview/qgraphicsanchorlayout.cpp | 12 ++ src/gui/graphicsview/qgraphicsanchorlayout.h | 1 + src/gui/graphicsview/qgraphicsanchorlayout_p.cpp | 196 ++++++++++++--------- src/gui/graphicsview/qgraphicsanchorlayout_p.h | 8 +- src/gui/graphicsview/qsimplex_p.cpp | 9 +- src/gui/graphicsview/qsimplex_p.h | 2 +- .../tst_qgraphicsanchorlayout.cpp | 44 ++++- 7 files changed, 176 insertions(+), 96 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp index efad259..12124ab 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp @@ -288,6 +288,18 @@ void QGraphicsAnchorLayout::addAnchors(QGraphicsLayoutItem *firstItem, } /*! + Returns true if there are no arrangement that satisfies all constraints. + Otherwise returns false. + + \sa addAnchor() +*/ +bool QGraphicsAnchorLayout::hasConflicts() const +{ + Q_D(const QGraphicsAnchorLayout); + return d->hasConflicts(); +} + +/*! Sets the default horizontal spacing for the anchor layout to \a spacing. \sa horizontalSpacing(), setVerticalSpacing(), setSpacing() diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.h b/src/gui/graphicsview/qgraphicsanchorlayout.h index d9a87ba..44074d1 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout.h +++ b/src/gui/graphicsview/qgraphicsanchorlayout.h @@ -93,6 +93,7 @@ public: QGraphicsLayoutItem *secondItem, Qt::Orientations orientations = Qt::Horizontal | Qt::Vertical); + bool hasConflicts() const; void setHorizontalSpacing(qreal spacing); void setVerticalSpacing(qreal spacing); void setSpacing(qreal spacing); diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp index b02adf4..23601f9 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp @@ -332,6 +332,7 @@ QGraphicsAnchorLayoutPrivate::QGraphicsAnchorLayoutPrivate() for (int i = 0; i < NOrientations; ++i) { spacings[i] = -1; graphSimplified[i] = false; + graphHasConflicts[i] = false; } } @@ -1587,6 +1588,7 @@ void QGraphicsAnchorLayoutPrivate::calculateGraphs( AnchorVertex *v = internalVertex(q, pickEdge(Qt::AnchorRight, orientation)); GraphPath trunkPath = graphPaths[orientation].value(v); + bool feasible = true; if (!trunkConstraints.isEmpty()) { #if 0 qDebug("Simplex used for trunk of %s", @@ -1594,33 +1596,37 @@ void QGraphicsAnchorLayoutPrivate::calculateGraphs( #endif // Solve min and max size hints for trunk - QPair minMax = solveMinMax(trunkConstraints, trunkPath); - sizeHints[orientation][Qt::MinimumSize] = minMax.first; - sizeHints[orientation][Qt::MaximumSize] = minMax.second; + qreal min, max; + feasible = solveMinMax(trunkConstraints, trunkPath, &min, &max); // Solve for preferred. The objective function is calculated from the constraints // and variables internally. - solvePreferred(trunkConstraints); + feasible &= solvePreferred(trunkConstraints); - // Propagate the new sizes down the simplified graph, ie. tell the - // group anchors to set their children anchors sizes. + if (feasible) { + // Propagate the new sizes down the simplified graph, ie. tell the + // group anchors to set their children anchors sizes. - // ### we calculated variables already a few times, can't we reuse that? - QList trunkVariables = getVariables(trunkConstraints); + // ### we calculated variables already a few times, can't we reuse that? + QList trunkVariables = getVariables(trunkConstraints); - for (int i = 0; i < trunkVariables.count(); ++i) - trunkVariables.at(i)->updateChildrenSizes(); + for (int i = 0; i < trunkVariables.count(); ++i) + trunkVariables.at(i)->updateChildrenSizes(); + + // Calculate and set the preferred size for the layout from the edge sizes that + // were calculated above. + qreal pref(0.0); + foreach (const AnchorData *ad, trunkPath.positives) { + pref += ad->sizeAtPreferred; + } + foreach (const AnchorData *ad, trunkPath.negatives) { + pref -= ad->sizeAtPreferred; + } + sizeHints[orientation][Qt::MinimumSize] = min; + sizeHints[orientation][Qt::PreferredSize] = pref; + sizeHints[orientation][Qt::MaximumSize] = max; - // Calculate and set the preferred size for the layout from the edge sizes that - // were calculated above. - qreal pref(0.0); - foreach (const AnchorData *ad, trunkPath.positives) { - pref += ad->sizeAtPreferred; - } - foreach (const AnchorData *ad, trunkPath.negatives) { - pref -= ad->sizeAtPreferred; } - sizeHints[orientation][Qt::PreferredSize] = pref; } else { #if 0 qDebug("Simplex NOT used for trunk of %s", @@ -1654,29 +1660,34 @@ void QGraphicsAnchorLayoutPrivate::calculateGraphs( // layout. // Solve the other only for preferred, skip trunk - for (int i = 1; i < parts.count(); ++i) { - QList partConstraints = parts[i]; - QList partVariables = getVariables(partConstraints); - Q_ASSERT(!partVariables.isEmpty()); - - sizeHintConstraints = constraintsFromSizeHints(partVariables); - partConstraints += sizeHintConstraints; - solvePreferred(partConstraints); - - // Propagate size at preferred to other sizes. Semi-floats - // always will be in their sizeAtPreferred. - for (int j = 0; j < partVariables.count(); ++j) { - AnchorData *ad = partVariables[j]; - Q_ASSERT(ad); - ad->sizeAtMinimum = ad->sizeAtPreferred; - ad->sizeAtMaximum = ad->sizeAtPreferred; - ad->updateChildrenSizes(); - } + if (feasible) { + for (int i = 1; i < parts.count(); ++i) { + QList partConstraints = parts[i]; + QList partVariables = getVariables(partConstraints); + Q_ASSERT(!partVariables.isEmpty()); + + sizeHintConstraints = constraintsFromSizeHints(partVariables); + partConstraints += sizeHintConstraints; + feasible &= solvePreferred(partConstraints); + if (!feasible) + break; + + // Propagate size at preferred to other sizes. Semi-floats + // always will be in their sizeAtPreferred. + for (int j = 0; j < partVariables.count(); ++j) { + AnchorData *ad = partVariables[j]; + Q_ASSERT(ad); + ad->sizeAtMinimum = ad->sizeAtPreferred; + ad->sizeAtMaximum = ad->sizeAtPreferred; + ad->updateChildrenSizes(); + } - // Delete the constraints, we won't use them anymore. - qDeleteAll(sizeHintConstraints); - sizeHintConstraints.clear(); + // Delete the constraints, we won't use them anymore. + qDeleteAll(sizeHintConstraints); + sizeHintConstraints.clear(); + } } + graphHasConflicts[orientation] = !feasible; // Clean up our data structures. They are not needed anymore since // distribution uses just interpolation. @@ -2141,47 +2152,48 @@ void QGraphicsAnchorLayoutPrivate::interpolateSequentialEdges( interpolateEdge(prev, data->m_edges.last(), orientation); } -QPair -QGraphicsAnchorLayoutPrivate::solveMinMax(QList constraints, - GraphPath path) +bool QGraphicsAnchorLayoutPrivate::solveMinMax(QList constraints, + GraphPath path, qreal *min, qreal *max) { QSimplex simplex; - simplex.setConstraints(constraints); - - // Obtain the objective constraint - QSimplexConstraint objective; - QSet::const_iterator iter; - for (iter = path.positives.constBegin(); iter != path.positives.constEnd(); ++iter) - objective.variables.insert(*iter, 1.0); - - for (iter = path.negatives.constBegin(); iter != path.negatives.constEnd(); ++iter) - objective.variables.insert(*iter, -1.0); - - simplex.setObjective(&objective); - - // Calculate minimum values - qreal min = simplex.solveMin(); - - // Save sizeAtMinimum results - QList variables = simplex.constraintsVariables(); - for (int i = 0; i < variables.size(); ++i) { - AnchorData *ad = static_cast(variables[i]); - ad->sizeAtMinimum = ad->result; - } + bool feasible = simplex.setConstraints(constraints); + if (feasible) { + // Obtain the objective constraint + QSimplexConstraint objective; + QSet::const_iterator iter; + for (iter = path.positives.constBegin(); iter != path.positives.constEnd(); ++iter) + objective.variables.insert(*iter, 1.0); + + for (iter = path.negatives.constBegin(); iter != path.negatives.constEnd(); ++iter) + objective.variables.insert(*iter, -1.0); + + simplex.setObjective(&objective); + + // Calculate minimum values + *min = simplex.solveMin(); + + // Save sizeAtMinimum results + QList variables = simplex.constraintsVariables(); + for (int i = 0; i < variables.size(); ++i) { + AnchorData *ad = static_cast(variables[i]); + Q_ASSERT(ad->result >= ad->minSize || qFuzzyCompare(ad->result, ad->minSize)); + ad->sizeAtMinimum = ad->result; + } - // Calculate maximum values - qreal max = simplex.solveMax(); + // Calculate maximum values + *max = simplex.solveMax(); - // Save sizeAtMaximum results - for (int i = 0; i < variables.size(); ++i) { - AnchorData *ad = static_cast(variables[i]); - ad->sizeAtMaximum = ad->result; + // Save sizeAtMaximum results + for (int i = 0; i < variables.size(); ++i) { + AnchorData *ad = static_cast(variables[i]); + Q_ASSERT(ad->result <= ad->maxSize || qFuzzyCompare(ad->result, ad->maxSize)); + ad->sizeAtMaximum = ad->result; + } } - - return qMakePair(min, max); + return feasible; } -void QGraphicsAnchorLayoutPrivate::solvePreferred(QList constraints) +bool QGraphicsAnchorLayoutPrivate::solvePreferred(QList constraints) { QList variables = getVariables(constraints); QList preferredConstraints; @@ -2228,25 +2240,35 @@ void QGraphicsAnchorLayoutPrivate::solvePreferred(QList co QSimplex *simplex = new QSimplex; - simplex->setConstraints(constraints + preferredConstraints); - simplex->setObjective(&objective); + bool feasible = simplex->setConstraints(constraints + preferredConstraints); + if (feasible) { + simplex->setObjective(&objective); - // Calculate minimum values - simplex->solveMin(); - - // Save sizeAtPreferred results - for (int i = 0; i < variables.size(); ++i) { - AnchorData *ad = static_cast(variables[i]); - ad->sizeAtPreferred = ad->result; - } + // Calculate minimum values + simplex->solveMin(); - // Make sure we delete the simplex solver -before- we delete the - // constraints used by it. - delete simplex; + // Save sizeAtPreferred results + for (int i = 0; i < variables.size(); ++i) { + AnchorData *ad = static_cast(variables[i]); + ad->sizeAtPreferred = ad->result; + } + // Make sure we delete the simplex solver -before- we delete the + // constraints used by it. + delete simplex; + } // Delete constraints and variables we created. qDeleteAll(preferredConstraints); qDeleteAll(preferredVariables); + + return feasible; +} + +bool QGraphicsAnchorLayoutPrivate::hasConflicts() const +{ + QGraphicsAnchorLayoutPrivate *that = const_cast(this); + that->calculateGraphs(); + return graphHasConflicts[0] || graphHasConflicts[1]; } #ifdef QT_DEBUG diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h index 4d746bf..4e1bcd4 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h @@ -478,9 +478,10 @@ public: Orientation orientation); // Linear Programming solver methods - QPair solveMinMax(QList constraints, - GraphPath path); - void solvePreferred(QList constraints); + bool solveMinMax(QList constraints, + GraphPath path, qreal *min, qreal *max); + bool solvePreferred(QList constraints); + bool hasConflicts() const; #ifdef QT_DEBUG void dumpGraph(); @@ -514,6 +515,7 @@ public: // ### bool graphSimplified[2]; + bool graphHasConflicts[2]; uint calculateGraphCacheDirty : 1; }; diff --git a/src/gui/graphicsview/qsimplex_p.cpp b/src/gui/graphicsview/qsimplex_p.cpp index 3bd6b5a..e3a991e 100644 --- a/src/gui/graphicsview/qsimplex_p.cpp +++ b/src/gui/graphicsview/qsimplex_p.cpp @@ -84,12 +84,12 @@ void QSimplex::clearDataStructures() objective = 0; } -void QSimplex::setConstraints(const QList newConstraints) +bool QSimplex::setConstraints(const QList newConstraints) { clearDataStructures(); if (newConstraints.isEmpty()) - return; + return true; // we are ok with no constraints constraints = newConstraints; // Set Variables direct mapping @@ -153,7 +153,7 @@ void QSimplex::setConstraints(const QList newConstraints) matrix = (qreal *)malloc(sizeof(qreal) * columns * rows); if (!matrix) { qWarning() << "QSimplex: Unable to allocate memory!"; - return; + return false; } for (int i = columns * rows - 1; i >= 0; --i) matrix[i] = 0.0; @@ -198,11 +198,12 @@ void QSimplex::setConstraints(const QList newConstraints) if (valueAt(0, columns - 1) != 0.0) { qWarning() << "QSimplex: No feasible solution!"; clearDataStructures(); - return; + return false; } // Remove artificial variables clearColumns(firstArtificial, columns - 2); + return true; } void QSimplex::solveMaxHelper() diff --git a/src/gui/graphicsview/qsimplex_p.h b/src/gui/graphicsview/qsimplex_p.h index 805ef4a..54b080d 100644 --- a/src/gui/graphicsview/qsimplex_p.h +++ b/src/gui/graphicsview/qsimplex_p.h @@ -107,7 +107,7 @@ public: qreal solveMax(); QList constraintsVariables(); - void setConstraints(const QList constraints); + bool setConstraints(const QList constraints); void setObjective(QSimplexConstraint *objective); void dumpMatrix(); diff --git a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp index 5bb3746..f982973 100644 --- a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp +++ b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp @@ -65,6 +65,7 @@ private slots: void setSpacing(); void hardComplexS60(); void delete_anchor(); + void conflicts(); }; class RectWidget : public QGraphicsWidget @@ -100,7 +101,7 @@ static void setAnchor(QGraphicsAnchorLayout *l, Qt::AnchorPoint firstEdge, QGraphicsLayoutItem *secondItem, Qt::AnchorPoint secondEdge, - qreal spacing) + qreal spacing = 0) { QGraphicsAnchor *anchor = l->addAnchor(firstItem, firstEdge, secondItem, secondEdge); anchor->setSpacing(spacing); @@ -1102,5 +1103,46 @@ void tst_QGraphicsAnchorLayout::delete_anchor() } +void tst_QGraphicsAnchorLayout::conflicts() +{ + QGraphicsWidget *a = createItem(QSizeF(80,10), QSizeF(90,10), QSizeF(100,10), "a"); + QGraphicsWidget *b = createItem(QSizeF(10,10), QSizeF(20,10), QSizeF(30,10), "b"); + QGraphicsWidget *c = createItem(QSizeF(10,10), QSizeF(20,10), QSizeF(30,10), "c"); + + QGraphicsAnchorLayout *l; + QGraphicsWidget *p = new QGraphicsWidget(0, Qt::Window); + + l = new QGraphicsAnchorLayout; + l->setContentsMargins(0, 0, 0, 0); + + // with the following setup, 'a' cannot be larger than 30 we will first have a Simplex conflict + + // horizontal + setAnchor(l, l, Qt::AnchorLeft, b, Qt::AnchorLeft); + setAnchor(l, b, Qt::AnchorRight, c, Qt::AnchorLeft); + setAnchor(l, c, Qt::AnchorRight, l, Qt::AnchorRight); + setAnchor(l, b, Qt::AnchorHorizontalCenter, a, Qt::AnchorLeft); + setAnchor(l, a, Qt::AnchorRight, c, Qt::AnchorHorizontalCenter); + + // vertical + setAnchor(l, l, Qt::AnchorTop, a, Qt::AnchorTop); + setAnchor(l, a, Qt::AnchorBottom, b, Qt::AnchorTop); + setAnchor(l, a, Qt::AnchorBottom, c, Qt::AnchorTop); + setAnchor(l, b, Qt::AnchorBottom, l, Qt::AnchorBottom); + setAnchor(l, c, Qt::AnchorBottom, l, Qt::AnchorBottom); + + p->setLayout(l); + + QCOMPARE(l->hasConflicts(), true); + + a->setMinimumSize(QSizeF(29,10)); + QCOMPARE(l->hasConflicts(), false); + + // It will currently fail if we uncomment this: + //QEXPECT_FAIL("", "The constraints are just within their bounds in order to be feasible", Continue); + //a->setMinimumSize(QSizeF(30,10)); + //QCOMPARE(l->hasConflicts(), false); +} + QTEST_MAIN(tst_QGraphicsAnchorLayout) #include "tst_qgraphicsanchorlayout.moc" -- cgit v0.12 From deb322f3f358b0e596720f85361a0e7077137530 Mon Sep 17 00:00:00 2001 From: Trond Kjernaasen Date: Thu, 17 Sep 2009 15:07:03 +0200 Subject: Fixed a bug in QToolTip when internal tool tips where reused. If a tool tip is to be reused, it *has* to be visible otherwise it *may* get destroyed by the expiration timer before the timer is reset. The tst_qtooltip::setPalette() test triggered this obscure bug under Windows. Reviewed-by: Kim --- src/gui/kernel/qtooltip.cpp | 6 +++--- tests/auto/qtooltip/tst_qtooltip.cpp | 11 ++++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/gui/kernel/qtooltip.cpp b/src/gui/kernel/qtooltip.cpp index a480195..2d0d209 100644 --- a/src/gui/kernel/qtooltip.cpp +++ b/src/gui/kernel/qtooltip.cpp @@ -290,8 +290,8 @@ void QTipLabel::timerEvent(QTimerEvent *e) // Fade out tip on mac (makes it invisible). // The tip will not be deleted until a new tip is shown. - // DRSWAT - Cocoa - macWindowFade(qt_mac_window_for(this)); + // DRSWAT - Cocoa + macWindowFade(qt_mac_window_for(this)); QTipLabel::instance->fadingOut = true; // will never be false again. } else @@ -431,7 +431,7 @@ bool QTipLabel::tipChanged(const QPoint &pos, const QString &text, QObject *o) void QToolTip::showText(const QPoint &pos, const QString &text, QWidget *w, const QRect &rect) { - if (QTipLabel::instance){ // a tip does already exist + if (QTipLabel::instance && QTipLabel::instance->isVisible()){ // a tip does already exist if (text.isEmpty()){ // empty text means hide current tip QTipLabel::instance->hideTip(); return; diff --git a/tests/auto/qtooltip/tst_qtooltip.cpp b/tests/auto/qtooltip/tst_qtooltip.cpp index 5068460..2ad74a3 100644 --- a/tests/auto/qtooltip/tst_qtooltip.cpp +++ b/tests/auto/qtooltip/tst_qtooltip.cpp @@ -42,6 +42,7 @@ #include #include +#include "../../shared/util.h" //TESTED_CLASS= //TESTED_FILES= @@ -132,20 +133,24 @@ void tst_QToolTip::task183679() void tst_QToolTip::setPalette() { //the previous test may still have a tooltip pending for deletion - QTest::qWait(100); QVERIFY(!QToolTip::isVisible()); QToolTip::showText(QPoint(), "tool tip text", 0); - QTest::qWait(100); + + QTRY_VERIFY(QToolTip::isVisible()); QWidget *toolTip = 0; foreach (QWidget *widget, QApplication::topLevelWidgets()) { - if (widget->windowType() == Qt::ToolTip) { + if (widget->windowType() == Qt::ToolTip + && widget->objectName() == QLatin1String("qtooltip_label")) + { toolTip = widget; break; } } + QVERIFY(toolTip); + QTRY_VERIFY(toolTip->isVisible()); const QPalette oldPalette = toolTip->palette(); QPalette newPalette = oldPalette; -- cgit v0.12 From 67d3086c6aa1cfd1579a8230a0b2b94fff3735f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Thu, 17 Sep 2009 15:29:23 +0200 Subject: Fix the scrollTo() test function on Windows. After the QTRY_COMPARE was added, the size of the view suddenly became a hard requirement. However, this reqirement was not met on windows, since the forcedSize was smaller than the minimum size allowed for the view. Thus, it would never have its size set to forcedSize and the QTRY_COMPARE would fail. --- tests/auto/qtableview/tst_qtableview.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/auto/qtableview/tst_qtableview.cpp b/tests/auto/qtableview/tst_qtableview.cpp index 48fcb3e..964841e 100644 --- a/tests/auto/qtableview/tst_qtableview.cpp +++ b/tests/auto/qtableview/tst_qtableview.cpp @@ -2279,7 +2279,7 @@ void tst_QTableView::scrollTo_data() << (int)QAbstractItemView::ScrollPerItem << (int)QAbstractItemView::ScrollPerItem << 10 << 10 // table - << 40 << 40 // size + << 80 << 80 // size << -1 << -1 // hide << 0 << 0 // cell << 1 << 1 // span @@ -2291,7 +2291,7 @@ void tst_QTableView::scrollTo_data() << (int)QAbstractItemView::ScrollPerPixel << (int)QAbstractItemView::ScrollPerPixel << 10 << 10 // table - << 40 << 40 // size + << 80 << 80 // size << -1 << -1 // hide << 0 << 0 // cell << 1 << 1 // span @@ -2303,7 +2303,7 @@ void tst_QTableView::scrollTo_data() << (int)QAbstractItemView::ScrollPerItem << (int)QAbstractItemView::ScrollPerItem << 10 << 10 // table - << 40 << 40 // size + << 80 << 80 // size << 3 << 3 // hide << 5 << 5 // cell << 1 << 1 // span @@ -2336,7 +2336,8 @@ void tst_QTableView::scrollTo() QtTestTableView view; view.show(); - QSize forcedSize(columnWidth * 2, rowHeight * 2); + // resizing to this size will ensure that there can ONLY_BE_ONE_CELL inside the view. + QSize forcedSize(columnWidth*2, rowHeight * 2); view.resize(forcedSize); QTest::qWait(0); QTRY_COMPARE(view.size(), forcedSize); @@ -2362,6 +2363,8 @@ void tst_QTableView::scrollTo() view.scrollTo(index, (QAbstractItemView::ScrollHint)scrollHint); QCOMPARE(view.verticalScrollBar()->value(), expectedVerticalScroll); QCOMPARE(view.horizontalScrollBar()->value(), expectedHorizontalScroll); + + //QTest::qWait(22100); // ### needed to pass the test } void tst_QTableView::indexAt_data() -- cgit v0.12 From 687fa8bcf2eac2a8c71d6560c5d388fac3b4283e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Thu, 17 Sep 2009 15:47:21 +0200 Subject: Clean up my previous commit (remove comment and whitespace fix) --- tests/auto/qtableview/tst_qtableview.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/auto/qtableview/tst_qtableview.cpp b/tests/auto/qtableview/tst_qtableview.cpp index 964841e..dbf1aa4 100644 --- a/tests/auto/qtableview/tst_qtableview.cpp +++ b/tests/auto/qtableview/tst_qtableview.cpp @@ -2337,7 +2337,7 @@ void tst_QTableView::scrollTo() view.show(); // resizing to this size will ensure that there can ONLY_BE_ONE_CELL inside the view. - QSize forcedSize(columnWidth*2, rowHeight * 2); + QSize forcedSize(columnWidth * 2, rowHeight * 2); view.resize(forcedSize); QTest::qWait(0); QTRY_COMPARE(view.size(), forcedSize); @@ -2363,8 +2363,6 @@ void tst_QTableView::scrollTo() view.scrollTo(index, (QAbstractItemView::ScrollHint)scrollHint); QCOMPARE(view.verticalScrollBar()->value(), expectedVerticalScroll); QCOMPARE(view.horizontalScrollBar()->value(), expectedHorizontalScroll); - - //QTest::qWait(22100); // ### needed to pass the test } void tst_QTableView::indexAt_data() -- cgit v0.12 From a62506aae40ede3fd8030312321759f669458909 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Thu, 17 Sep 2009 15:39:59 +0200 Subject: Make the PowerVR screen driver for QWS compile against shipped headers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pvr2d.h/wsegl.h headers we ship with Qt (in src/3rdparty/powervr) are meant for the PowerVR SGX. However, we use an MBX-specific define in the powervr driver. Reviewed-by: Jørgen Lind --- src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c b/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c index cc180f9..b26938b 100644 --- a/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c +++ b/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c @@ -50,8 +50,8 @@ /* Capability information for the display */ static WSEGLCaps const wseglDisplayCaps[] = { - {WSEGL_CAP_WINDOWS_USE_MBX_SYNC, 1}, - {WSEGL_CAP_PIXMAPS_USE_MBX_SYNC, 1}, + {WSEGL_CAP_WINDOWS_USE_HW_SYNC, 1}, + {WSEGL_CAP_PIXMAPS_USE_HW_SYNC, 1}, {WSEGL_NO_CAPS, 0} }; -- cgit v0.12 From e6dbbd0398d70ee64a3b8129e9621cfa15d70f8c Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Thu, 17 Sep 2009 17:10:28 +0200 Subject: Update the QWS PowerVR driver's pro to use the new EGL qmake vars Reviewed-by: Trustme --- src/plugins/gfxdrivers/powervr/QWSWSEGL/QWSWSEGL.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/gfxdrivers/powervr/QWSWSEGL/QWSWSEGL.pro b/src/plugins/gfxdrivers/powervr/QWSWSEGL/QWSWSEGL.pro index 9331d0a..595cf45 100644 --- a/src/plugins/gfxdrivers/powervr/QWSWSEGL/QWSWSEGL.pro +++ b/src/plugins/gfxdrivers/powervr/QWSWSEGL/QWSWSEGL.pro @@ -11,9 +11,9 @@ SOURCES+=\ pvrqwsdrawable.c \ pvrqwswsegl.c -INCLUDEPATH += $$QMAKE_INCDIR_OPENGL +INCLUDEPATH += $$QMAKE_INCDIR_EGL -for(p, QMAKE_LIBDIR_OPENGL) { +for(p, QMAKE_LIBDIR_EGL) { exists($$p):LIBS += -L$$p } -- cgit v0.12 From 0db5ca5c733422b28524791b4f292227a61090d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Thu, 17 Sep 2009 17:12:34 +0200 Subject: Fixed the invalid license header. This caused the tests/header test to fail. Reviewed-by: Kim --- .../tst_qgraphicsanchorlayout1.cpp | 78 +++++++++++----------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp index 1216b76..c2f0171 100644 --- a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp +++ b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp @@ -1,43 +1,43 @@ /**************************************************************************** - * ** - * ** Copyright (C) 2009 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$ - * ** - * ****************************************************************************/ +** +** Copyright (C) 2009 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$ +** +****************************************************************************/ #include #include -- cgit v0.12 From 0f0cda626c697fe5244853dbdd14feb0cf81055e Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 17 Sep 2009 12:58:59 +0200 Subject: Use the proxy in QStyle Reviewed-by: trustme --- src/gui/styles/qstyle.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/styles/qstyle.cpp b/src/gui/styles/qstyle.cpp index 2614bfb..eef1573 100644 --- a/src/gui/styles/qstyle.cpp +++ b/src/gui/styles/qstyle.cpp @@ -463,7 +463,7 @@ QRect QStyle::itemTextRect(const QFontMetrics &metrics, const QRect &rect, int a rect.getRect(&x, &y, &w, &h); if (!text.isEmpty()) { result = metrics.boundingRect(x, y, w, h, alignment, text); - if (!enabled && styleHint(SH_EtchDisabledText)) { + if (!enabled && proxy()->styleHint(SH_EtchDisabledText)) { result.setWidth(result.width()+1); result.setHeight(result.height()+1); } @@ -525,12 +525,12 @@ void QStyle::drawItemText(QPainter *painter, const QRect &rect, int alignment, c painter->setPen(QPen(pal.brush(textRole), savedPen.widthF())); } if (!enabled) { - if (styleHint(SH_DitherDisabledText)) { + if (proxy()->styleHint(SH_DitherDisabledText)) { QRect br; painter->drawText(rect, alignment, text, &br); painter->fillRect(br, QBrush(painter->background().color(), Qt::Dense5Pattern)); return; - } else if (styleHint(SH_EtchDisabledText)) { + } else if (proxy()->styleHint(SH_EtchDisabledText)) { QPen pen = painter->pen(); painter->setPen(pal.light().color()); painter->drawText(rect.adjusted(1, 1, 1, 1), alignment, text); -- cgit v0.12 From 7813e29760120d8e7ed0b1f4c91767cc809a2623 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 17 Sep 2009 18:02:57 +0200 Subject: Stabilize test --- tests/auto/qitemdelegate/tst_qitemdelegate.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/auto/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/qitemdelegate/tst_qitemdelegate.cpp index dbbbd1c..e6d6df3 100644 --- a/tests/auto/qitemdelegate/tst_qitemdelegate.cpp +++ b/tests/auto/qitemdelegate/tst_qitemdelegate.cpp @@ -900,11 +900,8 @@ void tst_QItemDelegate::decoration() item->setSelected(true); QApplication::processEvents(); -#ifdef Q_WS_QWS - QApplication::sendPostedEvents(); //glib workaround -#endif - QCOMPARE(delegate.decorationRect.size(), expected); + QTRY_COMPARE(delegate.decorationRect.size(), expected); } void tst_QItemDelegate::editorEvent_data() -- cgit v0.12 From 9a712c48fb8047c3ed833db7d47382eb072711d6 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Fri, 18 Sep 2009 08:09:53 +1000 Subject: Fix compilation for systems with MBX PowerVR headers. Reviewed-by: trustme --- src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c b/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c index b26938b..253f39f 100644 --- a/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c +++ b/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c @@ -48,6 +48,13 @@ #define WSEGL_UNUSED(x) (void)x; +// If the PVR2D version is not specified, then assume MBX-style headers. +// If the version is defined, then we assume that we have SGX-style headers. +#if !defined(PVR2D_REV_MAJOR) +#define WSEGL_CAP_WINDOWS_USE_HW_SYNC WSEGL_CAP_WINDOWS_USE_MBX_SYNC +#define WSEGL_CAP_PIXMAPS_USE_HW_SYNC WSEGL_CAP_PIXMAPS_USE_MBX_SYNC +#endif + /* Capability information for the display */ static WSEGLCaps const wseglDisplayCaps[] = { {WSEGL_CAP_WINDOWS_USE_HW_SYNC, 1}, -- cgit v0.12 From 215d7c9a57ae531982ec98a5de0ad01589151469 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Thu, 17 Sep 2009 15:17:16 -0700 Subject: Fix a bug in QDirectFBWindowSurface::scroll It seems that one cannot do multiple blits within a double-buffered surface in overlapping one another without doing a Flip in between. I find this a little odd and will check that it's the correct behavior but this fixes bugs in scroll(). To see a case that used to produce drawing errors check out the collidingmouse example and drag the viewport around. Reviewed-by: Jervey Kong --- src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp index 4cebc96..19103cb 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp @@ -274,6 +274,8 @@ static inline void scrollSurface(IDirectFBSurface *surface, const QRect &r, int { const DFBRectangle rect = { r.x(), r.y(), r.width(), r.height() }; surface->Blit(surface, surface, &rect, r.x() + dx, r.y() + dy); + const DFBRegion region = { rect.x + dx, rect.y + dy, r.right() + dx, r.bottom() + dy }; + surface->Flip(surface, ®ion, DSFLIP_BLIT); } bool QDirectFBWindowSurface::scroll(const QRegion ®ion, int dx, int dy) -- cgit v0.12 From 6c0b2b331cfcd200b4e62809e39971eb531fab80 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Fri, 18 Sep 2009 08:33:22 +1000 Subject: Fix broken .ui file - class name was not specified correctly. Reviewed-by: trustme --- tools/designer/src/components/formeditor/deviceprofiledialog.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/designer/src/components/formeditor/deviceprofiledialog.ui b/tools/designer/src/components/formeditor/deviceprofiledialog.ui index 17ee966..d7a298c 100644 --- a/tools/designer/src/components/formeditor/deviceprofiledialog.ui +++ b/tools/designer/src/components/formeditor/deviceprofiledialog.ui @@ -1,6 +1,6 @@ - dialog + DeviceProfileDialog -- cgit v0.12 From e43225a09536deddb589d9876da609c017730b53 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Fri, 18 Sep 2009 11:12:40 +1000 Subject: Colorize filter for OpenVG doesn't currently support strength() Reviewed-by: trustme --- src/openvg/qpaintengine_vg.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index d87ac40..3ae3fe4 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -3125,6 +3125,9 @@ QPixmapFilter *QVGPaintEngine::pixmapFilter(int type, const QPixmapFilter *proto d->convolutionFilter.reset(new QVGPixmapConvolutionFilter); return d->convolutionFilter.data(); case QPixmapFilter::ColorizeFilter: + // Strength parameter does not work with current implementation. + if ((static_cast(prototype))->strength() != 1.0f) + break; if (!d->colorizeFilter) d->colorizeFilter.reset(new QVGPixmapColorizeFilter); return d->colorizeFilter.data(); -- cgit v0.12 From 83d85f95eda193029fc3ea9406afd4791019189c Mon Sep 17 00:00:00 2001 From: Peter Yard Date: Fri, 18 Sep 2009 13:50:27 +1000 Subject: Corrected name of gestures png image name. --- doc/src/getting-started/examples.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc index 543a2e1..9e72ab4 100644 --- a/doc/src/getting-started/examples.qdoc +++ b/doc/src/getting-started/examples.qdoc @@ -300,7 +300,7 @@ \o{2,1} \l{Gestures Examples}{\bold{Gestures}} \o{2,1} \l{D-Bus Examples}{\bold{D-Bus}} \row - \o \image gestures-examples.png + \o \image gestures.png \o Applications can be written to respond to gestures as a natural input method. These examples show how to enable support for standard and custom gestures in -- cgit v0.12 From cc616cc8234e4d3e26e36fb8b234601768825e39 Mon Sep 17 00:00:00 2001 From: Peter Yard Date: Fri, 18 Sep 2009 13:51:11 +1000 Subject: Changed ingroup to correct group. --- doc/src/frameworks-technologies/gestures.qdoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/src/frameworks-technologies/gestures.qdoc b/doc/src/frameworks-technologies/gestures.qdoc index b9b7771..1e3cc47 100644 --- a/doc/src/frameworks-technologies/gestures.qdoc +++ b/doc/src/frameworks-technologies/gestures.qdoc @@ -44,7 +44,8 @@ \startpage index.html Qt Reference Documentation \title Gestures Programming - \ingroup howto + \ingroup frameworks-technologies + \brief An overview of the Qt support for Gesture programming. Qt includes a framework for gesture programming that gives has the ability -- cgit v0.12 From ac101a65abd1143ee8f91481e1d5d87b75f944ec Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Fri, 18 Sep 2009 10:12:17 +0200 Subject: Update default tag name in mkdist-webkit script. Reviewed-by: Simon Hausmann --- util/webkit/mkdist-webkit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/webkit/mkdist-webkit b/util/webkit/mkdist-webkit index b5c0460..4217953 100755 --- a/util/webkit/mkdist-webkit +++ b/util/webkit/mkdist-webkit @@ -5,7 +5,7 @@ die() { exit 1 } -default_tag="qtwebkit-4.6-snapshot-29072009" +default_tag="qtwebkit-4.6-snapshot-18092009" if [ $# -eq 0 ]; then tag="$default_tag" -- cgit v0.12 From 301ba29eb8b08d9c040ee80c8a6e4e98bea91dee Mon Sep 17 00:00:00 2001 From: "Anselmo Lacerda S. de Melo" Date: Tue, 15 Sep 2009 12:49:53 -0300 Subject: QGraphicsAnchorLayout: Initial support for Size Policy In this commit we introduce initial support for Size Policy. The size policies supported now are: * QSizePolicy::Fixed * QSizePolicy::Minimum * QSizePolicy::Maximum * QSizePolicy::Preferred * QSizePolicy::Ignored Signed-off-by: Anselmo Lacerda S. de Melo --- src/gui/graphicsview/qgraphicsanchorlayout.cpp | 1 - src/gui/graphicsview/qgraphicsanchorlayout_p.cpp | 43 +++++++++++++++++++++--- 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp index 12124ab..78b6b53 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp @@ -434,7 +434,6 @@ void QGraphicsAnchorLayout::invalidate() */ QSizeF QGraphicsAnchorLayout::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const { - Q_UNUSED(which); Q_UNUSED(constraint); Q_D(const QGraphicsAnchorLayout); diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp index 23601f9..f7266e2 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp @@ -98,17 +98,52 @@ void AnchorData::refreshSizeHints(qreal effectiveSpacing) bool hasCenter = false; QGraphicsLayoutItem *item = from->m_item; + QSizePolicy policy = item->sizePolicy(); + if (QGraphicsAnchorLayoutPrivate::edgeOrientation(from->m_edge) == QGraphicsAnchorLayoutPrivate::Horizontal) { - minSize = item->minimumWidth(); + + // minSize, prefSize and maxSize are initialized + // with item's preferred Size: this is QSizePolicy::Fixed. + // + // Then we check each flag to find the resultant QSizePolicy, + // according to the following table: + // + // constant value + // QSizePolicy::Fixed 0 + // QSizePolicy::Minimum GrowFlag + // QSizePolicy::Maximum ShrinkFlag + // QSizePolicy::Preferred GrowFlag | ShrinkFlag + // QSizePolicy::Ignored GrowFlag | ShrinkFlag | IgnoreFlag prefSize = item->preferredWidth(); - maxSize = item->maximumWidth(); + minSize = prefSize; + maxSize = prefSize; + + if (policy.horizontalPolicy() & QSizePolicy::GrowFlag) + maxSize = item->maximumWidth(); + + if (policy.horizontalPolicy() & QSizePolicy::ShrinkFlag) + minSize = item->minimumWidth(); + + if (policy.horizontalPolicy() & QSizePolicy::IgnoreFlag) + prefSize = minSize; + hasCenter = (from->m_edge == Qt::AnchorHorizontalCenter || to->m_edge == Qt::AnchorHorizontalCenter); } else { - minSize = item->minimumHeight(); prefSize = item->preferredHeight(); - maxSize = item->maximumHeight(); + minSize = prefSize; + maxSize = prefSize; + + if (policy.verticalPolicy() & QSizePolicy::GrowFlag) + maxSize = item->maximumHeight(); + + if (policy.verticalPolicy() & QSizePolicy::ShrinkFlag) + minSize = item->minimumHeight(); + + if (policy.verticalPolicy() & QSizePolicy::IgnoreFlag) + prefSize = minSize; + hasCenter = (from->m_edge == Qt::AnchorVerticalCenter || to->m_edge == Qt::AnchorVerticalCenter); } -- cgit v0.12 From 91cd65ff36b0465c3eef4e1575f064c1cf7e9236 Mon Sep 17 00:00:00 2001 From: "Anselmo Lacerda S. de Melo" Date: Wed, 16 Sep 2009 20:30:37 -0300 Subject: QGraphicsAnchorLayout: Added an auto test for size policy Added an auto test for the currently supported size policies set. This is a simple test containing a single item anchored to the layout vertical and horizontally. The size policies are set, then the item's minimum, preferred and maximum sizes are compared to the expected ones, according to each policy. Signed-off-by: Anselmo Lacerda S. de Melo --- .../tst_qgraphicsanchorlayout.cpp | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp index f982973..385fb3e 100644 --- a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp +++ b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp @@ -66,6 +66,7 @@ private slots: void hardComplexS60(); void delete_anchor(); void conflicts(); + void sizePolicy(); }; class RectWidget : public QGraphicsWidget @@ -250,6 +251,11 @@ void tst_QGraphicsAnchorLayout::layoutDirection() QGraphicsWidget *b = createItem(min, pref, max, "b"); QGraphicsWidget *c = createItem(min, pref, QSizeF(100, 20), "c"); + a->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); + b->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); + c->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); + + QGraphicsAnchorLayout *l = new QGraphicsAnchorLayout; l->setContentsMargins(0, 5, 10, 15); // horizontal @@ -1100,7 +1106,87 @@ void tst_QGraphicsAnchorLayout::delete_anchor() delete p; delete view; +} + +void tst_QGraphicsAnchorLayout::sizePolicy() +{ + QGraphicsScene scene; + QSizeF minSize(0, 0); + QSizeF prefSize(50, 50); + QSizeF maxSize(100, 100); + QGraphicsWidget *w1 = createItem(minSize, prefSize, maxSize, "w1"); + + QGraphicsAnchorLayout *l = new QGraphicsAnchorLayout; + l->setSpacing(0); + l->setContentsMargins(0, 0, 0, 0); + + // horizontal + QGraphicsAnchor *anchor = l->addAnchor(l, Qt::AnchorLeft, w1, Qt::AnchorLeft); + anchor->setSpacing(0); + + anchor = l->addAnchor(w1, Qt::AnchorRight, l, Qt::AnchorRight); + anchor->setSpacing(0); + // vertical + anchor = l->addAnchor(l, Qt::AnchorTop, w1, Qt::AnchorTop); + anchor->setSpacing(0); + + anchor = l->addAnchor(w1, Qt::AnchorBottom, l, Qt::AnchorBottom); + anchor->setSpacing(0); + + QGraphicsWidget *p = new QGraphicsWidget; + p->setLayout(l); + + scene.addItem(p); + QGraphicsView *view = new QGraphicsView(&scene); + + // QSizePolicy::Minimum + w1->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); + QApplication::processEvents(); + w1->adjustSize(); + + QCOMPARE(l->effectiveSizeHint(Qt::MinimumSize), QSizeF(50, 50)); + QCOMPARE(l->effectiveSizeHint(Qt::PreferredSize), QSizeF(50, 50)); + QCOMPARE(l->effectiveSizeHint(Qt::MaximumSize), QSizeF(100, 100)); + + // QSizePolicy::Maximum + w1->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum); + QApplication::processEvents(); + w1->adjustSize(); + + QCOMPARE(l->effectiveSizeHint(Qt::MinimumSize), QSizeF(0, 0)); + QCOMPARE(l->effectiveSizeHint(Qt::PreferredSize), QSizeF(50, 50)); + QCOMPARE(l->effectiveSizeHint(Qt::MaximumSize), QSizeF(50, 50)); + + // QSizePolicy::Fixed + w1->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + QApplication::processEvents(); + w1->adjustSize(); + + QCOMPARE(l->effectiveSizeHint(Qt::MinimumSize), QSizeF(50, 50)); + QCOMPARE(l->effectiveSizeHint(Qt::PreferredSize), QSizeF(50, 50)); + QCOMPARE(l->effectiveSizeHint(Qt::MaximumSize), QSizeF(50, 50)); + + // QSizePolicy::Preferred + w1->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); + QApplication::processEvents(); + w1->adjustSize(); + + QCOMPARE(l->effectiveSizeHint(Qt::MinimumSize), QSizeF(0, 0)); + QCOMPARE(l->effectiveSizeHint(Qt::PreferredSize), QSizeF(50, 50)); + QCOMPARE(l->effectiveSizeHint(Qt::MaximumSize), QSizeF(100, 100)); + + // QSizePolicy::Ignored + w1->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); + QApplication::processEvents(); + w1->adjustSize(); + + QCOMPARE(l->effectiveSizeHint(Qt::MinimumSize), QSizeF(0, 0)); + QCOMPARE(l->effectiveSizeHint(Qt::PreferredSize), QSizeF(0, 0)); + QCOMPARE(l->effectiveSizeHint(Qt::MaximumSize), QSizeF(100, 100)); + + delete p; + delete view; } void tst_QGraphicsAnchorLayout::conflicts() -- cgit v0.12 From 403f533b09df5982c9d9ffea35a9ff8363704869 Mon Sep 17 00:00:00 2001 From: "Anselmo Lacerda S. de Melo" Date: Wed, 16 Sep 2009 20:28:11 -0300 Subject: QGraphicsAnchorLayout: Set size policy in the example Set QSizePolicy::Preferred to all proxy widgets (after setWidgeT) in the QGraphicsAnchorLayout example to avoid "QSimplex: No feasible solution!" that occurs when all items are set with QPushButton's default size policy. Signed-off-by: Anselmo Lacerda S. de Melo --- examples/graphicsview/anchorlayout/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/graphicsview/anchorlayout/main.cpp b/examples/graphicsview/anchorlayout/main.cpp index a4bf1d0..3e19f18 100644 --- a/examples/graphicsview/anchorlayout/main.cpp +++ b/examples/graphicsview/anchorlayout/main.cpp @@ -56,6 +56,7 @@ static QGraphicsProxyWidget *createItem(const QSizeF &minimum = QSizeF(100.0, 10 w->setPreferredSize(preferred); w->setMaximumSize(maximum); + w->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); return w; } -- cgit v0.12 From 5b828316abb0ad1a33cdc11ebac0999d9b79576a Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Fri, 18 Sep 2009 10:28:18 +0200 Subject: Update list of excluded files in mkdit-webkit script. Reviewed-by: Simon Hausmann --- util/webkit/mkdist-webkit | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/util/webkit/mkdist-webkit b/util/webkit/mkdist-webkit index 4217953..548e3fb 100755 --- a/util/webkit/mkdist-webkit +++ b/util/webkit/mkdist-webkit @@ -76,6 +76,7 @@ excluded_directories="$excluded_directories WebCore/page/mac" 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/history/mac" @@ -196,6 +197,10 @@ files_to_remove="$files_to_remove JavaScriptCore/AllInOneFile.cpp" files_to_remove="$files_to_remove JavaScriptCore/JavaScriptCoreSources.bkl" files_to_remove="$files_to_remove JavaScriptCore/jscore.bkl" +files_to_remove="$files_to_remove WebCore/wscript" +files_to_remove="$files_to_remove WebCore/WebCore.ContextMenus.exp" +files_to_remove="$files_to_remove WebCore/WebCore.DragSupport.exp" +files_to_remove="$files_to_remove WebCore/WebCore.Inspector.exp" files_to_remove="$files_to_remove WebCore/WebCoreSources.bkl" files_to_remove="$files_to_remove WebCore/webcore-base.bkl" files_to_remove="$files_to_remove WebCore/webcore-wx.bkl" -- cgit v0.12 From ef310719ef42cd09e2542fce96c529b5657bf167 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Fri, 18 Sep 2009 10:35:59 +0200 Subject: Updated WebKit from /home/joce/dev/qtwebkit/ to qtwebkit-4.6-snapshot-18092009 ( 15c07fb8d7fa5e93c939aa7eb21c06e19c754cee ) 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-09-17 Janne Koskinen Reviewed by Simon Hausmann. Symbian build fix. Moved the #ifdefs around _q_cleanupLeakMessages() into the function definition. QMake is not being able to distinguish between release and debug builds in Symbian build. This is a Symbian toolchain issue. * Api/qwebpage.cpp: (QWebPagePrivate::_q_cleanupLeakMessages): * Api/qwebpage.h: * Api/qwebpage_p.h: 2009-09-17 Jocelyn Turcotte Reviewed by Simon Hausmann. Small cosmetic documentation fixlet in the QWebInspector. * Api/qwebinspector.cpp: 2009-09-16 Benjamin C Meyer Reviewed by Eric Seidel. Detect and add Windows7 properly to the user agent. * Api/qwebpage.cpp: (QWebPage::userAgentForUrl): 2009-09-16 Andras Becsi Rubberstamped by Kenneth Christiansen. [Qt] Build fix for previous changes. * QGVLauncher/main.cpp: (MainView::flip): 2009-09-16 Kenneth Rohde Christiansen Unreviewed potential Qt < 4.6 build fix. * QGVLauncher/main.cpp: (MainView::flip): 2009-09-16 Kenneth Rohde Christiansen Reviewed by Simon Hausmann. Add a "Flip effect" to our GraphicsView based launcher. * QGVLauncher/main.cpp: (MainView::resizeEvent): (MainView::flip): (MainWindow::flip): (MainWindow::buildUI): 2009-09-16 Zoltan Herczeg Rubber-stamped by Simon Hausmann. [Qt] Typo fix. Pass the window object to the Format menu. In this way Qt can free its internal graphical objects during exit. * QtLauncher/main.cpp: (MainWindow::setupUI): 2009-09-16 Jocelyn Turcotte Reviewed by Tor Arne Vestbø. [Qt] Build break fix on gcc ARM. * Api/qwebgraphicsitem.cpp: (QWebGraphicsItemPrivate::_q_doLoadProgress): 2009-09-16 Warwick Allison Reviewed by Simon Hausmann. Fix a crash in QWebFrame::hasFocus() with a simple null pointer check when the focused frame is null. We do the same check in other places where we call kit(). * Api/qwebframe.cpp: (QWebFrame::hasFocus): 2009-09-16 Jure Repinc Reviewed by Simon Hausmann. Fixed a typo found during translation. * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::interruptForPolicyChangeError): 2009-09-14 Jakub Wieczorek Reviewed by Simon Hausmann. [Qt] QWebGraphicsItem should check for null QWebPage. https://bugs.webkit.org/show_bug.cgi?id=29185 Don't crash in QWebGraphicsItem when the page is still null, by either checking if it's the case or constructing the default one. * Api/qwebgraphicsitem.cpp: (QWebGraphicsItem::icon): (QWebGraphicsItem::setZoomFactor): (QWebGraphicsItem::zoomFactor): (QWebGraphicsItem::setGeometry): (QWebGraphicsItem::load): (QWebGraphicsItem::setHtml): (QWebGraphicsItem::toHtml): (QWebGraphicsItem::setContent): (QWebGraphicsItem::history): (QWebGraphicsItem::settings): 2009-09-11 David Boddie Reviewed by Simon Hausmann. Doc: Note that Netscape plugins are only available on desktop platforms. * docs/qtwebkit.qdoc: 2009-09-11 Martin Smith Reviewed by Simon Hausmann. Adjust the name of the contentspage for the documentation to the new name used in Qt 4.6. * docs/qtwebkit.qdoc: 2009-09-11 Ariya Hidayat Reviewed by Simon Hausmann. Changed URLs from qtsoftware.com to qt.nokia.com, as part of a general renaming. * Api/qwebpluginfactory.cpp: * docs/webkitsnippets/simple/main.cpp: (main): * docs/webkitsnippets/webpage/main.cpp: (main): 2009-09-11 Volker Hilsheimer Reviewed by Simon Hausmann. Restructure the documentation, both on a file and on a content level. * Api/qwebdatabase.cpp: * Api/qwebelement.cpp: * Api/qwebframe.cpp: * Api/qwebhistory.cpp: * Api/qwebhistoryinterface.cpp: * Api/qwebpage.cpp: * Api/qwebpluginfactory.cpp: * Api/qwebsecurityorigin.cpp: * Api/qwebsettings.cpp: * Api/qwebview.cpp: * docs/qtwebkit.qdoc: 2009-09-11 Yongjun Zhang Reviewed by Simon Hausmann. https://bugs.webkit.org/show_bug.cgi?id=29136 [Qt] emit microFocusChanged() signal when no QWidget-based view is present. emit microFocusChange() signal regardless of view. * WebCoreSupport/EditorClientQt.cpp: (WebCore::EditorClientQt::setInputMethodState): 2009-09-11 Jocelyn Turcotte Reviewed by Simon Hausmann. https://bugs.webkit.org/show_bug.cgi?id=28806 [Qt] Make the WebInspector available as a QWidget. * Api/headers.pri: * Api/qwebelement.cpp: (QWebElement::enclosingElement): * Api/qwebelement.h: * Api/qwebinspector.cpp: Added. * Api/qwebinspector.h: Added. * Api/qwebinspector_p.h: Added. * Api/qwebpage.cpp: (QWebPagePrivate::QWebPagePrivate): (QWebPagePrivate::setInspector): (QWebPagePrivate::getOrCreateInspector): (QWebPagePrivate::inspectorController): (QWebPage::~QWebPage): (QWebPage::triggerAction): * Api/qwebpage.h: * Api/qwebpage_p.h: * Api/qwebsettings.cpp: * QtLauncher/main.cpp: (MainWindow::MainWindow): * WebCoreSupport/InspectorClientQt.cpp: (WebCore::InspectorClientWebPage::InspectorClientWebPage): (WebCore::InspectorClientWebPage::createWindow): (WebCore::InspectorClientQt::createPage): (WebCore::InspectorClientQt::showWindow): (WebCore::InspectorClientQt::closeWindow): (WebCore::InspectorClientQt::attachWindow): (WebCore::InspectorClientQt::detachWindow): (WebCore::InspectorClientQt::updateWindowTitle): * WebCoreSupport/InspectorClientQt.h: * docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp: Added. 2009-09-10 Laszlo Gombos Reviewed by Eric Seidel. [Qt] Fix comparison between signed and unsigned integer warnings https://bugs.webkit.org/show_bug.cgi?id=29162 No functional change. * Api/qwebelement.cpp: (QWebElement::findAll): * Api/qwebhistory.cpp: (QWebHistory::items): (QWebHistory::backItems): (QWebHistory::forwardItems): (QWebHistory::saveState): * Api/qwebplugindatabase.cpp: (QWebPluginDatabase::setSearchPaths): * WebCoreSupport/ChromeClientQt.cpp: (WebCore::ChromeClientQt::runOpenPanel): * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::createPlugin): 2009-09-10 Simon Hausmann Rubber-stamped by Ariya Hidayat. Fix a bunch of qdoc warnings: Invalid references, non-standard wording, etc. * Api/qwebelement.cpp: * Api/qwebgraphicsitem.cpp: * Api/qwebsecurityorigin.cpp: 2009-09-10 Simon Hausmann Reviewed by Ariya Hidayat. Fix context menu event delivery with QWebGraphicsItem. Re-implement the correct context menu virtual function using a QGraphicsSceneContextMenuEvent and forward & handle it in QWebPage. * Api/qwebgraphicsitem.cpp: (QWebGraphicsItem::contextMenuEvent): * Api/qwebgraphicsitem.h: * Api/qwebpage.cpp: (QWebPagePrivate::contextMenuEvent): (QWebPage::event): * Api/qwebpage_p.h: 2009-09-10 Laszlo Gombos Unreviewed. Build fix for QtWebKit for Mac after r48219. qevent and qstyleoption are QtGui interfaces. * Api/qwebgraphicsitem.cpp: * Api/qwebgraphicsitem.h: 2009-09-09 Simon Hausmann Reviewed by Tor Arne Vestbø. Call the right base class function QGraphicsWidget::event() instead of skipping it and using QObject::event() instead. * Api/qwebgraphicsitem.cpp: (QWebGraphicsItem::event): 2009-09-09 Kenneth Rohde Christiansen Unreviewed. Fix comment at Tor Arne Vestbø's request. * Api/qwebgraphicsitem.cpp: (QWebGraphicsItem::sceneEvent): (QWebGraphicsItem::event): 2009-09-09 Kenneth Rohde Christiansen Reviewed by Tor Arne Vestbø. Implement some virtual event methods so that we can fix event-related bugs in Qt patch releases. * Api/qwebgraphicsitem.cpp: (QWebGraphicsItem::sceneEvent): (QWebGraphicsItem::event): * Api/qwebgraphicsitem.h: 2009-09-09 Kenneth Rohde Christiansen , Antonio Gomes Reviewed by Simon Hausmann. Add a new QGraphicsWidget based version of the "QWebView" under the name "QWebGraphicsItem". https://bugs.webkit.org/show_bug.cgi?id=28862 Includes an alternative Qt launcher using the QGraphicsView. * Api/headers.pri: * Api/qwebgraphicsitem.cpp: Added. * Api/qwebgraphicsitem.h: Added. * Api/qwebpage.h: * QGVLauncher/QGVLauncher.pro: Copied from WebKit/qt/QtLauncher/QtLauncher.pro. * QGVLauncher/main.cpp: Added. * WebCoreSupport/ChromeClientQt.cpp: (WebCore::ChromeClientQt::repaint): (WebCore::ChromeClientQt::scroll): 2009-09-08 Kenneth Rohde Christiansen Unreviewed build fix. Potential build fix for Qt 4.5 * Api/qwebpage.cpp: (QWebPagePrivate::mousePressEvent): 2009-09-08 Benjamin Poulain Reviewed by Simon Hausmann. https://bugs.webkit.org/show_bug.cgi?id=29007 Add a test for the signal QWebFrame::javaScriptWindowObjectCleared() * tests/qwebframe/tst_qwebframe.cpp: 2009-09-08 Laszlo Gombos Reviewed by Simon Hausmann. [Qt] Fix unused variable warnings https://bugs.webkit.org/show_bug.cgi?id=29018 * Api/qwebpage.cpp: (QWebPagePrivate::keyPressEvent): * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::startDownload): (WebCore::FrameLoaderClientQt::createFrame): 2009-09-08 Laszlo Gombos Reviewed by Ariya Hidayat. [Qt] Use the declaration order in initializer lists https://bugs.webkit.org/show_bug.cgi?id=29017 * Api/qwebframe_p.h: 2009-09-08 Kenneth Rohde Christiansen Reviewed by Simon Hausmann. Add support for handling QGraphicsScene events. * Api/qwebpage.cpp: (QWebPagePrivate::mouseMoveEvent): (QWebPagePrivate::mousePressEvent): (QWebPagePrivate::mouseDoubleClickEvent): (QWebPagePrivate::mouseTripleClickEvent): (QWebPagePrivate::handleClipboard): (QWebPagePrivate::mouseReleaseEvent): (QWebPagePrivate::wheelEvent): (QWebPagePrivate::dragEnterEvent): (QWebPagePrivate::dragLeaveEvent): (QWebPagePrivate::dragMoveEvent): (QWebPagePrivate::dropEvent): (QWebPage::event): * Api/qwebpage_p.h: 2009-09-08 Kenneth Rohde Christiansen Reviewed by Simon Hausmann. [Qt] Make cursor set cleaner in QtWebKit Api: eliminate SetCursorEvent hack. https://bugs.webkit.org/show_bug.cgi?id=28865 Clean up the unserCursor hack to use the QCursor set as a property of the QWidget by WebCore::WidgetQt. Remove all code that are no longer necessary for getting cursor change events. Patch by Kenneth Rohde Christiansen and Antonio Gomes on 2009-09-07 * Api/qwebpage.cpp: * Api/qwebpage_p.h: * Api/qwebview.cpp: (QWebViewPrivate::QWebViewPrivate): (QWebView::event): 2009-09-08 Laszlo Gombos Reviewed by Simon Hausmann. [Qt] QtWebKit single API to enable persistency https://bugs.webkit.org/show_bug.cgi?id=28682 Disable LocalStorage, ApplicationCache, HTML5 offline storage by default. If persistency is enabled the default directory for LocalStorage and ApplicationCache is now based on QDesktopServices::DataLocation and not QDesktopServices::CacheLocation (as it is expected to keep this data around after a reboot). If persistency is enabled initialize HTML5 offline storage as well - this fixed offline Storage for QtLauncher. * Api/qwebpage.cpp: (QWebPagePrivate::QWebPagePrivate): * Api/qwebsettings.cpp: (QWebSettings::QWebSettings): (QWebSettings::enablePersistentStorage): * Api/qwebsettings.h: Add a new API called enablePersistentStorage * QtLauncher/main.cpp: Use the new enablePersistentStorage API (main): 2009-09-07 Jakub Wieczorek Reviewed by Simon Hausmann. Speed up the QWebPluginInfo::supportsMimeType() function. https://bugs.webkit.org/show_bug.cgi?id=27651 Instead of going through the MIME types list constructed with mimeTypes() function, look up the internal mimeToDescriptions map. * Api/qwebplugindatabase.cpp: (QWebPluginInfo::supportsMimeType): 2009-09-07 Jakub Wieczorek Reviewed by Simon Hausmann. Speed up the QWebPluginInfo::mimeTypes() function. https://bugs.webkit.org/show_bug.cgi?id=27651 Instead of constructing a list of MIME types every time it is called, do this only once. * Api/qwebplugindatabase.cpp: (QWebPluginInfo::mimeTypes): (QWebPluginInfo::operator=): * Api/qwebplugindatabase.h: * tests/qwebplugindatabase/tst_qwebplugindatabase.cpp: (tst_QWebPluginDatabase::operatorassign_data): (tst_QWebPluginDatabase::operatorassign): 2009-09-07 Jakub Wieczorek Reviewed by Simon Hausmann. Remove the private classes from QWebPluginDatabase. https://bugs.webkit.org/show_bug.cgi?id=27651 Instead, hold the PluginDatabase and PluginPackage objects as class members and take care of refcounting on our own instead of using RefPtr. This way we not only made the code cleaner but also got rid of redundant allocations when constructing null QWebPluginInfo objects. The private classes have been forward-declared and the d-pointers left to be on the safe side. * Api/qwebplugindatabase.cpp: (QWebPluginInfo::QWebPluginInfo): (QWebPluginInfo::~QWebPluginInfo): (QWebPluginInfo::name): (QWebPluginInfo::description): (QWebPluginInfo::mimeTypes): (QWebPluginInfo::path): (QWebPluginInfo::isNull): (QWebPluginInfo::setEnabled): (QWebPluginInfo::isEnabled): (QWebPluginInfo::operator==): (QWebPluginInfo::operator!=): (QWebPluginInfo::operator=): (QWebPluginDatabase::QWebPluginDatabase): (QWebPluginDatabase::~QWebPluginDatabase): (QWebPluginDatabase::plugins): (QWebPluginDatabase::searchPaths): (QWebPluginDatabase::setSearchPaths): (QWebPluginDatabase::addSearchPath): (QWebPluginDatabase::refresh): (QWebPluginDatabase::pluginForMimeType): (QWebPluginDatabase::setPreferredPluginForMimeType): * Api/qwebplugindatabase.h: * Api/qwebplugindatabase_p.h: Removed. 2009-09-05 Jakub Wieczorek Reviewed by Eric Seidel. [Qt] r47424 broke binary compatibility https://bugs.webkit.org/show_bug.cgi?id=28996 Append the new DnsPrefetchEnabled attribute at the end of the enum. * Api/qwebsettings.h: 2009-09-04 Mark Mentovai Reviewed by Dave Hyatt. https://bugs.webkit.org/show_bug.cgi?id=28614 Account for scrollbar state changes that occur during layout. * Api/qwebframe.cpp: (QWebFrame::setScrollBarPolicy): Eliminate duplicated (and incorrect) scrollbar mode tracking between FrameView and ScrollView. 2009-09-04 Laszlo Gombos Reviewed by Eric Seidel. [Qt] Fix tst_QWebPage::database autotest failure https://bugs.webkit.org/show_bug.cgi?id=28961 Make sure that the test case enables the feature before the feature gets tested * tests/qwebpage/tst_qwebpage.cpp: (tst_QWebPage::database): 2009-09-04 Benjamin C Meyer Reviewed by Eric Seidel. Any QtWebKit application crashes on exit if the inspector is used during the session rather then exiting. If a QWebView has a QWebPage that is destroyed the QWebView does not update its pointer and will crash the next time it access the page pointers (such as in its destructor). InspectorClientView should not call deleteLater when the page is destroyed because it does not have a parent and is a top level widget. close() needs to be called so that QApplication can exit the application if quitOnLastWindowClosed is set and a InspectorClientView is the last window, otherwise the application will never exit. * Api/qwebview.cpp: (QWebViewPrivate::_q_pageDestroyed): (QWebView::setPage): * Api/qwebview.h: * WebCoreSupport/InspectorClientQt.cpp: (WebCore::InspectorClientView::InspectorClientView): 2009-09-03 Adam Barth Reviewed by eric@webkit.org. https://bugs.webkit.org/show_bug.cgi?id=24696 Stub implementations of mixed content methods of FrameLoaderClient. * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::didDisplayInsecureContent): (WebCore::FrameLoaderClientQt::didRunInsecureContent): * WebCoreSupport/FrameLoaderClientQt.h: 2009-09-03 Laszlo Gombos Reviewed by Eric Seidel. [Qt] Add a setting to turn SessionStorage on/off https://bugs.webkit.org/show_bug.cgi?id=28836 * Api/qwebsettings.cpp: (QWebSettingsPrivate::apply): (QWebSettings::QWebSettings): * Api/qwebsettings.h: * tests/qwebpage/tst_qwebpage.cpp: (testFlag): (tst_QWebPage::testOptionalJSObjects): 2009-09-02 Richard Moore Reviewed by Tor Arne Vestbø. [Qt] Make sure we relayout the page after evaluating JS https://bugs.webkit.org/show_bug.cgi?id=28235 QtWebKit does not always seem to reflow the page when evaluating javascript. This patch changes the way evaluateJavaScript works to use the frameloader which ensures that this is done properly. * Api/qwebframe.cpp: (QWebFrame::evaluateJavaScript): * tests/qwebframe/tst_qwebframe.cpp: 2009-08-28 Gustavo Noronha Silva Reviewed by Holger Freyther. https://bugs.webkit.org/show_bug.cgi?id=25889 [GTK] scrollbar policy for main frame is not implementable Add empty implementation for new ChromeClient method. * WebCoreSupport/ChromeClientQt.h: (WebCore::ChromeClientQt::scrollbarsModeDidChange): 2009-08-27 Jedrzej Nowacki Reviewed by Ariya Hidayat. QWebHistory::clear() modifications. Clear() method was changed. If QWebHistory is empty (there is no elements even current) clear() do nothing. If there at least one element clear() will delete everything apart of current. New autotests in QWebHistory New autotests were added to QWebHistory. They should check some crashes in save and restore state process and clear() method and general behavior on where QWebHistory::count() == 0 or QWebHistory::count() == 1 Bugzilla: https://bugs.webkit.org/show_bug.cgi?id=28711 * Api/qwebhistory.cpp: (QWebHistory::clear): * tests/qwebhistory/tst_qwebhistory.cpp: (tst_QWebHistory::back): (tst_QWebHistory::forward): (tst_QWebHistory::saveAndRestore_crash_1): (tst_QWebHistory::saveAndRestore_crash_2): (tst_QWebHistory::saveAndRestore_crash_3): (tst_QWebHistory::clear): 2009-08-27 Jedrzej Nowacki Reviewed by Ariya Hidayat. [Qt] Cleanup, old and commented part of source code was removed. Fix some formatting problems. https://bugs.webkit.org/show_bug.cgi?id=28712 * Api/qwebhistory_p.h: (QWebHistoryPrivate::QWebHistoryPrivate): 2009-08-26 Adam Barth Reviewed by Oliver Hunt. Don't let local files access web URLs https://bugs.webkit.org/show_bug.cgi?id=28480 * Api/qwebsettings.cpp: (QWebSettings::QWebSettings): 2009-08-25 Antonio Gomes Reviewed by Ariya Hidayat. Bug 28708 - Make possible to better use ResourceError in FrameLoaderClientQt class. * Api/qwebframe.cpp: (QWebFrame::requestedUrl): * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::FrameLoaderClientQt): (WebCore::FrameLoaderClientQt::dispatchDidFinishLoad): (WebCore::FrameLoaderClientQt::postProgressFinishedNotification): (WebCore::FrameLoaderClientQt::dispatchDidFailProvisionalLoad): (WebCore::FrameLoaderClientQt::dispatchDidFailLoad): * WebCoreSupport/FrameLoaderClientQt.h: 2009-08-22 Adam Barth Revert 47684. We're going to do this later once clients have had a chance to opt into the setting they like. * Api/qwebsettings.cpp: (QWebSettings::QWebSettings): 2009-08-22 Adam Barth Reviewed by Eric Seidel. Don't let local files access web URLs https://bugs.webkit.org/show_bug.cgi?id=28480 * Api/qwebsettings.cpp: (QWebSettings::QWebSettings): 2009-08-19 Aaron Boodman Speculative build break fix for qt. * Api/qwebsecurityorigin.cpp: (QWebSecurityOrigin::whiteListAccessFromOrigin): * Api/qwebsecurityorigin.h: 2009-08-19 Aaron Boodman Reviewed by David Levin. https://bugs.webkit.org/show_bug.cgi?id=24853: Provide a way for WebKit clients to specify a more granular policy for cross-origin XHR access. * Api/qwebsecurityorigin.cpp: Add API to manipulate origin access whitelists. (QWebSecurityOrigin::whiteListAccessFromOrigin): Ditto. (QWebSecurityOrigin::resetOriginAccessWhiteLists): Ditto. * Api/qwebsecurityorigin.h: Ditto. 2009-08-18 Markus Goetz Reviwed by Ariya Hidayat. [Qt] For prefecthDNS, the pre-fetching has to be enabled in the WebSettings. * Api/qwebsettings.cpp: (QWebSettings::QWebSettings): * Api/qwebsettings.h: 2009-08-17 Darin Adler Try to fix Qt build again. * WebCoreSupport/EditorClientQt.cpp: Move "using namespace". 2009-08-17 Darin Adler Try to fix Qt build. * WebCoreSupport/EditorClientQt.cpp: (WebCore::EditorClientQt::shouldShowDeleteInterface): Use getAttribute(classAttr) instead of className() function. 2009-08-14 Yongjun Zhang Reviewed by Simon Hausmann. RVCT elftran fails to resolve QPainter::staticMetaObject coming with QWebView::RenderHints property. This is a temporary fix and will be revereted when the right symbols exported from Qt lib in S60. https://bugs.webkit.org/show_bug.cgi?id=28181 * Api/qwebview.h: 2009-08-14 Laszlo Gombos Reviewed by Simon Hausmann. [Qt] Public API to configure the storage path for HTML5 localStorage https://bugs.webkit.org/show_bug.cgi?id=28036 Disables LocalStorage for QtWebKit by default by setting QWebSettings::LocalStorageEnabled to false. Sets up a default for the LocalStorage path so that clients would only need to enable the LocalStorageEnabled setting to turn on LocalStoragre support. Turn on LocalStorage support for QtLauncher and the relevant test since LocalStorage is now disabled by default for QtWebkit. * Api/qwebpage.cpp: (defaultCachePath): (initializeApplicationCachePathIfNecessary): (QWebPagePrivate::QWebPagePrivate): * Api/qwebsettings.cpp: (QWebSettingsPrivate::apply): (QWebSettings::QWebSettings): (QWebSettings::setLocalStoragePath): (QWebSettings::localStoragePath): * Api/qwebsettings.h: * QtLauncher/main.cpp: (main): * tests/qwebpage/tst_qwebpage.cpp: (tst_QWebPage::multiplePageGroupsAndLocalStorage): 2009-08-14 Yael Aharon Reviewed by Simon Hausmann. [Qt] Allow applications to register their own local URL scheme. https://bugs.webkit.org/show_bug.cgi?id=28240 * Api/qwebsecurityorigin.cpp: (QWebSecurityOrigin::addLocalScheme): (QWebSecurityOrigin::removeLocalScheme): (QWebSecurityOrigin::localSchemes): * Api/qwebsecurityorigin.h: * tests/qwebpage/tst_qwebpage.cpp: (tst_QWebPage::localURLSchemes): 2009-08-13 Mark Rowe Try and fix the Qt build. * Api/qwebelement.cpp: 2009-08-13 Kavindra Devi Palaraja Reviewed by Simon Hausmann. Doc - Some cleanup on the documentation of QWebElement * Api/qwebelement.cpp: 2009-08-13 Norbert Leser Reviewed by Simon Hausmann. Symbian target components (library and executable files) require Unique Identifiers (i.e., UID3). These identifiers are defined in the respective project files, conditionally for "symbian" platform. * QtLauncher/QtLauncher.pro: * tests/qwebelement/qwebelement.pro: * tests/qwebframe/qwebframe.pro: * tests/qwebhistory/qwebhistory.pro: * tests/qwebhistoryinterface/qwebhistoryinterface.pro: * tests/qwebpage/qwebpage.pro: * tests/qwebview/qwebview.pro: 2009-08-12 George Wright Reviewed by Adam Treat. Initialise zoom levels independent of whether a URL is valid or not to fix https://bugs.webkit.org/show_bug.cgi?id=28162 * QtLauncher/main.cpp: (MainWindow::MainWindow): 2009-08-12 Joerg Bornemann Reviewed by Simon Hausmann. QtWebKit compile fix for Windows CE There's no getenv on Windows CE, use qgetenv instead. * Api/qwebpage.cpp: (qt_drt_overwritePluginDirectories): 2009-08-10 Kavindra Palaraja Reviewed by Simon Hausmann. Various fixes and improvements to the QWebPluginInfo, QWebPluginDatabase and QWebSettings documentation. * Api/qwebplugindatabase.cpp: * Api/qwebsettings.cpp: 2009-08-08 Volker Hilsheimer Reviewed by Simon Hausmann. Doc: there is no group of explicitly shared classes, only one class uses this. Explain the implications in the QWebHistoryItem documentation, and get rid of the "group". * Api/qwebhistory.cpp: 2009-08-05 Csaba Osztrogonac Reviewed by Simon Hausmann. [Qt] Fix build error caused by http://trac.webkit.org/changeset/46763 * Api/qwebpluginfactory.h: Export macro added. 2009-08-04 Antonio Gomes Reviewed by Simon Hausmann. [Qt] QWebFrame::requestedUrl method can mis-behave in case of unhandled sslErrors. https://bugs.webkit.org/show_bug.cgi?id=27804 * Api/qwebframe.cpp: (QWebFrame::requestedUrl): * tests/qwebframe/tst_qwebframe.cpp: 2009-08-04 Simon Hausmann Reviewed by Tor Arne Vestbø. Rename QWebPlugin to QWebPluginInfo, as discussed on IRC. * Api/qwebplugindatabase.cpp: (QWebPluginInfoPrivate::QWebPluginInfoPrivate): (QWebPluginInfo::QWebPluginInfo): (QWebPluginInfo::~QWebPluginInfo): (QWebPluginInfo::name): (QWebPluginInfo::description): (QWebPluginInfo::mimeTypes): (QWebPluginInfo::supportsMimeType): (QWebPluginInfo::path): (QWebPluginInfo::isNull): (QWebPluginInfo::setEnabled): (QWebPluginInfo::isEnabled): (QWebPluginInfo::operator==): (QWebPluginInfo::operator!=): (QWebPluginInfo::operator=): (QWebPluginDatabase::plugins): (QWebPluginDatabase::pluginForMimeType): (QWebPluginDatabase::setPreferredPluginForMimeType): * Api/qwebplugindatabase.h: * Api/qwebplugindatabase_p.h: * tests/qwebplugindatabase/tst_qwebplugindatabase.cpp: (tst_QWebPluginDatabase::installedPlugins): (tst_QWebPluginDatabase::searchPaths): (tst_QWebPluginDatabase::null_data): (tst_QWebPluginDatabase::null): (tst_QWebPluginDatabase::pluginForMimeType): (tst_QWebPluginDatabase::enabled): (tst_QWebPluginDatabase::operatorequal_data): (tst_QWebPluginDatabase::operatorequal): (tst_QWebPluginDatabase::preferredPlugin): 2009-08-04 Simon Hausmann Reviewed by Adam Treat. Replace QWebPlugin::MimeType with a typedef to QWebPluginFactory::MimeType. * Api/qwebplugindatabase.cpp: * Api/qwebplugindatabase.h: * Api/qwebpluginfactory.cpp: (QWebPluginFactory::MimeType::operator==): * Api/qwebpluginfactory.h: 2009-08-04 Jakub Wieczorek Reviewed by Simon Hausmann. Add QWebPluginDatabase API to the Qt API. https://bugs.webkit.org/show_bug.cgi?id=27651 * Api/headers.pri: * Api/qwebplugindatabase.cpp: Added. (QWebPluginPrivate::QWebPluginPrivate): (QWebPluginDatabasePrivate::QWebPluginDatabasePrivate): (QWebPlugin::MimeType::operator==): (QWebPlugin::QWebPlugin): (QWebPlugin::~QWebPlugin): (QWebPlugin::name): (QWebPlugin::description): (QWebPlugin::mimeTypes): (QWebPlugin::supportsMimeType): (QWebPlugin::path): (QWebPlugin::isNull): (QWebPlugin::setEnabled): (QWebPlugin::isEnabled): (QWebPlugin::operator==): (QWebPlugin::operator!=): (QWebPlugin::operator=): (QWebPluginDatabase::QWebPluginDatabase): (QWebPluginDatabase::~QWebPluginDatabase): (QWebPluginDatabase::plugins): (QWebPluginDatabase::defaultSearchPaths): (QWebPluginDatabase::searchPaths): (QWebPluginDatabase::setSearchPaths): (QWebPluginDatabase::addSearchPath): (QWebPluginDatabase::refresh): (QWebPluginDatabase::pluginForMimeType): (QWebPluginDatabase::setPreferredPluginForMimeType): * Api/qwebplugindatabase.h: Added. * Api/qwebplugindatabase_p.h: Added. * Api/qwebsettings.cpp: (QWebSettings::pluginDatabase): * Api/qwebsettings.h: * tests/qwebplugindatabase/qwebplugindatabase.pro: Added. * tests/qwebplugindatabase/tst_qwebplugindatabase.cpp: Added. (tst_QWebPluginDatabase::installedPlugins): (tst_QWebPluginDatabase::searchPaths): (tst_QWebPluginDatabase::null_data): (tst_QWebPluginDatabase::null): (tst_QWebPluginDatabase::pluginForMimeType): (tst_QWebPluginDatabase::enabled): (tst_QWebPluginDatabase::operatorequal_data): (tst_QWebPluginDatabase::operatorequal): (tst_QWebPluginDatabase::preferredPlugin): * tests/tests.pro: 2009-08-03 Balazs Kelemen Reviewed by Simon Hausmann. Do memory cleanup when running robotized QtLauncher in debug as well. * QtLauncher/main.cpp: (launcherMain): (main): 2009-07-30 Laszlo Gombos Reviewed by Tor Arne Vestbø. [Qt] Initialize HTML5 Application Cache for QtWebKit to a sensible default https://bugs.webkit.org/show_bug.cgi?id=27866 * Api/qwebpage.cpp: (initializeApplicationCachePathIfNecessary): (QWebPagePrivate::QWebPagePrivate): 2009-07-31 Jakob Petsovits Reviewed by Adam Treat. Build QtWebKit without benchmark tests for Qt < 4.5. https://bugs.webkit.org/show_bug.cgi?id=27886 The QBENCHMARK macro is only available from 4.5 on, so builds for Qt < 4.5 shouldn't try to build those. * tests/tests.pro: 2009-07-31 Kenneth Rohde Christiansen Reviewed by Adam Treat. Fix warning by migrating use of QString.sprintf(...) to QString.arg().arg()... * WebCoreSupport/EditorClientQt.cpp: (dumpRange): 2009-07-31 Kenneth Rohde Christiansen Reviewed by Tor Arne Vestbø. Expose the Offline Web Application Cache in the Qt API. * Api/qwebsettings.cpp: (QWebSettings::QWebSettings): (QWebSettings::setOfflineWebApplicationCachePath): (QWebSettings::offlineWebApplicationCachePath): (QWebSettings::setOfflineWebApplicationCacheQuota): (QWebSettings::offlineWebApplicationCacheQuota): * Api/qwebsettings.h: 2009-07-30 Kenneth Rohde Christiansen Reviewed by Adam Treat. Add missing Q_OBJECT to class inheriting from QObject. * tests/qwebframe/tst_qwebframe.cpp: 2009-07-30 Kenneth Rohde Christiansen Reviewed by Adam Treat. Fix indentation. * tests/qwebframe/tst_qwebframe.cpp: 2009-07-30 Volker Hilsheimer Reviewed by Simon Hausmann. Fix documentation links to examples. * Api/qwebview.cpp: 2009-07-30 Balazs Kelemen Reviewed by Simon Hausmann. Allocate MainWindow on heap in robotized QtLauncher as well. * QtLauncher/main.cpp: (main): 2009-07-29 Kevin McCullough Reviewed by Darin Adler. Added foundation work to allow a testing infrastructure for the Web Inspector. * WebCoreSupport/InspectorClientQt.cpp: (WebCore::InspectorClientQt::inspectorWindowObjectCleared): * WebCoreSupport/InspectorClientQt.h: 2009-07-29 Zoltan Herczeg Reviewed by Simon Hausmann. [Qt] In debug mode, this fix frees cached resources and other unreferenced objects (by calling the garbage collector) to remove the LEAK messages. https://bugs.webkit.org/show_bug.cgi?id=27767 * Api/qwebframe.cpp: (qt_drt_cache_clear): * QtLauncher/main.cpp: (main): 2009-07-28 Kenneth Rohde Christiansen Fix the Qt build by adapting to the changes of ScriptObject. * Api/qwebelement.cpp: (setupScriptObject): 2009-07-28 Robert Hogan Reviewed by Simon Hausmann. Add WebKit version API to Qt. Get the current version of WebKit from WebKit/mac/Configurations/Version.xcconfig at compile time and make it available to Qt applications through qWebKitVersion(). Also amend the User Agent string to place the Safari clause outside the final bracket and to the end of the UA string. https://bugs.webkit.org/show_bug.cgi?id=27158 Minor build tweak by Simon Hausmann (adding export macros to new functions). * Api/headers.pri: * Api/qwebkitversion.cpp: Added. (webKitVersion): (webKitMajorVersion): (webKitMinorVersion): * Api/qwebkitversion.h: Added. * Api/qwebpage.cpp: (QWebPage::userAgentForUrl): * tests/qwebview/tst_qwebview.cpp: (tst_QWebView::getWebKitVersion): http://qt.nokia.com/developer/task-tracker/index_html?id=238391&method=entry http://qt.nokia.com/developer/task-tracker/index_html?id=219344&method=entry http://qt.nokia.com/developer/task-tracker/index_html?id=241144&method=entry --- src/3rdparty/webkit/ChangeLog | 294 + src/3rdparty/webkit/JavaScriptCore/API/APICast.h | 35 +- src/3rdparty/webkit/JavaScriptCore/API/JSBase.h | 2 +- .../JavaScriptCore/API/JSCallbackConstructor.h | 2 +- .../JavaScriptCore/API/JSCallbackFunction.cpp | 1 + .../webkit/JavaScriptCore/API/JSCallbackFunction.h | 2 +- .../webkit/JavaScriptCore/API/JSCallbackObject.h | 6 +- .../JavaScriptCore/API/JSCallbackObjectFunctions.h | 35 +- .../webkit/JavaScriptCore/API/JSClassRef.h | 2 +- .../webkit/JavaScriptCore/API/JSObjectRef.cpp | 1 + .../webkit/JavaScriptCore/API/JSObjectRef.h | 3 +- src/3rdparty/webkit/JavaScriptCore/ChangeLog | 6964 +++++- .../webkit/JavaScriptCore/JavaScriptCore.gypi | 7 +- .../webkit/JavaScriptCore/JavaScriptCore.pri | 17 +- .../webkit/JavaScriptCore/JavaScriptCore.pro | 4 - .../JavaScriptCore/assembler/ARMAssembler.cpp | 78 +- .../webkit/JavaScriptCore/assembler/ARMAssembler.h | 203 +- .../JavaScriptCore/assembler/ARMv7Assembler.h | 115 +- .../assembler/AbstractMacroAssembler.h | 22 +- .../assembler/AssemblerBufferWithConstantPool.h | 25 +- .../JavaScriptCore/assembler/MacroAssemblerARM.cpp | 67 + .../JavaScriptCore/assembler/MacroAssemblerARM.h | 327 +- .../JavaScriptCore/assembler/MacroAssemblerARMv7.h | 17 +- .../JavaScriptCore/assembler/MacroAssemblerX86.h | 13 + .../assembler/MacroAssemblerX86Common.h | 221 +- .../assembler/MacroAssemblerX86_64.h | 72 +- .../webkit/JavaScriptCore/assembler/X86Assembler.h | 163 +- .../webkit/JavaScriptCore/bytecode/CodeBlock.cpp | 184 +- .../webkit/JavaScriptCore/bytecode/CodeBlock.h | 152 +- .../webkit/JavaScriptCore/bytecode/EvalCodeCache.h | 36 +- .../webkit/JavaScriptCore/bytecode/Instruction.h | 3 +- .../webkit/JavaScriptCore/bytecode/Opcode.h | 5 +- .../JavaScriptCore/bytecode/SamplingTool.cpp | 2 +- .../webkit/JavaScriptCore/bytecode/SamplingTool.h | 2 +- .../JavaScriptCore/bytecode/StructureStubInfo.cpp | 28 +- .../JavaScriptCore/bytecode/StructureStubInfo.h | 49 +- .../bytecompiler/BytecodeGenerator.cpp | 95 +- .../bytecompiler/BytecodeGenerator.h | 30 +- .../webkit/JavaScriptCore/debugger/Debugger.cpp | 65 +- .../webkit/JavaScriptCore/debugger/Debugger.h | 75 +- .../JavaScriptCore/debugger/DebuggerActivation.cpp | 19 +- .../JavaScriptCore/debugger/DebuggerActivation.h | 10 +- .../JavaScriptCore/debugger/DebuggerCallFrame.cpp | 16 +- .../JavaScriptCore/debugger/DebuggerCallFrame.h | 3 - .../webkit/JavaScriptCore/generated/Grammar.cpp | 2124 +- .../webkit/JavaScriptCore/generated/Grammar.h | 111 +- .../webkit/JavaScriptCore/interpreter/CachedCall.h | 3 +- .../webkit/JavaScriptCore/interpreter/CallFrame.h | 16 +- .../JavaScriptCore/interpreter/CallFrameClosure.h | 4 +- .../JavaScriptCore/interpreter/Interpreter.cpp | 510 +- .../JavaScriptCore/interpreter/Interpreter.h | 22 +- .../webkit/JavaScriptCore/interpreter/Register.h | 78 +- .../JavaScriptCore/interpreter/RegisterFile.cpp | 5 +- .../JavaScriptCore/interpreter/RegisterFile.h | 20 +- .../JavaScriptCore/jit/ExecutableAllocator.h | 9 + .../jit/ExecutableAllocatorPosix.cpp | 5 +- .../JavaScriptCore/jit/ExecutableAllocatorWin.cpp | 5 +- src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp | 499 +- src/3rdparty/webkit/JavaScriptCore/jit/JIT.h | 823 +- .../webkit/JavaScriptCore/jit/JITArithmetic.cpp | 1309 +- src/3rdparty/webkit/JavaScriptCore/jit/JITCall.cpp | 491 +- src/3rdparty/webkit/JavaScriptCore/jit/JITCode.h | 6 +- .../webkit/JavaScriptCore/jit/JITInlineMethods.h | 736 +- .../webkit/JavaScriptCore/jit/JITOpcodes.cpp | 1935 +- .../JavaScriptCore/jit/JITPropertyAccess.cpp | 994 +- .../webkit/JavaScriptCore/jit/JITStubCall.h | 136 +- .../webkit/JavaScriptCore/jit/JITStubs.cpp | 887 +- src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.h | 209 +- src/3rdparty/webkit/JavaScriptCore/jsc.cpp | 14 +- .../webkit/JavaScriptCore/os-win32/stdbool.h | 4 +- .../webkit/JavaScriptCore/os-win32/stdint.h | 7 +- .../webkit/JavaScriptCore/parser/Grammar.y | 491 +- .../webkit/JavaScriptCore/parser/Lexer.cpp | 128 +- src/3rdparty/webkit/JavaScriptCore/parser/Lexer.h | 20 +- .../JavaScriptCore/parser/NodeConstructors.h | 54 +- .../webkit/JavaScriptCore/parser/Nodes.cpp | 490 +- src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h | 377 +- .../webkit/JavaScriptCore/parser/Parser.cpp | 29 +- src/3rdparty/webkit/JavaScriptCore/parser/Parser.h | 61 +- .../webkit/JavaScriptCore/parser/ParserArena.cpp | 72 +- .../webkit/JavaScriptCore/parser/ParserArena.h | 82 +- .../webkit/JavaScriptCore/parser/SourceCode.h | 8 - .../webkit/JavaScriptCore/parser/SourcePoolQt.cpp | 109 - .../webkit/JavaScriptCore/parser/SourcePoolQt.h | 93 - src/3rdparty/webkit/JavaScriptCore/pcre/dftables | 2 +- .../JavaScriptCore/profiler/ProfileGenerator.cpp | 1 + .../JavaScriptCore/profiler/ProfileGenerator.h | 2 +- .../webkit/JavaScriptCore/profiler/Profiler.cpp | 24 +- .../webkit/JavaScriptCore/profiler/Profiler.h | 2 +- .../webkit/JavaScriptCore/runtime/ArgList.cpp | 10 +- .../webkit/JavaScriptCore/runtime/ArgList.h | 10 +- .../webkit/JavaScriptCore/runtime/Arguments.cpp | 69 +- .../webkit/JavaScriptCore/runtime/Arguments.h | 60 +- .../JavaScriptCore/runtime/ArrayConstructor.cpp | 14 +- .../JavaScriptCore/runtime/ArrayConstructor.h | 2 +- .../JavaScriptCore/runtime/ArrayPrototype.cpp | 21 +- .../webkit/JavaScriptCore/runtime/ArrayPrototype.h | 1 + .../webkit/JavaScriptCore/runtime/BooleanObject.h | 5 + .../JavaScriptCore/runtime/BooleanPrototype.cpp | 4 +- .../webkit/JavaScriptCore/runtime/CallData.cpp | 23 - .../webkit/JavaScriptCore/runtime/CallData.h | 32 +- .../webkit/JavaScriptCore/runtime/ClassInfo.h | 2 +- .../webkit/JavaScriptCore/runtime/Collector.cpp | 337 +- .../webkit/JavaScriptCore/runtime/Collector.h | 32 +- .../JavaScriptCore/runtime/CommonIdentifiers.h | 10 + .../webkit/JavaScriptCore/runtime/Completion.cpp | 32 +- .../JavaScriptCore/runtime/ConstructData.cpp | 29 +- .../webkit/JavaScriptCore/runtime/ConstructData.h | 39 +- .../JavaScriptCore/runtime/DateConstructor.cpp | 28 +- .../JavaScriptCore/runtime/DatePrototype.cpp | 82 +- .../webkit/JavaScriptCore/runtime/DatePrototype.h | 3 +- .../webkit/JavaScriptCore/runtime/Error.cpp | 10 +- src/3rdparty/webkit/JavaScriptCore/runtime/Error.h | 9 +- .../JavaScriptCore/runtime/ExceptionHelpers.cpp | 10 +- .../JavaScriptCore/runtime/ExceptionHelpers.h | 5 +- .../webkit/JavaScriptCore/runtime/Executable.cpp | 280 + .../webkit/JavaScriptCore/runtime/Executable.h | 314 + .../JavaScriptCore/runtime/FunctionConstructor.cpp | 34 +- .../JavaScriptCore/runtime/FunctionConstructor.h | 4 - .../JavaScriptCore/runtime/FunctionPrototype.cpp | 17 +- .../JavaScriptCore/runtime/FunctionPrototype.h | 2 +- .../webkit/JavaScriptCore/runtime/GetterSetter.cpp | 52 +- .../webkit/JavaScriptCore/runtime/GetterSetter.h | 22 +- .../JavaScriptCore/runtime/GlobalEvalFunction.cpp | 9 +- .../JavaScriptCore/runtime/GlobalEvalFunction.h | 9 +- .../webkit/JavaScriptCore/runtime/Identifier.h | 2 + .../JavaScriptCore/runtime/InitializeThreading.cpp | 1 - .../JavaScriptCore/runtime/InternalFunction.h | 2 +- .../JavaScriptCore/runtime/JSAPIValueWrapper.cpp | 31 + .../JavaScriptCore/runtime/JSAPIValueWrapper.h | 64 + .../webkit/JavaScriptCore/runtime/JSActivation.cpp | 42 +- .../webkit/JavaScriptCore/runtime/JSActivation.h | 23 +- .../webkit/JavaScriptCore/runtime/JSArray.cpp | 120 +- .../webkit/JavaScriptCore/runtime/JSArray.h | 110 +- .../webkit/JavaScriptCore/runtime/JSByteArray.cpp | 19 +- .../webkit/JavaScriptCore/runtime/JSByteArray.h | 5 +- .../webkit/JavaScriptCore/runtime/JSCell.cpp | 56 +- .../webkit/JavaScriptCore/runtime/JSCell.h | 218 +- .../webkit/JavaScriptCore/runtime/JSFunction.cpp | 91 +- .../webkit/JavaScriptCore/runtime/JSFunction.h | 57 +- .../webkit/JavaScriptCore/runtime/JSGlobalData.cpp | 28 +- .../webkit/JavaScriptCore/runtime/JSGlobalData.h | 34 +- .../JavaScriptCore/runtime/JSGlobalObject.cpp | 102 +- .../webkit/JavaScriptCore/runtime/JSGlobalObject.h | 35 +- .../runtime/JSGlobalObjectFunctions.cpp | 28 +- .../webkit/JavaScriptCore/runtime/JSImmediate.cpp | 77 - .../webkit/JavaScriptCore/runtime/JSImmediate.h | 149 +- .../JavaScriptCore/runtime/JSNotAnObject.cpp | 17 +- .../webkit/JavaScriptCore/runtime/JSNotAnObject.h | 7 +- .../webkit/JavaScriptCore/runtime/JSNumberCell.cpp | 46 +- .../webkit/JavaScriptCore/runtime/JSNumberCell.h | 163 +- .../webkit/JavaScriptCore/runtime/JSONObject.cpp | 204 +- .../webkit/JavaScriptCore/runtime/JSONObject.h | 5 +- .../webkit/JavaScriptCore/runtime/JSObject.cpp | 98 +- .../webkit/JavaScriptCore/runtime/JSObject.h | 127 +- .../runtime/JSPropertyNameIterator.cpp | 46 +- .../runtime/JSPropertyNameIterator.h | 33 +- .../JavaScriptCore/runtime/JSStaticScopeObject.cpp | 10 +- .../JavaScriptCore/runtime/JSStaticScopeObject.h | 4 +- .../webkit/JavaScriptCore/runtime/JSString.cpp | 36 +- .../webkit/JavaScriptCore/runtime/JSString.h | 33 +- .../webkit/JavaScriptCore/runtime/JSType.h | 6 +- .../webkit/JavaScriptCore/runtime/JSTypeInfo.h | 8 +- .../webkit/JavaScriptCore/runtime/JSValue.cpp | 98 +- .../webkit/JavaScriptCore/runtime/JSValue.h | 545 +- .../JavaScriptCore/runtime/JSVariableObject.cpp | 21 +- .../JavaScriptCore/runtime/JSVariableObject.h | 10 +- .../JavaScriptCore/runtime/JSWrapperObject.cpp | 10 +- .../JavaScriptCore/runtime/JSWrapperObject.h | 20 +- .../JavaScriptCore/runtime/LiteralParser.cpp | 6 +- .../webkit/JavaScriptCore/runtime/LiteralParser.h | 2 +- .../webkit/JavaScriptCore/runtime/Lookup.h | 60 +- .../webkit/JavaScriptCore/runtime/MarkStack.cpp | 40 + .../webkit/JavaScriptCore/runtime/MarkStack.h | 187 + .../JavaScriptCore/runtime/MarkStackPosix.cpp | 50 + .../webkit/JavaScriptCore/runtime/MarkStackWin.cpp | 53 + .../webkit/JavaScriptCore/runtime/MathObject.cpp | 12 +- .../webkit/JavaScriptCore/runtime/MathObject.h | 3 +- .../runtime/NativeErrorPrototype.cpp | 4 - .../JavaScriptCore/runtime/NativeErrorPrototype.h | 11 +- .../JavaScriptCore/runtime/NumberConstructor.cpp | 5 + .../JavaScriptCore/runtime/NumberConstructor.h | 3 +- .../webkit/JavaScriptCore/runtime/NumberObject.h | 12 +- .../webkit/JavaScriptCore/runtime/NumericStrings.h | 74 + .../JavaScriptCore/runtime/ObjectConstructor.cpp | 69 +- .../JavaScriptCore/runtime/ObjectConstructor.h | 2 +- .../JavaScriptCore/runtime/ObjectPrototype.cpp | 19 + .../JavaScriptCore/runtime/ObjectPrototype.h | 6 + .../webkit/JavaScriptCore/runtime/Operations.h | 43 +- .../JavaScriptCore/runtime/PropertyDescriptor.cpp | 103 + .../JavaScriptCore/runtime/PropertyDescriptor.h | 61 + .../JavaScriptCore/runtime/PropertyMapHashTable.h | 1 + .../JavaScriptCore/runtime/PropertyNameArray.h | 1 - .../webkit/JavaScriptCore/runtime/PropertySlot.cpp | 3 +- .../webkit/JavaScriptCore/runtime/PropertySlot.h | 23 +- .../webkit/JavaScriptCore/runtime/Protect.h | 2 +- .../webkit/JavaScriptCore/runtime/RegExp.cpp | 23 - .../JavaScriptCore/runtime/RegExpConstructor.cpp | 10 +- .../JavaScriptCore/runtime/RegExpConstructor.h | 3 +- .../JavaScriptCore/runtime/RegExpMatchesArray.h | 19 +- .../webkit/JavaScriptCore/runtime/RegExpObject.cpp | 5 + .../webkit/JavaScriptCore/runtime/RegExpObject.h | 5 +- .../JavaScriptCore/runtime/RegExpPrototype.cpp | 17 +- .../webkit/JavaScriptCore/runtime/ScopeChain.cpp | 2 +- .../webkit/JavaScriptCore/runtime/ScopeChain.h | 5 +- .../webkit/JavaScriptCore/runtime/ScopeChainMark.h | 11 +- .../webkit/JavaScriptCore/runtime/SmallStrings.cpp | 10 +- .../webkit/JavaScriptCore/runtime/SmallStrings.h | 6 +- .../webkit/JavaScriptCore/runtime/StringObject.cpp | 41 +- .../webkit/JavaScriptCore/runtime/StringObject.h | 11 +- .../StringObjectThatMasqueradesAsUndefined.h | 2 +- .../JavaScriptCore/runtime/StringPrototype.cpp | 37 +- .../JavaScriptCore/runtime/StringPrototype.h | 1 + .../webkit/JavaScriptCore/runtime/Structure.cpp | 159 +- .../webkit/JavaScriptCore/runtime/Structure.h | 108 +- .../JavaScriptCore/runtime/StructureChain.cpp | 10 +- .../webkit/JavaScriptCore/runtime/StructureChain.h | 2 +- .../runtime/StructureTransitionTable.h | 159 +- .../webkit/JavaScriptCore/runtime/SymbolTable.h | 4 + .../JavaScriptCore/runtime/TimeoutChecker.cpp | 11 +- .../webkit/JavaScriptCore/runtime/TimeoutChecker.h | 5 +- .../webkit/JavaScriptCore/runtime/Tracing.d | 40 - .../webkit/JavaScriptCore/runtime/UString.cpp | 85 +- .../webkit/JavaScriptCore/runtime/UString.h | 38 +- .../webkit/JavaScriptCore/wrec/WRECGenerator.cpp | 12 +- .../webkit/JavaScriptCore/wrec/WRECGenerator.h | 28 +- src/3rdparty/webkit/JavaScriptCore/wscript | 103 + .../webkit/JavaScriptCore/wtf/Assertions.cpp | 5 +- .../webkit/JavaScriptCore/wtf/Assertions.h | 20 +- src/3rdparty/webkit/JavaScriptCore/wtf/ByteArray.h | 13 + .../webkit/JavaScriptCore/wtf/CurrentTime.cpp | 65 +- .../webkit/JavaScriptCore/wtf/DateMath.cpp | 5 + .../webkit/JavaScriptCore/wtf/DisallowCType.h | 32 +- .../webkit/JavaScriptCore/wtf/FastAllocBase.h | 12 +- .../webkit/JavaScriptCore/wtf/FastMalloc.cpp | 248 +- .../webkit/JavaScriptCore/wtf/FastMalloc.h | 80 +- src/3rdparty/webkit/JavaScriptCore/wtf/HashMap.h | 5 +- src/3rdparty/webkit/JavaScriptCore/wtf/HashSet.h | 28 +- .../webkit/JavaScriptCore/wtf/MainThread.cpp | 2 +- .../webkit/JavaScriptCore/wtf/MainThread.h | 4 +- .../webkit/JavaScriptCore/wtf/MessageQueue.h | 2 +- .../webkit/JavaScriptCore/wtf/Noncopyable.h | 2 +- .../webkit/JavaScriptCore/wtf/PassRefPtr.h | 59 +- src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h | 169 +- .../webkit/JavaScriptCore/wtf/PossiblyNull.h | 59 + .../webkit/JavaScriptCore/wtf/PtrAndFlags.h | 23 +- src/3rdparty/webkit/JavaScriptCore/wtf/RefPtr.h | 32 +- .../webkit/JavaScriptCore/wtf/RefPtrHashMap.h | 106 +- .../webkit/JavaScriptCore/wtf/SegmentedVector.h | 3 + .../webkit/JavaScriptCore/wtf/StdLibExtras.h | 5 + .../webkit/JavaScriptCore/wtf/StringExtras.h | 16 + .../webkit/JavaScriptCore/wtf/TCSystemAlloc.cpp | 64 +- .../webkit/JavaScriptCore/wtf/TCSystemAlloc.h | 2 +- .../webkit/JavaScriptCore/wtf/ThreadSpecific.h | 20 +- src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h | 17 +- .../JavaScriptCore/wtf/ThreadingPthreads.cpp | 3 + .../webkit/JavaScriptCore/wtf/TypeTraits.h | 40 +- src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h | 32 +- .../webkit/JavaScriptCore/wtf/VectorTraits.h | 8 +- .../webkit/JavaScriptCore/wtf/qt/MainThreadQt.cpp | 2 - .../webkit/JavaScriptCore/wtf/qt/ThreadingQt.cpp | 2 - .../webkit/JavaScriptCore/wtf/unicode/Unicode.h | 3 + .../JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h | 4 +- .../wtf/unicode/wince/UnicodeWince.cpp | 175 + .../wtf/unicode/wince/UnicodeWince.h | 216 + .../JavaScriptCore/yarr/RegexInterpreter.cpp | 226 +- .../webkit/JavaScriptCore/yarr/RegexInterpreter.h | 4 +- .../webkit/JavaScriptCore/yarr/RegexJIT.cpp | 96 +- src/3rdparty/webkit/VERSION | 4 +- src/3rdparty/webkit/WebCore/ChangeLog | 21882 +++++++++++++++++++ src/3rdparty/webkit/WebCore/DerivedSources.cpp | 13 +- .../WebCore/ForwardingHeaders/parser/Parser.h | 4 - .../runtime/CollectorHeapIterator.h | 4 - .../ForwardingHeaders/runtime/JSAPIValueWrapper.h | 4 + .../WebCore/ForwardingHeaders/wtf/PossiblyNull.h | 4 + src/3rdparty/webkit/WebCore/WebCore.gypi | 318 +- src/3rdparty/webkit/WebCore/WebCore.order | 8 +- src/3rdparty/webkit/WebCore/WebCore.pro | 602 +- src/3rdparty/webkit/WebCore/WebCorePrefix.h | 14 +- .../webkit/WebCore/accessibility/AXObjectCache.cpp | 148 +- .../webkit/WebCore/accessibility/AXObjectCache.h | 55 +- .../WebCore/accessibility/AccessibilityList.cpp | 7 + .../WebCore/accessibility/AccessibilityListBox.cpp | 4 +- .../accessibility/AccessibilityListBoxOption.cpp | 2 +- .../accessibility/AccessibilityMediaControls.cpp | 320 + .../accessibility/AccessibilityMediaControls.h | 117 + .../WebCore/accessibility/AccessibilityObject.cpp | 112 +- .../WebCore/accessibility/AccessibilityObject.h | 72 +- .../accessibility/AccessibilityRenderObject.cpp | 251 +- .../accessibility/AccessibilityRenderObject.h | 17 +- .../WebCore/accessibility/AccessibilitySlider.cpp | 162 + .../WebCore/accessibility/AccessibilitySlider.h | 92 + .../WebCore/accessibility/AccessibilityTable.cpp | 6 +- .../accessibility/AccessibilityTableCell.cpp | 8 +- .../accessibility/AccessibilityTableColumn.cpp | 2 +- .../accessibility/AccessibilityTableRow.cpp | 2 +- .../WebCore/bindings/js/JSAbstractWorkerCustom.cpp | 25 +- .../webkit/WebCore/bindings/js/JSAttrCustom.cpp | 3 +- .../WebCore/bindings/js/JSAudioConstructor.cpp | 1 + .../WebCore/bindings/js/JSCSSRuleListCustom.cpp | 47 + .../bindings/js/JSCSSStyleDeclarationCustom.cpp | 19 +- .../bindings/js/JSCanvasArrayBufferConstructor.cpp | 70 + .../bindings/js/JSCanvasArrayBufferConstructor.h | 96 + .../WebCore/bindings/js/JSCanvasArrayCustom.cpp | 56 + .../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 + .../bindings/js/JSCanvasNumberArrayCustom.cpp | 46 + .../js/JSCanvasRenderingContext2DCustom.cpp | 32 +- .../js/JSCanvasRenderingContext3DCustom.cpp | 443 + .../bindings/js/JSCanvasRenderingContextCustom.cpp | 53 + .../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 + .../WebCore/bindings/js/JSClipboardCustom.cpp | 2 +- .../bindings/js/JSCustomPositionCallback.cpp | 25 +- .../WebCore/bindings/js/JSCustomPositionCallback.h | 20 +- .../bindings/js/JSCustomPositionErrorCallback.cpp | 19 +- .../bindings/js/JSCustomPositionErrorCallback.h | 19 +- .../bindings/js/JSCustomSQLStatementCallback.cpp | 18 +- .../bindings/js/JSCustomSQLStatementCallback.h | 17 +- .../js/JSCustomSQLStatementErrorCallback.cpp | 19 +- .../js/JSCustomSQLStatementErrorCallback.h | 17 +- .../bindings/js/JSCustomSQLTransactionCallback.cpp | 38 +- .../bindings/js/JSCustomSQLTransactionCallback.h | 9 +- .../js/JSCustomSQLTransactionErrorCallback.cpp | 17 +- .../js/JSCustomSQLTransactionErrorCallback.h | 17 +- .../WebCore/bindings/js/JSCustomVoidCallback.cpp | 35 +- .../WebCore/bindings/js/JSCustomVoidCallback.h | 33 +- .../bindings/js/JSCustomXPathNSResolver.cpp | 4 +- .../bindings/js/JSDOMApplicationCacheCustom.cpp | 38 +- .../webkit/WebCore/bindings/js/JSDOMBinding.cpp | 92 +- .../webkit/WebCore/bindings/js/JSDOMBinding.h | 28 +- .../WebCore/bindings/js/JSDOMGlobalObject.cpp | 54 +- .../webkit/WebCore/bindings/js/JSDOMGlobalObject.h | 21 +- .../webkit/WebCore/bindings/js/JSDOMWindowBase.cpp | 7 +- .../WebCore/bindings/js/JSDOMWindowCustom.cpp | 296 +- .../WebCore/bindings/js/JSDOMWindowShell.cpp | 28 +- .../webkit/WebCore/bindings/js/JSDOMWindowShell.h | 8 +- .../WebCore/bindings/js/JSDatabaseCustom.cpp | 46 +- .../bindings/js/JSDedicatedWorkerContextCustom.cpp | 15 +- .../bindings/js/JSDesktopNotificationsCustom.cpp | 95 + .../WebCore/bindings/js/JSDocumentCustom.cpp | 22 +- .../webkit/WebCore/bindings/js/JSElementCustom.cpp | 20 +- .../webkit/WebCore/bindings/js/JSEventCustom.cpp | 4 + .../webkit/WebCore/bindings/js/JSEventListener.cpp | 50 +- .../webkit/WebCore/bindings/js/JSEventListener.h | 13 +- .../bindings/js/JSEventSourceConstructor.cpp | 91 + .../WebCore/bindings/js/JSEventSourceConstructor.h | 55 + .../WebCore/bindings/js/JSEventSourceCustom.cpp | 93 + .../webkit/WebCore/bindings/js/JSEventTarget.cpp | 63 +- .../WebCore/bindings/js/JSGeolocationCustom.cpp | 150 +- .../bindings/js/JSHTMLAppletElementCustom.cpp | 5 + .../bindings/js/JSHTMLCanvasElementCustom.cpp | 50 + .../bindings/js/JSHTMLEmbedElementCustom.cpp | 5 + .../bindings/js/JSHTMLFrameElementCustom.cpp | 10 +- .../bindings/js/JSHTMLIFrameElementCustom.cpp | 8 +- .../bindings/js/JSHTMLInputElementCustom.cpp | 1 + .../bindings/js/JSHTMLObjectElementCustom.cpp | 5 + .../webkit/WebCore/bindings/js/JSHistoryCustom.cpp | 55 +- .../WebCore/bindings/js/JSImageConstructor.cpp | 1 + .../bindings/js/JSInspectedObjectWrapper.cpp | 4 + .../bindings/js/JSInspectorBackendCustom.cpp | 109 +- .../bindings/js/JSInspectorCallbackWrapper.cpp | 6 +- .../WebCore/bindings/js/JSLazyEventListener.cpp | 3 +- .../WebCore/bindings/js/JSLocationCustom.cpp | 60 +- .../bindings/js/JSMessageChannelConstructor.cpp | 1 + .../WebCore/bindings/js/JSMessageChannelCustom.cpp | 14 +- .../WebCore/bindings/js/JSMessageEventCustom.cpp | 79 + .../WebCore/bindings/js/JSMessagePortCustom.cpp | 72 +- .../WebCore/bindings/js/JSMessagePortCustom.h | 65 + .../WebCore/bindings/js/JSNamedNodesCollection.cpp | 33 + .../WebCore/bindings/js/JSNamedNodesCollection.h | 1 + .../WebCore/bindings/js/JSNavigatorCustom.cpp | 6 +- .../webkit/WebCore/bindings/js/JSNodeCustom.cpp | 63 +- .../WebCore/bindings/js/JSNodeFilterCondition.cpp | 7 +- .../WebCore/bindings/js/JSNodeFilterCondition.h | 4 +- .../WebCore/bindings/js/JSNodeFilterCustom.cpp | 10 +- .../WebCore/bindings/js/JSNodeIteratorCustom.cpp | 10 +- .../WebCore/bindings/js/JSOptionConstructor.cpp | 1 + .../bindings/js/JSPluginElementFunctions.cpp | 16 + .../WebCore/bindings/js/JSPluginElementFunctions.h | 1 + .../bindings/js/JSQuarantinedObjectWrapper.cpp | 48 +- .../bindings/js/JSQuarantinedObjectWrapper.h | 12 +- .../WebCore/bindings/js/JSSQLTransactionCustom.cpp | 11 +- .../bindings/js/JSSVGElementInstanceCustom.cpp | 21 +- .../bindings/js/JSSharedWorkerConstructor.cpp | 15 +- .../bindings/js/JSSharedWorkerContextCustom.cpp | 50 + .../WebCore/bindings/js/JSSharedWorkerCustom.cpp | 8 +- .../webkit/WebCore/bindings/js/JSStorageCustom.cpp | 9 +- .../WebCore/bindings/js/JSStyleSheetCustom.cpp | 21 +- .../WebCore/bindings/js/JSStyleSheetListCustom.cpp | 14 +- .../WebCore/bindings/js/JSTreeWalkerCustom.cpp | 10 +- .../WebCore/bindings/js/JSWebSocketConstructor.cpp | 93 + .../WebCore/bindings/js/JSWebSocketConstructor.h | 50 + .../WebCore/bindings/js/JSWebSocketCustom.cpp | 74 + .../WebCore/bindings/js/JSWorkerConstructor.cpp | 8 +- .../WebCore/bindings/js/JSWorkerContextBase.cpp | 21 +- .../WebCore/bindings/js/JSWorkerContextBase.h | 5 + .../WebCore/bindings/js/JSWorkerContextCustom.cpp | 47 +- .../webkit/WebCore/bindings/js/JSWorkerCustom.cpp | 14 +- .../bindings/js/JSXMLHttpRequestConstructor.cpp | 1 + .../WebCore/bindings/js/JSXMLHttpRequestCustom.cpp | 42 +- .../bindings/js/JSXMLHttpRequestUploadCustom.cpp | 36 +- .../WebCore/bindings/js/JSXSLTProcessorCustom.cpp | 6 +- .../webkit/WebCore/bindings/js/ScheduledAction.cpp | 4 +- .../webkit/WebCore/bindings/js/ScriptArray.cpp | 45 +- .../webkit/WebCore/bindings/js/ScriptArray.h | 16 +- .../webkit/WebCore/bindings/js/ScriptCallFrame.cpp | 2 +- .../WebCore/bindings/js/ScriptController.cpp | 13 +- .../webkit/WebCore/bindings/js/ScriptController.h | 1 + .../WebCore/bindings/js/ScriptControllerHaiku.cpp | 2 +- .../WebCore/bindings/js/ScriptFunctionCall.cpp | 2 +- .../webkit/WebCore/bindings/js/ScriptObject.cpp | 51 +- .../webkit/WebCore/bindings/js/ScriptObject.h | 21 +- .../WebCore/bindings/js/ScriptObjectQuarantine.cpp | 18 +- .../WebCore/bindings/js/ScriptObjectQuarantine.h | 3 +- .../webkit/WebCore/bindings/js/ScriptValue.cpp | 7 + .../webkit/WebCore/bindings/js/ScriptValue.h | 1 + .../WebCore/bindings/js/WorkerScriptController.cpp | 32 +- .../WebCore/bindings/scripts/CodeGenerator.pm | 268 +- .../WebCore/bindings/scripts/CodeGeneratorJS.pm | 216 +- .../WebCore/bindings/scripts/CodeGeneratorObjC.pm | 31 +- .../WebCore/bindings/scripts/CodeGeneratorV8.pm | 205 +- .../webkit/WebCore/bindings/scripts/IDLParser.pm | 6 +- .../WebCore/bindings/scripts/generate-bindings.pl | 6 +- src/3rdparty/webkit/WebCore/bridge/NP_jsobject.cpp | 16 +- .../webkit/WebCore/bridge/c/c_instance.cpp | 2 +- src/3rdparty/webkit/WebCore/bridge/c/c_instance.h | 2 +- .../webkit/WebCore/bridge/jni/jni_jsobject.mm | 15 +- src/3rdparty/webkit/WebCore/bridge/npapi.h | 10 +- .../webkit/WebCore/bridge/qt/qt_instance.cpp | 18 +- .../webkit/WebCore/bridge/qt/qt_instance.h | 4 +- .../webkit/WebCore/bridge/qt/qt_runtime.cpp | 17 +- src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.h | 2 +- src/3rdparty/webkit/WebCore/bridge/runtime.h | 3 +- .../webkit/WebCore/bridge/runtime_array.cpp | 27 +- src/3rdparty/webkit/WebCore/bridge/runtime_array.h | 5 +- .../webkit/WebCore/bridge/runtime_method.cpp | 16 +- .../webkit/WebCore/bridge/runtime_method.h | 1 + .../webkit/WebCore/bridge/runtime_object.cpp | 61 +- .../webkit/WebCore/bridge/runtime_object.h | 8 +- src/3rdparty/webkit/WebCore/config.h | 48 +- src/3rdparty/webkit/WebCore/css/CSSCanvasValue.cpp | 8 +- .../WebCore/css/CSSComputedStyleDeclaration.cpp | 124 +- .../WebCore/css/CSSComputedStyleDeclaration.h | 1 - .../webkit/WebCore/css/CSSCursorImageValue.cpp | 4 +- src/3rdparty/webkit/WebCore/css/CSSGrammar.y | 4 +- .../webkit/WebCore/css/CSSImageGeneratorValue.cpp | 26 +- .../webkit/WebCore/css/CSSImageGeneratorValue.h | 5 +- src/3rdparty/webkit/WebCore/css/CSSImageValue.cpp | 2 +- src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp | 21 +- .../WebCore/css/CSSMutableStyleDeclaration.cpp | 95 +- src/3rdparty/webkit/WebCore/css/CSSParser.cpp | 267 +- src/3rdparty/webkit/WebCore/css/CSSParser.h | 5 +- .../webkit/WebCore/css/CSSPrimitiveValue.cpp | 4 +- .../webkit/WebCore/css/CSSPrimitiveValue.h | 2 +- .../webkit/WebCore/css/CSSPrimitiveValueMappings.h | 75 +- .../webkit/WebCore/css/CSSPropertyLonghand.cpp | 21 +- .../webkit/WebCore/css/CSSPropertyNames.in | 21 +- src/3rdparty/webkit/WebCore/css/CSSRuleList.idl | 3 +- src/3rdparty/webkit/WebCore/css/CSSSelector.cpp | 19 +- src/3rdparty/webkit/WebCore/css/CSSSelector.h | 5 + .../webkit/WebCore/css/CSSSelectorList.cpp | 8 +- .../webkit/WebCore/css/CSSStyleDeclaration.idl | 3 +- .../webkit/WebCore/css/CSSStyleSelector.cpp | 313 +- src/3rdparty/webkit/WebCore/css/CSSStyleSelector.h | 25 +- .../webkit/WebCore/css/CSSValueKeywords.in | 20 + src/3rdparty/webkit/WebCore/css/CSSValueList.cpp | 8 + src/3rdparty/webkit/WebCore/css/CSSValueList.h | 1 + src/3rdparty/webkit/WebCore/css/Media.cpp | 74 + src/3rdparty/webkit/WebCore/css/Media.h | 54 + src/3rdparty/webkit/WebCore/css/Media.idl | 33 + src/3rdparty/webkit/WebCore/css/StyleBase.cpp | 2 +- src/3rdparty/webkit/WebCore/css/StyleSheetList.idl | 3 +- .../webkit/WebCore/css/WCSSPropertyNames.in | 4 + .../webkit/WebCore/css/WCSSValueKeywords.in | 1 + src/3rdparty/webkit/WebCore/css/html.css | 10 +- src/3rdparty/webkit/WebCore/css/mediaControls.css | 8 + .../webkit/WebCore/css/mediaControlsChromium.css | 72 +- src/3rdparty/webkit/WebCore/css/wml.css | 7 + src/3rdparty/webkit/WebCore/dom/Attr.cpp | 27 +- src/3rdparty/webkit/WebCore/dom/Attr.h | 41 +- src/3rdparty/webkit/WebCore/dom/Attribute.cpp | 6 +- src/3rdparty/webkit/WebCore/dom/CDATASection.cpp | 17 +- src/3rdparty/webkit/WebCore/dom/CDATASection.h | 12 +- src/3rdparty/webkit/WebCore/dom/CharacterData.cpp | 19 +- src/3rdparty/webkit/WebCore/dom/CharacterData.h | 35 +- src/3rdparty/webkit/WebCore/dom/Clipboard.h | 2 + src/3rdparty/webkit/WebCore/dom/Comment.cpp | 23 +- src/3rdparty/webkit/WebCore/dom/Comment.h | 14 +- src/3rdparty/webkit/WebCore/dom/ContainerNode.cpp | 21 +- src/3rdparty/webkit/WebCore/dom/ContainerNode.h | 9 +- .../webkit/WebCore/dom/DOMImplementation.cpp | 25 +- src/3rdparty/webkit/WebCore/dom/DocPtr.h | 114 - src/3rdparty/webkit/WebCore/dom/Document.cpp | 279 +- src/3rdparty/webkit/WebCore/dom/Document.h | 275 +- src/3rdparty/webkit/WebCore/dom/Document.idl | 13 +- .../webkit/WebCore/dom/DocumentFragment.cpp | 18 +- src/3rdparty/webkit/WebCore/dom/DocumentFragment.h | 7 +- src/3rdparty/webkit/WebCore/dom/DocumentType.cpp | 14 +- src/3rdparty/webkit/WebCore/dom/DocumentType.h | 4 +- src/3rdparty/webkit/WebCore/dom/EditingText.cpp | 25 +- src/3rdparty/webkit/WebCore/dom/EditingText.h | 13 +- src/3rdparty/webkit/WebCore/dom/Element.cpp | 48 +- src/3rdparty/webkit/WebCore/dom/Element.h | 65 +- src/3rdparty/webkit/WebCore/dom/Element.idl | 3 +- .../webkit/WebCore/dom/EntityReference.cpp | 11 +- src/3rdparty/webkit/WebCore/dom/EntityReference.h | 4 +- src/3rdparty/webkit/WebCore/dom/Event.cpp | 5 + src/3rdparty/webkit/WebCore/dom/Event.h | 1 + src/3rdparty/webkit/WebCore/dom/EventListener.h | 21 +- src/3rdparty/webkit/WebCore/dom/EventNames.h | 7 + src/3rdparty/webkit/WebCore/dom/EventTarget.cpp | 23 + src/3rdparty/webkit/WebCore/dom/EventTarget.h | 14 +- src/3rdparty/webkit/WebCore/dom/ExceptionCode.h | 2 +- src/3rdparty/webkit/WebCore/dom/InputElement.cpp | 76 +- src/3rdparty/webkit/WebCore/dom/InputElement.h | 22 +- src/3rdparty/webkit/WebCore/dom/MessageEvent.cpp | 29 +- src/3rdparty/webkit/WebCore/dom/MessageEvent.h | 24 +- src/3rdparty/webkit/WebCore/dom/MessageEvent.idl | 9 +- src/3rdparty/webkit/WebCore/dom/MessagePort.cpp | 87 +- src/3rdparty/webkit/WebCore/dom/MessagePort.h | 16 + src/3rdparty/webkit/WebCore/dom/MessagePort.idl | 2 +- .../webkit/WebCore/dom/MessagePortChannel.cpp | 8 +- .../webkit/WebCore/dom/MessagePortChannel.h | 12 +- src/3rdparty/webkit/WebCore/dom/Node.cpp | 185 +- src/3rdparty/webkit/WebCore/dom/Node.h | 106 +- src/3rdparty/webkit/WebCore/dom/NodeFilter.h | 4 +- .../webkit/WebCore/dom/NodeFilterCondition.h | 8 +- src/3rdparty/webkit/WebCore/dom/Notation.cpp | 16 +- src/3rdparty/webkit/WebCore/dom/Notation.h | 17 +- src/3rdparty/webkit/WebCore/dom/OptionElement.cpp | 43 +- src/3rdparty/webkit/WebCore/dom/OptionElement.h | 5 +- .../webkit/WebCore/dom/PageTransitionEvent.cpp | 61 + .../webkit/WebCore/dom/PageTransitionEvent.h | 64 + .../webkit/WebCore/dom/PageTransitionEvent.idl | 37 + src/3rdparty/webkit/WebCore/dom/Position.cpp | 26 +- src/3rdparty/webkit/WebCore/dom/Position.h | 54 +- .../webkit/WebCore/dom/PositionCreationFunctions.h | 0 .../webkit/WebCore/dom/PositionIterator.cpp | 2 +- .../webkit/WebCore/dom/ProcessingInstruction.cpp | 25 +- .../webkit/WebCore/dom/ProcessingInstruction.h | 39 +- src/3rdparty/webkit/WebCore/dom/Range.cpp | 25 +- src/3rdparty/webkit/WebCore/dom/Range.h | 5 + src/3rdparty/webkit/WebCore/dom/Range.idl | 3 + .../webkit/WebCore/dom/RegisteredEventListener.h | 6 +- .../webkit/WebCore/dom/ScriptExecutionContext.h | 4 +- src/3rdparty/webkit/WebCore/dom/SelectElement.cpp | 54 +- src/3rdparty/webkit/WebCore/dom/StyledElement.cpp | 37 +- src/3rdparty/webkit/WebCore/dom/StyledElement.h | 55 +- src/3rdparty/webkit/WebCore/dom/Text.cpp | 80 +- src/3rdparty/webkit/WebCore/dom/Text.h | 27 +- src/3rdparty/webkit/WebCore/dom/XMLTokenizer.cpp | 2 +- .../webkit/WebCore/dom/XMLTokenizerLibxml2.cpp | 4 +- src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp | 4 +- src/3rdparty/webkit/WebCore/dom/make_names.pl | 377 +- .../webkit/WebCore/editing/AppendNodeCommand.cpp | 2 +- .../webkit/WebCore/editing/ApplyStyleCommand.cpp | 387 +- .../webkit/WebCore/editing/ApplyStyleCommand.h | 10 + .../WebCore/editing/BreakBlockquoteCommand.cpp | 2 +- .../WebCore/editing/CompositeEditCommand.cpp | 66 +- .../webkit/WebCore/editing/CreateLinkCommand.cpp | 6 +- .../WebCore/editing/DeleteButtonController.cpp | 8 +- .../WebCore/editing/DeleteSelectionCommand.cpp | 42 +- .../webkit/WebCore/editing/EditCommand.cpp | 12 - src/3rdparty/webkit/WebCore/editing/EditCommand.h | 1 - src/3rdparty/webkit/WebCore/editing/Editor.cpp | 79 +- .../webkit/WebCore/editing/EditorCommand.cpp | 31 +- .../webkit/WebCore/editing/EditorInsertAction.h | 2 +- .../WebCore/editing/IndentOutdentCommand.cpp | 14 +- .../webkit/WebCore/editing/IndentOutdentCommand.h | 2 - .../WebCore/editing/InsertLineBreakCommand.cpp | 6 +- .../webkit/WebCore/editing/InsertListCommand.cpp | 2 +- .../WebCore/editing/InsertNodeBeforeCommand.cpp | 2 +- .../editing/InsertParagraphSeparatorCommand.cpp | 8 +- .../webkit/WebCore/editing/InsertTextCommand.cpp | 2 +- .../webkit/WebCore/editing/RemoveFormatCommand.cpp | 5 +- .../WebCore/editing/ReplaceSelectionCommand.cpp | 32 +- .../webkit/WebCore/editing/SelectionController.cpp | 3 +- .../WebCore/editing/SplitTextNodeCommand.cpp | 2 +- .../webkit/WebCore/editing/TextIterator.cpp | 7 +- .../webkit/WebCore/editing/UnlinkCommand.cpp | 5 +- .../webkit/WebCore/editing/VisibleSelection.cpp | 4 +- .../webkit/WebCore/editing/htmlediting.cpp | 102 +- src/3rdparty/webkit/WebCore/editing/htmlediting.h | 219 +- src/3rdparty/webkit/WebCore/editing/markup.cpp | 25 +- .../webkit/WebCore/editing/visible_units.cpp | 4 +- .../webkit/WebCore/generated/CSSGrammar.cpp | 886 +- src/3rdparty/webkit/WebCore/generated/CSSGrammar.h | 110 +- .../webkit/WebCore/generated/CSSPropertyNames.cpp | 965 +- .../webkit/WebCore/generated/CSSPropertyNames.h | 531 +- .../webkit/WebCore/generated/CSSValueKeywords.c | 1360 +- .../webkit/WebCore/generated/CSSValueKeywords.h | 710 +- src/3rdparty/webkit/WebCore/generated/ColorData.c | 4 +- .../webkit/WebCore/generated/DocTypeStrings.cpp | 4 +- src/3rdparty/webkit/WebCore/generated/Grammar.cpp | 2124 +- src/3rdparty/webkit/WebCore/generated/Grammar.h | 111 +- .../WebCore/generated/HTMLElementFactory.cpp | 324 +- .../webkit/WebCore/generated/HTMLElementFactory.h | 8 +- .../webkit/WebCore/generated/HTMLEntityNames.c | 3 +- .../webkit/WebCore/generated/HTMLNames.cpp | 60 +- src/3rdparty/webkit/WebCore/generated/HTMLNames.h | 20 +- .../webkit/WebCore/generated/JSAbstractWorker.cpp | 24 +- .../webkit/WebCore/generated/JSAbstractWorker.h | 4 +- src/3rdparty/webkit/WebCore/generated/JSAttr.cpp | 13 +- src/3rdparty/webkit/WebCore/generated/JSAttr.h | 1 + .../webkit/WebCore/generated/JSBarInfo.cpp | 7 +- src/3rdparty/webkit/WebCore/generated/JSBarInfo.h | 1 + .../webkit/WebCore/generated/JSCDATASection.cpp | 11 + .../webkit/WebCore/generated/JSCDATASection.h | 1 + .../webkit/WebCore/generated/JSCSSCharsetRule.cpp | 11 + .../webkit/WebCore/generated/JSCSSCharsetRule.h | 1 + .../webkit/WebCore/generated/JSCSSFontFaceRule.cpp | 11 + .../webkit/WebCore/generated/JSCSSFontFaceRule.h | 1 + .../webkit/WebCore/generated/JSCSSImportRule.cpp | 11 + .../webkit/WebCore/generated/JSCSSImportRule.h | 1 + .../webkit/WebCore/generated/JSCSSMediaRule.cpp | 20 +- .../webkit/WebCore/generated/JSCSSMediaRule.h | 4 +- .../webkit/WebCore/generated/JSCSSPageRule.cpp | 11 + .../webkit/WebCore/generated/JSCSSPageRule.h | 1 + .../WebCore/generated/JSCSSPrimitiveValue.cpp | 30 +- .../webkit/WebCore/generated/JSCSSPrimitiveValue.h | 4 +- .../webkit/WebCore/generated/JSCSSRule.cpp | 18 +- src/3rdparty/webkit/WebCore/generated/JSCSSRule.h | 4 +- .../webkit/WebCore/generated/JSCSSRuleList.cpp | 39 +- .../webkit/WebCore/generated/JSCSSRuleList.h | 6 +- .../WebCore/generated/JSCSSStyleDeclaration.cpp | 59 +- .../WebCore/generated/JSCSSStyleDeclaration.h | 6 +- .../webkit/WebCore/generated/JSCSSStyleRule.cpp | 11 + .../webkit/WebCore/generated/JSCSSStyleRule.h | 1 + .../webkit/WebCore/generated/JSCSSStyleSheet.cpp | 24 +- .../webkit/WebCore/generated/JSCSSStyleSheet.h | 4 +- .../webkit/WebCore/generated/JSCSSValue.cpp | 18 +- src/3rdparty/webkit/WebCore/generated/JSCSSValue.h | 4 +- .../webkit/WebCore/generated/JSCSSValueList.cpp | 37 +- .../webkit/WebCore/generated/JSCSSValueList.h | 6 +- .../generated/JSCSSVariablesDeclaration.cpp | 45 +- .../WebCore/generated/JSCSSVariablesDeclaration.h | 6 +- .../WebCore/generated/JSCSSVariablesRule.cpp | 11 + .../webkit/WebCore/generated/JSCSSVariablesRule.h | 1 + .../webkit/WebCore/generated/JSCanvasArray.cpp | 159 + .../webkit/WebCore/generated/JSCanvasArray.h | 87 + .../WebCore/generated/JSCanvasArrayBuffer.cpp | 120 + .../webkit/WebCore/generated/JSCanvasArrayBuffer.h | 77 + .../webkit/WebCore/generated/JSCanvasByteArray.cpp | 137 + .../webkit/WebCore/generated/JSCanvasByteArray.h | 77 + .../WebCore/generated/JSCanvasFloatArray.cpp | 137 + .../webkit/WebCore/generated/JSCanvasFloatArray.h | 77 + .../webkit/WebCore/generated/JSCanvasGradient.cpp | 9 +- .../webkit/WebCore/generated/JSCanvasGradient.h | 3 +- .../webkit/WebCore/generated/JSCanvasIntArray.cpp | 137 + .../webkit/WebCore/generated/JSCanvasIntArray.h | 77 + .../webkit/WebCore/generated/JSCanvasPattern.cpp | 2 +- .../WebCore/generated/JSCanvasRenderingContext.cpp | 167 + .../WebCore/generated/JSCanvasRenderingContext.h | 75 + .../generated/JSCanvasRenderingContext2D.cpp | 135 +- .../WebCore/generated/JSCanvasRenderingContext2D.h | 21 +- .../generated/JSCanvasRenderingContext3D.cpp | 4465 ++++ .../WebCore/generated/JSCanvasRenderingContext3D.h | 548 + .../WebCore/generated/JSCanvasShortArray.cpp | 137 + .../webkit/WebCore/generated/JSCanvasShortArray.h | 77 + .../generated/JSCanvasUnsignedByteArray.cpp | 137 + .../WebCore/generated/JSCanvasUnsignedByteArray.h | 77 + .../WebCore/generated/JSCanvasUnsignedIntArray.cpp | 137 + .../WebCore/generated/JSCanvasUnsignedIntArray.h | 77 + .../generated/JSCanvasUnsignedShortArray.cpp | 137 + .../WebCore/generated/JSCanvasUnsignedShortArray.h | 77 + .../webkit/WebCore/generated/JSCharacterData.cpp | 26 +- .../webkit/WebCore/generated/JSCharacterData.h | 4 +- .../webkit/WebCore/generated/JSClientRect.cpp | 13 +- .../webkit/WebCore/generated/JSClientRect.h | 1 + .../webkit/WebCore/generated/JSClientRectList.cpp | 39 +- .../webkit/WebCore/generated/JSClientRectList.h | 6 +- .../webkit/WebCore/generated/JSClipboard.cpp | 26 +- .../webkit/WebCore/generated/JSClipboard.h | 4 +- .../webkit/WebCore/generated/JSComment.cpp | 11 + src/3rdparty/webkit/WebCore/generated/JSComment.h | 1 + .../webkit/WebCore/generated/JSConsole.cpp | 44 +- src/3rdparty/webkit/WebCore/generated/JSConsole.h | 4 +- .../webkit/WebCore/generated/JSCoordinates.cpp | 33 +- .../webkit/WebCore/generated/JSCoordinates.h | 9 +- .../webkit/WebCore/generated/JSCounter.cpp | 13 +- src/3rdparty/webkit/WebCore/generated/JSCounter.h | 1 + .../WebCore/generated/JSDOMApplicationCache.cpp | 22 +- .../WebCore/generated/JSDOMApplicationCache.h | 4 +- .../WebCore/generated/JSDOMCoreException.cpp | 20 +- .../webkit/WebCore/generated/JSDOMCoreException.h | 4 +- .../WebCore/generated/JSDOMImplementation.cpp | 28 +- .../webkit/WebCore/generated/JSDOMImplementation.h | 4 +- .../webkit/WebCore/generated/JSDOMParser.cpp | 20 +- .../webkit/WebCore/generated/JSDOMParser.h | 4 +- .../webkit/WebCore/generated/JSDOMSelection.cpp | 42 +- .../webkit/WebCore/generated/JSDOMSelection.h | 4 +- .../webkit/WebCore/generated/JSDOMWindow.cpp | 376 +- .../webkit/WebCore/generated/JSDOMWindow.h | 52 +- .../webkit/WebCore/generated/JSDataGridColumn.cpp | 18 +- .../webkit/WebCore/generated/JSDataGridColumn.h | 4 +- .../WebCore/generated/JSDataGridColumnList.cpp | 53 +- .../WebCore/generated/JSDataGridColumnList.h | 6 +- .../webkit/WebCore/generated/JSDatabase.cpp | 32 +- src/3rdparty/webkit/WebCore/generated/JSDatabase.h | 6 +- .../WebCore/generated/JSDedicatedWorkerContext.cpp | 30 +- .../WebCore/generated/JSDedicatedWorkerContext.h | 7 +- .../webkit/WebCore/generated/JSDocument.cpp | 130 +- src/3rdparty/webkit/WebCore/generated/JSDocument.h | 12 +- .../WebCore/generated/JSDocumentFragment.cpp | 20 +- .../webkit/WebCore/generated/JSDocumentFragment.h | 4 +- .../webkit/WebCore/generated/JSDocumentType.cpp | 13 +- .../webkit/WebCore/generated/JSDocumentType.h | 1 + .../webkit/WebCore/generated/JSElement.cpp | 92 +- src/3rdparty/webkit/WebCore/generated/JSElement.h | 11 + src/3rdparty/webkit/WebCore/generated/JSEntity.cpp | 11 + src/3rdparty/webkit/WebCore/generated/JSEntity.h | 1 + .../webkit/WebCore/generated/JSEntityReference.cpp | 11 + .../webkit/WebCore/generated/JSEntityReference.h | 1 + .../webkit/WebCore/generated/JSErrorEvent.cpp | 18 +- .../webkit/WebCore/generated/JSErrorEvent.h | 4 +- src/3rdparty/webkit/WebCore/generated/JSEvent.cpp | 24 +- src/3rdparty/webkit/WebCore/generated/JSEvent.h | 4 +- .../webkit/WebCore/generated/JSEventException.cpp | 20 +- .../webkit/WebCore/generated/JSEventException.h | 4 +- .../webkit/WebCore/generated/JSEventSource.cpp | 300 + .../webkit/WebCore/generated/JSEventSource.h | 108 + src/3rdparty/webkit/WebCore/generated/JSFile.cpp | 13 +- src/3rdparty/webkit/WebCore/generated/JSFile.h | 1 + .../webkit/WebCore/generated/JSFileList.cpp | 39 +- src/3rdparty/webkit/WebCore/generated/JSFileList.h | 6 +- .../webkit/WebCore/generated/JSGeolocation.cpp | 18 +- .../webkit/WebCore/generated/JSGeolocation.h | 4 +- .../webkit/WebCore/generated/JSGeoposition.cpp | 33 +- .../webkit/WebCore/generated/JSGeoposition.h | 9 +- .../WebCore/generated/JSHTMLAnchorElement.cpp | 18 +- .../webkit/WebCore/generated/JSHTMLAnchorElement.h | 4 +- .../WebCore/generated/JSHTMLAppletElement.cpp | 19 + .../webkit/WebCore/generated/JSHTMLAppletElement.h | 2 + .../webkit/WebCore/generated/JSHTMLAreaElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLAreaElement.h | 1 + .../WebCore/generated/JSHTMLAudioElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLAudioElement.h | 1 + .../webkit/WebCore/generated/JSHTMLBRElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLBRElement.h | 1 + .../webkit/WebCore/generated/JSHTMLBaseElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLBaseElement.h | 1 + .../WebCore/generated/JSHTMLBaseFontElement.cpp | 11 + .../WebCore/generated/JSHTMLBaseFontElement.h | 1 + .../WebCore/generated/JSHTMLBlockquoteElement.cpp | 11 + .../WebCore/generated/JSHTMLBlockquoteElement.h | 1 + .../webkit/WebCore/generated/JSHTMLBodyElement.cpp | 38 +- .../webkit/WebCore/generated/JSHTMLBodyElement.h | 3 + .../WebCore/generated/JSHTMLButtonElement.cpp | 71 +- .../webkit/WebCore/generated/JSHTMLButtonElement.h | 8 +- .../WebCore/generated/JSHTMLCanvasElement.cpp | 20 +- .../webkit/WebCore/generated/JSHTMLCanvasElement.h | 4 + .../webkit/WebCore/generated/JSHTMLCollection.cpp | 53 +- .../webkit/WebCore/generated/JSHTMLCollection.h | 6 +- .../WebCore/generated/JSHTMLDListElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLDListElement.h | 1 + .../generated/JSHTMLDataGridCellElement.cpp | 11 + .../WebCore/generated/JSHTMLDataGridCellElement.h | 1 + .../WebCore/generated/JSHTMLDataGridColElement.cpp | 11 + .../WebCore/generated/JSHTMLDataGridColElement.h | 1 + .../WebCore/generated/JSHTMLDataGridElement.cpp | 11 + .../WebCore/generated/JSHTMLDataGridElement.h | 1 + .../WebCore/generated/JSHTMLDataGridRowElement.cpp | 11 + .../WebCore/generated/JSHTMLDataGridRowElement.h | 1 + .../WebCore/generated/JSHTMLDataListElement.cpp | 162 + .../WebCore/generated/JSHTMLDataListElement.h | 69 + .../WebCore/generated/JSHTMLDirectoryElement.cpp | 11 + .../WebCore/generated/JSHTMLDirectoryElement.h | 1 + .../webkit/WebCore/generated/JSHTMLDivElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLDivElement.h | 1 + .../webkit/WebCore/generated/JSHTMLDocument.cpp | 38 +- .../webkit/WebCore/generated/JSHTMLDocument.h | 4 +- .../webkit/WebCore/generated/JSHTMLElement.cpp | 24 +- .../webkit/WebCore/generated/JSHTMLElement.h | 4 +- .../generated/JSHTMLElementWrapperFactory.cpp | 22 +- .../generated/JSHTMLElementWrapperFactory.h | 8 +- .../WebCore/generated/JSHTMLEmbedElement.cpp | 51 +- .../webkit/WebCore/generated/JSHTMLEmbedElement.h | 5 +- .../WebCore/generated/JSHTMLFieldSetElement.cpp | 56 +- .../WebCore/generated/JSHTMLFieldSetElement.h | 11 + .../webkit/WebCore/generated/JSHTMLFontElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLFontElement.h | 1 + .../webkit/WebCore/generated/JSHTMLFormElement.cpp | 84 +- .../webkit/WebCore/generated/JSHTMLFormElement.h | 9 +- .../WebCore/generated/JSHTMLFrameElement.cpp | 45 +- .../webkit/WebCore/generated/JSHTMLFrameElement.h | 4 +- .../WebCore/generated/JSHTMLFrameSetElement.cpp | 42 +- .../WebCore/generated/JSHTMLFrameSetElement.h | 3 + .../webkit/WebCore/generated/JSHTMLHRElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLHRElement.h | 1 + .../webkit/WebCore/generated/JSHTMLHeadElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLHeadElement.h | 1 + .../WebCore/generated/JSHTMLHeadingElement.cpp | 11 + .../WebCore/generated/JSHTMLHeadingElement.h | 1 + .../webkit/WebCore/generated/JSHTMLHtmlElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLHtmlElement.h | 1 + .../WebCore/generated/JSHTMLIFrameElement.cpp | 57 +- .../webkit/WebCore/generated/JSHTMLIFrameElement.h | 4 +- .../WebCore/generated/JSHTMLImageElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLImageElement.h | 1 + .../WebCore/generated/JSHTMLInputElement.cpp | 73 +- .../webkit/WebCore/generated/JSHTMLInputElement.h | 8 +- .../WebCore/generated/JSHTMLIsIndexElement.cpp | 11 + .../WebCore/generated/JSHTMLIsIndexElement.h | 1 + .../webkit/WebCore/generated/JSHTMLLIElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLLIElement.h | 1 + .../WebCore/generated/JSHTMLLabelElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLLabelElement.h | 1 + .../WebCore/generated/JSHTMLLegendElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLLegendElement.h | 1 + .../webkit/WebCore/generated/JSHTMLLinkElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLLinkElement.h | 1 + .../webkit/WebCore/generated/JSHTMLMapElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLMapElement.h | 1 + .../WebCore/generated/JSHTMLMarqueeElement.cpp | 20 +- .../WebCore/generated/JSHTMLMarqueeElement.h | 4 +- .../WebCore/generated/JSHTMLMediaElement.cpp | 24 +- .../webkit/WebCore/generated/JSHTMLMediaElement.h | 4 +- .../webkit/WebCore/generated/JSHTMLMenuElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLMenuElement.h | 1 + .../webkit/WebCore/generated/JSHTMLMetaElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLMetaElement.h | 1 + .../webkit/WebCore/generated/JSHTMLModElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLModElement.h | 1 + .../WebCore/generated/JSHTMLOListElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLOListElement.h | 1 + .../WebCore/generated/JSHTMLObjectElement.cpp | 90 +- .../webkit/WebCore/generated/JSHTMLObjectElement.h | 6 +- .../WebCore/generated/JSHTMLOptGroupElement.cpp | 11 + .../WebCore/generated/JSHTMLOptGroupElement.h | 1 + .../WebCore/generated/JSHTMLOptionElement.cpp | 13 +- .../webkit/WebCore/generated/JSHTMLOptionElement.h | 1 + .../WebCore/generated/JSHTMLOptionsCollection.cpp | 16 +- .../WebCore/generated/JSHTMLOptionsCollection.h | 4 +- .../WebCore/generated/JSHTMLParagraphElement.cpp | 11 + .../WebCore/generated/JSHTMLParagraphElement.h | 1 + .../WebCore/generated/JSHTMLParamElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLParamElement.h | 1 + .../webkit/WebCore/generated/JSHTMLPreElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLPreElement.h | 1 + .../WebCore/generated/JSHTMLQuoteElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLQuoteElement.h | 1 + .../WebCore/generated/JSHTMLScriptElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLScriptElement.h | 1 + .../WebCore/generated/JSHTMLSelectElement.cpp | 75 +- .../webkit/WebCore/generated/JSHTMLSelectElement.h | 8 +- .../WebCore/generated/JSHTMLSourceElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLSourceElement.h | 1 + .../WebCore/generated/JSHTMLStyleElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLStyleElement.h | 1 + .../generated/JSHTMLTableCaptionElement.cpp | 13 +- .../WebCore/generated/JSHTMLTableCaptionElement.h | 1 + .../WebCore/generated/JSHTMLTableCellElement.cpp | 11 + .../WebCore/generated/JSHTMLTableCellElement.h | 1 + .../WebCore/generated/JSHTMLTableColElement.cpp | 11 + .../WebCore/generated/JSHTMLTableColElement.h | 1 + .../WebCore/generated/JSHTMLTableElement.cpp | 32 +- .../webkit/WebCore/generated/JSHTMLTableElement.h | 4 +- .../WebCore/generated/JSHTMLTableRowElement.cpp | 20 +- .../WebCore/generated/JSHTMLTableRowElement.h | 4 +- .../generated/JSHTMLTableSectionElement.cpp | 22 +- .../WebCore/generated/JSHTMLTableSectionElement.h | 4 +- .../WebCore/generated/JSHTMLTextAreaElement.cpp | 79 +- .../WebCore/generated/JSHTMLTextAreaElement.h | 9 +- .../WebCore/generated/JSHTMLTitleElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLTitleElement.h | 1 + .../WebCore/generated/JSHTMLUListElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLUListElement.h | 1 + .../WebCore/generated/JSHTMLVideoElement.cpp | 11 + .../webkit/WebCore/generated/JSHTMLVideoElement.h | 1 + .../webkit/WebCore/generated/JSHistory.cpp | 20 +- src/3rdparty/webkit/WebCore/generated/JSHistory.h | 9 +- .../webkit/WebCore/generated/JSImageData.cpp | 13 +- .../webkit/WebCore/generated/JSImageData.h | 1 + .../WebCore/generated/JSInspectorBackend.cpp | 368 +- .../webkit/WebCore/generated/JSInspectorBackend.h | 28 +- .../WebCore/generated/JSJavaScriptCallFrame.cpp | 14 +- .../WebCore/generated/JSJavaScriptCallFrame.h | 4 +- .../webkit/WebCore/generated/JSKeyboardEvent.cpp | 18 +- .../webkit/WebCore/generated/JSKeyboardEvent.h | 4 +- .../webkit/WebCore/generated/JSLocation.cpp | 22 +- src/3rdparty/webkit/WebCore/generated/JSLocation.h | 9 +- src/3rdparty/webkit/WebCore/generated/JSMedia.cpp | 197 + src/3rdparty/webkit/WebCore/generated/JSMedia.h | 84 + .../webkit/WebCore/generated/JSMediaError.cpp | 18 +- .../webkit/WebCore/generated/JSMediaError.h | 4 +- .../webkit/WebCore/generated/JSMediaList.cpp | 43 +- .../webkit/WebCore/generated/JSMediaList.h | 6 +- .../webkit/WebCore/generated/JSMessageChannel.cpp | 7 +- .../webkit/WebCore/generated/JSMessageChannel.h | 7 +- .../webkit/WebCore/generated/JSMessageEvent.cpp | 41 +- .../webkit/WebCore/generated/JSMessageEvent.h | 12 +- .../webkit/WebCore/generated/JSMessagePort.cpp | 48 +- .../webkit/WebCore/generated/JSMessagePort.h | 5 +- .../webkit/WebCore/generated/JSMimeType.cpp | 13 +- src/3rdparty/webkit/WebCore/generated/JSMimeType.h | 1 + .../webkit/WebCore/generated/JSMimeTypeArray.cpp | 47 +- .../webkit/WebCore/generated/JSMimeTypeArray.h | 6 +- .../webkit/WebCore/generated/JSMouseEvent.cpp | 18 +- .../webkit/WebCore/generated/JSMouseEvent.h | 4 +- .../webkit/WebCore/generated/JSMutationEvent.cpp | 18 +- .../webkit/WebCore/generated/JSMutationEvent.h | 4 +- .../webkit/WebCore/generated/JSNamedNodeMap.cpp | 61 +- .../webkit/WebCore/generated/JSNamedNodeMap.h | 6 +- .../webkit/WebCore/generated/JSNavigator.cpp | 33 +- .../webkit/WebCore/generated/JSNavigator.h | 5 +- src/3rdparty/webkit/WebCore/generated/JSNode.cpp | 49 +- src/3rdparty/webkit/WebCore/generated/JSNode.h | 9 +- .../webkit/WebCore/generated/JSNodeFilter.cpp | 18 +- .../webkit/WebCore/generated/JSNodeFilter.h | 4 +- .../webkit/WebCore/generated/JSNodeIterator.cpp | 24 +- .../webkit/WebCore/generated/JSNodeIterator.h | 4 +- .../webkit/WebCore/generated/JSNodeList.cpp | 45 +- src/3rdparty/webkit/WebCore/generated/JSNodeList.h | 6 +- .../webkit/WebCore/generated/JSNotation.cpp | 11 + src/3rdparty/webkit/WebCore/generated/JSNotation.h | 1 + .../webkit/WebCore/generated/JSOverflowEvent.cpp | 18 +- .../webkit/WebCore/generated/JSOverflowEvent.h | 4 +- .../WebCore/generated/JSPageTransitionEvent.cpp | 183 + .../WebCore/generated/JSPageTransitionEvent.h | 74 + src/3rdparty/webkit/WebCore/generated/JSPlugin.cpp | 47 +- src/3rdparty/webkit/WebCore/generated/JSPlugin.h | 6 +- .../webkit/WebCore/generated/JSPluginArray.cpp | 49 +- .../webkit/WebCore/generated/JSPluginArray.h | 6 +- .../webkit/WebCore/generated/JSPositionError.cpp | 18 +- .../webkit/WebCore/generated/JSPositionError.h | 4 +- .../WebCore/generated/JSProcessingInstruction.cpp | 11 + .../WebCore/generated/JSProcessingInstruction.h | 1 + .../webkit/WebCore/generated/JSProgressEvent.cpp | 18 +- .../webkit/WebCore/generated/JSProgressEvent.h | 4 +- .../webkit/WebCore/generated/JSRGBColor.cpp | 13 +- src/3rdparty/webkit/WebCore/generated/JSRGBColor.h | 1 + src/3rdparty/webkit/WebCore/generated/JSRange.cpp | 84 +- src/3rdparty/webkit/WebCore/generated/JSRange.h | 5 +- .../webkit/WebCore/generated/JSRangeException.cpp | 20 +- .../webkit/WebCore/generated/JSRangeException.h | 4 +- src/3rdparty/webkit/WebCore/generated/JSRect.cpp | 13 +- src/3rdparty/webkit/WebCore/generated/JSRect.h | 1 + .../webkit/WebCore/generated/JSSQLError.cpp | 7 +- src/3rdparty/webkit/WebCore/generated/JSSQLError.h | 1 + .../webkit/WebCore/generated/JSSQLResultSet.cpp | 7 +- .../webkit/WebCore/generated/JSSQLResultSet.h | 1 + .../WebCore/generated/JSSQLResultSetRowList.cpp | 14 +- .../WebCore/generated/JSSQLResultSetRowList.h | 4 +- .../webkit/WebCore/generated/JSSQLTransaction.cpp | 9 +- .../webkit/WebCore/generated/JSSQLTransaction.h | 3 +- .../webkit/WebCore/generated/JSSVGAElement.cpp | 22 +- .../webkit/WebCore/generated/JSSVGAElement.h | 4 +- .../WebCore/generated/JSSVGAltGlyphElement.cpp | 5 + .../WebCore/generated/JSSVGAltGlyphElement.h | 1 + .../webkit/WebCore/generated/JSSVGAngle.cpp | 22 +- src/3rdparty/webkit/WebCore/generated/JSSVGAngle.h | 4 +- .../WebCore/generated/JSSVGAnimatedAngle.cpp | 7 +- .../webkit/WebCore/generated/JSSVGAnimatedAngle.h | 1 + .../WebCore/generated/JSSVGAnimatedBoolean.cpp | 7 +- .../WebCore/generated/JSSVGAnimatedBoolean.h | 1 + .../WebCore/generated/JSSVGAnimatedEnumeration.cpp | 7 +- .../WebCore/generated/JSSVGAnimatedEnumeration.h | 1 + .../WebCore/generated/JSSVGAnimatedInteger.cpp | 7 +- .../WebCore/generated/JSSVGAnimatedInteger.h | 1 + .../WebCore/generated/JSSVGAnimatedLength.cpp | 7 +- .../webkit/WebCore/generated/JSSVGAnimatedLength.h | 1 + .../WebCore/generated/JSSVGAnimatedLengthList.cpp | 7 +- .../WebCore/generated/JSSVGAnimatedLengthList.h | 1 + .../WebCore/generated/JSSVGAnimatedNumber.cpp | 7 +- .../webkit/WebCore/generated/JSSVGAnimatedNumber.h | 1 + .../WebCore/generated/JSSVGAnimatedNumberList.cpp | 7 +- .../WebCore/generated/JSSVGAnimatedNumberList.h | 1 + .../generated/JSSVGAnimatedPreserveAspectRatio.cpp | 7 +- .../generated/JSSVGAnimatedPreserveAspectRatio.h | 1 + .../webkit/WebCore/generated/JSSVGAnimatedRect.cpp | 7 +- .../webkit/WebCore/generated/JSSVGAnimatedRect.h | 1 + .../WebCore/generated/JSSVGAnimatedString.cpp | 7 +- .../webkit/WebCore/generated/JSSVGAnimatedString.h | 1 + .../generated/JSSVGAnimatedTransformList.cpp | 7 +- .../WebCore/generated/JSSVGAnimatedTransformList.h | 1 + .../WebCore/generated/JSSVGAnimationElement.cpp | 54 +- .../WebCore/generated/JSSVGAnimationElement.h | 4 +- .../WebCore/generated/JSSVGCircleElement.cpp | 22 +- .../webkit/WebCore/generated/JSSVGCircleElement.h | 4 +- .../WebCore/generated/JSSVGClipPathElement.cpp | 22 +- .../WebCore/generated/JSSVGClipPathElement.h | 4 +- .../webkit/WebCore/generated/JSSVGColor.cpp | 22 +- src/3rdparty/webkit/WebCore/generated/JSSVGColor.h | 4 +- .../JSSVGComponentTransferFunctionElement.cpp | 16 + .../JSSVGComponentTransferFunctionElement.h | 4 +- .../WebCore/generated/JSSVGCursorElement.cpp | 12 +- .../webkit/WebCore/generated/JSSVGCursorElement.h | 4 +- .../generated/JSSVGDefinitionSrcElement.cpp | 72 - .../WebCore/generated/JSSVGDefinitionSrcElement.h | 58 - .../webkit/WebCore/generated/JSSVGDefsElement.cpp | 22 +- .../webkit/WebCore/generated/JSSVGDefsElement.h | 4 +- .../webkit/WebCore/generated/JSSVGDescElement.cpp | 12 +- .../webkit/WebCore/generated/JSSVGDescElement.h | 4 +- .../webkit/WebCore/generated/JSSVGDocument.cpp | 12 +- .../webkit/WebCore/generated/JSSVGDocument.h | 4 +- .../webkit/WebCore/generated/JSSVGElement.cpp | 7 +- .../webkit/WebCore/generated/JSSVGElement.h | 1 + .../WebCore/generated/JSSVGElementInstance.cpp | 18 +- .../WebCore/generated/JSSVGElementInstance.h | 4 +- .../WebCore/generated/JSSVGElementInstanceList.cpp | 14 +- .../WebCore/generated/JSSVGElementInstanceList.h | 4 +- .../generated/JSSVGElementWrapperFactory.cpp | 16 +- .../WebCore/generated/JSSVGElementWrapperFactory.h | 8 +- .../WebCore/generated/JSSVGEllipseElement.cpp | 22 +- .../webkit/WebCore/generated/JSSVGEllipseElement.h | 4 +- .../webkit/WebCore/generated/JSSVGException.cpp | 20 +- .../webkit/WebCore/generated/JSSVGException.h | 4 +- .../WebCore/generated/JSSVGFEBlendElement.cpp | 18 +- .../webkit/WebCore/generated/JSSVGFEBlendElement.h | 4 +- .../generated/JSSVGFEColorMatrixElement.cpp | 18 +- .../WebCore/generated/JSSVGFEColorMatrixElement.h | 4 +- .../generated/JSSVGFEComponentTransferElement.cpp | 12 +- .../generated/JSSVGFEComponentTransferElement.h | 4 +- .../WebCore/generated/JSSVGFECompositeElement.cpp | 18 +- .../WebCore/generated/JSSVGFECompositeElement.h | 4 +- .../generated/JSSVGFEDiffuseLightingElement.cpp | 12 +- .../generated/JSSVGFEDiffuseLightingElement.h | 4 +- .../generated/JSSVGFEDisplacementMapElement.cpp | 18 +- .../generated/JSSVGFEDisplacementMapElement.h | 4 +- .../generated/JSSVGFEDistantLightElement.cpp | 5 + .../WebCore/generated/JSSVGFEDistantLightElement.h | 1 + .../WebCore/generated/JSSVGFEFloodElement.cpp | 18 +- .../webkit/WebCore/generated/JSSVGFEFloodElement.h | 4 +- .../generated/JSSVGFEGaussianBlurElement.cpp | 14 +- .../WebCore/generated/JSSVGFEGaussianBlurElement.h | 4 +- .../WebCore/generated/JSSVGFEImageElement.cpp | 12 +- .../webkit/WebCore/generated/JSSVGFEImageElement.h | 4 +- .../WebCore/generated/JSSVGFEMergeElement.cpp | 12 +- .../webkit/WebCore/generated/JSSVGFEMergeElement.h | 4 +- .../WebCore/generated/JSSVGFEMergeNodeElement.cpp | 5 + .../WebCore/generated/JSSVGFEMergeNodeElement.h | 1 + .../WebCore/generated/JSSVGFEOffsetElement.cpp | 12 +- .../WebCore/generated/JSSVGFEOffsetElement.h | 4 +- .../WebCore/generated/JSSVGFEPointLightElement.cpp | 5 + .../WebCore/generated/JSSVGFEPointLightElement.h | 1 + .../generated/JSSVGFESpecularLightingElement.cpp | 12 +- .../generated/JSSVGFESpecularLightingElement.h | 4 +- .../WebCore/generated/JSSVGFESpotLightElement.cpp | 5 + .../WebCore/generated/JSSVGFESpotLightElement.h | 1 + .../WebCore/generated/JSSVGFETileElement.cpp | 12 +- .../webkit/WebCore/generated/JSSVGFETileElement.h | 4 +- .../WebCore/generated/JSSVGFETurbulenceElement.cpp | 18 +- .../WebCore/generated/JSSVGFETurbulenceElement.h | 4 +- .../WebCore/generated/JSSVGFilterElement.cpp | 14 +- .../webkit/WebCore/generated/JSSVGFilterElement.h | 4 +- .../generated/JSSVGForeignObjectElement.cpp | 22 +- .../WebCore/generated/JSSVGForeignObjectElement.h | 4 +- .../webkit/WebCore/generated/JSSVGGElement.cpp | 22 +- .../webkit/WebCore/generated/JSSVGGElement.h | 4 +- .../WebCore/generated/JSSVGGradientElement.cpp | 18 +- .../WebCore/generated/JSSVGGradientElement.h | 4 +- .../webkit/WebCore/generated/JSSVGImageElement.cpp | 22 +- .../webkit/WebCore/generated/JSSVGImageElement.h | 4 +- .../webkit/WebCore/generated/JSSVGLength.cpp | 22 +- .../webkit/WebCore/generated/JSSVGLength.h | 4 +- .../webkit/WebCore/generated/JSSVGLengthList.cpp | 26 +- .../webkit/WebCore/generated/JSSVGLengthList.h | 4 +- .../webkit/WebCore/generated/JSSVGLineElement.cpp | 22 +- .../webkit/WebCore/generated/JSSVGLineElement.h | 4 +- .../generated/JSSVGLinearGradientElement.cpp | 5 + .../WebCore/generated/JSSVGLinearGradientElement.h | 1 + .../WebCore/generated/JSSVGMarkerElement.cpp | 22 +- .../webkit/WebCore/generated/JSSVGMarkerElement.h | 4 +- .../webkit/WebCore/generated/JSSVGMaskElement.cpp | 14 +- .../webkit/WebCore/generated/JSSVGMaskElement.h | 4 +- .../webkit/WebCore/generated/JSSVGMatrix.cpp | 34 +- .../webkit/WebCore/generated/JSSVGMatrix.h | 4 +- .../webkit/WebCore/generated/JSSVGNumber.cpp | 7 +- .../webkit/WebCore/generated/JSSVGNumber.h | 1 + .../webkit/WebCore/generated/JSSVGNumberList.cpp | 26 +- .../webkit/WebCore/generated/JSSVGNumberList.h | 4 +- .../webkit/WebCore/generated/JSSVGPaint.cpp | 20 +- src/3rdparty/webkit/WebCore/generated/JSSVGPaint.h | 4 +- .../webkit/WebCore/generated/JSSVGPathElement.cpp | 66 +- .../webkit/WebCore/generated/JSSVGPathElement.h | 4 +- .../webkit/WebCore/generated/JSSVGPathSeg.cpp | 18 +- .../webkit/WebCore/generated/JSSVGPathSeg.h | 4 +- .../WebCore/generated/JSSVGPathSegArcAbs.cpp | 5 + .../webkit/WebCore/generated/JSSVGPathSegArcAbs.h | 1 + .../WebCore/generated/JSSVGPathSegArcRel.cpp | 5 + .../webkit/WebCore/generated/JSSVGPathSegArcRel.h | 1 + .../generated/JSSVGPathSegCurvetoCubicAbs.cpp | 5 + .../generated/JSSVGPathSegCurvetoCubicAbs.h | 1 + .../generated/JSSVGPathSegCurvetoCubicRel.cpp | 5 + .../generated/JSSVGPathSegCurvetoCubicRel.h | 1 + .../JSSVGPathSegCurvetoCubicSmoothAbs.cpp | 5 + .../generated/JSSVGPathSegCurvetoCubicSmoothAbs.h | 1 + .../JSSVGPathSegCurvetoCubicSmoothRel.cpp | 5 + .../generated/JSSVGPathSegCurvetoCubicSmoothRel.h | 1 + .../generated/JSSVGPathSegCurvetoQuadraticAbs.cpp | 5 + .../generated/JSSVGPathSegCurvetoQuadraticAbs.h | 1 + .../generated/JSSVGPathSegCurvetoQuadraticRel.cpp | 5 + .../generated/JSSVGPathSegCurvetoQuadraticRel.h | 1 + .../JSSVGPathSegCurvetoQuadraticSmoothAbs.cpp | 5 + .../JSSVGPathSegCurvetoQuadraticSmoothAbs.h | 1 + .../JSSVGPathSegCurvetoQuadraticSmoothRel.cpp | 5 + .../JSSVGPathSegCurvetoQuadraticSmoothRel.h | 1 + .../WebCore/generated/JSSVGPathSegLinetoAbs.cpp | 5 + .../WebCore/generated/JSSVGPathSegLinetoAbs.h | 1 + .../generated/JSSVGPathSegLinetoHorizontalAbs.cpp | 5 + .../generated/JSSVGPathSegLinetoHorizontalAbs.h | 1 + .../generated/JSSVGPathSegLinetoHorizontalRel.cpp | 5 + .../generated/JSSVGPathSegLinetoHorizontalRel.h | 1 + .../WebCore/generated/JSSVGPathSegLinetoRel.cpp | 5 + .../WebCore/generated/JSSVGPathSegLinetoRel.h | 1 + .../generated/JSSVGPathSegLinetoVerticalAbs.cpp | 5 + .../generated/JSSVGPathSegLinetoVerticalAbs.h | 1 + .../generated/JSSVGPathSegLinetoVerticalRel.cpp | 5 + .../generated/JSSVGPathSegLinetoVerticalRel.h | 1 + .../webkit/WebCore/generated/JSSVGPathSegList.cpp | 26 +- .../webkit/WebCore/generated/JSSVGPathSegList.h | 4 +- .../WebCore/generated/JSSVGPathSegMovetoAbs.cpp | 5 + .../WebCore/generated/JSSVGPathSegMovetoAbs.h | 1 + .../WebCore/generated/JSSVGPathSegMovetoRel.cpp | 5 + .../WebCore/generated/JSSVGPathSegMovetoRel.h | 1 + .../WebCore/generated/JSSVGPatternElement.cpp | 14 +- .../webkit/WebCore/generated/JSSVGPatternElement.h | 4 +- .../webkit/WebCore/generated/JSSVGPoint.cpp | 14 +- src/3rdparty/webkit/WebCore/generated/JSSVGPoint.h | 4 +- .../webkit/WebCore/generated/JSSVGPointList.cpp | 26 +- .../webkit/WebCore/generated/JSSVGPointList.h | 4 +- .../WebCore/generated/JSSVGPolygonElement.cpp | 22 +- .../webkit/WebCore/generated/JSSVGPolygonElement.h | 4 +- .../WebCore/generated/JSSVGPolylineElement.cpp | 22 +- .../WebCore/generated/JSSVGPolylineElement.h | 4 +- .../WebCore/generated/JSSVGPreserveAspectRatio.cpp | 18 +- .../WebCore/generated/JSSVGPreserveAspectRatio.h | 4 +- .../generated/JSSVGRadialGradientElement.cpp | 5 + .../WebCore/generated/JSSVGRadialGradientElement.h | 1 + .../webkit/WebCore/generated/JSSVGRect.cpp | 7 +- src/3rdparty/webkit/WebCore/generated/JSSVGRect.h | 1 + .../webkit/WebCore/generated/JSSVGRectElement.cpp | 22 +- .../webkit/WebCore/generated/JSSVGRectElement.h | 4 +- .../WebCore/generated/JSSVGRenderingIntent.cpp | 18 +- .../WebCore/generated/JSSVGRenderingIntent.h | 4 +- .../webkit/WebCore/generated/JSSVGSVGElement.cpp | 70 +- .../webkit/WebCore/generated/JSSVGSVGElement.h | 4 +- .../WebCore/generated/JSSVGScriptElement.cpp | 5 + .../webkit/WebCore/generated/JSSVGScriptElement.h | 1 + .../webkit/WebCore/generated/JSSVGStopElement.cpp | 12 +- .../webkit/WebCore/generated/JSSVGStopElement.h | 4 +- .../webkit/WebCore/generated/JSSVGStringList.cpp | 26 +- .../webkit/WebCore/generated/JSSVGStringList.h | 4 +- .../webkit/WebCore/generated/JSSVGStyleElement.cpp | 48 +- .../webkit/WebCore/generated/JSSVGStyleElement.h | 7 +- .../WebCore/generated/JSSVGSwitchElement.cpp | 22 +- .../webkit/WebCore/generated/JSSVGSwitchElement.h | 4 +- .../WebCore/generated/JSSVGSymbolElement.cpp | 12 +- .../webkit/WebCore/generated/JSSVGSymbolElement.h | 4 +- .../webkit/WebCore/generated/JSSVGTRefElement.cpp | 5 + .../webkit/WebCore/generated/JSSVGTRefElement.h | 1 + .../WebCore/generated/JSSVGTextContentElement.cpp | 38 +- .../WebCore/generated/JSSVGTextContentElement.h | 4 +- .../webkit/WebCore/generated/JSSVGTextElement.cpp | 18 +- .../webkit/WebCore/generated/JSSVGTextElement.h | 4 +- .../WebCore/generated/JSSVGTextPathElement.cpp | 16 + .../WebCore/generated/JSSVGTextPathElement.h | 4 +- .../generated/JSSVGTextPositioningElement.cpp | 5 + .../generated/JSSVGTextPositioningElement.h | 1 + .../webkit/WebCore/generated/JSSVGTitleElement.cpp | 12 +- .../webkit/WebCore/generated/JSSVGTitleElement.h | 4 +- .../webkit/WebCore/generated/JSSVGTransform.cpp | 30 +- .../webkit/WebCore/generated/JSSVGTransform.h | 4 +- .../WebCore/generated/JSSVGTransformList.cpp | 30 +- .../webkit/WebCore/generated/JSSVGTransformList.h | 4 +- .../webkit/WebCore/generated/JSSVGUnitTypes.cpp | 18 +- .../webkit/WebCore/generated/JSSVGUnitTypes.h | 4 +- .../webkit/WebCore/generated/JSSVGUseElement.cpp | 22 +- .../webkit/WebCore/generated/JSSVGUseElement.h | 4 +- .../webkit/WebCore/generated/JSSVGViewElement.cpp | 10 + .../webkit/WebCore/generated/JSSVGViewElement.h | 4 +- .../webkit/WebCore/generated/JSSVGZoomEvent.cpp | 5 + .../webkit/WebCore/generated/JSSVGZoomEvent.h | 1 + src/3rdparty/webkit/WebCore/generated/JSScreen.cpp | 7 +- src/3rdparty/webkit/WebCore/generated/JSScreen.h | 1 + .../webkit/WebCore/generated/JSSharedWorker.cpp | 115 + .../webkit/WebCore/generated/JSSharedWorker.h | 80 + .../WebCore/generated/JSSharedWorkerContext.cpp | 142 + .../WebCore/generated/JSSharedWorkerContext.h | 81 + .../webkit/WebCore/generated/JSStorage.cpp | 46 +- src/3rdparty/webkit/WebCore/generated/JSStorage.h | 8 +- .../webkit/WebCore/generated/JSStorageEvent.cpp | 18 +- .../webkit/WebCore/generated/JSStorageEvent.h | 4 +- .../webkit/WebCore/generated/JSStyleSheet.cpp | 13 +- .../webkit/WebCore/generated/JSStyleSheet.h | 7 +- .../webkit/WebCore/generated/JSStyleSheetList.cpp | 45 +- .../webkit/WebCore/generated/JSStyleSheetList.h | 6 +- src/3rdparty/webkit/WebCore/generated/JSText.cpp | 20 +- src/3rdparty/webkit/WebCore/generated/JSText.h | 4 +- .../webkit/WebCore/generated/JSTextEvent.cpp | 18 +- .../webkit/WebCore/generated/JSTextEvent.h | 4 +- .../webkit/WebCore/generated/JSTextMetrics.cpp | 13 +- .../webkit/WebCore/generated/JSTextMetrics.h | 1 + .../webkit/WebCore/generated/JSTimeRanges.cpp | 21 +- .../webkit/WebCore/generated/JSTimeRanges.h | 8 +- .../webkit/WebCore/generated/JSTreeWalker.cpp | 32 +- .../webkit/WebCore/generated/JSTreeWalker.h | 4 +- .../webkit/WebCore/generated/JSUIEvent.cpp | 18 +- src/3rdparty/webkit/WebCore/generated/JSUIEvent.h | 4 +- .../webkit/WebCore/generated/JSValidityState.cpp | 7 +- .../webkit/WebCore/generated/JSValidityState.h | 1 + .../webkit/WebCore/generated/JSVoidCallback.cpp | 7 +- .../webkit/WebCore/generated/JSVoidCallback.h | 3 +- .../WebCore/generated/JSWebKitAnimationEvent.cpp | 18 +- .../WebCore/generated/JSWebKitAnimationEvent.h | 4 +- .../WebCore/generated/JSWebKitCSSKeyframeRule.cpp | 11 + .../WebCore/generated/JSWebKitCSSKeyframeRule.h | 1 + .../WebCore/generated/JSWebKitCSSKeyframesRule.cpp | 41 +- .../WebCore/generated/JSWebKitCSSKeyframesRule.h | 6 +- .../webkit/WebCore/generated/JSWebKitCSSMatrix.cpp | 28 +- .../webkit/WebCore/generated/JSWebKitCSSMatrix.h | 4 +- .../generated/JSWebKitCSSTransformValue.cpp | 16 + .../WebCore/generated/JSWebKitCSSTransformValue.h | 4 +- .../webkit/WebCore/generated/JSWebKitPoint.cpp | 7 +- .../webkit/WebCore/generated/JSWebKitPoint.h | 1 + .../WebCore/generated/JSWebKitTransitionEvent.cpp | 18 +- .../WebCore/generated/JSWebKitTransitionEvent.h | 4 +- .../webkit/WebCore/generated/JSWebSocket.cpp | 280 + .../webkit/WebCore/generated/JSWebSocket.h | 106 + .../webkit/WebCore/generated/JSWheelEvent.cpp | 11 + .../webkit/WebCore/generated/JSWheelEvent.h | 1 + src/3rdparty/webkit/WebCore/generated/JSWorker.cpp | 34 +- src/3rdparty/webkit/WebCore/generated/JSWorker.h | 7 +- .../webkit/WebCore/generated/JSWorkerContext.cpp | 30 +- .../webkit/WebCore/generated/JSWorkerContext.h | 8 +- .../webkit/WebCore/generated/JSWorkerLocation.cpp | 20 +- .../webkit/WebCore/generated/JSWorkerLocation.h | 4 +- .../webkit/WebCore/generated/JSWorkerNavigator.cpp | 7 +- .../webkit/WebCore/generated/JSWorkerNavigator.h | 1 + .../webkit/WebCore/generated/JSXMLHttpRequest.cpp | 32 +- .../webkit/WebCore/generated/JSXMLHttpRequest.h | 4 +- .../generated/JSXMLHttpRequestException.cpp | 20 +- .../WebCore/generated/JSXMLHttpRequestException.h | 4 +- .../generated/JSXMLHttpRequestProgressEvent.cpp | 11 + .../generated/JSXMLHttpRequestProgressEvent.h | 1 + .../WebCore/generated/JSXMLHttpRequestUpload.cpp | 24 +- .../WebCore/generated/JSXMLHttpRequestUpload.h | 4 +- .../webkit/WebCore/generated/JSXMLSerializer.cpp | 20 +- .../webkit/WebCore/generated/JSXMLSerializer.h | 4 +- .../webkit/WebCore/generated/JSXPathEvaluator.cpp | 24 +- .../webkit/WebCore/generated/JSXPathEvaluator.h | 4 +- .../webkit/WebCore/generated/JSXPathException.cpp | 20 +- .../webkit/WebCore/generated/JSXPathException.h | 4 +- .../webkit/WebCore/generated/JSXPathExpression.cpp | 20 +- .../webkit/WebCore/generated/JSXPathExpression.h | 4 +- .../webkit/WebCore/generated/JSXPathNSResolver.cpp | 9 +- .../webkit/WebCore/generated/JSXPathNSResolver.h | 3 +- .../webkit/WebCore/generated/JSXPathResult.cpp | 22 +- .../webkit/WebCore/generated/JSXPathResult.h | 4 +- .../webkit/WebCore/generated/JSXSLTProcessor.cpp | 186 + .../webkit/WebCore/generated/JSXSLTProcessor.h | 91 + .../webkit/WebCore/generated/SVGElementFactory.cpp | 248 +- .../webkit/WebCore/generated/SVGElementFactory.h | 8 +- src/3rdparty/webkit/WebCore/generated/SVGNames.cpp | 14 +- src/3rdparty/webkit/WebCore/generated/SVGNames.h | 10 +- .../WebCore/generated/UserAgentStyleSheets.h | 6 +- .../WebCore/generated/UserAgentStyleSheetsData.cpp | 1137 +- .../webkit/WebCore/generated/WebKitVersion.h | 36 + .../webkit/WebCore/generated/XLinkNames.cpp | 8 +- src/3rdparty/webkit/WebCore/generated/XLinkNames.h | 8 +- src/3rdparty/webkit/WebCore/generated/XMLNames.cpp | 8 +- src/3rdparty/webkit/WebCore/generated/XMLNames.h | 8 +- .../webkit/WebCore/generated/XPathGrammar.cpp | 418 +- .../webkit/WebCore/generated/XPathGrammar.h | 64 +- .../webkit/WebCore/history/BackForwardList.cpp | 5 + .../webkit/WebCore/history/CachedFrame.cpp | 151 +- src/3rdparty/webkit/WebCore/history/CachedFrame.h | 42 +- src/3rdparty/webkit/WebCore/history/CachedPage.cpp | 21 +- src/3rdparty/webkit/WebCore/history/CachedPage.h | 4 +- .../webkit/WebCore/history/HistoryItem.cpp | 6 +- src/3rdparty/webkit/WebCore/history/PageCache.cpp | 2 +- .../webkit/WebCore/history/qt/HistoryItemQt.cpp | 2 +- .../webkit/WebCore/html/CanvasGradient.cpp | 64 - src/3rdparty/webkit/WebCore/html/CanvasGradient.h | 71 - .../webkit/WebCore/html/CanvasGradient.idl | 39 - src/3rdparty/webkit/WebCore/html/CanvasPattern.cpp | 66 - src/3rdparty/webkit/WebCore/html/CanvasPattern.h | 62 - src/3rdparty/webkit/WebCore/html/CanvasPattern.idl | 36 - .../webkit/WebCore/html/CanvasPixelArray.cpp | 44 - .../webkit/WebCore/html/CanvasPixelArray.h | 64 - .../webkit/WebCore/html/CanvasPixelArray.idl | 39 - .../WebCore/html/CanvasRenderingContext2D.cpp | 1566 -- .../webkit/WebCore/html/CanvasRenderingContext2D.h | 271 - .../WebCore/html/CanvasRenderingContext2D.idl | 123 - src/3rdparty/webkit/WebCore/html/CanvasStyle.cpp | 231 - src/3rdparty/webkit/WebCore/html/CanvasStyle.h | 89 - src/3rdparty/webkit/WebCore/html/CollectionType.h | 1 + .../webkit/WebCore/html/HTMLAnchorElement.cpp | 59 +- .../webkit/WebCore/html/HTMLAnchorElement.h | 9 +- .../webkit/WebCore/html/HTMLAppletElement.cpp | 11 +- .../webkit/WebCore/html/HTMLAppletElement.h | 7 +- .../webkit/WebCore/html/HTMLAreaElement.cpp | 15 +- src/3rdparty/webkit/WebCore/html/HTMLAreaElement.h | 10 +- .../webkit/WebCore/html/HTMLAttributeNames.in | 10 + .../webkit/WebCore/html/HTMLBodyElement.cpp | 38 +- src/3rdparty/webkit/WebCore/html/HTMLBodyElement.h | 2 + .../webkit/WebCore/html/HTMLBodyElement.idl | 8 +- .../webkit/WebCore/html/HTMLButtonElement.idl | 3 + .../webkit/WebCore/html/HTMLCanvasElement.cpp | 73 +- .../webkit/WebCore/html/HTMLCanvasElement.h | 43 +- .../webkit/WebCore/html/HTMLCanvasElement.idl | 3 +- .../webkit/WebCore/html/HTMLCollection.cpp | 9 + .../webkit/WebCore/html/HTMLDataListElement.cpp | 60 + .../webkit/WebCore/html/HTMLDataListElement.h | 55 + .../webkit/WebCore/html/HTMLDataListElement.idl | 38 + src/3rdparty/webkit/WebCore/html/HTMLDocument.cpp | 6 +- src/3rdparty/webkit/WebCore/html/HTMLDocument.h | 10 +- src/3rdparty/webkit/WebCore/html/HTMLElement.cpp | 77 +- src/3rdparty/webkit/WebCore/html/HTMLElement.h | 67 +- .../webkit/WebCore/html/HTMLEmbedElement.cpp | 35 +- .../webkit/WebCore/html/HTMLEmbedElement.h | 16 +- .../webkit/WebCore/html/HTMLEmbedElement.idl | 12 +- .../webkit/WebCore/html/HTMLFieldSetElement.cpp | 4 +- .../webkit/WebCore/html/HTMLFieldSetElement.h | 2 +- .../webkit/WebCore/html/HTMLFieldSetElement.idl | 2 + .../webkit/WebCore/html/HTMLFormControlElement.cpp | 52 +- .../webkit/WebCore/html/HTMLFormControlElement.h | 10 +- .../webkit/WebCore/html/HTMLFormElement.cpp | 36 + src/3rdparty/webkit/WebCore/html/HTMLFormElement.h | 9 +- .../webkit/WebCore/html/HTMLFormElement.idl | 2 + .../webkit/WebCore/html/HTMLFrameElement.cpp | 31 +- .../webkit/WebCore/html/HTMLFrameElement.h | 20 +- .../webkit/WebCore/html/HTMLFrameElement.idl | 14 +- .../webkit/WebCore/html/HTMLFrameElementBase.cpp | 98 +- .../webkit/WebCore/html/HTMLFrameElementBase.h | 54 +- .../webkit/WebCore/html/HTMLFrameOwnerElement.cpp | 4 +- .../webkit/WebCore/html/HTMLFrameOwnerElement.h | 24 +- .../webkit/WebCore/html/HTMLFrameSetElement.cpp | 36 +- .../webkit/WebCore/html/HTMLFrameSetElement.h | 2 + .../webkit/WebCore/html/HTMLFrameSetElement.idl | 4 +- .../webkit/WebCore/html/HTMLHtmlElement.cpp | 15 +- .../webkit/WebCore/html/HTMLIFrameElement.cpp | 43 +- .../webkit/WebCore/html/HTMLIFrameElement.h | 15 +- .../webkit/WebCore/html/HTMLIFrameElement.idl | 22 +- .../webkit/WebCore/html/HTMLImageElement.cpp | 50 +- .../webkit/WebCore/html/HTMLImageElement.h | 15 +- .../webkit/WebCore/html/HTMLInputElement.cpp | 153 +- .../webkit/WebCore/html/HTMLInputElement.h | 28 +- .../webkit/WebCore/html/HTMLInputElement.idl | 9 + .../webkit/WebCore/html/HTMLKeygenElement.cpp | 2 +- src/3rdparty/webkit/WebCore/html/HTMLLIElement.cpp | 6 +- .../webkit/WebCore/html/HTMLLegendElement.cpp | 4 +- .../webkit/WebCore/html/HTMLLegendElement.h | 2 +- .../webkit/WebCore/html/HTMLMediaElement.cpp | 212 +- .../webkit/WebCore/html/HTMLMediaElement.h | 5 + .../webkit/WebCore/html/HTMLOListElement.cpp | 18 +- .../webkit/WebCore/html/HTMLObjectElement.cpp | 139 +- .../webkit/WebCore/html/HTMLObjectElement.h | 73 +- .../webkit/WebCore/html/HTMLObjectElement.idl | 29 +- .../webkit/WebCore/html/HTMLOptGroupElement.cpp | 8 +- .../webkit/WebCore/html/HTMLOptGroupElement.h | 1 + .../webkit/WebCore/html/HTMLOptionElement.cpp | 12 +- .../webkit/WebCore/html/HTMLOptionElement.h | 1 + src/3rdparty/webkit/WebCore/html/HTMLParser.cpp | 12 +- .../webkit/WebCore/html/HTMLPlugInElement.cpp | 27 +- .../webkit/WebCore/html/HTMLPlugInElement.h | 43 +- .../webkit/WebCore/html/HTMLPlugInImageElement.h | 9 +- .../webkit/WebCore/html/HTMLSelectElement.idl | 2 + .../webkit/WebCore/html/HTMLTableCellElement.cpp | 4 +- .../webkit/WebCore/html/HTMLTableColElement.cpp | 4 +- src/3rdparty/webkit/WebCore/html/HTMLTagNames.in | 153 +- .../webkit/WebCore/html/HTMLTextAreaElement.cpp | 30 +- .../webkit/WebCore/html/HTMLTextAreaElement.h | 6 + .../webkit/WebCore/html/HTMLTextAreaElement.idl | 4 + src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp | 16 +- .../webkit/WebCore/html/HTMLViewSourceDocument.cpp | 33 +- .../webkit/WebCore/html/HTMLViewSourceDocument.h | 23 +- src/3rdparty/webkit/WebCore/html/TimeRanges.idl | 2 +- src/3rdparty/webkit/WebCore/html/ValidityState.cpp | 42 + src/3rdparty/webkit/WebCore/html/ValidityState.h | 9 +- .../webkit/WebCore/html/canvas/CanvasArray.cpp | 52 + .../webkit/WebCore/html/canvas/CanvasArray.h | 67 + .../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 | 76 + .../webkit/WebCore/html/canvas/CanvasByteArray.h | 87 + .../webkit/WebCore/html/canvas/CanvasByteArray.idl | 36 + .../WebCore/html/canvas/CanvasFloatArray.cpp | 79 + .../webkit/WebCore/html/canvas/CanvasFloatArray.h | 84 + .../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.cpp | 64 + .../webkit/WebCore/html/canvas/CanvasGradient.h | 71 + .../webkit/WebCore/html/canvas/CanvasGradient.idl | 39 + .../webkit/WebCore/html/canvas/CanvasIntArray.cpp | 82 + .../webkit/WebCore/html/canvas/CanvasIntArray.h | 85 + .../webkit/WebCore/html/canvas/CanvasIntArray.idl | 36 + .../WebCore/html/canvas/CanvasNumberArray.cpp | 47 + .../webkit/WebCore/html/canvas/CanvasNumberArray.h | 55 + .../WebCore/html/canvas/CanvasNumberArray.idl | 34 + .../webkit/WebCore/html/canvas/CanvasObject.cpp | 69 + .../webkit/WebCore/html/canvas/CanvasObject.h | 65 + .../webkit/WebCore/html/canvas/CanvasPattern.cpp | 66 + .../webkit/WebCore/html/canvas/CanvasPattern.h | 62 + .../webkit/WebCore/html/canvas/CanvasPattern.idl | 36 + .../WebCore/html/canvas/CanvasPixelArray.cpp | 44 + .../webkit/WebCore/html/canvas/CanvasPixelArray.h | 74 + .../WebCore/html/canvas/CanvasPixelArray.idl | 39 + .../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.cpp | 48 + .../WebCore/html/canvas/CanvasRenderingContext.h | 55 + .../WebCore/html/canvas/CanvasRenderingContext.idl | 39 + .../html/canvas/CanvasRenderingContext2D.cpp | 1565 ++ .../WebCore/html/canvas/CanvasRenderingContext2D.h | 270 + .../html/canvas/CanvasRenderingContext2D.idl | 122 + .../html/canvas/CanvasRenderingContext3D.cpp | 1401 ++ .../WebCore/html/canvas/CanvasRenderingContext3D.h | 321 + .../html/canvas/CanvasRenderingContext3D.idl | 687 + .../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 | 83 + .../WebCore/html/canvas/CanvasShortArray.idl | 36 + .../webkit/WebCore/html/canvas/CanvasStyle.cpp | 231 + .../webkit/WebCore/html/canvas/CanvasStyle.h | 89 + .../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 | 77 + .../WebCore/html/canvas/CanvasUnsignedByteArray.h | 83 + .../html/canvas/CanvasUnsignedByteArray.idl | 36 + .../WebCore/html/canvas/CanvasUnsignedIntArray.cpp | 82 + .../WebCore/html/canvas/CanvasUnsignedIntArray.h | 83 + .../WebCore/html/canvas/CanvasUnsignedIntArray.idl | 36 + .../html/canvas/CanvasUnsignedShortArray.cpp | 84 + .../WebCore/html/canvas/CanvasUnsignedShortArray.h | 84 + .../html/canvas/CanvasUnsignedShortArray.idl | 36 + .../webkit/WebCore/inspector/ConsoleMessage.cpp | 14 +- .../webkit/WebCore/inspector/ConsoleMessage.h | 7 + .../WebCore/inspector/DOMDispatchTimelineItem.cpp | 58 + .../WebCore/inspector/DOMDispatchTimelineItem.h | 58 + .../webkit/WebCore/inspector/InspectorBackend.cpp | 177 +- .../webkit/WebCore/inspector/InspectorBackend.h | 36 +- .../webkit/WebCore/inspector/InspectorBackend.idl | 35 +- .../webkit/WebCore/inspector/InspectorClient.h | 2 + .../WebCore/inspector/InspectorController.cpp | 204 +- .../webkit/WebCore/inspector/InspectorController.h | 44 +- .../webkit/WebCore/inspector/InspectorDOMAgent.cpp | 561 + .../webkit/WebCore/inspector/InspectorDOMAgent.h | 130 + .../inspector/InspectorDOMStorageResource.cpp | 12 +- .../inspector/InspectorDatabaseResource.cpp | 9 +- .../webkit/WebCore/inspector/InspectorFrontend.cpp | 215 +- .../webkit/WebCore/inspector/InspectorFrontend.h | 53 +- .../WebCore/inspector/InspectorJSONObject.cpp | 95 - .../webkit/WebCore/inspector/InspectorJSONObject.h | 60 - .../webkit/WebCore/inspector/InspectorResource.cpp | 27 +- .../webkit/WebCore/inspector/InspectorResource.h | 2 + .../WebCore/inspector/InspectorTimelineAgent.cpp | 142 + .../WebCore/inspector/InspectorTimelineAgent.h | 77 + .../WebCore/inspector/JavaScriptDebugServer.cpp | 151 +- .../WebCore/inspector/JavaScriptDebugServer.h | 28 +- .../webkit/WebCore/inspector/TimelineItem.cpp | 81 + .../webkit/WebCore/inspector/TimelineItem.h | 88 + .../WebCore/inspector/front-end/Breakpoint.js | 21 +- .../inspector/front-end/BreakpointsSidebarPane.js | 4 +- .../inspector/front-end/CallStackSidebarPane.js | 11 +- .../webkit/WebCore/inspector/front-end/Callback.js | 56 + .../WebCore/inspector/front-end/ChangesView.js | 80 + .../webkit/WebCore/inspector/front-end/Color.js | 661 + .../webkit/WebCore/inspector/front-end/Console.js | 983 - .../WebCore/inspector/front-end/ConsoleView.js | 986 + .../WebCore/inspector/front-end/CookieItemsView.js | 266 + .../webkit/WebCore/inspector/front-end/DOMAgent.js | 650 + .../inspector/front-end/DOMStorageDataGrid.js | 96 +- .../inspector/front-end/DOMStorageItemsView.js | 26 +- .../webkit/WebCore/inspector/front-end/DataGrid.js | 164 +- .../webkit/WebCore/inspector/front-end/Database.js | 42 +- .../inspector/front-end/DatabaseQueryView.js | 32 +- .../inspector/front-end/DatabaseTableView.js | 17 +- .../WebCore/inspector/front-end/DatabasesPanel.js | 526 - .../webkit/WebCore/inspector/front-end/Drawer.js | 202 + .../WebCore/inspector/front-end/ElementsPanel.js | 487 +- .../inspector/front-end/ElementsTreeOutline.js | 56 +- .../front-end/Images/clearConsoleButtonGlyph.png | Bin 0 -> 396 bytes .../front-end/Images/clearConsoleButtons.png | Bin 5224 -> 0 bytes .../front-end/Images/consoleButtonGlyph.png | Bin 0 -> 183 bytes .../inspector/front-end/Images/consoleButtons.png | Bin 5197 -> 0 bytes .../WebCore/inspector/front-end/Images/cookie.png | Bin 0 -> 2246 bytes .../inspector/front-end/Images/databasesIcon.png | Bin 7148 -> 0 bytes .../inspector/front-end/Images/dockButtonGlyph.png | Bin 0 -> 164 bytes .../inspector/front-end/Images/dockButtons.png | Bin 1274 -> 0 bytes .../inspector/front-end/Images/domStorage.png | Bin 442 -> 0 bytes .../inspector/front-end/Images/enableButtons.png | Bin 5543 -> 0 bytes .../front-end/Images/enableOutlineButtonGlyph.png | Bin 0 -> 363 bytes .../front-end/Images/enableSolidButtonGlyph.png | Bin 0 -> 302 bytes .../front-end/Images/excludeButtonGlyph.png | Bin 0 -> 212 bytes .../inspector/front-end/Images/excludeButtons.png | Bin 4562 -> 0 bytes .../front-end/Images/focusButtonGlyph.png | Bin 0 -> 285 bytes .../inspector/front-end/Images/focusButtons.png | Bin 4919 -> 0 bytes .../Images/largerResourcesButtonGlyph.png | Bin 0 -> 192 bytes .../front-end/Images/largerResourcesButtons.png | Bin 1596 -> 0 bytes .../inspector/front-end/Images/localStorage.png | Bin 0 -> 1081 bytes .../front-end/Images/nodeSearchButtonGlyph.png | Bin 0 -> 283 bytes .../front-end/Images/nodeSearchButtons.png | Bin 5708 -> 0 bytes .../front-end/Images/paneSettingsButtons.png | Bin 0 -> 1422 bytes .../Images/pauseOnExceptionButtonGlyph.png | Bin 0 -> 331 bytes .../front-end/Images/pauseOnExceptionButtons.png | Bin 2305 -> 0 bytes .../front-end/Images/percentButtonGlyph.png | Bin 0 -> 357 bytes .../inspector/front-end/Images/percentButtons.png | Bin 5771 -> 0 bytes .../front-end/Images/recordButtonGlyph.png | Bin 0 -> 213 bytes .../inspector/front-end/Images/recordButtons.png | Bin 5716 -> 0 bytes .../front-end/Images/recordToggledButtonGlyph.png | Bin 0 -> 510 bytes .../front-end/Images/reloadButtonGlyph.png | Bin 0 -> 267 bytes .../inspector/front-end/Images/reloadButtons.png | Bin 4544 -> 0 bytes .../inspector/front-end/Images/sessionStorage.png | Bin 0 -> 1097 bytes .../inspector/front-end/Images/storageIcon.png | Bin 0 -> 7148 bytes .../front-end/Images/undockButtonGlyph.png | Bin 0 -> 179 bytes .../WebCore/inspector/front-end/InjectedScript.js | 1116 + .../inspector/front-end/InjectedScriptAccess.js | 77 + .../inspector/front-end/MetricsSidebarPane.js | 38 +- .../inspector/front-end/ObjectPropertiesSection.js | 274 +- .../WebCore/inspector/front-end/ObjectProxy.js | 44 + .../webkit/WebCore/inspector/front-end/Popup.js | 168 + .../inspector/front-end/ProfileDataGridTree.js | 2 +- .../WebCore/inspector/front-end/ProfileView.js | 45 +- .../WebCore/inspector/front-end/ProfilesPanel.js | 60 +- .../inspector/front-end/PropertiesSidebarPane.js | 24 +- .../webkit/WebCore/inspector/front-end/Resource.js | 5 +- .../WebCore/inspector/front-end/ResourceView.js | 125 +- .../WebCore/inspector/front-end/ResourcesPanel.js | 415 +- .../inspector/front-end/ScopeChainSidebarPane.js | 46 +- .../WebCore/inspector/front-end/ScriptsPanel.js | 66 +- .../WebCore/inspector/front-end/SourceFrame.js | 163 +- .../WebCore/inspector/front-end/StatusBarButton.js | 118 + .../WebCore/inspector/front-end/StoragePanel.js | 685 + .../inspector/front-end/StylesSidebarPane.js | 701 +- .../WebCore/inspector/front-end/SummaryBar.js | 364 + .../WebCore/inspector/front-end/TextPrompt.js | 1 + .../WebCore/inspector/front-end/TimelineAgent.js | 54 + .../front-end/WatchExpressionsSidebarPane.js | 274 + .../webkit/WebCore/inspector/front-end/WebKit.qrc | 52 +- .../WebCore/inspector/front-end/inspector.css | 458 +- .../WebCore/inspector/front-end/inspector.html | 32 +- .../WebCore/inspector/front-end/inspector.js | 222 +- .../WebCore/inspector/front-end/treeoutline.js | 29 +- .../WebCore/inspector/front-end/utilities.js | 351 +- src/3rdparty/webkit/WebCore/loader/Cache.cpp | 6 +- src/3rdparty/webkit/WebCore/loader/CachedFont.cpp | 15 +- .../webkit/WebCore/loader/CachedResource.cpp | 25 +- .../webkit/WebCore/loader/CachedResource.h | 9 +- .../loader/CrossOriginPreflightResultCache.cpp | 17 +- .../loader/CrossOriginPreflightResultCache.h | 1 - src/3rdparty/webkit/WebCore/loader/DocLoader.cpp | 37 +- .../webkit/WebCore/loader/DocumentLoader.cpp | 156 +- .../webkit/WebCore/loader/DocumentLoader.h | 36 +- .../WebCore/loader/DocumentThreadableLoader.cpp | 245 +- .../WebCore/loader/DocumentThreadableLoader.h | 28 +- src/3rdparty/webkit/WebCore/loader/EmptyClients.h | 16 +- .../webkit/WebCore/loader/FTPDirectoryDocument.cpp | 8 +- .../webkit/WebCore/loader/FTPDirectoryDocument.h | 4 +- src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp | 295 +- src/3rdparty/webkit/WebCore/loader/FrameLoader.h | 20 +- .../webkit/WebCore/loader/FrameLoaderClient.h | 16 +- .../webkit/WebCore/loader/FrameLoaderTypes.h | 15 +- .../webkit/WebCore/loader/ImageDocument.cpp | 25 +- src/3rdparty/webkit/WebCore/loader/ImageDocument.h | 4 +- .../webkit/WebCore/loader/MainResourceLoader.cpp | 64 +- .../webkit/WebCore/loader/MainResourceLoader.h | 12 - .../webkit/WebCore/loader/MediaDocument.cpp | 4 +- src/3rdparty/webkit/WebCore/loader/MediaDocument.h | 13 +- .../webkit/WebCore/loader/PlaceholderDocument.cpp | 2 +- .../webkit/WebCore/loader/PlaceholderDocument.h | 2 +- .../webkit/WebCore/loader/PluginDocument.cpp | 10 +- .../webkit/WebCore/loader/PluginDocument.h | 4 +- .../webkit/WebCore/loader/ResourceLoader.cpp | 37 +- .../webkit/WebCore/loader/ResourceLoader.h | 8 +- src/3rdparty/webkit/WebCore/loader/TextDocument.h | 4 +- .../webkit/WebCore/loader/TextResourceDecoder.cpp | 26 +- .../webkit/WebCore/loader/ThreadableLoader.cpp | 12 +- .../webkit/WebCore/loader/ThreadableLoader.h | 32 +- .../webkit/WebCore/loader/UserStyleSheetLoader.cpp | 62 - .../webkit/WebCore/loader/UserStyleSheetLoader.h | 57 - .../WebCore/loader/WorkerThreadableLoader.cpp | 20 +- .../webkit/WebCore/loader/WorkerThreadableLoader.h | 12 +- .../WebCore/loader/appcache/ApplicationCache.cpp | 9 +- .../WebCore/loader/appcache/ApplicationCache.h | 3 + .../loader/appcache/ApplicationCacheGroup.cpp | 143 +- .../loader/appcache/ApplicationCacheGroup.h | 12 +- .../loader/appcache/ApplicationCacheHost.cpp | 382 + .../WebCore/loader/appcache/ApplicationCacheHost.h | 152 + .../loader/appcache/ApplicationCacheResource.h | 2 +- .../loader/appcache/ApplicationCacheStorage.cpp | 60 +- .../loader/appcache/ApplicationCacheStorage.h | 3 +- .../loader/appcache/DOMApplicationCache.cpp | 169 +- .../WebCore/loader/appcache/DOMApplicationCache.h | 91 +- .../WebCore/loader/appcache/ManifestParser.cpp | 21 +- .../WebCore/loader/appcache/ManifestParser.h | 1 + .../WebCore/loader/archive/ArchiveFactory.cpp | 2 +- .../WebCore/loader/archive/ArchiveResource.cpp | 6 +- .../WebCore/loader/archive/cf/LegacyWebArchive.cpp | 6 +- .../webkit/WebCore/loader/icon/IconDatabase.cpp | 2 +- src/3rdparty/webkit/WebCore/loader/loader.cpp | 12 +- .../webkit/WebCore/make-generated-sources.sh | 1 - .../webkit/WebCore/notifications/Notification.cpp | 234 + .../webkit/WebCore/notifications/Notification.h | 120 + .../webkit/WebCore/notifications/Notification.idl | 54 + .../WebCore/notifications/NotificationCenter.cpp | 60 + .../WebCore/notifications/NotificationCenter.h | 80 + .../WebCore/notifications/NotificationCenter.idl | 43 + .../WebCore/notifications/NotificationContents.h | 60 + .../WebCore/notifications/NotificationPresenter.h | 80 + src/3rdparty/webkit/WebCore/page/AbstractView.idl | 1 + src/3rdparty/webkit/WebCore/page/Chrome.cpp | 14 + src/3rdparty/webkit/WebCore/page/Chrome.h | 8 + src/3rdparty/webkit/WebCore/page/ChromeClient.h | 13 +- src/3rdparty/webkit/WebCore/page/Console.cpp | 67 +- src/3rdparty/webkit/WebCore/page/Console.h | 6 +- src/3rdparty/webkit/WebCore/page/Console.idl | 4 + .../webkit/WebCore/page/ContextMenuController.cpp | 405 +- src/3rdparty/webkit/WebCore/page/Coordinates.cpp | 38 - src/3rdparty/webkit/WebCore/page/Coordinates.h | 2 - src/3rdparty/webkit/WebCore/page/Coordinates.idl | 4 - src/3rdparty/webkit/WebCore/page/DOMSelection.cpp | 42 +- src/3rdparty/webkit/WebCore/page/DOMTimer.cpp | 14 +- src/3rdparty/webkit/WebCore/page/DOMTimer.h | 3 + src/3rdparty/webkit/WebCore/page/DOMWindow.cpp | 121 +- src/3rdparty/webkit/WebCore/page/DOMWindow.h | 26 +- src/3rdparty/webkit/WebCore/page/DOMWindow.idl | 40 +- .../webkit/WebCore/page/DragController.cpp | 20 +- src/3rdparty/webkit/WebCore/page/EventHandler.cpp | 73 +- src/3rdparty/webkit/WebCore/page/EventHandler.h | 38 + src/3rdparty/webkit/WebCore/page/EventSource.cpp | 372 + src/3rdparty/webkit/WebCore/page/EventSource.h | 146 + src/3rdparty/webkit/WebCore/page/EventSource.idl | 65 + .../webkit/WebCore/page/FocusController.cpp | 18 +- src/3rdparty/webkit/WebCore/page/Frame.cpp | 75 +- src/3rdparty/webkit/WebCore/page/Frame.h | 20 +- src/3rdparty/webkit/WebCore/page/FrameTree.cpp | 2 +- src/3rdparty/webkit/WebCore/page/FrameView.cpp | 230 +- src/3rdparty/webkit/WebCore/page/FrameView.h | 36 +- src/3rdparty/webkit/WebCore/page/Geolocation.cpp | 209 +- src/3rdparty/webkit/WebCore/page/Geolocation.h | 25 +- src/3rdparty/webkit/WebCore/page/Geoposition.cpp | 36 - src/3rdparty/webkit/WebCore/page/Geoposition.h | 2 - src/3rdparty/webkit/WebCore/page/Geoposition.idl | 4 - src/3rdparty/webkit/WebCore/page/Location.cpp | 4 +- src/3rdparty/webkit/WebCore/page/Navigator.cpp | 20 +- src/3rdparty/webkit/WebCore/page/Navigator.h | 5 + src/3rdparty/webkit/WebCore/page/Navigator.idl | 4 + .../webkit/WebCore/page/OriginAccessEntry.cpp | 81 + .../webkit/WebCore/page/OriginAccessEntry.h | 61 + src/3rdparty/webkit/WebCore/page/Page.cpp | 88 +- src/3rdparty/webkit/WebCore/page/Page.h | 36 + src/3rdparty/webkit/WebCore/page/PageGroup.cpp | 73 + src/3rdparty/webkit/WebCore/page/PageGroup.h | 21 +- .../webkit/WebCore/page/PositionCallback.h | 2 +- .../webkit/WebCore/page/PositionCallback.idl | 34 - src/3rdparty/webkit/WebCore/page/PositionError.h | 6 + .../webkit/WebCore/page/PositionErrorCallback.idl | 34 - src/3rdparty/webkit/WebCore/page/PositionOptions.h | 37 +- src/3rdparty/webkit/WebCore/page/PrintContext.cpp | 4 +- .../webkit/WebCore/page/SecurityOrigin.cpp | 80 +- src/3rdparty/webkit/WebCore/page/SecurityOrigin.h | 11 + src/3rdparty/webkit/WebCore/page/Settings.cpp | 15 +- src/3rdparty/webkit/WebCore/page/Settings.h | 8 + src/3rdparty/webkit/WebCore/page/UserScript.h | 65 + src/3rdparty/webkit/WebCore/page/UserScriptTypes.h | 43 + src/3rdparty/webkit/WebCore/page/UserStyleSheet.h | 61 + .../webkit/WebCore/page/UserStyleSheetTypes.h | 41 + src/3rdparty/webkit/WebCore/page/XSSAuditor.cpp | 63 +- src/3rdparty/webkit/WebCore/page/XSSAuditor.h | 30 +- .../WebCore/page/android/EventHandlerAndroid.cpp | 3 +- .../page/android/InspectorControllerAndroid.cpp | 1 - .../WebCore/page/animation/AnimationBase.cpp | 206 +- .../webkit/WebCore/page/animation/AnimationBase.h | 3 +- .../WebCore/page/animation/AnimationController.cpp | 10 +- .../WebCore/page/animation/CompositeAnimation.cpp | 4 +- .../WebCore/page/animation/KeyframeAnimation.cpp | 12 +- src/3rdparty/webkit/WebCore/page/qt/FrameQt.cpp | 18 - .../webkit/WebCore/page/win/EventHandlerWin.cpp | 5 + src/3rdparty/webkit/WebCore/page/win/FrameWin.cpp | 4 +- src/3rdparty/webkit/WebCore/page/win/PageWin.cpp | 24 + .../webkit/WebCore/platform/ContextMenu.cpp | 15 +- .../webkit/WebCore/platform/ContextMenuItem.h | 6 + src/3rdparty/webkit/WebCore/platform/Cookie.h | 63 + src/3rdparty/webkit/WebCore/platform/CookieJar.h | 8 +- .../webkit/WebCore/platform/CrossThreadCopier.h | 4 + src/3rdparty/webkit/WebCore/platform/Cursor.h | 5 + src/3rdparty/webkit/WebCore/platform/DragData.cpp | 5 +- src/3rdparty/webkit/WebCore/platform/DragData.h | 3 + src/3rdparty/webkit/WebCore/platform/DragImage.cpp | 6 +- src/3rdparty/webkit/WebCore/platform/DragImage.h | 4 + src/3rdparty/webkit/WebCore/platform/FileSystem.h | 4 + .../webkit/WebCore/platform/GeolocationService.cpp | 20 +- .../webkit/WebCore/platform/GeolocationService.h | 5 + src/3rdparty/webkit/WebCore/platform/HostWindow.h | 3 + src/3rdparty/webkit/WebCore/platform/KURL.cpp | 20 +- src/3rdparty/webkit/WebCore/platform/KURL.h | 26 +- .../webkit/WebCore/platform/KURLGoogle.cpp | 69 +- src/3rdparty/webkit/WebCore/platform/KURLHash.h | 2 +- .../webkit/WebCore/platform/LocalizedStrings.h | 8 +- .../webkit/WebCore/platform/MIMETypeRegistry.cpp | 4 +- src/3rdparty/webkit/WebCore/platform/Pasteboard.h | 9 +- .../WebCore/platform/PlatformKeyboardEvent.h | 10 +- .../WebCore/platform/PlatformMenuDescription.h | 4 + .../webkit/WebCore/platform/PlatformMouseEvent.h | 10 + .../webkit/WebCore/platform/PlatformWheelEvent.h | 11 + src/3rdparty/webkit/WebCore/platform/PopupMenu.h | 11 + .../webkit/WebCore/platform/PopupMenuClient.h | 3 +- src/3rdparty/webkit/WebCore/platform/ScrollTypes.h | 4 +- .../webkit/WebCore/platform/ScrollView.cpp | 102 +- src/3rdparty/webkit/WebCore/platform/ScrollView.h | 6 +- src/3rdparty/webkit/WebCore/platform/Scrollbar.cpp | 14 +- .../webkit/WebCore/platform/StaticConstructors.h | 6 + src/3rdparty/webkit/WebCore/platform/ThemeTypes.h | 5 +- .../webkit/WebCore/platform/ThreadTimers.cpp | 66 +- .../webkit/WebCore/platform/ThreadTimers.h | 4 - src/3rdparty/webkit/WebCore/platform/Timer.cpp | 10 +- src/3rdparty/webkit/WebCore/platform/TreeShared.h | 15 +- src/3rdparty/webkit/WebCore/platform/Widget.h | 5 + .../webkit/WebCore/platform/animation/Animation.h | 6 - .../webkit/WebCore/platform/graphics/BitmapImage.h | 21 +- .../webkit/WebCore/platform/graphics/Color.h | 9 + .../webkit/WebCore/platform/graphics/FloatPoint.h | 9 + .../WebCore/platform/graphics/FloatPoint3D.h | 10 + .../webkit/WebCore/platform/graphics/FloatRect.h | 9 + .../webkit/WebCore/platform/graphics/FontCache.h | 11 +- .../WebCore/platform/graphics/FontDescription.h | 11 +- .../WebCore/platform/graphics/FontFastPath.cpp | 22 +- .../WebCore/platform/graphics/GeneratedImage.cpp | 2 +- .../webkit/WebCore/platform/graphics/GlyphBuffer.h | 13 + .../platform/graphics/GlyphPageTreeNode.cpp | 6 +- .../webkit/WebCore/platform/graphics/Gradient.h | 12 +- .../WebCore/platform/graphics/GraphicsContext.cpp | 51 +- .../WebCore/platform/graphics/GraphicsContext.h | 71 +- .../WebCore/platform/graphics/GraphicsContext3D.h | 328 + .../WebCore/platform/graphics/GraphicsLayer.cpp | 325 +- .../WebCore/platform/graphics/GraphicsLayer.h | 315 +- .../platform/graphics/GraphicsLayerClient.h | 16 +- .../WebCore/platform/graphics/ImageBuffer.cpp | 73 + .../webkit/WebCore/platform/graphics/ImageBuffer.h | 32 +- .../WebCore/platform/graphics/ImageSource.cpp | 185 + .../webkit/WebCore/platform/graphics/ImageSource.h | 36 +- .../webkit/WebCore/platform/graphics/IntPoint.h | 5 + .../webkit/WebCore/platform/graphics/IntRect.h | 5 + .../webkit/WebCore/platform/graphics/IntSize.h | 15 + .../WebCore/platform/graphics/MediaPlayer.cpp | 17 +- .../webkit/WebCore/platform/graphics/MediaPlayer.h | 8 +- .../WebCore/platform/graphics/MediaPlayerPrivate.h | 3 +- .../webkit/WebCore/platform/graphics/Path.h | 8 + .../webkit/WebCore/platform/graphics/Pattern.h | 6 + .../WebCore/platform/graphics/SimpleFontData.cpp | 4 +- .../WebCore/platform/graphics/SimpleFontData.h | 18 +- .../WebCore/platform/graphics/filters/FEBlend.cpp | 78 +- .../WebCore/platform/graphics/filters/FEBlend.h | 2 +- .../platform/graphics/filters/FEColorMatrix.cpp | 126 +- .../graphics/filters/FEComponentTransfer.cpp | 92 +- .../platform/graphics/filters/FilterEffect.cpp | 9 +- .../platform/graphics/filters/FilterEffect.h | 1 + .../graphics/opentype/OpenTypeUtilities.cpp | 45 +- .../platform/graphics/opentype/OpenTypeUtilities.h | 5 + .../WebCore/platform/graphics/qt/FontCacheQt.cpp | 2 +- .../webkit/WebCore/platform/graphics/qt/FontQt.cpp | 5 +- .../platform/graphics/qt/GraphicsContextQt.cpp | 418 +- .../WebCore/platform/graphics/qt/ImageBufferQt.cpp | 100 +- .../platform/graphics/qt/ImageDecoderQt.cpp | 55 +- .../WebCore/platform/graphics/qt/ImageDecoderQt.h | 9 +- .../WebCore/platform/graphics/qt/ImageSourceQt.cpp | 111 +- .../graphics/qt/MediaPlayerPrivatePhonon.cpp | 19 +- .../graphics/qt/MediaPlayerPrivatePhonon.h | 3 +- .../webkit/WebCore/platform/graphics/qt/PathQt.cpp | 4 +- .../transforms/Matrix3DTransformOperation.cpp | 2 +- .../transforms/MatrixTransformOperation.cpp | 2 +- .../graphics/transforms/TransformOperations.h | 3 + .../graphics/transforms/TransformationMatrix.cpp | 11 + .../graphics/transforms/TransformationMatrix.h | 5 +- .../platform/image-decoders/ImageDecoder.cpp | 248 + .../WebCore/platform/image-decoders/ImageDecoder.h | 64 +- .../image-decoders/cairo/ImageDecoderCairo.cpp | 83 - .../platform/image-decoders/wx/ImageDecoderWx.cpp | 105 +- .../webkit/WebCore/platform/mac/ClipboardMac.h | 2 + .../webkit/WebCore/platform/mac/ClipboardMac.mm | 77 +- .../WebCore/platform/mac/ContextMenuItemMac.mm | 6 +- .../webkit/WebCore/platform/mac/ContextMenuMac.mm | 6 +- .../webkit/WebCore/platform/mac/CookieJar.mm | 49 + .../webkit/WebCore/platform/mac/DragDataMac.mm | 4 +- .../webkit/WebCore/platform/mac/DragImageMac.mm | 5 +- .../WebCore/platform/mac/GeolocationServiceMac.h | 4 +- .../WebCore/platform/mac/GeolocationServiceMac.mm | 4 +- .../WebCore/platform/mac/LocalizedStringsMac.mm | 37 +- .../webkit/WebCore/platform/mac/PasteboardMac.mm | 2 +- .../webkit/WebCore/platform/mac/PopupMenuMac.mm | 5 +- .../webkit/WebCore/platform/mac/ScrollViewMac.mm | 22 +- .../WebCore/platform/mac/ScrollbarThemeMac.mm | 2 +- .../WebCore/platform/mac/WebCoreNSStringExtras.mm | 41 +- .../platform/mock/GeolocationServiceMock.cpp | 136 + .../WebCore/platform/mock/GeolocationServiceMock.h | 80 + .../webkit/WebCore/platform/network/Credential.cpp | 5 + .../webkit/WebCore/platform/network/Credential.h | 2 + .../WebCore/platform/network/CredentialStorage.cpp | 120 + .../WebCore/platform/network/CredentialStorage.h | 44 + .../WebCore/platform/network/HTTPParsers.cpp | 7 + .../WebCore/platform/network/ProtectionSpace.cpp | 5 + .../WebCore/platform/network/ProtectionSpace.h | 12 +- .../WebCore/platform/network/ProtectionSpaceHash.h | 70 + .../WebCore/platform/network/ResourceHandle.h | 2 +- .../platform/network/ResourceHandleClient.h | 2 +- .../platform/network/ResourceHandleInternal.h | 2 + .../platform/network/ResourceRequestBase.cpp | 19 +- .../WebCore/platform/network/ResourceRequestBase.h | 12 +- .../platform/network/SocketStreamErrorBase.cpp | 48 + .../platform/network/SocketStreamErrorBase.h | 72 + .../platform/network/SocketStreamHandleBase.cpp | 106 + .../platform/network/SocketStreamHandleBase.h | 72 + .../platform/network/SocketStreamHandleClient.h | 62 + .../platform/network/qt/DnsPrefetchHelper.cpp | 34 + .../platform/network/qt/DnsPrefetchHelper.h | 75 + .../platform/network/qt/QNetworkReplyHandler.cpp | 14 +- .../platform/network/qt/QNetworkReplyHandler.h | 1 + .../platform/network/qt/ResourceHandleQt.cpp | 36 +- .../WebCore/platform/network/qt/ResourceRequest.h | 2 +- .../webkit/WebCore/platform/qt/ClipboardQt.cpp | 2 +- .../webkit/WebCore/platform/qt/CookieJarQt.cpp | 13 + .../webkit/WebCore/platform/qt/DragDataQt.cpp | 2 +- .../webkit/WebCore/platform/qt/FileSystemQt.cpp | 6 +- .../webkit/WebCore/platform/qt/Localizations.cpp | 106 + .../webkit/WebCore/platform/qt/PasteboardQt.cpp | 2 +- .../platform/qt/PlatformKeyboardEventQt.cpp | 42 +- .../WebCore/platform/qt/PlatformMouseEventQt.cpp | 37 + .../webkit/WebCore/platform/qt/PopupMenuQt.cpp | 33 +- .../webkit/WebCore/platform/qt/QWebPopup.cpp | 2 +- .../webkit/WebCore/platform/qt/RenderThemeQt.cpp | 98 +- .../WebCore/platform/qt/TemporaryLinkStubs.cpp | 5 - .../webkit/WebCore/platform/qt/WheelEventQt.cpp | 55 +- .../webkit/WebCore/platform/qt/WidgetQt.cpp | 11 +- .../WebCore/platform/sql/SQLiteTransaction.cpp | 10 +- .../webkit/WebCore/platform/text/CString.cpp | 16 +- .../webkit/WebCore/platform/text/CString.h | 7 +- .../webkit/WebCore/platform/text/PlatformString.h | 11 + .../WebCore/platform/text/RegularExpression.cpp | 2 +- .../webkit/WebCore/platform/text/String.cpp | 24 + .../webkit/WebCore/platform/text/StringImpl.cpp | 15 +- .../webkit/WebCore/platform/text/StringImpl.h | 6 +- .../webkit/WebCore/platform/text/TextCodec.h | 2 +- .../webkit/WebCore/platform/text/TextEncoding.cpp | 5 + .../WebCore/platform/text/TextEncodingRegistry.cpp | 14 + .../webkit/WebCore/platform/text/UnicodeRange.h | 4 + .../webkit/WebCore/platform/text/cf/StringCF.cpp | 2 +- .../WebCore/platform/text/mac/TextCodecMac.cpp | 17 +- .../webkit/WebCore/plugins/PluginDatabase.cpp | 67 +- .../webkit/WebCore/plugins/PluginDatabase.h | 22 +- .../webkit/WebCore/plugins/PluginDatabaseClient.h | 42 + .../webkit/WebCore/plugins/PluginPackage.cpp | 20 +- .../webkit/WebCore/plugins/PluginPackage.h | 8 +- .../webkit/WebCore/plugins/PluginQuirkSet.h | 2 +- .../webkit/WebCore/plugins/PluginStream.cpp | 10 +- src/3rdparty/webkit/WebCore/plugins/PluginView.cpp | 223 +- src/3rdparty/webkit/WebCore/plugins/PluginView.h | 20 +- .../webkit/WebCore/plugins/PluginViewNone.cpp | 25 +- .../WebCore/plugins/mac/PluginPackageMac.cpp | 3 - .../webkit/WebCore/plugins/mac/PluginViewMac.cpp | 103 +- src/3rdparty/webkit/WebCore/plugins/npapi.cpp | 2 - .../webkit/WebCore/plugins/qt/PluginPackageQt.cpp | 2 +- .../webkit/WebCore/plugins/qt/PluginViewQt.cpp | 187 +- .../WebCore/plugins/win/PluginPackageWin.cpp | 6 +- .../webkit/WebCore/plugins/win/PluginViewWin.cpp | 135 +- .../webkit/WebCore/rendering/AutoTableLayout.cpp | 8 +- .../webkit/WebCore/rendering/CounterNode.cpp | 6 +- .../webkit/WebCore/rendering/FixedTableLayout.cpp | 6 +- .../webkit/WebCore/rendering/HitTestResult.cpp | 2 +- .../webkit/WebCore/rendering/InlineBox.cpp | 7 - src/3rdparty/webkit/WebCore/rendering/InlineBox.h | 7 +- .../webkit/WebCore/rendering/InlineFlowBox.cpp | 277 +- .../webkit/WebCore/rendering/InlineFlowBox.h | 67 +- .../webkit/WebCore/rendering/InlineTextBox.cpp | 8 +- .../WebCore/rendering/MediaControlElements.cpp | 241 +- .../WebCore/rendering/MediaControlElements.h | 55 +- .../webkit/WebCore/rendering/RenderApplet.h | 9 + .../webkit/WebCore/rendering/RenderBlock.cpp | 565 +- .../webkit/WebCore/rendering/RenderBlock.h | 285 +- .../WebCore/rendering/RenderBlockLineLayout.cpp | 56 +- .../webkit/WebCore/rendering/RenderBox.cpp | 177 +- src/3rdparty/webkit/WebCore/rendering/RenderBox.h | 57 +- .../WebCore/rendering/RenderBoxModelObject.cpp | 213 +- .../WebCore/rendering/RenderBoxModelObject.h | 16 +- .../webkit/WebCore/rendering/RenderButton.cpp | 4 +- .../webkit/WebCore/rendering/RenderButton.h | 12 +- .../webkit/WebCore/rendering/RenderCounter.cpp | 4 +- .../webkit/WebCore/rendering/RenderCounter.h | 21 +- .../webkit/WebCore/rendering/RenderFieldset.cpp | 3 +- .../webkit/WebCore/rendering/RenderFieldset.h | 23 +- .../WebCore/rendering/RenderFileUploadControl.h | 28 +- .../webkit/WebCore/rendering/RenderFlexibleBox.cpp | 173 +- .../webkit/WebCore/rendering/RenderFrame.h | 9 + .../webkit/WebCore/rendering/RenderFrameSet.cpp | 11 +- .../webkit/WebCore/rendering/RenderFrameSet.h | 35 +- .../webkit/WebCore/rendering/RenderHTMLCanvas.cpp | 20 +- .../webkit/WebCore/rendering/RenderHTMLCanvas.h | 21 +- .../webkit/WebCore/rendering/RenderImage.cpp | 18 +- .../webkit/WebCore/rendering/RenderImage.h | 60 +- .../webkit/WebCore/rendering/RenderInline.cpp | 62 +- .../webkit/WebCore/rendering/RenderInline.h | 87 +- .../webkit/WebCore/rendering/RenderLayer.cpp | 186 +- .../webkit/WebCore/rendering/RenderLayer.h | 6 +- .../WebCore/rendering/RenderLayerBacking.cpp | 290 +- .../webkit/WebCore/rendering/RenderLayerBacking.h | 40 +- .../WebCore/rendering/RenderLayerCompositor.cpp | 77 +- .../WebCore/rendering/RenderLayerCompositor.h | 8 +- .../webkit/WebCore/rendering/RenderLineBoxList.cpp | 22 +- .../webkit/WebCore/rendering/RenderListBox.h | 40 +- .../webkit/WebCore/rendering/RenderListItem.cpp | 59 +- .../webkit/WebCore/rendering/RenderListItem.h | 36 +- .../webkit/WebCore/rendering/RenderListMarker.h | 32 +- .../webkit/WebCore/rendering/RenderMarquee.cpp | 7 +- .../webkit/WebCore/rendering/RenderMedia.cpp | 106 +- .../webkit/WebCore/rendering/RenderMedia.h | 43 +- .../WebCore/rendering/RenderMediaControls.cpp | 16 +- .../webkit/WebCore/rendering/RenderMenuList.cpp | 13 +- .../webkit/WebCore/rendering/RenderMenuList.h | 32 +- .../webkit/WebCore/rendering/RenderObject.cpp | 75 +- .../webkit/WebCore/rendering/RenderObject.h | 22 +- .../WebCore/rendering/RenderObjectChildList.cpp | 9 +- .../webkit/WebCore/rendering/RenderOverflow.h | 153 + src/3rdparty/webkit/WebCore/rendering/RenderPart.h | 9 + .../webkit/WebCore/rendering/RenderPartObject.cpp | 77 +- .../webkit/WebCore/rendering/RenderPartObject.h | 11 +- src/3rdparty/webkit/WebCore/rendering/RenderPath.h | 19 +- .../webkit/WebCore/rendering/RenderReplaced.cpp | 125 +- .../webkit/WebCore/rendering/RenderReplaced.h | 47 +- .../webkit/WebCore/rendering/RenderSVGBlock.h | 2 + .../WebCore/rendering/RenderSVGContainer.cpp | 4 - .../webkit/WebCore/rendering/RenderSVGContainer.h | 32 +- .../WebCore/rendering/RenderSVGHiddenContainer.cpp | 4 - .../WebCore/rendering/RenderSVGHiddenContainer.h | 3 +- .../webkit/WebCore/rendering/RenderSVGImage.cpp | 4 - .../webkit/WebCore/rendering/RenderSVGImage.h | 9 +- .../webkit/WebCore/rendering/RenderSVGInlineText.h | 3 +- .../webkit/WebCore/rendering/RenderSVGRoot.cpp | 4 - .../webkit/WebCore/rendering/RenderSVGRoot.h | 24 +- .../webkit/WebCore/rendering/RenderSVGText.h | 2 +- .../webkit/WebCore/rendering/RenderSVGTextPath.h | 13 +- .../rendering/RenderSVGViewportContainer.cpp | 25 +- .../WebCore/rendering/RenderSVGViewportContainer.h | 25 +- .../webkit/WebCore/rendering/RenderScrollbar.cpp | 22 +- .../webkit/WebCore/rendering/RenderScrollbar.h | 39 +- .../WebCore/rendering/RenderScrollbarPart.cpp | 16 +- .../WebCore/rendering/RenderScrollbarTheme.cpp | 22 +- .../webkit/WebCore/rendering/RenderSlider.cpp | 72 +- .../webkit/WebCore/rendering/RenderSlider.h | 10 + .../webkit/WebCore/rendering/RenderTable.cpp | 116 +- .../webkit/WebCore/rendering/RenderTable.h | 76 +- .../webkit/WebCore/rendering/RenderTableCell.cpp | 8 +- .../webkit/WebCore/rendering/RenderTableCell.h | 56 +- .../webkit/WebCore/rendering/RenderTableCol.cpp | 19 +- .../webkit/WebCore/rendering/RenderTableCol.h | 39 +- .../webkit/WebCore/rendering/RenderTableRow.cpp | 11 +- .../webkit/WebCore/rendering/RenderTableRow.h | 29 +- .../WebCore/rendering/RenderTableSection.cpp | 48 +- .../webkit/WebCore/rendering/RenderTableSection.h | 76 +- .../webkit/WebCore/rendering/RenderText.cpp | 14 +- src/3rdparty/webkit/WebCore/rendering/RenderText.h | 12 +- .../webkit/WebCore/rendering/RenderTextControl.cpp | 33 +- .../webkit/WebCore/rendering/RenderTextControl.h | 49 +- .../rendering/RenderTextControlMultiLine.cpp | 31 +- .../WebCore/rendering/RenderTextControlMultiLine.h | 16 +- .../rendering/RenderTextControlSingleLine.cpp | 44 +- .../rendering/RenderTextControlSingleLine.h | 34 +- .../WebCore/rendering/RenderTextFragment.cpp | 6 +- .../webkit/WebCore/rendering/RenderTheme.cpp | 9 + .../webkit/WebCore/rendering/RenderTheme.h | 3 + .../WebCore/rendering/RenderThemeChromiumLinux.cpp | 26 + .../WebCore/rendering/RenderThemeChromiumLinux.h | 7 + .../WebCore/rendering/RenderThemeChromiumMac.h | 3 +- .../WebCore/rendering/RenderThemeChromiumMac.mm | 52 +- .../WebCore/rendering/RenderThemeChromiumSkia.cpp | 315 +- .../WebCore/rendering/RenderThemeChromiumSkia.h | 9 + .../WebCore/rendering/RenderThemeChromiumWin.cpp | 46 +- .../webkit/WebCore/rendering/RenderThemeSafari.cpp | 46 +- .../webkit/WebCore/rendering/RenderThemeWin.cpp | 2 +- .../webkit/WebCore/rendering/RenderTreeAsText.cpp | 24 +- .../webkit/WebCore/rendering/RenderVideo.h | 42 +- .../webkit/WebCore/rendering/RenderView.cpp | 14 +- src/3rdparty/webkit/WebCore/rendering/RenderView.h | 12 +- .../webkit/WebCore/rendering/RenderWidget.cpp | 35 +- .../webkit/WebCore/rendering/RenderWidget.h | 16 + .../WebCore/rendering/RenderWidgetProtector.h | 53 + .../webkit/WebCore/rendering/RootInlineBox.cpp | 79 +- .../webkit/WebCore/rendering/RootInlineBox.h | 101 +- .../WebCore/rendering/SVGCharacterLayoutInfo.cpp | 2 +- .../webkit/WebCore/rendering/SVGRenderSupport.cpp | 4 +- .../WebCore/rendering/SVGRenderTreeAsText.cpp | 45 +- .../webkit/WebCore/rendering/SVGRenderTreeAsText.h | 24 +- .../webkit/WebCore/rendering/SVGRootInlineBox.cpp | 11 +- .../WebCore/rendering/TextControlInnerElements.cpp | 6 +- .../webkit/WebCore/rendering/style/FillLayer.cpp | 57 +- .../webkit/WebCore/rendering/style/FillLayer.h | 71 +- .../webkit/WebCore/rendering/style/RenderStyle.cpp | 58 +- .../webkit/WebCore/rendering/style/RenderStyle.h | 22 +- .../WebCore/rendering/style/RenderStyleConstants.h | 28 +- .../WebCore/storage/ChangeVersionWrapper.cpp | 12 +- src/3rdparty/webkit/WebCore/storage/Database.cpp | 65 +- src/3rdparty/webkit/WebCore/storage/Database.h | 24 +- src/3rdparty/webkit/WebCore/storage/Database.idl | 1 + .../webkit/WebCore/storage/DatabaseAuthorizer.cpp | 67 + .../webkit/WebCore/storage/DatabaseAuthorizer.h | 10 +- .../webkit/WebCore/storage/DatabaseDetails.h | 2 +- .../webkit/WebCore/storage/DatabaseThread.cpp | 11 +- .../webkit/WebCore/storage/DatabaseThread.h | 9 + .../webkit/WebCore/storage/DatabaseTracker.cpp | 78 +- .../webkit/WebCore/storage/DatabaseTracker.h | 16 +- .../webkit/WebCore/storage/LocalStorageTask.cpp | 3 +- .../webkit/WebCore/storage/LocalStorageTask.h | 2 +- .../webkit/WebCore/storage/LocalStorageThread.cpp | 11 +- .../webkit/WebCore/storage/LocalStorageThread.h | 4 +- .../webkit/WebCore/storage/OriginQuotaManager.cpp | 17 +- .../webkit/WebCore/storage/OriginUsageRecord.cpp | 10 +- .../webkit/WebCore/storage/OriginUsageRecord.h | 2 +- src/3rdparty/webkit/WebCore/storage/SQLError.h | 2 +- .../webkit/WebCore/storage/SQLResultSetRowList.h | 4 +- .../webkit/WebCore/storage/SQLStatement.cpp | 24 +- src/3rdparty/webkit/WebCore/storage/SQLStatement.h | 12 +- .../webkit/WebCore/storage/SQLStatementCallback.h | 2 +- .../WebCore/storage/SQLStatementErrorCallback.h | 2 +- .../webkit/WebCore/storage/SQLTransaction.cpp | 166 +- .../webkit/WebCore/storage/SQLTransaction.h | 34 +- .../WebCore/storage/SQLTransactionCallback.h | 2 +- .../WebCore/storage/SQLTransactionClient.cpp | 76 + .../webkit/WebCore/storage/SQLTransactionClient.h | 48 + .../WebCore/storage/SQLTransactionCoordinator.cpp | 105 + .../WebCore/storage/SQLTransactionCoordinator.h | 56 + .../WebCore/storage/SQLTransactionErrorCallback.h | 8 +- src/3rdparty/webkit/WebCore/storage/Storage.cpp | 10 +- src/3rdparty/webkit/WebCore/storage/Storage.h | 7 +- src/3rdparty/webkit/WebCore/storage/Storage.idl | 3 +- .../webkit/WebCore/storage/StorageArea.cpp | 0 src/3rdparty/webkit/WebCore/storage/StorageArea.h | 4 +- .../webkit/WebCore/storage/StorageAreaImpl.cpp | 83 +- .../webkit/WebCore/storage/StorageAreaImpl.h | 10 +- .../webkit/WebCore/storage/StorageAreaSync.cpp | 23 +- .../webkit/WebCore/storage/StorageAreaSync.h | 10 +- .../webkit/WebCore/storage/StorageEvent.cpp | 3 +- src/3rdparty/webkit/WebCore/storage/StorageEvent.h | 8 +- src/3rdparty/webkit/WebCore/storage/StorageMap.cpp | 25 +- src/3rdparty/webkit/WebCore/storage/StorageMap.h | 4 +- .../webkit/WebCore/storage/StorageNamespace.h | 1 + .../WebCore/storage/StorageNamespaceImpl.cpp | 33 +- .../webkit/WebCore/storage/StorageNamespaceImpl.h | 3 +- .../webkit/WebCore/storage/StorageSyncManager.cpp | 3 +- .../webkit/WebCore/storage/StorageSyncManager.h | 2 +- .../webkit/WebCore/svg/ElementTimeControl.h | 9 +- .../webkit/WebCore/svg/ElementTimeControl.idl | 13 +- src/3rdparty/webkit/WebCore/svg/SVGAElement.cpp | 11 +- src/3rdparty/webkit/WebCore/svg/SVGAllInOne.cpp | 1 - .../webkit/WebCore/svg/SVGAnimationElement.cpp | 18 +- .../webkit/WebCore/svg/SVGAnimationElement.h | 9 +- src/3rdparty/webkit/WebCore/svg/SVGColor.cpp | 4 +- src/3rdparty/webkit/WebCore/svg/SVGColor.h | 4 +- .../svg/SVGComponentTransferFunctionElement.h | 1 + .../webkit/WebCore/svg/SVGDefinitionSrcElement.cpp | 45 - .../webkit/WebCore/svg/SVGDefinitionSrcElement.h | 39 - .../webkit/WebCore/svg/SVGDefinitionSrcElement.idl | 31 - src/3rdparty/webkit/WebCore/svg/SVGDocument.h | 10 +- src/3rdparty/webkit/WebCore/svg/SVGElement.cpp | 11 +- src/3rdparty/webkit/WebCore/svg/SVGElement.h | 66 +- .../webkit/WebCore/svg/SVGElementInstance.cpp | 7 +- .../webkit/WebCore/svg/SVGElementInstance.h | 22 +- .../WebCore/svg/SVGExternalResourcesRequired.h | 1 + .../webkit/WebCore/svg/SVGFELightElement.h | 1 + .../webkit/WebCore/svg/SVGFEMergeNodeElement.h | 1 + .../svg/SVGFilterPrimitiveStandardAttributes.h | 1 + .../webkit/WebCore/svg/SVGFontFaceElement.cpp | 14 +- .../webkit/WebCore/svg/SVGImageElement.cpp | 4 +- .../webkit/WebCore/svg/SVGMarkerElement.cpp | 2 +- src/3rdparty/webkit/WebCore/svg/SVGMaskElement.cpp | 2 +- src/3rdparty/webkit/WebCore/svg/SVGNumberList.cpp | 1 + .../webkit/WebCore/svg/SVGParserUtilities.cpp | 4 +- .../webkit/WebCore/svg/SVGPatternElement.cpp | 2 +- src/3rdparty/webkit/WebCore/svg/SVGSVGElement.cpp | 5 +- src/3rdparty/webkit/WebCore/svg/SVGSVGElement.h | 4 +- src/3rdparty/webkit/WebCore/svg/SVGSVGElement.idl | 3 +- src/3rdparty/webkit/WebCore/svg/SVGStopElement.h | 5 +- .../webkit/WebCore/svg/SVGStyleElement.cpp | 34 +- src/3rdparty/webkit/WebCore/svg/SVGStyleElement.h | 9 +- .../webkit/WebCore/svg/SVGStyleElement.idl | 5 +- .../webkit/WebCore/svg/SVGTextContentElement.cpp | 2 +- src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp | 14 +- .../WebCore/svg/animation/SVGSMILElement.cpp | 35 +- .../webkit/WebCore/svg/graphics/SVGImage.cpp | 12 +- .../svg/graphics/SVGPaintServerGradient.cpp | 2 +- .../WebCore/svg/graphics/SVGPaintServerPattern.cpp | 2 +- .../WebCore/svg/graphics/SVGResourceFilter.cpp | 14 +- .../WebCore/svg/graphics/SVGResourceMasker.cpp | 8 +- .../WebCore/svg/graphics/filters/SVGFETile.cpp | 2 +- src/3rdparty/webkit/WebCore/svg/svgtags.in | 163 +- .../webkit/WebCore/websockets/WebSocket.cpp | 292 + src/3rdparty/webkit/WebCore/websockets/WebSocket.h | 134 + .../webkit/WebCore/websockets/WebSocket.idl | 67 + .../webkit/WebCore/websockets/WebSocketChannel.cpp | 246 + .../webkit/WebCore/websockets/WebSocketChannel.h | 86 + .../WebCore/websockets/WebSocketChannelClient.h | 53 + .../WebCore/websockets/WebSocketHandshake.cpp | 462 + .../webkit/WebCore/websockets/WebSocketHandshake.h | 113 + src/3rdparty/webkit/WebCore/wml/WMLAElement.cpp | 12 +- src/3rdparty/webkit/WebCore/wml/WMLAElement.h | 1 - .../webkit/WebCore/wml/WMLAccessElement.cpp | 15 +- src/3rdparty/webkit/WebCore/wml/WMLAccessElement.h | 4 + .../webkit/WebCore/wml/WMLAnchorElement.cpp | 14 +- src/3rdparty/webkit/WebCore/wml/WMLAnchorElement.h | 3 +- src/3rdparty/webkit/WebCore/wml/WMLCardElement.cpp | 7 +- src/3rdparty/webkit/WebCore/wml/WMLDoElement.cpp | 37 +- src/3rdparty/webkit/WebCore/wml/WMLDoElement.h | 4 +- src/3rdparty/webkit/WebCore/wml/WMLDocument.cpp | 59 +- src/3rdparty/webkit/WebCore/wml/WMLDocument.h | 9 +- src/3rdparty/webkit/WebCore/wml/WMLElement.cpp | 9 +- src/3rdparty/webkit/WebCore/wml/WMLElement.h | 4 +- .../webkit/WebCore/wml/WMLErrorHandling.cpp | 3 +- .../webkit/WebCore/wml/WMLEventHandlingElement.cpp | 12 + .../webkit/WebCore/wml/WMLEventHandlingElement.h | 1 + .../webkit/WebCore/wml/WMLFieldSetElement.cpp | 2 +- .../webkit/WebCore/wml/WMLFormControlElement.cpp | 15 +- .../webkit/WebCore/wml/WMLFormControlElement.h | 1 + src/3rdparty/webkit/WebCore/wml/WMLGoElement.cpp | 28 +- src/3rdparty/webkit/WebCore/wml/WMLGoElement.h | 3 +- .../webkit/WebCore/wml/WMLInputElement.cpp | 14 +- src/3rdparty/webkit/WebCore/wml/WMLInputElement.h | 3 +- .../WebCore/wml/WMLIntrinsicEventHandler.cpp | 8 +- .../webkit/WebCore/wml/WMLIntrinsicEventHandler.h | 1 + src/3rdparty/webkit/WebCore/wml/WMLNoopElement.cpp | 2 - .../webkit/WebCore/wml/WMLOnEventElement.cpp | 25 +- .../webkit/WebCore/wml/WMLOnEventElement.h | 1 + .../webkit/WebCore/wml/WMLOptionElement.cpp | 6 +- src/3rdparty/webkit/WebCore/wml/WMLPageState.cpp | 227 +- src/3rdparty/webkit/WebCore/wml/WMLPageState.h | 29 +- .../webkit/WebCore/wml/WMLPostfieldElement.cpp | 13 +- .../webkit/WebCore/wml/WMLPostfieldElement.h | 1 + src/3rdparty/webkit/WebCore/wml/WMLPrevElement.cpp | 9 +- src/3rdparty/webkit/WebCore/wml/WMLPrevElement.h | 2 +- .../webkit/WebCore/wml/WMLRefreshElement.cpp | 11 +- .../webkit/WebCore/wml/WMLRefreshElement.h | 2 +- .../webkit/WebCore/wml/WMLSelectElement.cpp | 6 +- src/3rdparty/webkit/WebCore/wml/WMLSelectElement.h | 3 + .../webkit/WebCore/wml/WMLSetvarElement.cpp | 13 +- src/3rdparty/webkit/WebCore/wml/WMLSetvarElement.h | 1 + .../webkit/WebCore/wml/WMLTableElement.cpp | 4 +- src/3rdparty/webkit/WebCore/wml/WMLTagNames.in | 50 +- src/3rdparty/webkit/WebCore/wml/WMLTaskElement.cpp | 46 +- src/3rdparty/webkit/WebCore/wml/WMLTaskElement.h | 8 +- .../webkit/WebCore/wml/WMLTimerElement.cpp | 13 +- src/3rdparty/webkit/WebCore/wml/WMLTimerElement.h | 1 + src/3rdparty/webkit/WebCore/wml/WMLVariables.cpp | 4 +- .../webkit/WebCore/workers/AbstractWorker.cpp | 29 +- .../webkit/WebCore/workers/AbstractWorker.h | 6 +- .../WebCore/workers/DedicatedWorkerContext.cpp | 47 +- .../WebCore/workers/DedicatedWorkerContext.h | 23 +- .../WebCore/workers/DedicatedWorkerContext.idl | 6 + .../WebCore/workers/DedicatedWorkerThread.cpp | 71 + .../webkit/WebCore/workers/DedicatedWorkerThread.h | 60 + .../workers/DefaultSharedWorkerRepository.cpp | 387 + .../workers/DefaultSharedWorkerRepository.h | 90 + .../webkit/WebCore/workers/SharedWorker.cpp | 16 +- src/3rdparty/webkit/WebCore/workers/SharedWorker.h | 3 + .../webkit/WebCore/workers/SharedWorkerContext.cpp | 83 + .../webkit/WebCore/workers/SharedWorkerContext.h | 74 + .../webkit/WebCore/workers/SharedWorkerContext.idl | 47 + .../WebCore/workers/SharedWorkerRepository.h | 67 + .../webkit/WebCore/workers/SharedWorkerThread.cpp | 63 + .../webkit/WebCore/workers/SharedWorkerThread.h | 56 + src/3rdparty/webkit/WebCore/workers/Worker.cpp | 30 +- src/3rdparty/webkit/WebCore/workers/Worker.h | 11 +- src/3rdparty/webkit/WebCore/workers/Worker.idl | 7 + .../webkit/WebCore/workers/WorkerContext.cpp | 55 +- .../webkit/WebCore/workers/WorkerContext.h | 24 +- .../webkit/WebCore/workers/WorkerContext.idl | 7 + .../webkit/WebCore/workers/WorkerContextProxy.h | 4 +- .../webkit/WebCore/workers/WorkerLocation.cpp | 2 +- .../WebCore/workers/WorkerMessagingProxy.cpp | 88 +- .../webkit/WebCore/workers/WorkerMessagingProxy.h | 12 +- .../webkit/WebCore/workers/WorkerObjectProxy.h | 19 +- .../webkit/WebCore/workers/WorkerReportingProxy.h | 61 + .../webkit/WebCore/workers/WorkerRunLoop.cpp | 4 + .../webkit/WebCore/workers/WorkerScriptLoader.cpp | 47 +- .../webkit/WebCore/workers/WorkerScriptLoader.h | 16 +- .../webkit/WebCore/workers/WorkerThread.cpp | 44 +- src/3rdparty/webkit/WebCore/workers/WorkerThread.h | 39 +- src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp | 364 +- src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.h | 20 +- .../webkit/WebCore/xml/XMLHttpRequestUpload.cpp | 4 +- src/3rdparty/webkit/WebCore/xml/XPathNamespace.cpp | 10 +- src/3rdparty/webkit/WebCore/xml/XPathNamespace.h | 13 +- src/3rdparty/webkit/WebCore/xml/XSLImportRule.cpp | 2 +- src/3rdparty/webkit/WebCore/xml/XSLTProcessor.cpp | 6 +- src/3rdparty/webkit/WebKit.pri | 19 +- src/3rdparty/webkit/WebKit/ChangeLog | 321 + .../webkit/WebKit/StringsNotToBeLocalized.txt | 65 +- .../WebKit/mac/Configurations/Version.xcconfig | 57 + .../webkit/WebKit/mac/Workers/WebWorkersPrivate.h | 37 + .../webkit/WebKit/mac/Workers/WebWorkersPrivate.mm | 46 + src/3rdparty/webkit/WebKit/qt/Api/headers.pri | 6 +- src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp | 24 +- src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h | 3 + src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp | 13 +- src/3rdparty/webkit/WebKit/qt/Api/qwebframe_p.h | 5 +- .../webkit/WebKit/qt/Api/qwebgraphicsitem.cpp | 764 + .../webkit/WebKit/qt/Api/qwebgraphicsitem.h | 146 + src/3rdparty/webkit/WebKit/qt/Api/qwebhistory.cpp | 30 +- src/3rdparty/webkit/WebKit/qt/Api/qwebhistory_p.h | 28 +- .../webkit/WebKit/qt/Api/qwebinspector.cpp | 187 + src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.h | 58 + .../webkit/WebKit/qt/Api/qwebinspector_p.h | 44 + .../webkit/WebKit/qt/Api/qwebkitversion.cpp | 58 + src/3rdparty/webkit/WebKit/qt/Api/qwebkitversion.h | 32 + src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp | 331 +- src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h | 7 +- src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h | 49 +- .../webkit/WebKit/qt/Api/qwebplugindatabase.cpp | 376 + .../webkit/WebKit/qt/Api/qwebplugindatabase.h | 98 + .../webkit/WebKit/qt/Api/qwebpluginfactory.cpp | 7 + .../webkit/WebKit/qt/Api/qwebpluginfactory.h | 4 +- .../webkit/WebKit/qt/Api/qwebsecurityorigin.cpp | 46 + .../webkit/WebKit/qt/Api/qwebsecurityorigin.h | 5 + src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp | 178 +- src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h | 22 +- src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp | 66 +- src/3rdparty/webkit/WebKit/qt/Api/qwebview.h | 7 + src/3rdparty/webkit/WebKit/qt/ChangeLog | 1175 + .../webkit/WebKit/qt/QGVLauncher/QGVLauncher.pro | 13 + src/3rdparty/webkit/WebKit/qt/QGVLauncher/main.cpp | 317 + .../WebKit/qt/WebCoreSupport/ChromeClientQt.cpp | 11 +- .../WebKit/qt/WebCoreSupport/ChromeClientQt.h | 1 + .../WebKit/qt/WebCoreSupport/EditorClientQt.cpp | 19 +- .../qt/WebCoreSupport/FrameLoaderClientQt.cpp | 34 +- .../WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h | 5 +- .../WebKit/qt/WebCoreSupport/InspectorClientQt.cpp | 113 +- .../WebKit/qt/WebCoreSupport/InspectorClientQt.h | 7 +- .../qtwebkit_qwebinspector_snippet.cpp | 17 + .../WebKit/qt/tests/qwebelement/qwebelement.pro | 2 + .../webkit/WebKit/qt/tests/qwebframe/qwebframe.pro | 2 + .../WebKit/qt/tests/qwebframe/tst_qwebframe.cpp | 163 +- .../WebKit/qt/tests/qwebhistory/qwebhistory.pro | 2 + .../qt/tests/qwebhistory/tst_qwebhistory.cpp | 67 + .../qwebhistoryinterface/qwebhistoryinterface.pro | 2 + .../webkit/WebKit/qt/tests/qwebpage/qwebpage.pro | 2 + .../WebKit/qt/tests/qwebpage/tst_qwebpage.cpp | 90 +- .../qwebplugindatabase/qwebplugindatabase.pro | 6 + .../qwebplugindatabase/tst_qwebplugindatabase.cpp | 437 + .../webkit/WebKit/qt/tests/qwebview/qwebview.pro | 2 + .../WebKit/qt/tests/qwebview/tst_qwebview.cpp | 7 + src/3rdparty/webkit/WebKit/qt/tests/tests.pro | 4 +- .../WebKit/scripts/generate-webkitversion.pl | 136 + 2270 files changed, 118487 insertions(+), 33479 deletions(-) create mode 100644 src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.cpp delete mode 100644 src/3rdparty/webkit/JavaScriptCore/parser/SourcePoolQt.cpp delete mode 100644 src/3rdparty/webkit/JavaScriptCore/parser/SourcePoolQt.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/Executable.cpp create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/Executable.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/JSAPIValueWrapper.cpp create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/JSAPIValueWrapper.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/MarkStack.cpp create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/MarkStack.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/MarkStackPosix.cpp create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/MarkStackWin.cpp create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/NumericStrings.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/PropertyDescriptor.cpp create mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/PropertyDescriptor.h delete mode 100644 src/3rdparty/webkit/JavaScriptCore/runtime/Tracing.d create mode 100644 src/3rdparty/webkit/JavaScriptCore/wscript create mode 100644 src/3rdparty/webkit/JavaScriptCore/wtf/PossiblyNull.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/wtf/unicode/wince/UnicodeWince.cpp create mode 100644 src/3rdparty/webkit/JavaScriptCore/wtf/unicode/wince/UnicodeWince.h delete mode 100644 src/3rdparty/webkit/WebCore/ForwardingHeaders/parser/Parser.h delete mode 100644 src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/CollectorHeapIterator.h create mode 100644 src/3rdparty/webkit/WebCore/ForwardingHeaders/runtime/JSAPIValueWrapper.h create mode 100644 src/3rdparty/webkit/WebCore/ForwardingHeaders/wtf/PossiblyNull.h create mode 100644 src/3rdparty/webkit/WebCore/accessibility/AccessibilityMediaControls.cpp create mode 100644 src/3rdparty/webkit/WebCore/accessibility/AccessibilityMediaControls.h create mode 100644 src/3rdparty/webkit/WebCore/accessibility/AccessibilitySlider.cpp create mode 100644 src/3rdparty/webkit/WebCore/accessibility/AccessibilitySlider.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCSSRuleListCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasArrayBufferConstructor.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasArrayBufferConstructor.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasArrayCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasByteArrayConstructor.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasByteArrayConstructor.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasByteArrayCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasFloatArrayConstructor.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasFloatArrayConstructor.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasFloatArrayCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasIntArrayConstructor.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasIntArrayConstructor.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasIntArrayCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasNumberArrayCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasRenderingContext3DCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasShortArrayConstructor.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasShortArrayConstructor.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasShortArrayCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasUnsignedByteArrayConstructor.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasUnsignedByteArrayConstructor.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasUnsignedByteArrayCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasUnsignedIntArrayConstructor.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasUnsignedIntArrayConstructor.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasUnsignedIntArrayCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasUnsignedShortArrayConstructor.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasUnsignedShortArrayConstructor.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSCanvasUnsignedShortArrayCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSDesktopNotificationsCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSEventSourceConstructor.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSEventSourceConstructor.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSEventSourceCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSMessageEventCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSMessagePortCustom.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSSharedWorkerContextCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebSocketConstructor.cpp create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebSocketConstructor.h create mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSWebSocketCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/css/Media.cpp create mode 100644 src/3rdparty/webkit/WebCore/css/Media.h create mode 100644 src/3rdparty/webkit/WebCore/css/Media.idl create mode 100644 src/3rdparty/webkit/WebCore/css/WCSSPropertyNames.in create mode 100644 src/3rdparty/webkit/WebCore/css/WCSSValueKeywords.in delete mode 100644 src/3rdparty/webkit/WebCore/dom/DocPtr.h create mode 100644 src/3rdparty/webkit/WebCore/dom/PageTransitionEvent.cpp create mode 100644 src/3rdparty/webkit/WebCore/dom/PageTransitionEvent.h create mode 100644 src/3rdparty/webkit/WebCore/dom/PageTransitionEvent.idl create mode 100644 src/3rdparty/webkit/WebCore/dom/PositionCreationFunctions.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasArray.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasArrayBuffer.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasArrayBuffer.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasByteArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasByteArray.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasFloatArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasFloatArray.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasIntArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasIntArray.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext3D.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext3D.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasShortArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasShortArray.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasUnsignedByteArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasUnsignedByteArray.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasUnsignedIntArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasUnsignedIntArray.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasUnsignedShortArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSCanvasUnsignedShortArray.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSEventSource.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSEventSource.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSHTMLDataListElement.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSHTMLDataListElement.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSMedia.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSMedia.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSPageTransitionEvent.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSPageTransitionEvent.h delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSSVGDefinitionSrcElement.cpp delete mode 100644 src/3rdparty/webkit/WebCore/generated/JSSVGDefinitionSrcElement.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSSharedWorker.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSSharedWorker.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSSharedWorkerContext.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSSharedWorkerContext.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSWebSocket.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSWebSocket.h create mode 100644 src/3rdparty/webkit/WebCore/generated/JSXSLTProcessor.cpp create mode 100644 src/3rdparty/webkit/WebCore/generated/JSXSLTProcessor.h create mode 100644 src/3rdparty/webkit/WebCore/generated/WebKitVersion.h delete mode 100644 src/3rdparty/webkit/WebCore/html/CanvasGradient.cpp delete mode 100644 src/3rdparty/webkit/WebCore/html/CanvasGradient.h delete mode 100644 src/3rdparty/webkit/WebCore/html/CanvasGradient.idl delete mode 100644 src/3rdparty/webkit/WebCore/html/CanvasPattern.cpp delete mode 100644 src/3rdparty/webkit/WebCore/html/CanvasPattern.h delete mode 100644 src/3rdparty/webkit/WebCore/html/CanvasPattern.idl delete mode 100644 src/3rdparty/webkit/WebCore/html/CanvasPixelArray.cpp delete mode 100644 src/3rdparty/webkit/WebCore/html/CanvasPixelArray.h delete mode 100644 src/3rdparty/webkit/WebCore/html/CanvasPixelArray.idl delete mode 100644 src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.cpp delete mode 100644 src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.h delete mode 100644 src/3rdparty/webkit/WebCore/html/CanvasRenderingContext2D.idl delete mode 100644 src/3rdparty/webkit/WebCore/html/CanvasStyle.cpp delete mode 100644 src/3rdparty/webkit/WebCore/html/CanvasStyle.h create mode 100644 src/3rdparty/webkit/WebCore/html/HTMLDataListElement.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/HTMLDataListElement.h create mode 100644 src/3rdparty/webkit/WebCore/html/HTMLDataListElement.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasArray.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasArray.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasArrayBuffer.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasArrayBuffer.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasArrayBuffer.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasBuffer.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasBuffer.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasBuffer.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasByteArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasByteArray.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasByteArray.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasFloatArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasFloatArray.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasFloatArray.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasFramebuffer.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasFramebuffer.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasFramebuffer.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasGradient.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasGradient.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasGradient.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasIntArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasIntArray.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasIntArray.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasNumberArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasNumberArray.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasNumberArray.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasObject.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasObject.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasPattern.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasPattern.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasPattern.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasPixelArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasPixelArray.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasPixelArray.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasProgram.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasProgram.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasProgram.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderbuffer.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderbuffer.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderbuffer.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext3D.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext3D.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext3D.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasShader.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasShader.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasShader.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasShortArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasShortArray.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasShortArray.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasStyle.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasStyle.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasTexture.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasTexture.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasTexture.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasUnsignedByteArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasUnsignedByteArray.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasUnsignedByteArray.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasUnsignedIntArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasUnsignedIntArray.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasUnsignedIntArray.idl create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasUnsignedShortArray.cpp create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasUnsignedShortArray.h create mode 100644 src/3rdparty/webkit/WebCore/html/canvas/CanvasUnsignedShortArray.idl create mode 100644 src/3rdparty/webkit/WebCore/inspector/DOMDispatchTimelineItem.cpp create mode 100644 src/3rdparty/webkit/WebCore/inspector/DOMDispatchTimelineItem.h create mode 100644 src/3rdparty/webkit/WebCore/inspector/InspectorDOMAgent.cpp create mode 100644 src/3rdparty/webkit/WebCore/inspector/InspectorDOMAgent.h delete mode 100644 src/3rdparty/webkit/WebCore/inspector/InspectorJSONObject.cpp delete mode 100644 src/3rdparty/webkit/WebCore/inspector/InspectorJSONObject.h create mode 100644 src/3rdparty/webkit/WebCore/inspector/InspectorTimelineAgent.cpp create mode 100644 src/3rdparty/webkit/WebCore/inspector/InspectorTimelineAgent.h create mode 100644 src/3rdparty/webkit/WebCore/inspector/TimelineItem.cpp create mode 100644 src/3rdparty/webkit/WebCore/inspector/TimelineItem.h create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Callback.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/ChangesView.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Color.js delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Console.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/ConsoleView.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/CookieItemsView.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/DOMAgent.js delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/DatabasesPanel.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Drawer.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/clearConsoleButtonGlyph.png delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/clearConsoleButtons.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/consoleButtonGlyph.png delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/consoleButtons.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/cookie.png delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/databasesIcon.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/dockButtonGlyph.png delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/dockButtons.png delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/domStorage.png delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/enableButtons.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/enableOutlineButtonGlyph.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/enableSolidButtonGlyph.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/excludeButtonGlyph.png delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/excludeButtons.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/focusButtonGlyph.png delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/focusButtons.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/largerResourcesButtonGlyph.png delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/largerResourcesButtons.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/localStorage.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/nodeSearchButtonGlyph.png delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/nodeSearchButtons.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/paneSettingsButtons.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/pauseOnExceptionButtonGlyph.png delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/pauseOnExceptionButtons.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/percentButtonGlyph.png delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/percentButtons.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/recordButtonGlyph.png delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/recordButtons.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/recordToggledButtonGlyph.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/reloadButtonGlyph.png delete mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/reloadButtons.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/sessionStorage.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/storageIcon.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/undockButtonGlyph.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/InjectedScript.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/InjectedScriptAccess.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/ObjectProxy.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Popup.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/StatusBarButton.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/StoragePanel.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/SummaryBar.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/TimelineAgent.js create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js delete mode 100644 src/3rdparty/webkit/WebCore/loader/UserStyleSheetLoader.cpp delete mode 100644 src/3rdparty/webkit/WebCore/loader/UserStyleSheetLoader.h create mode 100644 src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheHost.cpp create mode 100644 src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheHost.h create mode 100644 src/3rdparty/webkit/WebCore/notifications/Notification.cpp create mode 100644 src/3rdparty/webkit/WebCore/notifications/Notification.h create mode 100644 src/3rdparty/webkit/WebCore/notifications/Notification.idl create mode 100644 src/3rdparty/webkit/WebCore/notifications/NotificationCenter.cpp create mode 100644 src/3rdparty/webkit/WebCore/notifications/NotificationCenter.h create mode 100644 src/3rdparty/webkit/WebCore/notifications/NotificationCenter.idl create mode 100644 src/3rdparty/webkit/WebCore/notifications/NotificationContents.h create mode 100644 src/3rdparty/webkit/WebCore/notifications/NotificationPresenter.h delete mode 100644 src/3rdparty/webkit/WebCore/page/Coordinates.cpp create mode 100644 src/3rdparty/webkit/WebCore/page/EventSource.cpp create mode 100644 src/3rdparty/webkit/WebCore/page/EventSource.h create mode 100644 src/3rdparty/webkit/WebCore/page/EventSource.idl delete mode 100644 src/3rdparty/webkit/WebCore/page/Geoposition.cpp create mode 100644 src/3rdparty/webkit/WebCore/page/OriginAccessEntry.cpp create mode 100644 src/3rdparty/webkit/WebCore/page/OriginAccessEntry.h delete mode 100644 src/3rdparty/webkit/WebCore/page/PositionCallback.idl delete mode 100644 src/3rdparty/webkit/WebCore/page/PositionErrorCallback.idl create mode 100644 src/3rdparty/webkit/WebCore/page/UserScript.h create mode 100644 src/3rdparty/webkit/WebCore/page/UserScriptTypes.h create mode 100644 src/3rdparty/webkit/WebCore/page/UserStyleSheet.h create mode 100644 src/3rdparty/webkit/WebCore/page/UserStyleSheetTypes.h create mode 100644 src/3rdparty/webkit/WebCore/platform/Cookie.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/GraphicsContext3D.h create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/ImageBuffer.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/ImageSource.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/image-decoders/ImageDecoder.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/mock/GeolocationServiceMock.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/mock/GeolocationServiceMock.h create mode 100644 src/3rdparty/webkit/WebCore/platform/network/CredentialStorage.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/network/CredentialStorage.h create mode 100644 src/3rdparty/webkit/WebCore/platform/network/ProtectionSpaceHash.h create mode 100644 src/3rdparty/webkit/WebCore/platform/network/SocketStreamErrorBase.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/network/SocketStreamErrorBase.h create mode 100644 src/3rdparty/webkit/WebCore/platform/network/SocketStreamHandleBase.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/network/SocketStreamHandleBase.h create mode 100644 src/3rdparty/webkit/WebCore/platform/network/SocketStreamHandleClient.h create mode 100644 src/3rdparty/webkit/WebCore/platform/network/qt/DnsPrefetchHelper.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/network/qt/DnsPrefetchHelper.h create mode 100644 src/3rdparty/webkit/WebCore/plugins/PluginDatabaseClient.h create mode 100644 src/3rdparty/webkit/WebCore/rendering/RenderOverflow.h create mode 100644 src/3rdparty/webkit/WebCore/rendering/RenderWidgetProtector.h create mode 100644 src/3rdparty/webkit/WebCore/storage/SQLTransactionClient.cpp create mode 100644 src/3rdparty/webkit/WebCore/storage/SQLTransactionClient.h create mode 100644 src/3rdparty/webkit/WebCore/storage/SQLTransactionCoordinator.cpp create mode 100644 src/3rdparty/webkit/WebCore/storage/SQLTransactionCoordinator.h delete mode 100644 src/3rdparty/webkit/WebCore/storage/StorageArea.cpp delete mode 100644 src/3rdparty/webkit/WebCore/svg/SVGDefinitionSrcElement.cpp delete mode 100644 src/3rdparty/webkit/WebCore/svg/SVGDefinitionSrcElement.h delete mode 100644 src/3rdparty/webkit/WebCore/svg/SVGDefinitionSrcElement.idl create mode 100644 src/3rdparty/webkit/WebCore/websockets/WebSocket.cpp create mode 100644 src/3rdparty/webkit/WebCore/websockets/WebSocket.h create mode 100644 src/3rdparty/webkit/WebCore/websockets/WebSocket.idl create mode 100644 src/3rdparty/webkit/WebCore/websockets/WebSocketChannel.cpp create mode 100644 src/3rdparty/webkit/WebCore/websockets/WebSocketChannel.h create mode 100644 src/3rdparty/webkit/WebCore/websockets/WebSocketChannelClient.h create mode 100644 src/3rdparty/webkit/WebCore/websockets/WebSocketHandshake.cpp create mode 100644 src/3rdparty/webkit/WebCore/websockets/WebSocketHandshake.h create mode 100644 src/3rdparty/webkit/WebCore/workers/DedicatedWorkerThread.cpp create mode 100644 src/3rdparty/webkit/WebCore/workers/DedicatedWorkerThread.h create mode 100644 src/3rdparty/webkit/WebCore/workers/DefaultSharedWorkerRepository.cpp create mode 100644 src/3rdparty/webkit/WebCore/workers/DefaultSharedWorkerRepository.h create mode 100644 src/3rdparty/webkit/WebCore/workers/SharedWorkerContext.cpp create mode 100644 src/3rdparty/webkit/WebCore/workers/SharedWorkerContext.h create mode 100644 src/3rdparty/webkit/WebCore/workers/SharedWorkerContext.idl create mode 100644 src/3rdparty/webkit/WebCore/workers/SharedWorkerRepository.h create mode 100644 src/3rdparty/webkit/WebCore/workers/SharedWorkerThread.cpp create mode 100644 src/3rdparty/webkit/WebCore/workers/SharedWorkerThread.h create mode 100644 src/3rdparty/webkit/WebCore/workers/WorkerReportingProxy.h create mode 100644 src/3rdparty/webkit/WebKit/mac/Configurations/Version.xcconfig create mode 100644 src/3rdparty/webkit/WebKit/mac/Workers/WebWorkersPrivate.h create mode 100644 src/3rdparty/webkit/WebKit/mac/Workers/WebWorkersPrivate.mm create mode 100644 src/3rdparty/webkit/WebKit/qt/Api/qwebgraphicsitem.cpp create mode 100644 src/3rdparty/webkit/WebKit/qt/Api/qwebgraphicsitem.h create mode 100644 src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.cpp create mode 100644 src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.h create mode 100644 src/3rdparty/webkit/WebKit/qt/Api/qwebinspector_p.h create mode 100644 src/3rdparty/webkit/WebKit/qt/Api/qwebkitversion.cpp create mode 100644 src/3rdparty/webkit/WebKit/qt/Api/qwebkitversion.h create mode 100644 src/3rdparty/webkit/WebKit/qt/Api/qwebplugindatabase.cpp create mode 100644 src/3rdparty/webkit/WebKit/qt/Api/qwebplugindatabase.h create mode 100644 src/3rdparty/webkit/WebKit/qt/QGVLauncher/QGVLauncher.pro create mode 100644 src/3rdparty/webkit/WebKit/qt/QGVLauncher/main.cpp create mode 100644 src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebplugindatabase/qwebplugindatabase.pro create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebplugindatabase/tst_qwebplugindatabase.cpp create mode 100644 src/3rdparty/webkit/WebKit/scripts/generate-webkitversion.pl diff --git a/src/3rdparty/webkit/ChangeLog b/src/3rdparty/webkit/ChangeLog index a08a7b4..4a08347 100644 --- a/src/3rdparty/webkit/ChangeLog +++ b/src/3rdparty/webkit/ChangeLog @@ -1,3 +1,297 @@ +2009-09-10 Laszlo Gombos + + Reviewed by Ariya Hidayat. + + Disable some ARM compiler warnings + https://bugs.webkit.org/show_bug.cgi?id=29083 + + The following ARM compiler warnings are disabled + + - #68-D: integer conversion resulted in a change of sign + - #111-D: statement is unreachable + - #177-D: variable XXX was declared but never referenced + - #368-D: class XXX defines no constructor to initialize the following: YYY + - #830-D: function XXX "XXX::operator new" has no corresponding operator delete + - #1293-D: assignment in condition + + * WebKit.pri: + +2009-09-09 Kenneth Rohde Christiansen + + Reviewed by Simon Hausmann. + + [Qt] Add the alternative QtLauncher (based on QGraphicsView) to the build. + + https://bugs.webkit.org/show_bug.cgi?id=28862 + + * WebKit.pro: + +2009-09-07 Xan Lopez + + Rubber-stamped by Gustavo Noronha. + + Bump versions in preparation for 1.1.14 release. + + * configure.ac: + +2009-09-07 Gustavo Noronha Silva + + Reviewed by Xan Lopez. + + https://bugs.webkit.org/show_bug.cgi?id=26854 + [GTK] Needs API to allow more control over outgoing requests + + * GNUmakefile.am: new files added to the build for new class + WebKitNetworkResponse + +2009-09-06 Martin Robinson + + Reviewed by Gustavo Noronha, Jan Alonzo and Xan Lopez. + + [Gtk] Expose a database API + https://bugs.webkit.org/show_bug.cgi?id=27899 + + Expose an HTML5 database API for GTK+. + + * GNUmakefile.am: + +2009-09-04 Albert Bachand + + Reviewed by Eric Seidel. + + Modify the condition regarding the key modifier for opening combo + boxes under GTK from just PLATFORM(GTK) to also look for + (PLATFORM(CHROMIUM) && PLATFORM(LINUX)). + + * WebCore/dom/SelectElement.cpp: + * WebCore/manual-tests/select-popup-on-spacebar.html: + +2009-09-02 Jan Michael Alonzo + + Reviewed by Xan Lopez and Gustavo Noronha. + + [Gtk] Implement a WebDataSource for the gtk port + https://bugs.webkit.org/show_bug.cgi?id=24758 + + Add WebKitWebDataSource unit test to the build script + + * GNUmakefile.am: + +2009-09-02 Jan Michael Alonzo + + Reviewed by Xan Lopez and Gustavo Noronha. + + [Gtk] Implement a WebDataSource for the gtk port + https://bugs.webkit.org/show_bug.cgi?id=24758 + + Add WebKitWebDataSource and DocumentLoaderGtk to the build script. + + * GNUmakefile.am: + +2009-09-01 Jan Michael Alonzo + + Reviewed by Xan Lopez and Gustavo Noronha. + + [Gtk] Implement a WebDataSource for the gtk port + https://bugs.webkit.org/show_bug.cgi?id=24758 + + Add WebKitWebResource to the build script. + + * GNUmakefile.am: + +2009-08-28 Jan Michael Alonzo + + Reviewed by Oliver Hunt. + + Gtk Build broken for OSX Quartz + https://bugs.webkit.org/show_bug.cgi?id=28727 + + Define XP_UNIX for non-Win OS builds. + + * GNUmakefile.am: + +2009-08-28 Gustavo Noronha Silva + + Reviewed by Holger Freyther. + + https://bugs.webkit.org/show_bug.cgi?id=25889 + [GTK] scrollbar policy for main frame is not implementable + + Adding files for the new test for window-related issues (starting + with scrollbar policy). + + * GNUmakefile.am: + +2009-08-27 Priit Laes + + Reviewed by Xan Lopez. + + [GTK] Out-of-srcdir build problem + https://bugs.webkit.org/show_bug.cgi?id=28741 + + * GNUmakefile.am, autotools/webkit.m4: + Fix problem with out-of-srcdir builds. Also bump required glib version. + +2009-08-24 Gustavo Noronha Silva + + Reviewed by Xan Lopez. + + Bump package and so versions for 1.1.13 release. + + * configure.ac: + +2009-08-22 Javier Jardón + + [GTK] Not use deprecated symbols in WebKitWebView example code. + https://bugs.webkit.org/show_bug.cgi?id=28651 + + * WebKit/gtk/webkit/webkitwebview.cpp + +2009-08-18 Xan Lopez + + Rubber-stamped by Holger Freyther. + + Require at least libsoup 2.27.91 for the new password + manager/authentication APIs. + + * configure.ac: + +2009-08-18 Drew Wilson + + Reviewed by NOBODY (Build Break). + + Speculative fix for GTK DumpRenderTree. + + * GNUmakefile.am: + +2009-08-18 Kent Tamura + + Reviewed by Eric Seidel. + + Add --enable-datalist option. + + * configure.ac: + +2009-08-14 Adam Bergkvist + + Reviewed by Sam Weinig. + + [GTK] Added EventSource to the build (default on). + https://bugs.webkit.org/show_bug.cgi?id=14997 + + * configure.ac: + +2009-08-14 Jan Michael Alonzo + + Rubber-stamped by Gustavo Noronha. + + Initialize CFLAGS and CXXFLAGS before the main body of the + WEBKIT_INIT macro so C files don't get built with "-g -O2". + + * autotools/webkit.m4: + +2009-08-12 Xan Lopez + + Reviewed by Jan Alonzo. + + [GTK] Remove keyring optional features + https://bugs.webkit.org/show_bug.cgi?id=28173 + + Remove keyring support, we now do authentication storage through + libsoup. We depend on libsoup master now, will bump the dependency + when there's a new release. + + * GNUmakefile.am: + * configure.ac: + +2009-08-11 Drew Wilson + + Reviewed by NOBODY (Build break). + + Speculative fix for GTK build break. + + * WebKit.pro: + +2009-08-11 Tor Arne Vestbø + + Reviewed by Simon Hausmann. + + Build the TestNetscapePlugin on Qt/Mac + + * WebKit.pro: + +2009-08-11 Xan Lopez + + Reviewed by Jan Alonzo. + + Prefix lengthy commands with AM_V_GEN so that they produce an + output like 'GEN ' when in silent mode. + + * GNUmakefile.am: + +2009-08-05 Jan Michael Alonzo + + Reviewed by Xan Lopez. + + [Gtk] macros in webkit.m4 should be defined once only + https://bugs.webkit.org/show_bug.cgi?id=27929 + + The macros in webkit.m4 are not meant to be called multiple times + so we'll make them AC_DEFUN_ONCE. Also make AC_HEADER_STDC and AC_PROG_CXX + AC_REQUIRE to remove the automake warnings when doing autogen.sh. + + Lastly, make sure CXXFLAGS and CFLAGS are defined before + AC_PROG_CXX gets expanded so it doesn't add "-g -O2" on Release builds. + + * autotools/webkit.m4: + +2009-08-05 Xan Lopez + + Revert r46714, it was making us build debug images by default. + + * autotools/webkit.m4: + +2009-08-03 Laszlo Gombos + + Reviewed by Eric Seidel. + + [Qt] Consolidate common gcc flags to WebKit.pri + https://bugs.webkit.org/show_bug.cgi?id=27934 + + * WebKit.pri: + +2009-08-03 Jan Michael Alonzo + + Rubber-stamped by Eric Seidel. + + [Gtk] macros in webkit.m4 should be defined once only + https://bugs.webkit.org/show_bug.cgi?id=27929 + + The macros in webkit.m4 are not meant to be called multiple times + so we'll make them AC_DEFUN_ONCE. Also make AC_HEADER_STDC and AC_PROG_CXX + AC_REQUIRE to remove the automake warnings when doing autogen.sh. + + * autotools/webkit.m4: + +2009-07-29 Ariya Hidayat + + Reviewed by Simon Hausmann. + + Adding ImageDiff project file. + + https://bugs.webkit.org/show_bug.cgi?id=27813 + + * WebKit.pro: Added ImageDiff.pro. + +2009-07-29 Jan Michael Alonzo + + Reviewed by Eric Seidel and Xan Lopez. + + [Gtk] Enable http/tests/appcache tests + https://bugs.webkit.org/show_bug.cgi?id=27674 + + * GNUmakefile.am: Add webkit/webkitapplicationcache.cpp + 2009-07-28 Xan Lopez Reviewed by Gustavo Noronha. diff --git a/src/3rdparty/webkit/JavaScriptCore/API/APICast.h b/src/3rdparty/webkit/JavaScriptCore/API/APICast.h index 762a15e..b6d1532 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/APICast.h +++ b/src/3rdparty/webkit/JavaScriptCore/API/APICast.h @@ -26,7 +26,7 @@ #ifndef APICast_h #define APICast_h -#include "JSNumberCell.h" +#include "JSAPIValueWrapper.h" #include "JSValue.h" #include #include @@ -58,18 +58,18 @@ inline JSC::ExecState* toJS(JSGlobalContextRef c) return reinterpret_cast(c); } -inline JSC::JSValue toJS(JSC::ExecState* exec, JSValueRef v) +inline JSC::JSValue toJS(JSC::ExecState*, JSValueRef v) { - JSC::JSValue jsValue = JSC::JSValue::decode(reinterpret_cast(const_cast(v))); -#if USE(ALTERNATE_JSIMMEDIATE) - UNUSED_PARAM(exec); +#if USE(JSVALUE32_64) + JSC::JSCell* jsCell = reinterpret_cast(const_cast(v)); + if (!jsCell) + return JSC::JSValue(); + if (jsCell->isAPIValueWrapper()) + return static_cast(jsCell)->value(); + return jsCell; #else - if (jsValue && jsValue.isNumber()) { - ASSERT(jsValue.isAPIMangledNumber()); - return JSC::jsNumber(exec, jsValue.uncheckedGetNumber()); - } + return JSC::JSValue::decode(reinterpret_cast(const_cast(v))); #endif - return jsValue; } inline JSC::JSObject* toJS(JSObjectRef o) @@ -89,15 +89,16 @@ inline JSC::JSGlobalData* toJS(JSContextGroupRef g) inline JSValueRef toRef(JSC::ExecState* exec, JSC::JSValue v) { -#if USE(ALTERNATE_JSIMMEDIATE) - UNUSED_PARAM(exec); +#if USE(JSVALUE32_64) + if (!v) + return 0; + if (!v.isCell()) + return reinterpret_cast(asCell(JSC::jsAPIValueWrapper(exec, v))); + return reinterpret_cast(asCell(v)); #else - if (v && v.isNumber()) { - ASSERT(!v.isAPIMangledNumber()); - return reinterpret_cast(JSC::JSValue::encode(JSC::jsAPIMangledNumber(exec, v.uncheckedGetNumber()))); - } -#endif + UNUSED_PARAM(exec); return reinterpret_cast(JSC::JSValue::encode(v)); +#endif } inline JSObjectRef toRef(JSC::JSObject* o) diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSBase.h b/src/3rdparty/webkit/JavaScriptCore/API/JSBase.h index 9f3d88e..d1ce9b3 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSBase.h +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSBase.h @@ -67,7 +67,7 @@ typedef struct OpaqueJSValue* JSObjectRef; #undef JS_EXPORT #if defined(BUILDING_WX__) #define JS_EXPORT -#elif defined(__GNUC__) +#elif defined(__GNUC__) && !defined(__CC_ARM) && !defined(__ARMCC__) #define JS_EXPORT __attribute__((visibility("default"))) #elif defined(_WIN32_WCE) #if defined(JS_BUILDING_JS) diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackConstructor.h b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackConstructor.h index 1f06249..0497aa2 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, ImplementsHasInstance | HasStandardGetOwnPropertySlot)); + return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance | HasStandardGetOwnPropertySlot | HasDefaultMark | HasDefaultGetPropertyNames)); } private: diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackFunction.cpp b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackFunction.cpp index 1b3217b..b7dd768 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackFunction.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackFunction.cpp @@ -28,6 +28,7 @@ #include "JSCallbackFunction.h" #include "APICast.h" +#include "CodeBlock.h" #include "JSFunction.h" #include "FunctionPrototype.h" #include diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackFunction.h b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackFunction.h index 7dd87b5..3a17fa2 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, HasStandardGetOwnPropertySlot)); + return Structure::create(proto, TypeInfo(ObjectType, HasStandardGetOwnPropertySlot | HasDefaultMark)); } private: diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObject.h b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObject.h index 4360baa..47fd6c3 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObject.h +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObject.h @@ -61,12 +61,12 @@ private: virtual void put(ExecState*, const Identifier&, JSValue, PutPropertySlot&); - virtual bool deleteProperty(ExecState*, const Identifier&, bool checkDontDelete = true); - virtual bool deleteProperty(ExecState*, unsigned, bool checkDontDelete = true); + virtual bool deleteProperty(ExecState*, const Identifier&); + virtual bool deleteProperty(ExecState*, unsigned); virtual bool hasInstance(ExecState* exec, JSValue value, JSValue proto); - virtual void getPropertyNames(ExecState*, PropertyNameArray&, unsigned listedAttributes = Structure::Prototype); + virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&); 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 669b3cd..4d113fe 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObjectFunctions.h +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSCallbackObjectFunctions.h @@ -224,7 +224,7 @@ void JSCallbackObject::put(ExecState* exec, const Identifier& propertyName } template -bool JSCallbackObject::deleteProperty(ExecState* exec, const Identifier& propertyName, bool checkDontDelete) +bool JSCallbackObject::deleteProperty(ExecState* exec, const Identifier& propertyName) { JSContextRef ctx = toRef(exec); JSObjectRef thisRef = toRef(this); @@ -262,13 +262,13 @@ bool JSCallbackObject::deleteProperty(ExecState* exec, const Identifier& p } } - return Base::deleteProperty(exec, propertyName, checkDontDelete); + return Base::deleteProperty(exec, propertyName); } template -bool JSCallbackObject::deleteProperty(ExecState* exec, unsigned propertyName, bool checkDontDelete) +bool JSCallbackObject::deleteProperty(ExecState* exec, unsigned propertyName) { - return deleteProperty(exec, Identifier::from(exec, propertyName), checkDontDelete); + return deleteProperty(exec, Identifier::from(exec, propertyName)); } template @@ -318,11 +318,12 @@ bool JSCallbackObject::hasInstance(ExecState* exec, JSValue value, JSValue for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) { if (JSObjectHasInstanceCallback hasInstance = jsClass->hasInstance) { + JSValueRef valueRef = toRef(exec, value); JSValueRef exception = 0; bool result; { JSLock::DropAllLocks dropAllLocks(exec); - result = hasInstance(execRef, thisRef, toRef(exec, value), &exception); + result = hasInstance(execRef, thisRef, valueRef, &exception); } exec->setException(toJS(exec, exception)); return result; @@ -372,7 +373,7 @@ JSValue JSCallbackObject::call(ExecState* exec, JSObject* functionObject, } template -void JSCallbackObject::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames, unsigned listedAttributes) +void JSCallbackObject::getOwnPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) { JSContextRef execRef = toRef(exec); JSObjectRef thisRef = toRef(this); @@ -380,7 +381,7 @@ void JSCallbackObject::getPropertyNames(ExecState* exec, PropertyNameArray for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) { if (JSObjectGetPropertyNamesCallback getPropertyNames = jsClass->getPropertyNames) { JSLock::DropAllLocks dropAllLocks(exec); - getPropertyNames(execRef, thisRef, toRef(&propertyNames), listedAttributes); + getPropertyNames(execRef, thisRef, toRef(&propertyNames)); } if (OpaqueJSClassStaticValuesTable* staticValues = jsClass->staticValues(exec)) { @@ -406,7 +407,7 @@ void JSCallbackObject::getPropertyNames(ExecState* exec, PropertyNameArray } } - Base::getPropertyNames(exec, propertyNames, listedAttributes); + Base::getOwnPropertyNames(exec, propertyNames); } template @@ -428,11 +429,13 @@ double JSCallbackObject::toNumber(ExecState* exec) const JSLock::DropAllLocks dropAllLocks(exec); value = convertToType(ctx, thisRef, kJSTypeNumber, &exception); } - exec->setException(toJS(exec, exception)); - if (value) { - double dValue; - return toJS(exec, value).getNumber(dValue) ? dValue : NaN; + if (exception) { + exec->setException(toJS(exec, exception)); + return 0; } + + double dValue; + return toJS(exec, value).getNumber(dValue) ? dValue : NaN; } return Base::toNumber(exec); @@ -452,11 +455,11 @@ UString JSCallbackObject::toString(ExecState* exec) const JSLock::DropAllLocks dropAllLocks(exec); value = convertToType(ctx, thisRef, kJSTypeString, &exception); } - exec->setException(toJS(exec, exception)); - if (value) - return toJS(exec, value).getString(); - if (exception) + if (exception) { + exec->setException(toJS(exec, exception)); return ""; + } + return toJS(exec, value).getString(); } return Base::toString(exec); diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.h b/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.h index c742d96..c4777dd 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.h +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.h @@ -58,7 +58,7 @@ struct StaticFunctionEntry : FastAllocBase { typedef HashMap, StaticValueEntry*> OpaqueJSClassStaticValuesTable; typedef HashMap, StaticFunctionEntry*> OpaqueJSClassStaticFunctionsTable; -class OpaqueJSClass; +struct OpaqueJSClass; // An OpaqueJSClass (JSClass) is created without a context, so it can be used with any context, even across context groups. // This structure holds data members that vary across context groups. diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.cpp b/src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.cpp index 87d36ec..06ef578 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.cpp @@ -28,6 +28,7 @@ #include "JSObjectRef.h" #include "APICast.h" +#include "CodeBlock.h" #include "DateConstructor.h" #include "ErrorConstructor.h" #include "FunctionConstructor.h" diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.h b/src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.h index 86921bd..3e8b0eb 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.h +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSObjectRef.h @@ -187,7 +187,6 @@ typedef bool @param ctx The execution context to use. @param object The JSObject whose property names are being collected. @param accumulator A JavaScript property name accumulator in which to accumulate the names of object's properties. -@param flag Specify which property should be included @discussion If you named your function GetPropertyNames, you would declare it like this: void GetPropertyNames(JSContextRef ctx, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames); @@ -197,7 +196,7 @@ Property name accumulators are used by JSObjectCopyPropertyNames and JavaScript Use JSPropertyNameAccumulatorAddName to add property names to accumulator. A class's getPropertyNames callback only needs to provide the names of properties that the class vends through a custom getProperty or setProperty callback. Other properties, including statically declared properties, properties vended by other classes, and properties belonging to object's prototype, are added independently. */ typedef void -(*JSObjectGetPropertyNamesCallback) (JSContextRef ctx, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames, unsigned flag); +(*JSObjectGetPropertyNamesCallback) (JSContextRef ctx, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames); /*! @typedef JSObjectCallAsFunctionCallback diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog index 24fc7e7..8aa8c1d 100644 --- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog +++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog @@ -1,3 +1,6959 @@ +2009-09-17 Janne Koskinen + + Reviewed by Simon Hausmann. + + Symbian/WINSCW build fox. + + Repeat Q_OS_WIN wchar_t hack for WINSCW, similar to + revision 24774. + + WINSCW defines wchar_t, thus UChar has to be wchar_t + + * wtf/unicode/qt4/UnicodeQt4.h: + +2009-09-17 Janne Koskinen + + Reviewed by Simon Hausmann. + + Symbian/WINSCW build fix. + + https://bugs.webkit.org/show_bug.cgi?id=29186 + + WINSCW Template specialisation name in declaration must the be the same as in implementation. + + * runtime/LiteralParser.h: + +2009-09-15 Norbert Leser + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=27060 + + Symbian compiler for emulator target (WINSCW) fails with + "illegal operand" for m_attributesInPrevious in structure.ccp + (when calling make_pair functions). + This error is apparently due to the compiler not properly + resolving the unsigned type of the declared bitfield. + + Initial patch explicitly casted m_attributesInPrevious + to unsigned, but since bitfield optimization is not critical for + the emulator target, this conditional change in header file + appears to be least intrusive. + + * runtime/Structure.h: + +2009-09-16 Gabor Loki + + Reviewed by Darin Adler. + + Fix GCC warnings on ARM_THUMB2 platform + + * assembler/ARMv7Assembler.h: + (JSC::ARMThumbImmediate::countLeadingZerosPartial): + * assembler/MacroAssemblerARMv7.h: + (JSC::MacroAssemblerARMv7::branchTruncateDoubleToInt32): + (JSC::MacroAssemblerARMv7::moveFixedWidthEncoding): + +2009-09-16 Greg Bolsinga + + Add ENABLE(INSPECTOR) + https://bugs.webkit.org/show_bug.cgi?id=29260 + + Reviewed by David Kilzer. + + * wtf/Platform.h: + +2009-09-16 Greg Bolsinga + + Add ENABLE(CONTEXT_MENUS) + https://bugs.webkit.org/show_bug.cgi?id=29225 + + Reviewed by David Kilzer. + + * wtf/Platform.h: + +2009-09-16 Benjamin C Meyer + + Reviewed by Eric Seidel. + + The webkit stdint and stdbool headers exists because + the compiler MSVC doesn't include them. The check + should not check for PLATFORM(WIN_OS) but for MSVC. + + * os-win32/stdbool.h: + * os-win32/stdint.h: + +2009-09-16 Greg Bolsinga + + Add ENABLE(DRAG_SUPPORT) + https://bugs.webkit.org/show_bug.cgi?id=29233 + + Reviewed by David Kilzer. + + * wtf/Platform.h: + +2009-09-16 Kevin Ollivier + + waf build fix after flag was moved to correct place. + + * wscript: + +2009-09-16 Tor Arne Vestbø + + Reviewed by Simon Hausmann. + + [Qt] Build fix for 64-bit Qt on Mac OS X + + * wtf/Platform.h: Use JSVALUE64 on DARWIN, not only on MAC + +2009-09-16 Zoltan Herczeg + + Reviewed by Simon Hausmann. + + [Qt] Fix wtf/ThreadSpecific.h under Qt to free thread local objects. + https://bugs.webkit.org/show_bug.cgi?id=29295 + + This is an important fix when JavaScript workers are in use, since + unfreed ThreadGlobalDatas leak a big amount of memory (50-100k each). + QThreadStorage calls the destructor of a given object, which is the + ThreadSpecific::Data. Unlike pthread, Qt is object oriented, and does + not support the calling of a static utility function when the thread + is about to close. In this patch we call the ThreadSpecific::destroy() + utility function from the destructor of ThreadSpecific::Data. Moreover, + since Qt resets all thread local values to 0 before the calling of the + appropriate destructors, we set back the pointer to its original value. + This is necessary because the get() method of the ThreadSpecific + object may be called during the exuction of the destructor. + + * wtf/ThreadSpecific.h: + (WTF::ThreadSpecific::Data::~Data): + (WTF::::~ThreadSpecific): + (WTF::::set): + (WTF::::destroy): + +2009-09-10 Oliver Hunt + + Reviewed by Geoff Garen. + + Allow anonymous storage inside JSObject + https://bugs.webkit.org/show_bug.cgi?id=29168 + + Add the concept of anonymous slots to Structures so that it is + possible to store references to values that need marking in the + standard JSObject storage buffer. This allows us to reduce the + malloc overhead of some objects (by allowing them to store JS + values in the inline storage of the object) and reduce the + dependence of custom mark functions (if all an objects children + are in the standard object property storage there's no need to + mark them manually). + + * JavaScriptCore.exp: + * runtime/JSObject.h: + (JSC::JSObject::putAnonymousValue): + (JSC::JSObject::getAnonymousValue): + (JSC::JSObject::addAnonymousSlots): + * runtime/JSWrapperObject.h: + (JSC::JSWrapperObject::createStructure): + (JSC::JSWrapperObject::JSWrapperObject): + (JSC::JSWrapperObject::setInternalValue): + * runtime/PropertyMapHashTable.h: + * runtime/Structure.cpp: + (JSC::Structure::~Structure): + (JSC::Structure::materializePropertyMap): + (JSC::Structure::addAnonymousSlotsTransition): + (JSC::Structure::copyPropertyTable): + (JSC::Structure::put): + (JSC::Structure::rehashPropertyMapHashTable): + * runtime/Structure.h: + (JSC::Structure::propertyStorageSize): + (JSC::StructureTransitionTable::reifySingleTransition): + * runtime/StructureTransitionTable.h: + (JSC::StructureTransitionTable::TransitionTable::addSlotTransition): + (JSC::StructureTransitionTable::TransitionTable::removeSlotTransition): + (JSC::StructureTransitionTable::TransitionTable::getSlotTransition): + (JSC::StructureTransitionTable::getAnonymousSlotTransition): + (JSC::StructureTransitionTable::addAnonymousSlotTransition): + (JSC::StructureTransitionTable::removeAnonymousSlotTransition): + +2009-09-15 Alex Milowski + + Reviewed by Tor Arne Vestbø. + + Added the ENABLE_MATHML define to the features + + * Configurations/FeatureDefines.xcconfig: + +2009-09-15 Csaba Osztrogonac + + Reviewed by Tor Arne Vestbø. + + [Qt] Build fix for windows. + + After http://trac.webkit.org/changeset/47795 the MinGW build broke, + because MinGW has __mingw_aligned_malloc instead of _aligned_malloc. + + * runtime/Collector.cpp: + (JSC::Heap::allocateBlock): MinGW case added. + (JSC::Heap::freeBlock): MinGW case added. + +2009-09-15 Csaba Osztrogonac + + Reviewed by Tor Arne Vestbø. + + [Qt] Build fix for Windows/MinGW + + https://bugs.webkit.org/show_bug.cgi?id=29268 + + * wtf/Platform.h: JSVALUE32_64 temporarily disabled on PLATFORM(WIN_OS) with COMPILER(MINGW) + +2009-09-14 Gabor Loki + + Reviewed by Gavin Barraclough. + + Detect VFP at runtime in generic ARM port on Linux platform. + https://bugs.webkit.org/show_bug.cgi?id=29076 + + * JavaScriptCore.pri: + * assembler/MacroAssemblerARM.cpp: Added. + (JSC::isVFPPresent): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::supportsFloatingPoint): + +2009-09-14 Csaba Osztrogonac + + Reviewed by Tor Arne Vestbø. + + [Qt] Build fix for windows build. + + * JavaScriptCore.pri: Correct a logic error. + * pcre/dftables: Add missing paranthesis for tmpdir function. + +2009-09-12 Oliver Hunt + + Reviewed by NOBODY (Build fix). + + Build fix for windows exports (again). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-09-12 Oliver Hunt + + Reviewed by NOBODY (Build fix). + + Build fix for windows exports. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-09-12 Oliver Hunt + + Reviewed by NOBODY (Build fix). + + Correct fix for non-allinonefile builds + + * runtime/ObjectConstructor.cpp: + +2009-09-12 Oliver Hunt + + Reviewed by NOBODY (Build fix). + + Fix non-allinonefile builds + + * runtime/ObjectConstructor.cpp: + +2009-09-12 Oliver Hunt + + Reviewed by Maciej Stachowiak. + + [ES5] Implement Object.keys + https://bugs.webkit.org/show_bug.cgi?id=29170 + + This patch basically requires two separate steps, the first is to split getPropertyNames + into two functions -- getOwnPropertyNames and getPropertyNames, basically making them behave + in the same way as getOwnPropertySlot and getPropertySlot. In essence getOwnPropertyNames + produces the list of properties on an object excluding its prototype chain and getPropertyNames + just iterates the the object and its prototype chain calling getOwnPropertyNames at each level. + + * API/JSCallbackObject.h: + * API/JSCallbackObjectFunctions.h: + (JSC::::getOwnPropertyNames): + * JavaScriptCore.exp: + * debugger/DebuggerActivation.cpp: + (JSC::DebuggerActivation::getOwnPropertyNames): + * debugger/DebuggerActivation.h: + * runtime/CommonIdentifiers.h: + * runtime/JSArray.cpp: + (JSC::JSArray::getOwnPropertyNames): + * runtime/JSArray.h: + * runtime/JSByteArray.cpp: + (JSC::JSByteArray::getOwnPropertyNames): + * runtime/JSByteArray.h: + * runtime/JSNotAnObject.cpp: + (JSC::JSNotAnObject::getOwnPropertyNames): + * runtime/JSNotAnObject.h: + * runtime/JSObject.cpp: + (JSC::JSObject::getOwnPropertyNames): + * runtime/JSObject.h: + * runtime/JSVariableObject.cpp: + (JSC::JSVariableObject::getOwnPropertyNames): + * runtime/JSVariableObject.h: + * runtime/ObjectConstructor.cpp: + (JSC::ObjectConstructor::ObjectConstructor): + (JSC::objectConstructorKeys): + * runtime/RegExpMatchesArray.h: + (JSC::RegExpMatchesArray::getOwnPropertyNames): + * runtime/StringObject.cpp: + (JSC::StringObject::getOwnPropertyNames): + * runtime/StringObject.h: + * runtime/Structure.cpp: + (JSC::Structure::getOwnEnumerablePropertyNames): + (JSC::Structure::getEnumerablePropertyNames): + * runtime/Structure.h: + +2009-09-11 Oliver Hunt + + Reviewed by Sam Weinig. + + getPropertyNames caching is invalid when the prototype chain contains objects with custom getPropertyNames + https://bugs.webkit.org/show_bug.cgi?id=29214 + + Add a flag to TypeInfo to indicate whether a type overrides getPropertyNames. + This flag is used to make sure that caching of the property name data is safe. + + * API/JSCallbackConstructor.h: + (JSC::JSCallbackConstructor::createStructure): + * debugger/DebuggerActivation.h: + (JSC::DebuggerActivation::createStructure): + * runtime/BooleanObject.h: + (JSC::BooleanObject::createStructure): + * runtime/DatePrototype.h: + (JSC::DatePrototype::createStructure): + * runtime/FunctionPrototype.h: + (JSC::FunctionPrototype::createStructure): + * runtime/JSONObject.h: + (JSC::JSONObject::createStructure): + * runtime/JSObject.h: + (JSC::JSObject::createStructure): + * runtime/JSTypeInfo.h: + (JSC::TypeInfo::hasDefaultGetPropertyNames): + * runtime/JSVariableObject.h: + (JSC::JSVariableObject::createStructure): + * runtime/JSWrapperObject.h: + (JSC::JSWrapperObject::createStructure): + * 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/StructureChain.cpp: + (JSC::StructureChain::isCacheable): + +2009-09-11 Alexey Proskuryakov + + Reviewed by Geoff Garen. + + https://bugs.webkit.org/show_bug.cgi?id=29207 + Add checks for using WebCore JS context on secondary threads + + * runtime/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + Added a new mainThreadOnly flag that WebCore would set. + + * runtime/Collector.cpp: (JSC::Heap::registerThread): JSC API methods always call this, + so this is a good place to check that the API isn't used form a wrong thread. + +2009-09-11 Jocelyn Turcotte + + Reviewed by Simon Hausmann. + + Compiling JavaScriptCore on sparc 64 with gcc fails. + + ThreadSafeShared uses the atomic __gnu_cxx::__exchange_and_add with an int, + however on sparc 64 the _Atomic_word argument is typedefed to long (8 bytes). + + The patch disables WTF_USE_LOCKFREE_THREADSAFESHARED in ThreadSafeShared to use + a mutex instead when compiling for sparc 64 with gcc. + + https://bugs.webkit.org/show_bug.cgi?id=29175 + + * wtf/Platform.h: + __sparc64__ is not defined on all OS. + Uses instead: __sparc__ && __arch64__ || __sparcv9 + * wtf/Threading.h: + +2009-09-11 Prasanth Ullattil + + Reviewed by Simon Hausmann. + + Fix compile error on Windows7(64Bit) with latest SDK. + + Added the missing include file. + + * runtime/UString.cpp: + +2009-09-11 Joerg Bornemann + + Reviewed by Simon Hausmann. + + Qt/Windows CE compile fix, include the executable allocator and + markstack implementation in the windows build. + + * JavaScriptCore.pri: + +2009-09-08 John Abd-El-Malek + + Reviewed by Dimitri Glazkov. + + Remove unneeded define for ActiveX. + https://bugs.webkit.org/show_bug.cgi?id=29054 + + * wtf/Platform.h: + +2009-09-10 Mark Rowe + + Rubber-stamped by Sam Weinig. + + Update JavaScriptCore and WebKit's FeatureDefines.xcconfig so that they are in sync with WebCore as they need to be. + + * Configurations/FeatureDefines.xcconfig: + +2009-09-10 Fumitoshi Ukai + + Reviewed by Alexey Proskuryakov. + + Export WTF::tryFastMalloc used in WebSocketChannel. + https://bugs.webkit.org/show_bug.cgi?id=28038 + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-09-10 Oliver Hunt + + Reviewed by NOBODY (Build fix). + + Make StructureTransitionTable use an enum for the PtrAndFlags member + used for the single transition slot optimisation. + + * runtime/StructureTransitionTable.h: + (JSC::StructureTransitionTable::StructureTransitionTable): + (JSC::StructureTransitionTable::usingSingleTransitionSlot): + (JSC::StructureTransitionTable::): + +2009-09-10 Oliver Hunt + + Reviewed by Geoff Garen. + + Refactor StructureTransitionTable and Structure to unify handling of the single slot optimization + https://bugs.webkit.org/show_bug.cgi?id=29141 + + Make StructureTransitionTable encapsulate the single transition slot optimization. + + * runtime/Structure.cpp: + (JSC::Structure::Structure): + (JSC::Structure::~Structure): + (JSC::Structure::addPropertyTransitionToExistingStructure): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::addPropertyWithoutTransition): + (JSC::Structure::removePropertyWithoutTransition): + (JSC::Structure::hasTransition): + * runtime/Structure.h: + (JSC::StructureTransitionTable::contains): + (JSC::StructureTransitionTable::get): + (JSC::StructureTransitionTable::hasTransition): + (JSC::StructureTransitionTable::reifySingleTransition): + * runtime/StructureTransitionTable.h: + (JSC::StructureTransitionTable::StructureTransitionTable): + (JSC::StructureTransitionTable::~StructureTransitionTable): + (JSC::StructureTransitionTable::remove): + (JSC::StructureTransitionTable::add): + (JSC::StructureTransitionTable::table): + (JSC::StructureTransitionTable::singleTransition): + (JSC::StructureTransitionTable::usingSingleTransitionSlot): + (JSC::StructureTransitionTable::setSingleTransition): + (JSC::StructureTransitionTable::setTransitionTable): + (JSC::StructureTransitionTable::): + * wtf/PtrAndFlags.h: + (WTF::PtrAndFlags::PtrAndFlags): + +2009-09-10 Zoltan Horvath + + Reviewed by Darin Adler. + + Implement fastDeleteSkippingDestructor for FastAllocBase and fastDeleteAllValues for HashSet + https://bugs.webkit.org/show_bug.cgi?id=25930 + + FastAllocBase has been extended with fastDeleteSkippingDestructor function which + releases memory without destructor call. fastDeleteAllValues has been implemented + similar as deleteAllValues but it uses fastDelete function to release memory. + + * wtf/FastAllocBase.h: + (WTF::fastDeleteSkippingDestructor): + * wtf/HashSet.h: + (WTF::fastDeleteAllValues): + +2009-09-10 Laszlo Gombos + + Reviewed by Darin Adler. + + ARM compiler does not understand GCC visibility attribute + https://bugs.webkit.org/show_bug.cgi?id=29079 + + * API/JSBase.h: Make the test more specific to hit only + the GCC compiler + +2009-09-10 Adam Barth + + Unreviewed revert of the previous change. It broke the tests. + + * wtf/dtoa.cpp: + (WTF::dtoa): + +2009-09-10 Ben Laurie + + Reviewed by Adam Barth. + + + + If dtoa was given a small buffer and the number was either infinite or + NaN, then the buffer would be overflowed. + + * wtf/dtoa.cpp: + +2009-09-09 Laszlo Gombos + + Reviewed by Darin Adler. + + Change reinterpret_cast to static_cast in r48212. + + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::cacheFlush): + +2009-09-09 Laszlo Gombos + + Reviewed by Darin Adler. + + Remove WTF_PLATFORM_FORCE_PACK as it is no longer used + https://bugs.webkit.org/show_bug.cgi?id=29066 + + * wtf/Platform.h: + +2009-09-09 Laszlo Gombos + + Reviewed by Ariya Hidayat. + + Implement flushing the instruction cache for Symbian + https://bugs.webkit.org/show_bug.cgi?id=29075 + + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::cacheFlush): Call IMB_Range to flush + the instruction cache on Symbian + +2009-09-09 Kent Hansen + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=29024 + Make JavaScriptCore compile on platforms with case-insensitive file systems and typeinfo.h in STL + + These platforms include Microsoft Visual Studio 2003, and Symbian with Metrowerks compiler. + + * JavaScriptCore.gypi: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/JSTypeInfo.h: Copied from JavaScriptCore/runtime/TypeInfo.h. + * runtime/Structure.h: + * runtime/TypeInfo.h: Removed. + +2009-09-08 Oliver Hunt + + Reviewed by Maciej Stachowiak. + + JSON.stringify(Date) loses the milliseconds information + https://bugs.webkit.org/show_bug.cgi?id=29063 + + Make sure we include milliseconds in the output of toISOString. + + * runtime/DatePrototype.cpp: + (JSC::dateProtoFuncToISOString): + +2009-09-08 Kevin Ollivier + + wx build fix, generate derived sources earlier in order to make sure + they're found by the build system when generating the list of sources to build. + + * wscript: + +2009-09-08 Laszlo Gombos + + Reviewed by Simon Hausmann. + + Build fix when USE(LOCKFREE_THREADSAFESHARED) is not defined + https://bugs.webkit.org/show_bug.cgi?id=29011 + + * wtf/Threading.h: Use LOCKFREE_THREADSAFESHARED guard for + atomicIncrement and atomicDecrement + +2009-09-07 Zoltan Horvath + + Reviewed by Darin Adler. + + Allow custom memory allocation control in Yarr's RegexInterpreter + https://bugs.webkit.org/show_bug.cgi?id=29025 + + Inherits RegexInterpreter classes from FastAllocBase (bug #20422), which has + been instantiated by 'new': + + class ByteDisjunction + -> instantiated in JavaScriptCore/yarr/RegexInterpreter.cpp:1462 + + struct BytecodePattern + -> instantiated in JavaScriptCore/yarr/RegexInterpreter.cpp:1279 + + * yarr/RegexInterpreter.h: + +2009-09-07 Drew Wilson + + Reverting r48121 to fix Windows build errors. + + * JavaScriptCore.exp: + +2009-09-07 Drew Wilson + + Reviewed by David Levin. + + Enable SHARED_WORKERS by default + https://bugs.webkit.org/show_bug.cgi?id=28959 + + * Configurations/FeatureDefines.xcconfig: + +2009-09-07 Fumitoshi Ukai + + Reviewed by Alexey Proskuryakov. + + Export WTF::tryFastMalloc used in WebSocketChannel. + https://bugs.webkit.org/show_bug.cgi?id=28038 + + * JavaScriptCore.exp: + +2009-09-04 Oliver Hunt + + Reviewed by NOBODY (Build fix). + + Fix windows export files + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-09-04 Oliver Hunt + + Reviewed by Gavin Barraclough. + + [[ToString]] conversion should use the actual toString function for String objects. + + Remove incorrect specialisations of toString conversions on StringObject. + + * JavaScriptCore.exp: + * runtime/StringObject.cpp: + * runtime/StringObject.h: + +2009-09-04 Steve Falkenburg + + Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Add new export. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Add new export. + +2009-09-04 Steve Falkenburg + + Windows build fix. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Remove unneeded export. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Remove unneeded export. + +2009-09-04 Darin Adler + + Reviewed by Geoff Garen. + + DateInstance object collected on ARM JIT (JSValue: WTF_USE_JSVALUE32) + https://bugs.webkit.org/show_bug.cgi?id=28909 + + Part two. + + Make some improvements to garbage collection code: + + 1) Create a runtime assertion that catches any classes that + override markChildren but have the HasDefaultMark bit set. + 2) Remove checks of the mark bit outside the MarkStack::append + function; they are redundant. + 3) Improve the efficiency of the asObject and asArray functions + when called on JSCell* to avoid a round trip to JSValue. + 4) Make more callers use the checked asCell and asObject + casting functions rather than unchecked casts. + 5) Removed the JSCell::marked function and other GC-related + functions because these operations are no longer things that + code other than the core GC code needs to do directly. Fixed + callers that were calling them. + + * runtime/Collector.cpp: + (JSC::Heap::markConservatively): Removed unneeded call to MarkStack::drain. + (JSC::Heap::markProtectedObjects): Removed unneeded check of the mark + bit and call to MarkStack::drain. + (JSC::Heap::collect): Removed unneeded checks of the mark bit and also + changed call to SmallStrings::mark to call markChildren instead to match + the rest of the objects. + (JSC::typeName): Removed unneeded cast to JSObject*. + + * runtime/JSArray.h: + (JSC::asArray): Added an overload for JSCell* and changed the JSValue + version to call it. Removed some unneeded casts. + (JSC::JSArray::markChildrenDirect): Marked this function inline. It's in + a header, and if not marked inline this could lead to linking problems. + (JSC::MarkStack::markChildren): Added. This helper function is used by + the drain function to avoid repating code. Also added the code here to + check fro default mark violations in debug code. If a markChildren + function adds something to the mark stack, but the type info claimed + hasDefaultMark was true, then we will get an assertion now. Also fixed + the assertion about the mark bit to use the Heap function directly + because we don't have a JSCell::marked function any more. + (JSC::MarkStack::drain): Changed a local variable from "v" to "value", + and from "currentCell" to "cell". Changed to call markChildren in two + places instead of repeating a chain of if statements twice. Changed + code that reads and writes the mark bit to use Heap::isCellMarked and + Heap::markCell so we can eliminate the JSCell::marked and + JSCell::markCellDirect functions. + + * runtime/JSCell.h: Removed JSCell's markCellDirect and marked member + functions. Added a comment explaining that asCell should be deprecated + in favor of the JSValue asCell member function. + (JSC::MarkStack::append): Added the assertion that catches callers + that have set the HasDefaultMark bit incorrectly. Changed + code that reads and writes the mark bit to use Heap::isCellMarked and + Heap::markCell so we can eliminate the JSCell::marked and + JSCell::markCellDirect functions. Moved the overload of + MarkStack::append for JSValue here so it can call through to the cell + version. The old version had a copy of all the code instead, but that + repeated the conversion from JSValue to JSCell* and the check for + whether a value is a cell multiple times. + (JSC::Structure::markAggregate): Moved this function here to avoid + dependencies for Structure.h, since this calls MarkStack::append. + + * runtime/JSObject.cpp: + (JSC::JSObject::markChildren): Added code to clear + m_isCheckingForDefaultMarkViolation so the marking done by JSObject + doesn't trigger the assertion. + + * runtime/JSValue.h: Moved some stray includes that were outside the + header guard inside it. Not sure how that happened! Removed the + GC-related member functions markChildren, hasChildren, marked, and + markDirect. + + * runtime/JSWrapperObject.h: Made markChildren private. + (JSC::JSWrapperObject::createStructure): Added. Fixes a bug where the + HasDefaultMark bit was set. + + * runtime/MarkStack.h: Added m_isCheckingForDefaultMarkViolation and + initialized it to false. Moved the append function body from here to + JSCell.h. Added a declaration of a private markChildren function used + inside the drain function. + + * runtime/SmallStrings.cpp: + (JSC::SmallStrings::markChildren): Changed the name and style of this + function to match other functions. This allows us to share the normal + mark stack code path. + + * runtime/SmallStrings.h: Changed the name and interface of mark to + the more-normal markChildren style. + + * runtime/Structure.h: Moved the body of markAggregate into the + JSCell.h to avoid a circular dependency with JSCell.h. + +2009-09-04 Darin Adler + + Reviewed by Geoff Garen. + + DateInstance object collected on ARM JIT (JSValue: WTF_USE_JSVALUE32) + https://bugs.webkit.org/show_bug.cgi?id=28909 + + Part one. + + Make some improvements to garbage collection code: + + 1) Fix the two classes that had the default mark bit set but + should not. + 2) Remove checks of the mark bit outside the MarkStack::append + function; they are redundant. + 3) Make more callers use the checked asCell and asObject + casting functions rather than unchecked casts. + 4) Removed some GC-related functions because these operations are + no longer things that code other than the core GC code needs + to do directly. Fixed callers that were calling them. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::markAggregate): Removed unneeded check of the mark + bit before calling MarkStack::append. + + * interpreter/Register.h: Removed unneeded marked and markChildren + functions. + + * jit/JITStubs.cpp: + (op_eq): Removed unneeded assertions, instead using checked casting + functions such as asObject. + + * runtime/ArgList.h: Added now-needed forward declaration of MarkStack. + + * runtime/GetterSetter.cpp: + (JSC::GetterSetter::markChildren): Remmoved unneeded check of the mark bit. + + * runtime/GlobalEvalFunction.h: + (JSC::GlobalEvalFunction::createStructure): Added. Fixes a bug where the + HasDefaultMark bit was set. + + * runtime/JSCell.cpp: + (JSC::JSCell::getObject): Use asObject to avoid a direct static_cast. + + * runtime/JSObject.h: + (JSC::asObject): Added an overload for JSCell* and changed the JSValue + version to call it. + (JSC::JSValue::get): Use asObject to avoid a direct static_cast. + + * runtime/JSWrapperObject.h: Made markChildren private. + (JSC::JSWrapperObject::createStructure): Added. Fixes a bug where the + HasDefaultMark bit was set. Later we may want to optimize this for + wrapper types that never have cells in their internal values, but there + is no measured performance regression in SunSpider or V8 doing this + all the time. + + * runtime/MarkStack.cpp: Tweaked formatting. + +2009-09-04 Kevin Ollivier + + wx build fix. Switch USE_ defines over to the compiler so that they can be + checked by files not including config.h (like WebCorePrefix.h). + + * wtf/Platform.h: + +2009-09-03 Yong Li + + Reviewed by David Levin. + + Remove unnecessary dependency on unistd.h + https://bugs.webkit.org/show_bug.cgi?id=28962 + + * runtime/Completion.cpp: + +2009-09-03 Fumitoshi Ukai + + Reviewed by Eric Seidel. + + Add strnstr for Linux and Windows in StringExtras.h + https://bugs.webkit.org/show_bug.cgi?id=28901 + + * wtf/StringExtras.h: + (strnstr): + +2009-09-03 Zoltan Horvath + + Reviewed by Darin Adler. + + Allow custom memory allocation control for JavaScriptCore's HashEntry class + https://bugs.webkit.org/show_bug.cgi?id=27830 + + Inherits HashEntry class from FastAllocBase because it has been + instantiated by 'new' JavaScriptCore/runtime/Lookup.cpp:32. + + * runtime/Lookup.h: + +2009-09-02 Gavin Barraclough + + Should crash if JIT code buffer allocation fails. + + https://bugs.webkit.org/show_bug.cgi?id=28926 + + + * jit/ExecutableAllocatorPosix.cpp: + (JSC::ExecutablePool::systemAlloc): + * jit/ExecutableAllocatorWin.cpp: + (JSC::ExecutablePool::systemAlloc): + +2009-09-02 Kevin Ollivier + + waf build fixes for Windows/MSVC. + + * wscript: + +2009-09-02 Kevin Ollivier + + Build fix for building on Windows. + + * wtf/ThreadingPthreads.cpp: + +2009-09-02 Norbert Leser + + Reviewed by Eric Seidel. + + Use fastMalloc when neither MMAP nor VIRTUALALLOC are enabled + + RegisterFile constructor currently throws #error when both + MMAP and VIRTUALALLOC conditions fail. + On any platform that does not provide these features + (for instance, Symbian), + the fallback should be regular malloc (or fastMalloc). + It is functionally equivalent in this case, even though it may + have certain drawbacks such as lack of dynamic pre-allocation. + + * interpreter/RegisterFile.cpp: + (JSC::RegisterFile::~RegisterFile): + * interpreter/RegisterFile.h: + (JSC::RegisterFile::RegisterFile): + +2009-08-31 Robert Agoston + + Reviewed by Gavin Barraclough. + + Fixed typo. + https://bugs.webkit.org/show_bug.cgi?id=28691 + + * parser/Parser.h: + (JSC::Parser::parse): + +2009-08-27 Oliver Hunt + + Reviewed by Maciej Stachowiak. + + JSON Stringifier does not follow ES5 spec for handling of Number, String and Boolean objects + https://bugs.webkit.org/show_bug.cgi?id=28797 + + Fixed unwrapBoxedPrimitive to do the right thing, which necessitated a couple of new exception + checks, and corrected the logic in gap to correctly convert Number and String objects. + + * runtime/JSONObject.cpp: + (JSC::unwrapBoxedPrimitive): + (JSC::gap): + (JSC::Stringifier::Stringifier): + (JSC::Stringifier::appendStringifiedValue): + +2009-08-27 Oliver Hunt + + Reviewed by Adam Roben. + + JSON.stringify replacer array does not accept values that are not string primitives. + https://bugs.webkit.org/show_bug.cgi?id=28788 + + Update the JSON stringifier to initialise its replacer array according to the most + recent version of the spec. + + * runtime/Identifier.h: + (JSC::Identifier::from): + * runtime/JSONObject.cpp: + (JSC::Stringifier::Stringifier): + +2009-08-27 Alexey Proskuryakov + + Reviewed by Oliver Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=28753 + Excessive number of threads (and a crash) + + * wtf/Threading.h: (WTF::atomicIncrement): Changed atomicIncrement to match decrement + and return the new value. Also added using directives for these functions, to match + te rest of WTF. + +2009-08-27 Brent Fulgham + + Reviewed by Adam Roben. + + Link the testapi against CFLite when building the WinCairo port. + + * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add new Release_CFLite + target. Update all targets to inherit from either the + JavaScriptCF.vsprops (Apple target) or the JavaScriptCFLite.vsprops + file (WinCairo target). + * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Remove + input file CoreFoundation.lib. This is provided by either the + JavaScriptCF.vsprops or JavaScriptCFLite.vsprops file. + +2009-08-27 Steve Falkenburg + + Reviewed by Geoff Garen. + + Fix Windows-specific crash due to missing memory clearing call. + + * runtime/Collector.cpp: + (JSC::Heap::allocateBlock): + +2009-08-27 Brent Fulgham + + Build fix: JavaScriptCore_debug.def missing some exports. Apple + Windows build does not use this file, so it was not noticed previously. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-08-27 Gavin Barraclough + + Reviewed by Oliver Hunt. + + x86-64 GTK broken due to code offsets changing, pointers sometimes packed into immediates. + https://bugs.webkit.org/show_bug.cgi?id=28317 + + Missed one, fix part II. + + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::move): + * assembler/X86Assembler.h: + (JSC::CAN_SIGN_EXTEND_8_32): + +2009-08-27 Oliver Hunt + + Reviewed by Adam Roben. + + JSON.stringify replacer array does not accept values that are not string primitives. + https://bugs.webkit.org/show_bug.cgi?id=28788 + + Update the JSON stringifier to initialise its replacer array according to the most + recent version of the spec. + + * runtime/Identifier.h: + (JSC::Identifier::from): + * runtime/JSONObject.cpp: + (JSC::Stringifier::Stringifier): + +2009-08-27 Oliver Hunt + + Reviewed by Alexey Proskuryakov. + + JSON parser accepts trailing comma in array literals + https://bugs.webkit.org/show_bug.cgi?id=28779 + + Update parser to correctly fail if there's a trailing comma. + + * runtime/LiteralParser.cpp: + (JSC::LiteralParser::parse): + +2009-08-26 Oliver Hunt + + Reviewed by Gavin Barraclough. + + 'this' in JSON.parse reviver is the global object + https://bugs.webkit.org/show_bug.cgi?id=28752 + + This is a technically simple change, we merely update the code for calling + the reviver function to pass the correct this object. Doing so however + exposes the holder to arbitrary mutation by the reviver function so it is + necessary for us to now guard all property accesses against the possibility + of failure. + + * runtime/JSArray.h: + JSON needs to delete a property from the array, so we friend its + Walker class so that we can make a non-virtual call to the arrays + delete and getOwnPropertySlot methods. + * runtime/JSONObject.cpp: + (JSC::Walker::callReviver): + We need to pass the correct this object + (JSC::Walker::walk): + Update calls to callReviver, and update property logic logic + to correctly handle the holder being mutated by the reviver + function. + +2009-08-26 Alice Liu + + Windows build fix: added some exported symbols + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-08-26 Geoffrey Garen + + Windows build fix: Removed some exported symbols that no longer exist. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-08-26 Gavin Barraclough + + Reviewed by Olliejver Hunt. + + x86-64 GTK broken due to code offsets changing, pointers sometimes packed into immediates. + https://bugs.webkit.org/show_bug.cgi?id=28317 + + We rely on a slightly OS X specific behaviour, that x86-64 applications have a 4Gb zero page, + so pointers are never representable as a 32-bit integer, and always have to be represented by + a separate immediate load instruction, rather than within the immediate field of an arithmetic + or memory operation. + + We explicitly check for a couple of cases where a value might be representable in 32-bit, but + these probably never kick in on Mac OS, and only kick in to hose GTK. Deleting these does not + show a performance degradation on SunSpider. Remove. + + * assembler/MacroAssemblerX86_64.h: + (JSC::MacroAssemblerX86_64::storePtr): + (JSC::MacroAssemblerX86_64::branchPtr): + +2009-08-26 Geoffrey Garen + + Reviewed by Oliver Hunt. + + A bit of Collector refatoring. + + SunSpider says no change. v8 says 1.003x faster (1.02x faster on splay). + + * JavaScriptCore.exp: + + * runtime/JSCell.cpp: + (JSC::JSCell::toPrimitive): + (JSC::JSCell::getPrimitiveNumber): + (JSC::JSCell::toBoolean): + (JSC::JSCell::toNumber): + (JSC::JSCell::toString): + (JSC::JSCell::toObject): Removed pure virtual functions from + JSCell, so the collector can construct one. This allowed + me to remove a bunch of ASSERT_NOT_REACHED throughout the + code, too. + + * runtime/JSCell.h: + (JSC::JSCell::JSCell): ditto + (JSC::Heap::heap): Inlined this function because it's trivial. + + * JavaScriptCore.exp: + + * runtime/Collector.cpp: + (JSC::Heap::destroy): + (JSC::Heap::allocateBlock): + (JSC::Heap::freeBlock): + (JSC::Heap::freeBlocks): Renamed freeHeap to freeBlocks, since + it doesn't actually free the Heap object. + (JSC::Heap::heapAllocate): + (JSC::Heap::sweep): + * runtime/Collector.h: Refactored block allocation and destruction + into helper functions. + + * runtime/GetterSetter.cpp: + * runtime/JSAPIValueWrapper.cpp: + * runtime/JSPropertyNameIterator.cpp: Removed dummy implementations + of pure virtual functions. (See above.) + +=== End re-roll-in of r47738:47740 with Windows crash fixed === + +2009-08-26 Geoffrey Garen + + Build fix: start out with a 32-bit value to avoid a shortening warning. + + * runtime/Collector.cpp: + (JSC::Heap::sweep): + +2009-08-24 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Substantially reduced VM thrash in the GC heap. + + 1.08x faster on v8 (1.60x faster on v8-splay). + + 1.40x faster on bench-alloc-nonretained. + + 1.90x faster on bench-alloc-retained. + + SunSpider says no change. + + * runtime/Collector.cpp: + (JSC::Heap::heapAllocate): Fixed a long-standing bug: update a few local + variables unconditionally after calling collect(), since they may be used + even if we don't "goto scan". (In the bug I saw, usedBlocks got out of + sync with heap.usedBlocks). + (JSC::Heap::sweep): Keep enough free heap space to accomodate + the number of objects we'll allocate before the next GC, plus 25%, for + good measure. + * runtime/Collector.h: Bumped the block size to 256k. This seems to give + the best cache performance, and it prevents us from initiating lots of + VM traffic to recover very small chunks of memory. + +=== Begin re-roll-in of r47738:47740 with Windows crash fixed === + +2009-08-25 Drew Wilson + + Reviewed by David Levin. + + postMessage() spec now supports sending arrays of ports + https://bugs.webkit.org/show_bug.cgi?id=26902 + + Added OwnPtr to VectorTraits so we can store OwnPtrs in Vectors. + + * wtf/VectorTraits.h: + +2009-08-26 Xan Lopez + + Rubber-stamped by Gustavo Noronha. + + Remove duplicated files from file list. + + * GNUmakefile.am: + +2009-08-26 Oliver Hunt + + Reviewed by NOBODY (Build fix). + + More export fixes. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-08-26 Oliver Hunt + + Reviewed by NOBODY (Build fix). + + Hopefully fix all the exports from JSC on windows + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-08-26 Oliver Hunt + + Reviewed by NOBODY (Build fixes). + + Forgot I added files to JavaScriptCore. + + * GNUmakefile.am: + * JavaScriptCore.gypi: + * JavaScriptCore.pri: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCoreSources.bkl: + +2009-08-25 Oliver Hunt + + Reviewed by Gavin Barraclough. + + [ES5] Implement getOwnPropertyDescriptor + https://bugs.webkit.org/show_bug.cgi?id=28724 + + Implement the core runtime support for getOwnPropertyDescriptor. + This adds a virtual getOwnPropertyDescriptor method to every class + that implements getOwnPropertySlot that shadows the behaviour of + getOwnPropertySlot. The alternative would be to make getOwnPropertySlot + (or PropertySlots in general) provide property attribute information, + but quick testing showed this to be a regression. + + * JavaScriptCore.exp: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/Arguments.cpp: + (JSC::Arguments::getOwnPropertyDescriptor): + * runtime/Arguments.h: + * runtime/ArrayPrototype.cpp: + (JSC::ArrayPrototype::getOwnPropertyDescriptor): + * runtime/ArrayPrototype.h: + * runtime/CommonIdentifiers.h: + * runtime/DatePrototype.cpp: + (JSC::DatePrototype::getOwnPropertyDescriptor): + * runtime/DatePrototype.h: + * runtime/JSArray.cpp: + (JSC::JSArray::getOwnPropertyDescriptor): + * runtime/JSArray.h: + * runtime/JSByteArray.cpp: + (JSC::JSByteArray::getOwnPropertyDescriptor): + * runtime/JSByteArray.h: + * runtime/JSFunction.cpp: + (JSC::JSFunction::getOwnPropertyDescriptor): + * runtime/JSFunction.h: + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::getOwnPropertyDescriptor): + * runtime/JSNotAnObject.cpp: + (JSC::JSNotAnObject::getOwnPropertyDescriptor): + * runtime/JSNotAnObject.h: + * runtime/JSONObject.cpp: + (JSC::JSONObject::getOwnPropertySlot): + (JSC::JSONObject::getOwnPropertyDescriptor): + * runtime/JSONObject.h: + * runtime/JSObject.cpp: + (JSC::JSObject::getOwnPropertyDescriptor): + (JSC::JSObject::getPropertyDescriptor): + * runtime/JSObject.h: + * runtime/JSString.cpp: + (JSC::JSString::getStringPropertyDescriptor): + (JSC::JSString::getOwnPropertyDescriptor): + * runtime/JSString.h: + * runtime/JSVariableObject.cpp: + (JSC::JSVariableObject::symbolTableGet): + * runtime/JSVariableObject.h: + * runtime/Lookup.h: + (JSC::getStaticPropertyDescriptor): + (JSC::getStaticFunctionDescriptor): + (JSC::getStaticValueDescriptor): + Add property descriptor equivalents of the lookup + table access functions + + * runtime/MathObject.cpp: + (JSC::MathObject::getOwnPropertySlot): + (JSC::MathObject::getOwnPropertyDescriptor): + * runtime/MathObject.h: + * runtime/NumberConstructor.cpp: + (JSC::NumberConstructor::getOwnPropertyDescriptor): + * runtime/NumberConstructor.h: + * runtime/ObjectConstructor.cpp: + (JSC::ObjectConstructor::ObjectConstructor): + (JSC::objectConstructorGetOwnPropertyDescriptor): + * runtime/PropertyDescriptor.cpp: Added. + (JSC::PropertyDescriptor::writable): + (JSC::PropertyDescriptor::enumerable): + (JSC::PropertyDescriptor::configurable): + (JSC::PropertyDescriptor::hasAccessors): + (JSC::PropertyDescriptor::setUndefined): + (JSC::PropertyDescriptor::getter): + (JSC::PropertyDescriptor::setter): + (JSC::PropertyDescriptor::setDescriptor): + (JSC::PropertyDescriptor::setAccessorDescriptor): + * runtime/PropertyDescriptor.h: Added. + (JSC::PropertyDescriptor::PropertyDescriptor): + (JSC::PropertyDescriptor::attributes): + (JSC::PropertyDescriptor::isValid): + (JSC::PropertyDescriptor::value): + * runtime/RegExpConstructor.cpp: + (JSC::RegExpConstructor::getOwnPropertyDescriptor): + * runtime/RegExpConstructor.h: + * runtime/RegExpMatchesArray.h: + (JSC::RegExpMatchesArray::getOwnPropertyDescriptor): + * runtime/RegExpObject.cpp: + (JSC::RegExpObject::getOwnPropertyDescriptor): + * runtime/RegExpObject.h: + * runtime/StringObject.cpp: + (JSC::StringObject::getOwnPropertyDescriptor): + * runtime/StringObject.h: + * runtime/StringPrototype.cpp: + (JSC::StringPrototype::getOwnPropertyDescriptor): + * runtime/StringPrototype.h: + +2009-08-24 Gavin Barraclough + + Reviewed by Darin Adler. + + How many copies of the parameters do you need? + https://bugs.webkit.org/show_bug.cgi?id=28701 + + The function parameters in JSC get copied a lot - and unnecessarily so. + + Originally this happened due to duplicating FunctionBodyNodes on recompilation, + though the problem has been exacerbated by copying the parameters from the + original function body onto the executable, then back onto the real body that + will be generated (this happens on every function). And this is all made worse + since the data structures in question are a little ugly - C style arrays of C++ + objects containing ref counts, so they need a full copy-construct (rather than + a simple memcpy). + + This can all be greatly simplified by just punting the parameters off into + their own ref-counted object, and forgoing all the copying. + + ~no performance change, possible slight progression. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::makeFunction): + * parser/Nodes.cpp: + (JSC::FunctionParameters::FunctionParameters): + (JSC::FunctionBodyNode::FunctionBodyNode): + (JSC::FunctionBodyNode::finishParsing): + * parser/Nodes.h: + (JSC::FunctionBodyNode::parameters): + (JSC::FunctionBodyNode::parameterCount): + * runtime/Executable.cpp: + (JSC::FunctionExecutable::~FunctionExecutable): + (JSC::FunctionExecutable::compile): + (JSC::FunctionExecutable::reparseExceptionInfo): + (JSC::FunctionExecutable::fromGlobalCode): + (JSC::FunctionExecutable::paramString): + * runtime/Executable.h: + (JSC::FunctionExecutable::FunctionExecutable): + (JSC::FunctionExecutable::parameterCount): + +2009-08-25 Brent Fulgham + + Reviewed by NOBODY (Buildfix). + + * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add Debug_CFLite target + that inherits from the debug_wincairo property sheet and therefore + links to the proper debug library. + * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add Debug_CFLite target + that inherits from the debug_wincairo property sheet and therefore + links to the proper debug library. + +2009-08-25 Chris Marrin + + Reviewed by Simon Fraser. + + Export tryFastMalloc for Canvas3D work + https://bugs.webkit.org/show_bug.cgi?id=28018 + + * JavaScriptCore.exp: + +2009-08-25 David Levin + + Reviewed by Adam Roben. + + PLATFORM(CFNETWORK) should be USE(CFNETWORK). + https://bugs.webkit.org/show_bug.cgi?id=28713 + + * wtf/Platform.h: Added a #define to catch this issue in the + future. The define would generate an error on gcc without the + space in the expansion, but Visual C++ needs the space to cause an error. + +2009-08-24 Brent Fulgham + + Reviewed by Steve Falkenburg. + + Revise CFLite Debug build to emit DLL's with _debug label. + https://bugs.webkit.org/show_bug.cgi?id=28695. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Modify + Cairo debug build to inherit from new debug_cairo property sheet. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops: + Modify to look for debug CFLite when in debug build. + +2009-08-24 Gavin Barraclough + + Reviewed by Oliver Adler & Darin Hunt. + + https://bugs.webkit.org/show_bug.cgi?id=28691 + Do not retain ScopeNodes outside of parsing + + There is now no need for these to exist outside of parsing - their use in the runtime is replaced by Executable types. + + * bytecode/EvalCodeCache.h: + (JSC::EvalCodeCache::get): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitNewFunction): + (JSC::BytecodeGenerator::emitNewFunctionExpression): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::makeFunction): + * debugger/Debugger.cpp: + (JSC::Debugger::recompileAllJSFunctions): + (JSC::evaluateInGlobalCallFrame): + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::evaluate): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::execute): + (JSC::Interpreter::prepareForRepeatCall): + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * parser/Nodes.cpp: + (JSC::ScopeNodeData::ScopeNodeData): + (JSC::ProgramNode::create): + (JSC::EvalNode::create): + (JSC::FunctionBodyNode::create): + * parser/Nodes.h: + (JSC::ScopeNode::adoptData): + (JSC::FunctionBodyNode::parameterCount): + * parser/Parser.cpp: + * parser/Parser.h: + (JSC::Parser::arena): + (JSC::Parser::Parser): + (JSC::Parser::parse): + * runtime/ArrayPrototype.cpp: + (JSC::isNumericCompareFunction): + (JSC::arrayProtoFuncSort): + * runtime/Completion.cpp: + (JSC::checkSyntax): + (JSC::evaluate): + * runtime/Executable.cpp: + (JSC::FunctionExecutable::~FunctionExecutable): + (JSC::EvalExecutable::compile): + (JSC::ProgramExecutable::checkSyntax): + (JSC::ProgramExecutable::compile): + (JSC::FunctionExecutable::compile): + (JSC::EvalExecutable::generateJITCode): + (JSC::ProgramExecutable::generateJITCode): + (JSC::FunctionExecutable::generateJITCode): + (JSC::FunctionExecutable::reparseExceptionInfo): + (JSC::EvalExecutable::reparseExceptionInfo): + (JSC::FunctionExecutable::recompile): + (JSC::FunctionExecutable::fromGlobalCode): + (JSC::FunctionExecutable::copyParameters): + (JSC::FunctionExecutable::paramString): + * runtime/Executable.h: + (JSC::ScriptExecutable::ScriptExecutable): + (JSC::ScriptExecutable::sourceID): + (JSC::ScriptExecutable::sourceURL): + (JSC::ScriptExecutable::lineNo): + (JSC::ScriptExecutable::lastLine): + (JSC::ScriptExecutable::usesEval): + (JSC::ScriptExecutable::usesArguments): + (JSC::ScriptExecutable::needsActivation): + (JSC::ScriptExecutable::recordParse): + (JSC::EvalExecutable::bytecode): + (JSC::EvalExecutable::jitCode): + (JSC::ProgramExecutable::bytecode): + (JSC::ProgramExecutable::reparseExceptionInfo): + (JSC::ProgramExecutable::jitCode): + (JSC::FunctionExecutable::FunctionExecutable): + (JSC::FunctionExecutable::make): + (JSC::FunctionExecutable::bytecode): + (JSC::FunctionExecutable::isGenerated): + (JSC::FunctionExecutable::name): + (JSC::FunctionExecutable::parameterCount): + (JSC::FunctionExecutable::jitCode): + * runtime/FunctionConstructor.cpp: + (JSC::constructFunction): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::numericCompareFunction): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncEval): + +2009-08-24 Darin Adler + + * runtime/ObjectPrototype.cpp: + (JSC::ObjectPrototype::put): Landed revised version I had tested but forgot + to land. Leave out the branch, since we don't need one. + +2009-08-24 Darin Adler + + Reviewed by Geoff Garen. + + Array index miss case creates a string every time + https://bugs.webkit.org/show_bug.cgi?id=28664 + + SunSpider test results I saw: + + 0.5% faster overall + 1% faster on crypto-aes + 20% faster on crypto-md5 + 13% faster on crypto-sha1 + + * runtime/ObjectPrototype.cpp: + (JSC::ObjectPrototype::ObjectPrototype): Initialize m_hasNoPropertiesWithUInt32Names + to true. + (JSC::ObjectPrototype::put): Clearly m_hasNoPropertiesWithUInt32Names if the new + property has a name that is the string form of a UInt32. + (JSC::ObjectPrototype::getOwnPropertySlot): Don't call JSObject::getOwnPropertySlot + if m_hasNoPropertiesWithUInt32Names is true, and it is highly likely to be true. + + * runtime/ObjectPrototype.h: Added declarations for the above. + +2009-08-24 Gustavo Noronha Silva + + Unreviewed. Fix a typo in my distcheck build fix. + + * GNUmakefile.am: + +2009-08-23 Gustavo Noronha Silva + + Unreviewed build fix for make distcheck. + + * GNUmakefile.am: Added files required for the build. + +2009-08-22 Maciej Stachowiak + + Reviewed by Mark Rowe. + + REGRESSION(r47639-r47660): Webkit crashes on launch on PowerPC + https://bugs.webkit.org/show_bug.cgi?id=28655 + + * runtime/JSFunction.cpp: + (JSC::JSFunction::JSFunction): Initialize properly with a VPtrHackExecutable. + * wtf/Platform.h: + +2009-08-22 Darin Adler + + Fix storage leak from syntax tree arena allocation patch. + + * parser/Nodes.h: CommaNode needs to inherit from ParserArenaDeletable + because it has a vector. + +2009-08-21 Darin Adler + + Fix Qt build. + + * parser/Nodes.cpp: + (JSC::ScopeNodeData::ScopeNodeData): Made non-inline again. + This is used outside Nodes.cpp so can't be inline unless + it is in the header. + +2009-08-21 Darin Adler + + Two loose ends from the last commit. + + * JavaScriptCore.xcodeproj/project.pbxproj: Made ParserArena.h + and create_hash_table project-internal instead of "private". + * runtime/Executable.h: Removed accidentally-added constructor. + +2009-08-21 Darin Adler + + Reviewed by Gavin Barraclough. + + Syntax tree nodes should use arena allocation + https://bugs.webkit.org/show_bug.cgi?id=25674 + + Use an actual arena now. 0.6% speedup on SunSpider. + + New and improved with 100% less leaking of the universe. + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + Removed all exports involving the class FunctionBodyNode, which no + longer needs to be used outside JavaScriptCore. + + * JavaScriptCore.xcodeproj/project.pbxproj: Made Nodes.h and + Executable.h project-internal instead of "private". + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): Updated since VarStack + contains const Identifier* now. + + * parser/Grammar.y: Made identifiers from the lexer be const + Identifier* and updated since VarStack contains const Identifier* now. + + * parser/Lexer.cpp: + (JSC::Lexer::setCode): Pass in ParserArena, used for identifiers. + (JSC::Lexer::makeIdentifier): Changed return type to const Identifier* + and changed to call ParserArena. + (JSC::Lexer::clear): Removed the code to manage m_identifiers and + added code to set m_arena to 0. + * parser/Lexer.h: Updated for changes above. + + * parser/NodeConstructors.h: + (JSC::ParserArenaFreeable::operator new): Added. Calls allocateFreeable + on the arena. + (JSC::ParserArenaDeletable::operator new): Changed to call the + allocateDeletable function on the arena instead of deleteWithArena. + (JSC::PropertyNode::PropertyNode): Added new constructor that makes + numeric identifiers. Some day we might want to optimize this for + integers so it doesn't create a string for each one. + (JSC::ContinueNode::ContinueNode): Initialize m_ident to nullIdentifier + since it's now a const Identifier& so it can't be left uninitialized. + (JSC::BreakNode::BreakNode): Ditto. + (JSC::CaseClauseNode::CaseClauseNode): Updated to use SourceElements* + to keep track of the statements rather than a separate statement vector. + (JSC::BlockNode::BlockNode): Ditto. + (JSC::ForInNode::ForInNode): Initialize m_ident to nullIdentifier. + + * parser/Nodes.cpp: Moved the comment explaining emitBytecode in here. + It seemed strangely out of place in the header. + (JSC::ThrowableExpressionData::emitThrowError): Added an overload for + UString as well as Identifier. + (JSC::SourceElements::singleStatement): Added. + (JSC::SourceElements::lastStatement): Added. + (JSC::RegExpNode::emitBytecode): Changed the throwError code to use + the substitution mechanism instead of doing a string append. + (JSC::SourceElements::emitBytecode): Added. Replaces the old + statementListEmitCode function, since we now keep the SourceElements + objects around. + (JSC::BlockNode::lastStatement): Added. + (JSC::BlockNode::emitBytecode): Changed to use emitBytecode instead of + statementListEmitCode. + (JSC::CaseClauseNode::emitBytecode): Added. + (JSC::CaseBlockNode::emitBytecodeForBlock): Changed to use emitBytecode + instead of statementListEmitCode. + (JSC::ScopeNodeData::ScopeNodeData): Changed to store the + SourceElements* instead of using releaseContentsIntoVector. + (JSC::ScopeNode::emitStatementsBytecode): Added. + (JSC::ScopeNode::singleStatement): Added. + (JSC::ProgramNode::emitBytecode): Call emitStatementsBytecode instead + of statementListEmitCode. + (JSC::EvalNode::emitBytecode): Ditto. + (JSC::FunctionBodyNode::emitBytecode): Call emitStatementsBytecode + insetad of statementListEmitCode and check for the return node using + the new functions. + + * parser/Nodes.h: Changed VarStack to store const Identifier* instead + of Identifier and rely on the arena to control lifetime. Added a new + ParserArenaFreeable class. Made ParserArenaDeletable inherit from + FastAllocBase instead of having its own operator new. Base the Node + class on ParserArenaFreeable. Changed the various Node classes + to use const Identifier& instead of Identifier to avoid the need to + call their destructors and allow them to function as "freeable" in the + arena. Removed extraneous JSC_FAST_CALL on definitions of inline functions. + Changed ElementNode, PropertyNode, ArgumentsNode, ParameterNode, + CaseClauseNode, ClauseListNode, and CaseBlockNode to use ParserArenaFreeable + as a base class since they do not descend from Node. Eliminated the + StatementVector type and instead have various classes use SourceElements* + instead of StatementVector. This prevents those classes from having to + use ParserArenaDeletable to make sure the vector destructor is called. + + * parser/Parser.cpp: + (JSC::Parser::parse): Pass the arena to the lexer. + + * parser/Parser.h: Added an include of ParserArena.h, which is no longer + included by Nodes.h. + (JSC::Parser::parseFunctionFromGlobalCode): Changed to use the + singleStatement function, since there is no longer any children function. + Removed some unneeded use of RefPtr. + + * parser/ParserArena.cpp: + (JSC::ParserArena::ParserArena): Added. Initializes the new members, + m_freeableMemory, m_freeablePoolEnd, and m_identifiers. + (JSC::ParserArena::freeablePool): Added. Computes the pool pointer, + since we store only the current pointer and the end of pool pointer. + (JSC::ParserArena::deallocateObjects): Added. Contains the common + memory-deallocation logic used by both the destructor and the + reset function. + (JSC::ParserArena::~ParserArena): Changed to call deallocateObjects. + (JSC::ParserArena::reset): Ditto. Also added code to zero out the + new structures, and switched to use clear() instead of shrink(0) since + we don't really reuse arenas. + (JSC::ParserArena::makeNumericIdentifier): Added. + (JSC::ParserArena::allocateFreeablePool): Added. Used when the pool + is empty. + (JSC::ParserArena::isEmpty): Added. No longer inline, which is fine + since this is used only for assertions at the moment. + (JSC::ParserArena::derefWithArena): Make non-inline. + + * parser/ParserArena.h: Added an actual arena of "freeable" objects, + ones that don't need destructors to be called. Also added a separate + IdentifierArena object, a segmented vector of identifiers that used + to be in the Lexer. + + * runtime/Executable.h: Moved the definition of the + FunctionExecutable::make function here. It can't go in JSFunction.h + since that header has to be used outside JavaScriptCore and so can't + include this, which includes Nodes.h. The function could be moved + elswhere if we don't want to include JSFunction.h in this header, but + for now this seems to be the best place. + + * runtime/JSFunction.h: Removed the include of Executable.h and + definition of the FunctionExecutable::make function. + + * wtf/FastMalloc.cpp: Fixed an incorrect comment. + +2009-08-21 Mark Rowe + + Fix the non-JIT build. + + * runtime/Executable.cpp: + * runtime/Executable.h: + +2009-08-21 Gavin Barraclough + + Speculative QuickTime build fix. + + * runtime/JSArray.cpp: + +2009-08-21 Gavin Barraclough + + Speculative QT build fix. + + * runtime/StringPrototype.cpp: + +2009-08-21 Gavin Barraclough + + Reviewed by Oliver Hunt. + + Restructure Executable types so that host functions do not hold a FunctionExecutable. + https://bugs.webkit.org/show_bug.cgi?id=28621 + + All JSFunction objects have a pointer to an Executable*. This is currently always a + FunctionExecutable, however this has a couple of drawbacks. Host functions do not + store a range of information that the FunctionExecutable provides (source, name, + CodeBlock & information presently held on the FunctionBodyNode). + + [ * nearly all... see below! ] + + Instead, make JSFunctions hold a pointer to an ExecutableBase, move fields specific + to JS sourced executable types (source, node) into a new subclass (ScriptExecutable), + and create a new NativeExecutable type. We now provide a new method in JSFunction + to access & downcast to FunctionExecutable, but in doing so we can make an early + check (with an ASSERT) to ensure that the Executable read from a function will only + be treated as a FunctionExecutable (and thus the JS sepcific fields will only be + accessed) if the JSFunction is not a host function. + + There is one JSFunction that currently does not have an Executable, which is the + object created to allow us to read out the vtable pointer. By making this change + we can also add a new Executable type fror this object (VPtrHackExecutable). + Since this means that really all JSFunctions have an Executable we no longer have + to null-check m_executable before us it - particularly in isHostFunction(). + + This patch removes CacheableEvalExecutable, since all subclasses of ExecutableBase + can now be ref-counted - since both JSFunction holds (and ref-counts) an ExecutableBase + that might be a FunctionExecutable or a NativeExecutable. This does now mean that all + ProgramExecutables and EvalExecutables (unnecessarily) provide an interface to be + ref-counted, however this seems less-bad than host functions unnecessarily providing + interface to access non-host specific information. + + The class hierarcy has changed from this: + + - ExecutableBase + - ProgramExecutable + - EvalExecutable + - CacheableEvalExecutable (also RefCounted by multiple-inheritance) + - FunctionExecutable (also RefCounted by multiple-inheritance, 'special' FunctionExecutable also used for host functions) + + To this: + + - RefCounted + - ExecutableBase + - NativeExecutable + - VPtrHackExecutable + - ScriptExecutable + - ProgramExecutable + - EvalExecutable + - FunctionExecutable + + This patch speeds up sunspidey by a couple of ms (presumably due to the changes to isHostFunction()). + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::CodeBlock): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::ownerExecutable): + (JSC::GlobalCodeBlock::GlobalCodeBlock): + * bytecode/EvalCodeCache.h: + (JSC::EvalCodeCache::get): + * debugger/Debugger.cpp: + (JSC::Debugger::recompileAllJSFunctions): + * interpreter/CachedCall.h: + (JSC::CachedCall::CachedCall): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::callEval): + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * profiler/Profiler.cpp: + (JSC::createCallIdentifierFromFunctionImp): + * runtime/Arguments.h: + (JSC::Arguments::getArgumentsData): + (JSC::Arguments::Arguments): + * runtime/Executable.cpp: + (JSC::NativeExecutable::~NativeExecutable): + (JSC::VPtrHackExecutable::~VPtrHackExecutable): + * runtime/Executable.h: + (JSC::ExecutableBase::ExecutableBase): + (JSC::ExecutableBase::~ExecutableBase): + (JSC::ExecutableBase::isHostFunction): + (JSC::NativeExecutable::NativeExecutable): + (JSC::VPtrHackExecutable::VPtrHackExecutable): + (JSC::ScriptExecutable::ScriptExecutable): + (JSC::ScriptExecutable::source): + (JSC::ScriptExecutable::sourceID): + (JSC::ScriptExecutable::sourceURL): + (JSC::ScriptExecutable::lineNo): + (JSC::ScriptExecutable::lastLine): + (JSC::ScriptExecutable::usesEval): + (JSC::ScriptExecutable::usesArguments): + (JSC::ScriptExecutable::needsActivation): + (JSC::EvalExecutable::EvalExecutable): + (JSC::EvalExecutable::create): + (JSC::ProgramExecutable::ProgramExecutable): + (JSC::FunctionExecutable::FunctionExecutable): + * runtime/FunctionPrototype.cpp: + (JSC::functionProtoFuncToString): + * runtime/JSFunction.cpp: + (JSC::JSFunction::JSFunction): + (JSC::JSFunction::~JSFunction): + (JSC::JSFunction::markChildren): + (JSC::JSFunction::getCallData): + (JSC::JSFunction::call): + (JSC::JSFunction::lengthGetter): + (JSC::JSFunction::getConstructData): + (JSC::JSFunction::construct): + * runtime/JSFunction.h: + (JSC::JSFunction::executable): + (JSC::JSFunction::jsExecutable): + (JSC::JSFunction::isHostFunction): + +2009-08-20 Oliver Hunt + + Reviewed by Maciej Stachowiak. + + Browser hangs on opening Web Inspector. + https://bugs.webkit.org/show_bug.cgi?id=28438 + + Code generation needs to be able to walk the entire scopechain in some + cases, however the symbol table used by activations was a member of the + codeblock. Following recompilation this may no longer exist, leading + to a crash or hang on lookup. + + We fix this by introducing a refcounted SymbolTable subclass, SharedSymbolTable, + for the CodeBlocks used by function code. This allows activations to + maintain ownership of a copy of the symbol table even after recompilation so + they can continue to work. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::CodeBlock): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::symbolTable): + (JSC::CodeBlock::sharedSymbolTable): + (JSC::GlobalCodeBlock::GlobalCodeBlock): + (JSC::FunctionCodeBlock::FunctionCodeBlock): + (JSC::FunctionCodeBlock::~FunctionCodeBlock): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::retrieveArguments): + * runtime/Executable.cpp: + (JSC::EvalExecutable::generateBytecode): + (JSC::FunctionExecutable::generateBytecode): + (JSC::FunctionExecutable::reparseExceptionInfo): + (JSC::EvalExecutable::reparseExceptionInfo): + * runtime/JSActivation.h: + (JSC::JSActivation::JSActivationData::JSActivationData): + (JSC::JSActivation::JSActivationData::~JSActivationData): + * runtime/SymbolTable.h: + +2009-08-20 Xan Lopez + + Add new file to GTK+ build. + + * GNUmakefile.am: + +2009-08-20 Geoffrey Garen + + Reviewed by Maciej Stachowiak. + + Added a number => string cache. + + 1.07x faster on v8 (1.7x faster on v8-splay). + 1.004x faster on SunSpider. + + * runtime/JSCell.h: Moved JSValue::toString to JSString.h. + * runtime/JSGlobalData.h: Holds the cache. + * runtime/JSNumberCell.cpp: + (JSC::JSNumberCell::toString): + (JSC::JSNumberCell::toThisString): Removed -0 special case. + UString handles this now, since too many clients were + special-casing it. + + * runtime/JSString.h: + (JSC::JSValue::toString): Use the cache when converting + an int or double to string. + + * runtime/Operations.h: + (JSC::concatenateStrings): Call toString to take advantage + of the cache. + + * runtime/SmallStrings.h: + (JSC::NumericStrings::add): + (JSC::NumericStrings::lookup): The cache. + + * runtime/UString.cpp: + (JSC::UString::from): Added -0 special case mentioned above. + Removed appendNumeric because it's mutually exclusive with the + cache. + +2009-08-20 Oliver Hunt + + Reviewed by Gavin Barraclough. + + REGRESSION: fast/profiler/call.html is crashing occasionally + https://bugs.webkit.org/show_bug.cgi?id=28476 + + Using the codeblock for information about how many parameters and + locals a function has is unsafe in certain circumstances. The + basic scenario is all function code being cleared in response to + the debugger or profiler being enabled, and then an activation is + marked before its associated function is re-executed. + + To deal with this scenario we store the variable count of a function + directly in the FunctionExecutable, and then use that information. + + * runtime/Arguments.h: + (JSC::Arguments::getArgumentsData): + * runtime/Executable.cpp: + (JSC::FunctionExecutable::generateBytecode): + * runtime/Executable.h: + (JSC::FunctionExecutable::FunctionExecutable): + (JSC::FunctionExecutable::variableCount): + * runtime/JSActivation.cpp: + (JSC::JSActivation::markChildren): + +2009-08-20 Gavin Barraclough + + Reviewed by Oliver Hunt. + + Numbering of arguments to emitGetJITStubArg/emitPutJITStubArg incorrect + + + The argumentNumber argument to emitGetJITStubArg/emitPutJITStubArg should match + the argument number used within the stub functions in JITStubs.cpp, but it doesn't. + + Firstly, all the numbers changed when we added a void* 'reserved' as the first slot + (rather than leaving argument 0 unused), and secondly in 32_64 builds the index to + peek/poke needs to be multiplies by 2 (since the argument to peek/poke is a number + of machine words, and on 32_64 build the argument slots to stub functions are two + words wide). + + * jit/JIT.h: + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallSetupArgs): + (JSC::JIT::compileOpConstructSetupArgs): + (JSC::JIT::compileOpCallVarargsSetupArgs): + (JSC::JIT::compileOpCall): + * jit/JITInlineMethods.h: + (JSC::JIT::emitPutJITStubArg): + (JSC::JIT::emitPutJITStubArgConstant): + (JSC::JIT::emitGetJITStubArg): + (JSC::JIT::emitPutJITStubArgFromVirtualRegister): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::privateCompilePutByIdTransition): + +2009-08-20 Oliver Hunt + + Reviewed by Geoff Garen. + + REGRESSION: significant slowdown on Celtic Kane "AJAX declaration" subtest + https://bugs.webkit.org/show_bug.cgi?id=28332 + + Follow up style fixes that were missed in review. + + * runtime/Structure.cpp: + (JSC::Structure::hasTransition): + * runtime/Structure.h: + (JSC::Structure::get): + (JSC::StructureTransitionTable::contains): + * runtime/StructureTransitionTable.h: + (JSC::StructureTransitionTable::add): + +2009-08-20 Oliver Hunt + + Add new exports to windows jsc build + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-08-20 Oliver Hunt + + Reviewed by Gavin Barraclough. + + REGRESSION: significant slowdown on Celtic Kane "AJAX declaration" subtest + https://bugs.webkit.org/show_bug.cgi?id=28332 + + The method check optimisation made transitions aware of the value being + assigned when a transition was assigning a function. This had the side + effect of making every assignment of a function expression result in a + new transition, and thus a new Structure. The net result of this is that + the common JS idiom of + + function MyObject() { + this.myFunction = function(...){...}; + } + new MyObject(); + + Will produce a unique structure on every iteration, meaning that all + caching is defeated and there is a significant amount of structure churn. + + The fix is to return the transition to its original form where it is + keyed off a property name + attributes tuple, but have each transition + support an optional transition on a specific value. + + * JavaScriptCore.exp: + * runtime/JSObject.h: + (JSC::JSObject::putDirectInternal): + * runtime/Structure.cpp: + (JSC::Structure::~Structure): + (JSC::Structure::addPropertyTransitionToExistingStructure): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::hasTransition): + * runtime/Structure.h: + (JSC::Structure::transitionedFor): + (JSC::Structure::hasTransition): + (JSC::Structure::): + (JSC::StructureTransitionTable::contains): + (JSC::StructureTransitionTable::get): + * runtime/StructureTransitionTable.h: + (JSC::StructureTransitionTableHashTraits::emptyValue): + (JSC::StructureTransitionTable::hasTransition): + (JSC::StructureTransitionTable::remove): + (JSC::StructureTransitionTable::add): + +2009-08-20 Gavin Barraclough + + Reviewed by Oliver Hunt. + + Remove FunctionCodeBlock. + https://bugs.webkit.org/show_bug.cgi?id=28502 + + These only exist to allow JIT code to dereference properties off the + CodeBlock for any callee, regardless of whether it is a host function. + + Instead just use the FunctionExecutable. Copy the m_parameters field + from the CodeBlock into the Executable, and use this to distinguish + between host functions, functions that have been bytecompiled, and + functions that have not. + + m_parameters is moved to ExecutableBase rather than FunctionExecutable + so that (as a separate change) we can move make a separate class of + executable for host code, which is not devived from FunctionExecutable + (host code does not feature any of the properties that normal executable + do and will provide, such as source, attributes, and a parsed name). + + 1% win on v8 tests, 0.5% on sunspider. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::derefStructures): + (JSC::CodeBlock::refStructures): + (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): + (JSC::CodeBlock::handlerForBytecodeOffset): + (JSC::CodeBlock::lineNumberForBytecodeOffset): + (JSC::CodeBlock::expressionRangeForBytecodeOffset): + (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset): + (JSC::CodeBlock::functionRegisterForBytecodeOffset): + (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset): + (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset): + * bytecode/CodeBlock.h: + (JSC::): + (JSC::CodeBlock::source): + (JSC::CodeBlock::sourceOffset): + (JSC::CodeBlock::evalCodeCache): + (JSC::CodeBlock::createRareDataIfNecessary): + + remove NativeCodeBlocks and the NativeCode code type. + + * jit/JIT.cpp: + (JSC::JIT::linkCall): + + Revert to previous behaviour (as currently still commented!) that Hhost functions have a null codeblock. + + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallInitializeCallFrame): + (JSC::JIT::compileOpCallSetupArgs): + (JSC::JIT::compileOpCallVarargsSetupArgs): + (JSC::JIT::compileOpConstructSetupArgs): + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::compileOpCall): + (JSC::JIT::compileOpCallSlowCase): + + Bring the 32_64 & non-32_64 JITs into line with each other, callee in regT0. + + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + + Rewrite call trampolines to not use the CodeBlock. + + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + + Make call_JSFunction & call_arityCheck return the callee, don't expect to be passed the CodeBlock. + + * runtime/Executable.cpp: + (JSC::FunctionExecutable::generateBytecode): + (JSC::FunctionExecutable::recompile): + (JSC::FunctionExecutable::FunctionExecutable): + * runtime/Executable.h: + (JSC::ExecutableBase::): + (JSC::ExecutableBase::ExecutableBase): + (JSC::FunctionExecutable::isHostFunction): + + Add m_numParameters. + + * runtime/JSFunction.cpp: + (JSC::JSFunction::~JSFunction): + + Only call generatedBytecode() on JSFunctions non-host FunctionExecutables. + +2009-08-20 Yongjun Zhang + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=28054 + + Use a helper function to work around winscw compiler forward declaration bug + regarding templated classes. + + Add parenthesis around (PassRefPtr::*UnspecifiedBoolType) to make winscw compiler + work with the default UnSpecifiedBoolType() operator, which removes the winscw + specific bool cast hack. + + * wtf/PassRefPtr.h: + (WTF::derefIfNotNull): + (WTF::PassRefPtr::~PassRefPtr): + +2009-08-19 Yong Li + + Reviewed by Gavin Barraclough. + + Change namespace ARM to ARMRegisters + X86 to X86Registers to avoid conflict with macros + https://bugs.webkit.org/show_bug.cgi?id=28428 + + * assembler/ARMAssembler.cpp: + * assembler/ARMAssembler.h: + * assembler/ARMv7Assembler.h: + * assembler/MacroAssemblerARM.h: + * assembler/MacroAssemblerARMv7.h: + * assembler/MacroAssemblerX86Common.h: + * assembler/MacroAssemblerX86_64.h: + * assembler/X86Assembler.h: + * jit/JIT.h: + * jit/JITArithmetic.cpp: + * jit/JITInlineMethods.h: + * jit/JITOpcodes.cpp: + * wrec/WRECGenerator.cpp: + * wrec/WRECGenerator.h: + * yarr/RegexJIT.cpp: + +2009-08-19 Oliver Hunt + + Reviewed by Gavin Barraclough. + + Devirtualise marking + https://bugs.webkit.org/show_bug.cgi?id=28294 + + We actually need to mark the value in a number object if we're using the + 32bit number representation. + + * runtime/NumberObject.h: + (JSC::NumberObject::createStructure): + +2009-08-19 Gavin Barraclough + + Reviewed by Darin Adler. + + We probably shouldn't be keeping the AST for eval nodes around forevar. + https://bugs.webkit.org/show_bug.cgi?id=28469 + + EvalNodes don't destroyData() (delete their parser data) since they need to hold onto + their varStack. Copy a list of variable onto EvalCodeBlock, and this can go away. + + * bytecode/CodeBlock.h: + (JSC::EvalCodeBlock::variable): + (JSC::EvalCodeBlock::numVariables): + (JSC::EvalCodeBlock::adoptVariables): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::execute): + * parser/Nodes.h: + * runtime/Executable.cpp: + (JSC::EvalExecutable::generateBytecode): + * runtime/Executable.h: + +2009-08-19 Jungshik Shin + + Reviewed by Darin Adler. + + http://bugs.webkit.org/show_bug.cgi?id=28441 + + Fix a build issue with ICU 4.2 or later on Windows with Visual C++. + Instead of defining all isXXX and toupper/tolower as + WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h, + #define them to be different by prepending 'WTF_...ASCIIType_h' with + the originial names like 'toupper_WTF_...ASCIIType_h'. + + * wtf/DisallowCType.h: + +2009-08-18 Oliver Hunt + + Reviewed by Gavin Barraclough. + + Assigning a function to an object should always use the existing transition, even if the transition is not specialized + https://bugs.webkit.org/show_bug.cgi?id=28442 + + Check for an unspecialized transition as an alternative to always failing if specialisation does not match. + + * runtime/Structure.cpp: + (JSC::Structure::addPropertyTransitionToExistingStructure): + +2009-08-18 Dirk Schulze + + Reviewed by Oliver Hunt. + + Added additional getter to ByteArray with an unsigned char as return. + ByteArray can take unsigned char directly now. + + * wtf/ByteArray.h: + (WTF::ByteArray::set): + (WTF::ByteArray::get): + +2009-08-18 Peter Kasting + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=28415 + Set svn:eol-style CRLF on all .sln and .vcproj files that don't already + have it. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: + * JavaScriptCore.vcproj/testapi/testapi.vcproj: + +2009-08-18 Xan Lopez + + Try to fix the GTK+ build. + + * GNUmakefile.am: + +2009-08-17 Gavin Barraclough + + Reviewed by Sam Weinig. + + No, silly runtime, AST nodes are not for you. + + We still use AST nodes (ScopeNodes, particularly FunctionBodyNodes) within + the runtime, which means that these nodes must be persisted outside of the + arena, contain both parser & runtime data, etc. This is all a bit of a mess. + + Move functionality into a new FunctionExecutable class. + + * API/JSCallbackFunction.cpp: + * API/JSObjectRef.cpp: + * JavaScriptCore.exp: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::CodeBlock): + (JSC::CodeBlock::markAggregate): + (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): + (JSC::CodeBlock::lineNumberForBytecodeOffset): + (JSC::CodeBlock::shrinkToFit): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::getBytecodeIndex): + (JSC::CodeBlock::discardBytecode): + (JSC::CodeBlock::instructionCount): + (JSC::CodeBlock::getJITCode): + (JSC::CodeBlock::executablePool): + (JSC::CodeBlock::ownerExecutable): + (JSC::CodeBlock::extractExceptionInfo): + (JSC::CodeBlock::addFunctionDecl): + (JSC::CodeBlock::functionDecl): + (JSC::CodeBlock::numberOfFunctionDecls): + (JSC::CodeBlock::addFunctionExpr): + (JSC::CodeBlock::functionExpr): + (JSC::GlobalCodeBlock::GlobalCodeBlock): + (JSC::ProgramCodeBlock::ProgramCodeBlock): + (JSC::EvalCodeBlock::EvalCodeBlock): + (JSC::FunctionCodeBlock::FunctionCodeBlock): + (JSC::NativeCodeBlock::NativeCodeBlock): + * bytecode/EvalCodeCache.h: + * bytecode/SamplingTool.cpp: + (JSC::SamplingTool::doRun): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitNewFunction): + (JSC::BytecodeGenerator::emitNewFunctionExpression): + * bytecompiler/BytecodeGenerator.h: + * debugger/Debugger.cpp: + (JSC::Debugger::recompileAllJSFunctions): + * interpreter/CachedCall.h: + (JSC::CachedCall::CachedCall): + * interpreter/CallFrameClosure.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::throwException): + (JSC::Interpreter::execute): + (JSC::Interpreter::prepareForRepeatCall): + (JSC::Interpreter::debug): + (JSC::Interpreter::privateExecute): + (JSC::Interpreter::retrieveLastCaller): + * interpreter/Interpreter.h: + * jit/JIT.cpp: + (JSC::JIT::privateCompile): + * jit/JIT.h: + (JSC::JIT::compile): + * jit/JITOpcodes.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + (JSC::JIT::emit_op_new_func): + (JSC::JIT::emit_op_new_func_exp): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + (JSC::): + * parser/Nodes.cpp: + (JSC::FunctionBodyNode::reparseDataIfNecessary): + * parser/Nodes.h: + (JSC::EvalNode::partialDestroyData): + * parser/Parser.h: + * profiler/ProfileGenerator.cpp: + * profiler/Profiler.cpp: + (JSC::Profiler::createCallIdentifier): + (JSC::createCallIdentifierFromFunctionImp): + * runtime/Arguments.h: + (JSC::Arguments::getArgumentsData): + (JSC::Arguments::Arguments): + (JSC::JSActivation::copyRegisters): + * runtime/ArrayPrototype.cpp: + (JSC::isNumericCompareFunction): + * runtime/CallData.h: + (JSC::): + * runtime/Collector.cpp: + (JSC::Heap::collect): + * runtime/ConstructData.h: + (JSC::): + * runtime/ExceptionHelpers.cpp: + (JSC::createUndefinedVariableError): + (JSC::createInvalidParamError): + (JSC::createNotAConstructorError): + (JSC::createNotAFunctionError): + (JSC::createNotAnObjectError): + * runtime/Executable.cpp: Added. + (JSC::EvalExecutable::generateBytecode): + (JSC::ProgramExecutable::generateBytecode): + (JSC::FunctionExecutable::generateBytecode): + (JSC::EvalExecutable::generateJITCode): + (JSC::ProgramExecutable::generateJITCode): + (JSC::FunctionExecutable::generateJITCode): + (JSC::FunctionExecutable::isHostFunction): + (JSC::FunctionExecutable::markAggregate): + (JSC::FunctionExecutable::reparseExceptionInfo): + (JSC::EvalExecutable::reparseExceptionInfo): + (JSC::FunctionExecutable::recompile): + (JSC::FunctionExecutable::FunctionExecutable): + * runtime/Executable.h: + (JSC::ExecutableBase::~ExecutableBase): + (JSC::ExecutableBase::ExecutableBase): + (JSC::ExecutableBase::source): + (JSC::ExecutableBase::sourceID): + (JSC::ExecutableBase::lastLine): + (JSC::ExecutableBase::usesEval): + (JSC::ExecutableBase::usesArguments): + (JSC::ExecutableBase::needsActivation): + (JSC::ExecutableBase::astNode): + (JSC::ExecutableBase::generatedJITCode): + (JSC::ExecutableBase::getExecutablePool): + (JSC::EvalExecutable::EvalExecutable): + (JSC::EvalExecutable::bytecode): + (JSC::EvalExecutable::varStack): + (JSC::EvalExecutable::evalNode): + (JSC::EvalExecutable::jitCode): + (JSC::ProgramExecutable::ProgramExecutable): + (JSC::ProgramExecutable::reparseExceptionInfo): + (JSC::ProgramExecutable::bytecode): + (JSC::ProgramExecutable::programNode): + (JSC::ProgramExecutable::jitCode): + (JSC::FunctionExecutable::FunctionExecutable): + (JSC::FunctionExecutable::name): + (JSC::FunctionExecutable::bytecode): + (JSC::FunctionExecutable::generatedBytecode): + (JSC::FunctionExecutable::usesEval): + (JSC::FunctionExecutable::usesArguments): + (JSC::FunctionExecutable::parameterCount): + (JSC::FunctionExecutable::paramString): + (JSC::FunctionExecutable::isGenerated): + (JSC::FunctionExecutable::body): + (JSC::FunctionExecutable::jitCode): + (JSC::FunctionExecutable::createNativeThunk): + * runtime/FunctionConstructor.cpp: + (JSC::constructFunction): + * runtime/FunctionPrototype.cpp: + (JSC::functionProtoFuncToString): + * runtime/JSActivation.cpp: + (JSC::JSActivation::JSActivation): + (JSC::JSActivation::markChildren): + (JSC::JSActivation::isDynamicScope): + (JSC::JSActivation::argumentsGetter): + * runtime/JSActivation.h: + (JSC::JSActivation::JSActivationData::JSActivationData): + * runtime/JSFunction.cpp: + (JSC::JSFunction::isHostFunction): + (JSC::JSFunction::JSFunction): + (JSC::JSFunction::~JSFunction): + (JSC::JSFunction::markChildren): + (JSC::JSFunction::getCallData): + (JSC::JSFunction::call): + (JSC::JSFunction::lengthGetter): + (JSC::JSFunction::getConstructData): + (JSC::JSFunction::construct): + * runtime/JSFunction.h: + (JSC::JSFunction::executable): + (JSC::FunctionExecutable::make): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + (JSC::JSGlobalData::numericCompareFunction): + * runtime/JSGlobalData.h: + +2009-08-17 Mark Rowe + + Reviewed by Darin Adler. + + Fix 300,000+ leaks seen during the regression tests. + + EvalCodeCache::get was heap-allocating an EvalExecutable instance without adopting the initial reference. + While fixing this we noticed that EvalExecutable was a RefCounted type that was sometimes stack allocated. + To make this cleaner and to prevent clients from attempting to ref a stack-allocated instance, we move the + refcounting down to a new CacheableEvalExecutable class that derives from EvalExecutable. EvalCodeCache::get + now uses CacheableEvalExecutable::create and avoids the leak. + + * bytecode/EvalCodeCache.h: + (JSC::EvalCodeCache::get): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::callEval): + * runtime/Executable.h: + (JSC::CacheableEvalExecutable::create): + (JSC::CacheableEvalExecutable::CacheableEvalExecutable): + +2009-08-17 Oliver Hunt + + RS=Mark Rowe. + + REGRESSION (r47292): Prototype.js is broken by ES5 Arguments changes + https://bugs.webkit.org/show_bug.cgi?id=28341 + + + Reverting r47292. Alas Prototype.js breaks with Arguments inheriting + from Array as ES5 attempted. Prototype.js defines $A in terms of a + function it places on (among other global objects) the Array prototype, + thus breaking $A for arrays. + + * runtime/Arguments.h: + (JSC::Arguments::Arguments): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): + (JSC::JSGlobalObject::markChildren): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): + * runtime/ObjectPrototype.cpp: + (JSC::ObjectPrototype::ObjectPrototype): + * runtime/ObjectPrototype.h: + * tests/mozilla/ecma_3/Function/arguments-001.js: + +2009-08-17 Peter Kasting + + Reviewed by Steve Falkenburg. + + https://bugs.webkit.org/show_bug.cgi?id=27323 + Only add Cygwin to the path when it isn't already there. This avoids + causing problems for people who purposefully have non-Cygwin versions of + executables like svn in front of the Cygwin ones in their paths. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: + * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: + * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: + * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: + +2009-08-17 Xan Lopez + + Reviewed by Mark Rowe. + + Fix build with FAST_MALLOC_MATCH_VALIDATION enabled. + + * wtf/FastMalloc.cpp: + (WTF::fastMalloc): + (WTF::fastCalloc): + (WTF::fastRealloc): + +2009-08-16 Holger Hans Peter Freyther + + Reviewed by Mark Rowe. + + Fix crash on ./ecma_2/RegExp/exec-002.js. + https://bugs.webkit.org/show_bug.cgi?id=28353 + + Change the order of freeParenthesesDisjunctionContext and + popParenthesesDisjunctionContext on all call sites as the pop + method is accessing backTrack->lastContext which is the context + that is about to be freed. + + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::parenthesesDoBacktrack): + (JSC::Yarr::Interpreter::backtrackParentheses): + +2009-08-16 Holger Hans Peter Freyther + + Reviewed by Mark Rowe. + + https://bugs.webkit.org/show_bug.cgi?id=28352 + + Fix coding style violations. Use m_ for C++ class members. Remove + trailing whitespace on empty lines. + + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::ParenthesesDisjunctionContext): + (JSC::Yarr::Interpreter::tryConsumeCharacter): + (JSC::Yarr::Interpreter::tryConsumeBackReference): + (JSC::Yarr::Interpreter::parenthesesDoBacktrack): + (JSC::Yarr::Interpreter::backtrackParentheses): + (JSC::Yarr::ByteCompiler::ByteCompiler): + (JSC::Yarr::ByteCompiler::compile): + (JSC::Yarr::ByteCompiler::checkInput): + (JSC::Yarr::ByteCompiler::assertionBOL): + (JSC::Yarr::ByteCompiler::assertionEOL): + (JSC::Yarr::ByteCompiler::assertionWordBoundary): + (JSC::Yarr::ByteCompiler::atomPatternCharacter): + (JSC::Yarr::ByteCompiler::atomCharacterClass): + (JSC::Yarr::ByteCompiler::atomBackReference): + (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin): + (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin): + (JSC::Yarr::ByteCompiler::popParenthesesStack): + (JSC::Yarr::ByteCompiler::closeAlternative): + (JSC::Yarr::ByteCompiler::closeBodyAlternative): + (JSC::Yarr::ByteCompiler::atomParenthesesEnd): + (JSC::Yarr::ByteCompiler::regexBegin): + (JSC::Yarr::ByteCompiler::alterantiveBodyDisjunction): + (JSC::Yarr::ByteCompiler::alterantiveDisjunction): + (JSC::Yarr::ByteCompiler::emitDisjunction): + +2009-08-15 Mark Rowe + + Fix the build with JIT disabled. + + * runtime/Arguments.h: Only compile the jitCode method when the JIT is enabled. + * runtime/Executable.h: Include PrototypeFunction.h so the compiler knows what + NativeFunctionWrapper is when the JIT is disabled. + +2009-08-15 Adam Bergkvist + + Reviewed by Sam Weinig. + + Added ENABLE_EVENTSOURCE flag. + https://bugs.webkit.org/show_bug.cgi?id=14997 + + * Configurations/FeatureDefines.xcconfig: + +2009-08-14 Gavin Barraclough + + * parser/Parser.h: + (JSC::EvalExecutable::parse): + (JSC::ProgramExecutable::parse): + * runtime/Executable.h: + +2009-08-14 Gavin Barraclough + + Reviewed by Oliver Hunt. + + Remove AST nodes from use within the Runtime (outside of parsing), stage 1 + https://bugs.webkit.org/show_bug.cgi?id=28330 + + Remove the EvalNode and ProgramNode from use in the runtime. They still exist + after this patch, but are hidden behind EvalExecutable and FunctionExecutable, + and are also still reachable behind CodeBlock::m_ownerNode. + + The next step will be to beat back FunctionBodyNode in the same fashion. + Then remove the usage via CodeBlock, then only construct these nodes only on + demand during bytecode generation. + + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.h: + (JSC::GlobalCodeBlock::GlobalCodeBlock): + (JSC::GlobalCodeBlock::~GlobalCodeBlock): + (JSC::ProgramCodeBlock::ProgramCodeBlock): + (JSC::EvalCodeBlock::EvalCodeBlock): + (JSC::FunctionCodeBlock::FunctionCodeBlock): + (JSC::NativeCodeBlock::NativeCodeBlock): + * bytecode/EvalCodeCache.h: + (JSC::EvalCodeCache::get): + * debugger/Debugger.cpp: + (JSC::evaluateInGlobalCallFrame): + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::evaluate): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::callEval): + (JSC::Interpreter::execute): + * interpreter/Interpreter.h: + * parser/Nodes.cpp: + (JSC::FunctionBodyNode::createNativeThunk): + (JSC::FunctionBodyNode::generateBytecode): + (JSC::FunctionBodyNode::bytecodeForExceptionInfoReparse): + * parser/Parser.h: + (JSC::Parser::parse): + (JSC::Parser::reparse): + (JSC::Parser::parseFunctionFromGlobalCode): + (JSC::::parse): + * runtime/Completion.cpp: + (JSC::checkSyntax): + (JSC::evaluate): + * runtime/Error.cpp: + (JSC::throwError): + * runtime/Error.h: + * runtime/Executable.h: Added. + (JSC::TemplateExecutable::TemplateExecutable): + (JSC::TemplateExecutable::markAggregate): + (JSC::TemplateExecutable::sourceURL): + (JSC::TemplateExecutable::lineNo): + (JSC::TemplateExecutable::bytecode): + (JSC::TemplateExecutable::jitCode): + (JSC::EvalExecutable::EvalExecutable): + (JSC::ProgramExecutable::ProgramExecutable): + * runtime/FunctionConstructor.cpp: + (JSC::constructFunction): + * runtime/FunctionConstructor.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::numericCompareFunction): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::~JSGlobalObject): + (JSC::JSGlobalObject::markChildren): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::codeBlocks): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncEval): + +2009-08-14 Darin Adler + + Reviewed by Sam Weinig. + + Rename the confusing isObject() to inherits(). + It still works on non-objects, returning false. + + * runtime/ArrayConstructor.cpp: + (JSC::arrayConstructorIsArray): Removed unneeded isObject call + and updated remaining isObject call to new name, inherits. + + * runtime/JSCell.h: Renamed isObject() to inherits() + but more importantly, made it non-virtual (it was already inline) + so it is now as fast as JSObject::inherits was. + + * runtime/JSObject.h: Removed inherits function since the one + in the base class is fine as-is. Also made various JSCell functions + that should not be called on JSObject uncallable by making them + both private and not implemented. + (JSC::JSCell::inherits): Updated name. + (JSC::JSValue::inherits): Ditto. + + * debugger/Debugger.cpp: + (JSC::Debugger::recompileAllJSFunctions): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::unwindCallFrame): + * runtime/ArrayPrototype.cpp: + (JSC::arrayProtoFuncToString): + (JSC::arrayProtoFuncToLocaleString): + (JSC::arrayProtoFuncConcat): + * runtime/BooleanPrototype.cpp: + (JSC::booleanProtoFuncToString): + (JSC::booleanProtoFuncValueOf): + * runtime/DateConstructor.cpp: + (JSC::constructDate): + * runtime/DatePrototype.cpp: + (JSC::dateProtoFuncToString): + (JSC::dateProtoFuncToUTCString): + (JSC::dateProtoFuncToISOString): + (JSC::dateProtoFuncToDateString): + (JSC::dateProtoFuncToTimeString): + (JSC::dateProtoFuncToLocaleString): + (JSC::dateProtoFuncToLocaleDateString): + (JSC::dateProtoFuncToLocaleTimeString): + (JSC::dateProtoFuncGetTime): + (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::dateProtoFuncGetMilliSeconds): + (JSC::dateProtoFuncGetUTCMilliseconds): + (JSC::dateProtoFuncGetTimezoneOffset): + (JSC::dateProtoFuncSetTime): + (JSC::setNewValueFromTimeArgs): + (JSC::setNewValueFromDateArgs): + (JSC::dateProtoFuncSetYear): + (JSC::dateProtoFuncGetYear): + * runtime/FunctionPrototype.cpp: + (JSC::functionProtoFuncToString): + * runtime/JSActivation.cpp: + (JSC::JSActivation::argumentsGetter): + * runtime/JSValue.h: + * runtime/RegExpConstructor.cpp: + (JSC::constructRegExp): + * runtime/RegExpPrototype.cpp: + (JSC::regExpProtoFuncTest): + (JSC::regExpProtoFuncExec): + (JSC::regExpProtoFuncCompile): + (JSC::regExpProtoFuncToString): + * runtime/ScopeChain.cpp: + (JSC::ScopeChain::localDepth): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncReplace): + (JSC::stringProtoFuncToString): + (JSC::stringProtoFuncMatch): + (JSC::stringProtoFuncSearch): + (JSC::stringProtoFuncSplit): + Updated to new name, inherits, from old name, isObject. + +2009-07-31 Harald Fernengel + + Reviewed by Simon Hausmann. + + Adding QNX as a platform. Currently only tested with Qt. + + https://bugs.webkit.org/show_bug.cgi?id=27885 + + * JavaScriptCore/runtime/Collector.cpp: Added retrieving of stack base + since QNX doesn't have the pthread _nt functions + * JavaScriptCore/wtf/Platform.h: Added WTF_PLATFORM_QNX and corresponding + defines + * WebCore/bridge/npapi.h: Build fix for missing typedefs on QNX + +2009-08-14 Gabor Loki + + Reviewed by Simon Hausmann. + + Currently generic ARM and ARMv7 platforms work only with JSVALUE32 + https://bugs.webkit.org/show_bug.cgi?id=28300 + + * wtf/Platform.h: + +2009-08-14 Gabor Loki + + Reviewed by Simon Hausmann. + + Enable JIT on ARM for QT by default + https://bugs.webkit.org/show_bug.cgi?id=28259 + + * wtf/Platform.h: + +2009-08-14 Gabor Loki + + Reviewed by Simon Hausmann. + + Enable YARR_JIT on ARM for QT by default + https://bugs.webkit.org/show_bug.cgi?id=28259 + + * wtf/Platform.h: + +2009-08-14 Oliver Hunt + + Reviewed by Gavin Barraclough. + + [ES5] Arguments object should inherit from Array + https://bugs.webkit.org/show_bug.cgi?id=28298 + + Make the Arguments object conform to the behaviour specified in ES5. + The simple portion of this is to make Arguments use Array.prototype + as its prototype rather than Object.prototype. + + The spec then requires us to set instance.constructor to the pristine + Object constructor, and instance.toString and instance.toLocaleString + to the pristine versions from Object.prototype. To do this we now + make the ObjectPrototype constructor return its toString and + toLocaleString functions (similar to the call and apply functions + from FunctionPrototype). + + Oddly enough this reports itself as a slight win, but given the code + isn't hit in the tests that claim to have improved I put this down to + code motion. + + * runtime/Arguments.h: + (JSC::Arguments::Arguments): + (JSC::Arguments::initializeStandardProperties): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): + (JSC::JSGlobalObject::markChildren): + * runtime/JSGlobalObject.h: + (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): + (JSC::JSGlobalObject::objectConstructor): + (JSC::JSGlobalObject::objectToStringFunction): + (JSC::JSGlobalObject::objectToLocaleStringFunction): + * runtime/ObjectPrototype.cpp: + (JSC::ObjectPrototype::ObjectPrototype): + * runtime/ObjectPrototype.h: + * tests/mozilla/ecma_3/Function/arguments-001.js: + Update test to new es5 behaviour + +2009-08-14 Oliver Hunt + + Remove MarkStack::drain from the JSC exports file + + MarkStack::drain is now marked inline, the including it in the exports file + produces an ld warning + + * JavaScriptCore.exp: + +2009-08-13 Sam Weinig + + Reviewed by Oliver Hunt. + + Remove accidentally left in debugging statement. + + * runtime/JSArray.h: + (JSC::MarkStack::drain): + +2009-08-13 Oliver Hunt + + Reviewed by Maciej Stachowiak. + + [ES5] Implement Array.isArray + https://bugs.webkit.org/show_bug.cgi?id=28296 + + Add support for Array.isArray to the Array constructor + + * runtime/ArrayConstructor.cpp: + (JSC::ArrayConstructor::ArrayConstructor): + (JSC::arrayConstructorIsArray): + * runtime/ArrayConstructor.h: + * runtime/CommonIdentifiers.h: + * runtime/JSArray.h: + (JSC::MarkStack::drain): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): + +2009-08-13 Oliver Hunt + + Reviewed by NOBODY (Buildfix). + + Attempt to fix windows build + + * runtime/Collector.cpp: + +2009-08-13 Oliver Hunt + + Reviewed by Maciej Stachowiak. + + Devirtualise marking + https://bugs.webkit.org/show_bug.cgi?id=28294 + + Add a bit to TypeInfo to indicate that an object uses the standard + JSObject::markChildren method. This allows us to devirtualise marking + of most objects (though a branch is still needed). We also add a branch + to identify arrays thus devirtualising marking in that case as well. + + In order to make the best use of this devirtualisation I've also reworked + the MarkStack::drain() logic to make the iteration more efficient. + + * API/JSCallbackConstructor.h: + (JSC::JSCallbackConstructor::createStructure): + * API/JSCallbackFunction.h: + (JSC::JSCallbackFunction::createStructure): + * JavaScriptCore.exp: + * runtime/BooleanObject.h: + (JSC::BooleanObject::createStructure): + * runtime/FunctionPrototype.h: + (JSC::FunctionPrototype::createStructure): + * runtime/InternalFunction.h: + (JSC::InternalFunction::createStructure): + * runtime/JSAPIValueWrapper.h: + (JSC::JSAPIValueWrapper::JSAPIValueWrapper): + * runtime/JSArray.cpp: + (JSC::JSArray::markChildren): + * runtime/JSArray.h: + (JSC::JSArray::markChildrenDirect): + (JSC::MarkStack::drain): + * runtime/JSByteArray.cpp: + (JSC::JSByteArray::createStructure): + * runtime/JSCell.h: + (JSC::MarkStack::append): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSNumberCell.h: + (JSC::JSNumberCell::createStructure): + * runtime/JSONObject.h: + (JSC::JSONObject::createStructure): + * runtime/JSObject.cpp: + (JSC::JSObject::markChildren): + * runtime/JSObject.h: + (JSC::JSObject::markChildrenDirect): + (JSC::JSObject::createStructure): + * runtime/JSString.h: + (JSC::JSString::createStructure): + * runtime/JSType.h: + (JSC::): + * runtime/MarkStack.h: + (JSC::MarkStack::MarkStack): + (JSC::MarkStack::MarkSet::MarkSet): + (JSC::MarkStack::MarkStackArray::last): + * 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/StringObjectThatMasqueradesAsUndefined.h: + (JSC::StringObjectThatMasqueradesAsUndefined::createStructure): + * runtime/TypeInfo.h: + (JSC::TypeInfo::hasDefaultMark): + +2009-08-13 Darin Adler + + Reviewed by Mark Rowe. + + Some small bits of housekeeping. + + * JavaScriptCore.xcodeproj/project.pbxproj: Make Parser.h + project instead of private. Remove JSONObject.lut.h. + + * assembler/ARMAssembler.h: Remove unneeded WTF prefix. + * assembler/AssemblerBufferWithConstantPool.h: Ditto. + * bytecompiler/BytecodeGenerator.h: Ditto. + + * wtf/SegmentedVector.h: Add a "using" statement as we do + with the other WTF headers. + +2009-08-13 Darin Adler + + Fix Tiger build. + + * parser/Grammar.y: Use a template function so we can compile + setStatementLocation even if it comes before YYLTYPE is defined. + +2009-08-13 Darin Adler + + Reviewed by George Staikos. + + Too much use of void* in Grammar.y + https://bugs.webkit.org/show_bug.cgi?id=28287 + + * parser/Grammar.y: Changed all the helper functions to + take a JSGlobalData* instead of a void*. A couple formatting + tweaks that I missed when breaking this into pieces. + +2009-08-13 Darin Adler + + Reviewed by George Staikos. + + Another part of https://bugs.webkit.org/show_bug.cgi?id=28287 + + * parser/Grammar.y: Reduced and sorted includes. Tweaked comment + format. Marked a few more functions inline. + +2009-08-13 Darin Adler + + Reviewed by George Staikos. + + Another part of https://bugs.webkit.org/show_bug.cgi?id=28287 + + * parser/Grammar.y: Pass the number to the PropertyNode instead of + first turning it into an Identifier. + + * parser/NodeConstructors.h: + (JSC::PropertyNode::PropertyNode): Add an overload that takes a double + so the code to convert to a string can be here instead of Grammar.y. + * parser/Nodes.h: Ditto. + +2009-08-13 Darin Adler + + Reviewed by George Staikos. + + Another part of https://bugs.webkit.org/show_bug.cgi?id=28287 + + * parser/Grammar.y: Eliminate the DBG macro. + +2009-08-13 Darin Adler + + Reviewed by George Staikos. + + Another part of https://bugs.webkit.org/show_bug.cgi?id=28287 + + * parser/Grammar.y: Eliminate the SET_EXCEPTION_LOCATION macro. + +2009-08-13 Darin Adler + + Reviewed by George Staikos. + + George asked me to break the patch from + https://bugs.webkit.org/show_bug.cgi?id=28287 + into smaller pieces and land it in stages. + + * parser/Grammar.y: Eliminate the LEXER macro. + +2009-08-13 Mark Rowe + + Try some more to fix the Windows build. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export a new symbol. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Ditto. + +2009-08-13 Mark Rowe + + Try and fix the Windows build. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export a new symbol. + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Ditto. + +2009-08-13 Darin Adler + + Reviewed by David Levin. + + JavaScriptCore tweaks to get ready for the parser arena + https://bugs.webkit.org/show_bug.cgi?id=28243 + + Eliminate dependencies on Nodes.h outside JavaScriptCore, + and cut down on them inside JavaScriptCore. + + Change regular expression parsing to use identifiers as + with other strings we parse. + + Fix a couple things that are needed to use const Identifier + more, which will be part of the parser arena work. + + * JavaScriptCore.exp: Resorted and updated. + + * JavaScriptCore.xcodeproj/project.pbxproj: Changed + CollectorHeapIterator.h to be project-internal. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitPushNewScope): Added const. + * bytecompiler/BytecodeGenerator.h: Ditto. + + * debugger/Debugger.cpp: + (JSC::Debugger::recompileAllJSFunctions): Moved this function + here from WebCore. Here is better since it uses so many internals. + Removed unimportant optimization for the no listener case. + * debugger/Debugger.h: Ditto. Also removed unneeded include + and tweaked formatting and comments. + + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::functionName): Call asFunction instead + of doing the unchecked static_cast. + (JSC::DebuggerCallFrame::calculatedFunctionName): Ditto. + + * jit/JITStubs.cpp: + (JSC::op_call_JSFunction): Call isHostFunction on the body rather + than on the JSFunction. + (JSC::vm_lazyLinkCall): Ditto. + (JSC::op_construct_JSConstruct): Ditto. + + * parser/Grammar.y: Changed callers to use new scanRegExp with + out arguments instead of relying on state in the Lexer. And + callers that just want to skip a regular expression to use + skipRegExp. + + * parser/Lexer.cpp: + (JSC::Lexer::scanRegExp): Changed to use out arguments, and to + add a prefix argument so we can add in the "=" character as needed. + Also rewrote to streamline the logic a bit inspired by suggestions + by David Levin. + (JSC::Lexer::skipRegExp): Added. Version of the function above that + does not actually put the regular expression into a string. + (JSC::Lexer::clear): Removed code to clear m_pattern and m_flags. + * parser/Lexer.h: Changed scanRegExp to have out arguments. Added + skipRegExp. Eliminated pattern, flags, m_pattern, and m_flags. + + * parser/NodeConstructors.h: + (JSC::RegExpNode::RegExpNode): Changed to take const Identifier&. + * parser/Nodes.cpp: + (JSC::RegExpNode::emitBytecode): Changed since m_pattern and + m_flags are now Identifier instead of UString. + (JSC::FunctionBodyNode::make): Moved this function here instead + of putting it in the JSFunction.h header. + * parser/Nodes.h: Changed RegExpNode to use Identifier. + + * profiler/Profiler.cpp: + (JSC::Profiler::createCallIdentifier): Changed to use isHostFunction + on the body instead of on the JSFunction object. + * runtime/FunctionPrototype.cpp: + (JSC::functionProtoFuncToString): Ditto. + + * runtime/JSFunction.cpp: + (JSC::JSFunction::isHostFunction): Moved here from header. + (JSC::JSFunction::isHostFunctionNonInline): Added. + (JSC::JSFunction::JSFunction): Removed unneeded initialization of + m_body to 0. + (JSC::JSFunction::setBody): Moved here from header. + + * runtime/JSFunction.h: Removed unneeded includes. Moved private + constructor down to the private section. Made virtual functions + private. Removed unneeded overload of setBody and moved the body + of the function into the .cpp file. Changed assertions to use + the non-inline version of isHostFunction. + + * runtime/PropertySlot.cpp: + (JSC::PropertySlot::functionGetter): Use asFunction instead + of doing the unchecked static_cast. + + * wtf/SegmentedVector.h: + (WTF::SegmentedVector::isEmpty): Added. + +2009-08-13 Mark Rowe + + Rubber-stamped by Darin Adler. + + Use the version of operator new that takes a JSGlobalData when allocating FuncDeclNode and FuncExprNode + from within the grammar to prevent these nodes from being leaked. + + * parser/Grammar.y: + +2009-08-13 Simon Hausmann + + Reviewed by Ariya Hidayat. + + Remove the special-case for Qt wrt JSVALUE_32 introduced in + r46709. It must've been a dependency issue on the bot, as + after a manual build all the tests pass on amd64 and ia32. + + * wtf/Platform.h: + +2009-08-12 Gabor Loki + + Reviewed by Gavin Barraclough. + + Add optimize call and property access support for ARM JIT. + https://bugs.webkit.org/show_bug.cgi?id=24986 + + For tightly coupled sequences the BEGIN_UNINTERRUPTED_SEQUENCE and + END_UNINTERRUPTED_SEQUENCE macros have been introduced which ensure + space for instructions and constants of the named sequence. This + method is vital for those architecture which are using constant pool. + + The 'latePatch' method - which was linked to JmpSrc - is replaced with + a port specific solution (each calls are marked to place their address + on the constant pool). + + * assembler/ARMAssembler.cpp: + (JSC::ARMAssembler::linkBranch): + (JSC::ARMAssembler::executableCopy): Add extra align for constant pool. + * assembler/ARMAssembler.h: + (JSC::ARMAssembler::JmpSrc::JmpSrc): + (JSC::ARMAssembler::sizeOfConstantPool): + (JSC::ARMAssembler::jmp): + (JSC::ARMAssembler::linkCall): + * assembler/ARMv7Assembler.h: + * assembler/AbstractMacroAssembler.h: + * assembler/AssemblerBufferWithConstantPool.h: + (JSC::AssemblerBufferWithConstantPool::flushIfNoSpaceFor): Fix the + computation of the remaining space. + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::branch32): + (JSC::MacroAssemblerARM::nearCall): + (JSC::MacroAssemblerARM::call): + (JSC::MacroAssemblerARM::branchPtrWithPatch): + (JSC::MacroAssemblerARM::ensureSpace): + (JSC::MacroAssemblerARM::sizeOfConstantPool): + (JSC::MacroAssemblerARM::prepareCall): + * assembler/X86Assembler.h: + * jit/JIT.h: + * jit/JITCall.cpp: + (JSC::JIT::compileOpCall): + * jit/JITInlineMethods.h: + (JSC::JIT::beginUninterruptedSequence): + (JSC::JIT::endUninterruptedSequence): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_method_check): + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::compileGetByIdSlowCase): + (JSC::JIT::emit_op_put_by_id): + +2009-08-12 Gavin Barraclough + + Rubber Stamped by Dave Kilzer. + + Disable WTF_USE_JSVALUE32_64 on iPhone for now (support not yet added for ARMv7). + + * wtf/Platform.h: + +2009-08-12 Gavin Barraclough + + Reviewed by Maciej Stachoviak. + + Ooops - moved code that had been accidentally added to op_new_func instead of + op_new_func_exp, to where it shoulds be. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * wtf/Platform.h: + +2009-08-12 Ada Chan + + Added workaround for the limitation that VirtualFree with MEM_RELEASE + can only accept the base address returned by VirtualAlloc when the region + was reserved and it can only free the entire region, and not a part of it. + + Reviewed by Oliver Hunt. + + * runtime/MarkStack.h: + (JSC::MarkStack::MarkStackArray::shrinkAllocation): + * runtime/MarkStackWin.cpp: + (JSC::MarkStack::releaseStack): + +2009-08-12 Balazs Kelemen + + Reviewed by Ariya Hidayat. + + Build fix: use std::numeric_limits::min() instead of LLONG_MIN + since LLONG_MIN is not defined in standard c++. + + * runtime/UString.cpp: + (JSC::UString::from): + +2009-08-12 Benjamin Otte + + Reviewed by Jan Alonzo. + + Buildfix for Gtk platforms debug builds. + + * GNUmakefile.am: Choose MarkStackPosix.cpp or MarkStackWin.cpp + depending on platform. + +2009-08-12 Simon Hausmann + + Prospective build fix for Mac and 32-bit Windows. + + * runtime/UString.cpp: Include wtf/StringExtras.h for snprintf. + (JSC::UString::from): Use %lld instead of %I64d for snprintf + on non-windows platforms. + +2009-08-12 Prasanth Ullattil + + Reviewed by Simon Hausmann. + + Fix compile error on 64Bit Windows, when UString::from + is called with an intptr_t. + + Added new UString::From overload with long long parameter. + + Thanks to Holger for the long long idea. + + * runtime/UString.cpp: + (JSC::UString::from): + * runtime/UString.h: + +2009-08-11 Oliver Hunt + + Reviewed by Mark Rowe. + + Minor style fixes. + + * runtime/UString.h: + (JSC::UString::Rep::createEmptyBuffer): + * wtf/FastMalloc.h: + (WTF::TryMallocReturnValue::getValue): + +2009-08-11 Oliver Hunt + + Reviewed by Gavin Barraclough. + + Make it harder to misuse try* allocation routines + https://bugs.webkit.org/show_bug.cgi?id=27469 + + Jump through a few hoops to make it much harder to accidentally + miss null-checking of values returned by the try-* allocation + routines. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + * JavaScriptCore.xcodeproj/project.pbxproj: + * runtime/JSArray.cpp: + (JSC::JSArray::putSlowCase): + (JSC::JSArray::increaseVectorLength): + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncFontsize): + (JSC::stringProtoFuncLink): + * runtime/UString.cpp: + (JSC::allocChars): + (JSC::reallocChars): + (JSC::expandCapacity): + (JSC::UString::Rep::reserveCapacity): + (JSC::UString::expandPreCapacity): + (JSC::createRep): + (JSC::concatenate): + (JSC::UString::spliceSubstringsWithSeparators): + (JSC::UString::replaceRange): + (JSC::UString::append): + (JSC::UString::operator=): + * runtime/UString.h: + (JSC::UString::Rep::createEmptyBuffer): + * wtf/FastMalloc.cpp: + (WTF::tryFastZeroedMalloc): + (WTF::tryFastMalloc): + (WTF::tryFastCalloc): + (WTF::tryFastRealloc): + (WTF::TCMallocStats::tryFastMalloc): + (WTF::TCMallocStats::tryFastCalloc): + (WTF::TCMallocStats::tryFastRealloc): + * wtf/FastMalloc.h: + (WTF::TryMallocReturnValue::TryMallocReturnValue): + (WTF::TryMallocReturnValue::~TryMallocReturnValue): + (WTF::TryMallocReturnValue::operator PossiblyNull): + (WTF::TryMallocReturnValue::getValue): + * wtf/Platform.h: + * wtf/PossiblyNull.h: Added. + (WTF::PossiblyNull::PossiblyNull): + (WTF::PossiblyNull::~PossiblyNull): + (WTF::::getValue): + +2009-08-11 Gavin Barraclough + + Reviewed by NOBODY (build fix part deux). + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-08-11 Gavin Barraclough + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-08-11 Gavin Barraclough + + Reviewed by Oliver Hunt. + + Restrict use of FuncDeclNode & FuncExprNode to the parser. + https://bugs.webkit.org/show_bug.cgi?id=28209 + + These objects were also being referenced from the CodeBlock. By changing this + to just retain pointers to FunctionBodyNodes these classes can be restricted to + use during parsing. + + No performance impact (or sub-percent progression). + + * JavaScriptCore.exp: + Update symbols. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::mark): + (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): + (JSC::CodeBlock::shrinkToFit): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::addFunction): + (JSC::CodeBlock::function): + Unify m_functions & m_functionExpressions into a single Vector >. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::addConstant): + (JSC::BytecodeGenerator::emitNewFunction): + (JSC::BytecodeGenerator::emitNewFunctionExpression): + * bytecompiler/BytecodeGenerator.h: + FunctionStacks now contain FunctionBodyNodes not FuncDeclNodes. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::execute): + (JSC::Interpreter::privateExecute): + Update to reflect chnages in CodeBlock. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_new_func_exp): + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + (JSC::): + Update to reflect chnages in CodeBlock. + + * parser/Grammar.y: + FunctionStacks now contain FunctionBodyNodes not FuncDeclNodes. + + * parser/NodeConstructors.h: + (JSC::FuncExprNode::FuncExprNode): + (JSC::FuncDeclNode::FuncDeclNode): + * parser/Nodes.cpp: + (JSC::ScopeNodeData::mark): + (JSC::FunctionBodyNode::finishParsing): + * parser/Nodes.h: + (JSC::FunctionBodyNode::ident): + Move m_ident & make methods from FuncDeclNode & FuncExprNode to FunctionBodyNode. + + * runtime/JSFunction.h: + (JSC::FunctionBodyNode::make): + Make this method inline (was FuncDeclNode::makeFunction). + +2009-08-11 Oliver Hunt + + Reviewed by Gavin Barraclough. + + Native JSON.stringify does not omit functions + https://bugs.webkit.org/show_bug.cgi?id=28117 + + Objects that are callable should be treated as undefined when + serialising to JSON. + + * runtime/JSONObject.cpp: + (JSC::Stringifier::appendStringifiedValue): + +2009-08-11 Oliver Hunt + + Reviewed by Geoff Garen. + + REGRESSION: Hang/crash in BytecodeGenerator::constRegisterFor loading simple page + https://bugs.webkit.org/show_bug.cgi?id=28169 + + Handle the case where someone has attempted to shadow a property + on the global object with a constant. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::constRegisterFor): + * parser/Nodes.cpp: + (JSC::ConstDeclNode::emitCodeSingle): + +2009-08-11 John Gregg + + Reviewed by Maciej Stachowiak. + + Desktop Notifications API + https://bugs.webkit.org/show_bug.cgi?id=25463 + + Adds ENABLE_NOTIFICATION flag. + + * Configurations/FeatureDefines.xcconfig: + * wtf/Platform.h: + +2009-08-11 Maxime Simon + + Reviewed by Eric Seidel. + + Modifications on JavaScriptCore to allow Haiku port. + https://bugs.webkit.org/show_bug.cgi?id=28121 + + * runtime/Collector.cpp: Haiku doesn't have sys/mman.h, using OS.h instead. + (JSC::currentThreadStackBase): Haiku uses its own threading system. + * wtf/Platform.h: Defining all Haiku platform values. + * wtf/haiku/MainThreadHaiku.cpp: Adding a missing header (NotImplemented.h). + +2009-08-11 Jessie Berlin + + Reviewed by Adam Roben. + + Fix windows build. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-08-11 Csaba Osztrogonac + + Reviewed by Tor Arne Vestbø. + + Buildfix for Qt-win platforms. + + * JavaScriptCore.pri: Choose MarkStackPosix.cpp or MarkStackWin.cpp depend on platform. + +2009-08-10 Oliver Hunt + + Reviewed by NOBODY (And another build fix). + + Add new exports for MSVC + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + * JavaScriptCore.xcodeproj/project.pbxproj: + +2009-08-10 Oliver Hunt + + Reviewed by NOBODY (yet another build fix). + + Remove obsolete entries from MSVC exports file + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-08-10 Oliver Hunt + + Add includes needed for non-allinonefile builds + + * runtime/GetterSetter.h: + * runtime/ScopeChain.h: + +2009-08-10 Oliver Hunt + + Fix export file for last build fix + + * JavaScriptCore.exp: + +2009-08-10 Oliver Hunt + + Hoist page size initialization into platform specific code. + + * jit/ExecutableAllocatorPosix.cpp: + * jit/ExecutableAllocatorWin.cpp: + * runtime/MarkStack.h: + (JSC::MarkStack::pageSize): + * runtime/MarkStackPosix.cpp: + (JSC::MarkStack::initializePagesize): + * runtime/MarkStackWin.cpp: + (JSC::MarkStack::initializePagesize): + +2009-08-07 Oliver Hunt + + Reviewed by Gavin Barraclough. + + Stack overflow crash in JavaScript garbage collector mark pass + https://bugs.webkit.org/show_bug.cgi?id=12216 + + Make the GC mark phase iterative by using an explicit mark stack. + To do this marking any single object is performed in multiple stages + * The object is appended to the MarkStack, this sets the marked + bit for the object using the new markDirect() function, and then + returns + * When the MarkStack is drain()ed the object is popped off the stack + and markChildren(MarkStack&) is called on the object to collect + all of its children. drain() then repeats until the stack is empty. + + Additionally I renamed a number of methods from 'mark' to 'markAggregate' + in order to make it more clear that marking of those object was not + going to result in an actual recursive mark. + + * GNUmakefile.am + * JavaScriptCore.exp: + * JavaScriptCore.gypi: + * JavaScriptCore.pri: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::markAggregate): + * bytecode/CodeBlock.h: + * bytecode/EvalCodeCache.h: + (JSC::EvalCodeCache::markAggregate): + * debugger/DebuggerActivation.cpp: + (JSC::DebuggerActivation::markChildren): + * debugger/DebuggerActivation.h: + * interpreter/Register.h: + * interpreter/RegisterFile.h: + (JSC::RegisterFile::markGlobals): + (JSC::RegisterFile::markCallFrames): + * parser/Nodes.cpp: + (JSC::ScopeNodeData::markAggregate): + (JSC::EvalNode::markAggregate): + (JSC::FunctionBodyNode::markAggregate): + * parser/Nodes.h: + (JSC::ScopeNode::markAggregate): + * runtime/ArgList.cpp: + (JSC::MarkedArgumentBuffer::markLists): + * runtime/ArgList.h: + * runtime/Arguments.cpp: + (JSC::Arguments::markChildren): + * runtime/Arguments.h: + * runtime/Collector.cpp: + (JSC::Heap::markConservatively): + (JSC::Heap::markCurrentThreadConservativelyInternal): + (JSC::Heap::markCurrentThreadConservatively): + (JSC::Heap::markOtherThreadConservatively): + (JSC::Heap::markStackObjectsConservatively): + (JSC::Heap::markProtectedObjects): + (JSC::Heap::collect): + * runtime/Collector.h: + * runtime/GetterSetter.cpp: + (JSC::GetterSetter::markChildren): + * runtime/GetterSetter.h: + (JSC::GetterSetter::GetterSetter): + (JSC::GetterSetter::createStructure): + * runtime/GlobalEvalFunction.cpp: + (JSC::GlobalEvalFunction::markChildren): + * runtime/GlobalEvalFunction.h: + * runtime/JSActivation.cpp: + (JSC::JSActivation::markChildren): + * runtime/JSActivation.h: + * runtime/JSArray.cpp: + (JSC::JSArray::markChildren): + * runtime/JSArray.h: + * runtime/JSCell.h: + (JSC::JSCell::markCellDirect): + (JSC::JSCell::markChildren): + (JSC::JSValue::markDirect): + (JSC::JSValue::markChildren): + (JSC::JSValue::hasChildren): + (JSC::MarkStack::append): + (JSC::MarkStack::drain): + * runtime/JSFunction.cpp: + (JSC::JSFunction::markChildren): + * runtime/JSFunction.h: + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + * runtime/JSGlobalObject.cpp: + (JSC::markIfNeeded): + (JSC::JSGlobalObject::markChildren): + * runtime/JSGlobalObject.h: + * runtime/JSNotAnObject.cpp: + (JSC::JSNotAnObject::markChildren): + * runtime/JSNotAnObject.h: + * runtime/JSONObject.cpp: + (JSC::Stringifier::markAggregate): + (JSC::JSONObject::markStringifiers): + * runtime/JSONObject.h: + * runtime/JSObject.cpp: + (JSC::JSObject::markChildren): + (JSC::JSObject::defineGetter): + (JSC::JSObject::defineSetter): + * runtime/JSObject.h: + * runtime/JSPropertyNameIterator.cpp: + (JSC::JSPropertyNameIterator::markChildren): + * runtime/JSPropertyNameIterator.h: + (JSC::JSPropertyNameIterator::createStructure): + (JSC::JSPropertyNameIterator::JSPropertyNameIterator): + (JSC::JSPropertyNameIterator::create): + * runtime/JSStaticScopeObject.cpp: + (JSC::JSStaticScopeObject::markChildren): + * runtime/JSStaticScopeObject.h: + * runtime/JSType.h: + (JSC::): + * runtime/JSValue.h: + * runtime/JSWrapperObject.cpp: + (JSC::JSWrapperObject::markChildren): + * runtime/JSWrapperObject.h: + * runtime/MarkStack.cpp: Added. + (JSC::MarkStack::compact): + * runtime/MarkStack.h: Added. + (JSC::): + (JSC::MarkStack::MarkStack): + (JSC::MarkStack::append): + (JSC::MarkStack::appendValues): + (JSC::MarkStack::~MarkStack): + (JSC::MarkStack::MarkSet::MarkSet): + (JSC::MarkStack::pageSize): + + MarkStackArray is a non-shrinking, mmap-based vector type + used for storing objects to be marked. + (JSC::MarkStack::MarkStackArray::MarkStackArray): + (JSC::MarkStack::MarkStackArray::~MarkStackArray): + (JSC::MarkStack::MarkStackArray::expand): + (JSC::MarkStack::MarkStackArray::append): + (JSC::MarkStack::MarkStackArray::removeLast): + (JSC::MarkStack::MarkStackArray::isEmpty): + (JSC::MarkStack::MarkStackArray::size): + (JSC::MarkStack::MarkStackArray::shrinkAllocation): + * runtime/MarkStackPosix.cpp: Added. + (JSC::MarkStack::allocateStack): + (JSC::MarkStack::releaseStack): + * runtime/MarkStackWin.cpp: Added. + (JSC::MarkStack::allocateStack): + (JSC::MarkStack::releaseStack): + + * runtime/ScopeChain.h: + * runtime/ScopeChainMark.h: + (JSC::ScopeChain::markAggregate): + * runtime/SmallStrings.cpp: + (JSC::SmallStrings::mark): + * runtime/Structure.h: + (JSC::Structure::markAggregate): + +2009-08-10 Mark Rowe + + Reviewed by Darin Adler. + + Fix hundreds of "pointer being freed was not allocated" errors seen on the build bot. + + * wtf/FastMalloc.h: Implement nothrow variants of the delete and delete[] operators since + we implement the nothrow variants of new and new[]. The nothrow variant of delete is called + explicitly in the implementation of std::sort which was resulting in FastMalloc-allocated + memory being passed to the system allocator to free. + +2009-08-10 Jan Michael Alonzo + + [Gtk] Unreviewed build fix. Move JSAPIValueWrapper.cpp/.h in the debug + section. This file is already part of AllInOneFile in Release builds. + + * GNUmakefile.am: + +2009-08-10 Darin Adler + + * wtf/FastMalloc.h: Fix build. + +2009-08-10 Darin Adler + + Reviewed by Mark Rowe. + + FastMalloc.h has cross-platform code but marked as WinCE-only + https://bugs.webkit.org/show_bug.cgi?id=28160 + + 1) The support for nothrow was inside #if PLATFORM(WINCE) even though it is + not platform-specific. + 2) The code tried to override operator delete nothrow, which does not exist. + 3) The code in the header checks the value of USE_SYSTEM_MALLOC, but the code + in FastMalloc.cpp checks only if the macro is defined. + + * wtf/FastMalloc.h: See above. + * wtf/FastMalloc.cpp: Ditto. + +2009-08-10 Sam Weinig + + Reviewed by Anders Carlsson. + + Fix an annoying indentation issue. + + * runtime/DateConstructor.cpp: + (JSC::constructDate): + +2009-08-10 Xan Lopez + + Unreviewed build fix. + + Add new files to makefile. + + * GNUmakefile.am: + +2009-08-10 Simon Hausmann + + Fix compilation with the interpreter instead of the JIT by including + PrototypeFunction.h as forward-declared through NativeFunctionWrapper.h. + + * runtime/ObjectConstructor.cpp: + +2009-08-09 Oliver Hunt + + Reviewed by George Staikos. + + JSON.stringify replacer returning undefined does not omit object properties + https://bugs.webkit.org/show_bug.cgi?id=28118 + + Correct behaviour of stringify when using a replacer function that returns + undefined. This is a simple change to move the undefined value check to + after the replacer function is called. This means that the replacer function + is now called for properties with the value undefined, however i've confirmed + that this behaviour is correct. + + In addition I've made the cyclic object exception have a more useful error + message. + + * runtime/JSONObject.cpp: + (JSC::Stringifier::appendStringifiedValue): + +2009-08-08 Oliver Hunt + + Reviewed by Eric Seidel and Sam Weinig. + + [ES5] Implement Object.getPrototypeOf + https://bugs.webkit.org/show_bug.cgi?id=28114 + + Implement getPrototypeOf + + * runtime/CommonIdentifiers.h: + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::reset): + * runtime/ObjectConstructor.cpp: + (JSC::ObjectConstructor::ObjectConstructor): + (JSC::objectConsGetPrototypeOf): + * runtime/ObjectConstructor.h: + +2009-08-07 Zoltan Horvath + + Reviewed by Eric Seidel. + + Allow custom memory allocation control for Noncopyable class + https://bugs.webkit.org/show_bug.cgi?id=27879 + + Several classes which are inherited from Noncopyable are instantiated by + operator new, so Noncopyable class has been inherited from FastAllocBase. + + * wtf/Noncopyable.h: + +2009-08-07 George Staikos + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=27305 + Implement WinCE-specific unicode layer. + Written by George Staikos + with bug fixes by Yong Li + refactored by Joe Mason + + * wtf/Platform.h: + * wtf/unicode/Unicode.h: + * wtf/unicode/wince/UnicodeWince.cpp: Added. + (WTF::Unicode::toLower): + (WTF::Unicode::toUpper): + (WTF::Unicode::foldCase): + (WTF::Unicode::isPrintableChar): + (WTF::Unicode::isSpace): + (WTF::Unicode::isLetter): + (WTF::Unicode::isUpper): + (WTF::Unicode::isLower): + (WTF::Unicode::isDigit): + (WTF::Unicode::isPunct): + (WTF::Unicode::toTitleCase): + (WTF::Unicode::direction): + (WTF::Unicode::category): + (WTF::Unicode::decompositionType): + (WTF::Unicode::combiningClass): + (WTF::Unicode::mirroredChar): + (WTF::Unicode::digitValue): + * wtf/unicode/wince/UnicodeWince.h: Added. + (WTF::Unicode::): + (WTF::Unicode::isSeparatorSpace): + (WTF::Unicode::isHighSurrogate): + (WTF::Unicode::isLowSurrogate): + (WTF::Unicode::isArabicChar): + (WTF::Unicode::hasLineBreakingPropertyComplexContext): + (WTF::Unicode::umemcasecmp): + (WTF::Unicode::surrogateToUcs4): + +2009-08-07 Yongjun Zhang + + Reviewed by Eric Seidel. + + https://bugs.webkit.org/show_bug.cgi?id=28069 + + Add inline to help winscw compiler resolve specialized argument in + templated functions. + + * runtime/LiteralParser.cpp: + (JSC::LiteralParser::Lexer::lexString): + +2009-08-07 Zoltan Horvath + + Reviewed by Eric Seidel. + + Allow custom memory allocation control for RegExpObjectData struct + http://bugs.webkit.org/show_bug.cgi?id=26750 + + Inherits RegExpObjectData struct from FastAllocBase because + it has been instantiated by 'new' in JavaScriptCore/runtime/RegExpObject.cpp:62 + + * runtime/RegExpObject.h: + +2009-08-06 Norbert Leser + + Reviewed by Darin Adler. + + Updated patch for bug #27059: + Symbian platform always uses little endian encoding, + regardless of compiler. + We need to make sure that we correctly detect EABI architecture + for armv5 targets on Symbian, + where __EABI__ is set but not __ARM_EABI__ + + * wtf/Platform.h: + +2009-08-06 Adam Barth + + Unreviewed revert. + + http://bugs.webkit.org/show_bug.cgi?id=27879 + + Revert 46877 because it broke GTK. + + * wtf/Noncopyable.h: + +2009-08-06 Gavin Barraclough + + Reviewed by Oliver Hunt. + + Make get_by_id/put_by_id/method_check/call defer optimization using a data flag rather than a code modification. + ( https://bugs.webkit.org/show_bug.cgi?id=27635 ) + + This improves performance of ENABLE(ASSEMBLER_WX_EXCLUSIVE) builds by 2-2.5%, reducing the overhead to about 2.5%. + (No performance impact with ASSEMBLER_WX_EXCLUSIVE disabled). + + * bytecode/CodeBlock.cpp: + (JSC::printStructureStubInfo): + - Make StructureStubInfo store the type as an integer, rather than an OpcodeID. + + * bytecode/CodeBlock.h: + (JSC::): + (JSC::CallLinkInfo::seenOnce): + (JSC::CallLinkInfo::setSeen): + (JSC::MethodCallLinkInfo::seenOnce): + (JSC::MethodCallLinkInfo::setSeen): + - Change a pointer in CallLinkInfo/MethodCallLinkInfo to use a PtrAndFlags, use a flag to track when an op has been executed once. + + * bytecode/StructureStubInfo.cpp: + (JSC::StructureStubInfo::deref): + - Make StructureStubInfo store the type as an integer, rather than an OpcodeID. + + * bytecode/StructureStubInfo.h: + (JSC::StructureStubInfo::StructureStubInfo): + (JSC::StructureStubInfo::initGetByIdSelf): + (JSC::StructureStubInfo::initGetByIdProto): + (JSC::StructureStubInfo::initGetByIdChain): + (JSC::StructureStubInfo::initGetByIdSelfList): + (JSC::StructureStubInfo::initGetByIdProtoList): + (JSC::StructureStubInfo::initPutByIdTransition): + (JSC::StructureStubInfo::initPutByIdReplace): + (JSC::StructureStubInfo::seenOnce): + (JSC::StructureStubInfo::setSeen): + - Make StructureStubInfo store the type as an integer, rather than an OpcodeID, add a flag to track when an op has been executed once. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitGetById): + (JSC::BytecodeGenerator::emitPutById): + - Make StructureStubInfo store the type as an integer, rather than an OpcodeID. + + * jit/JIT.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + (JSC::JIT::unlinkCall): + - Remove the "don't lazy link" stage of calls. + + * jit/JIT.h: + (JSC::JIT::compileCTIMachineTrampolines): + - Remove the "don't lazy link" stage of calls. + + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallSlowCase): + - Remove the "don't lazy link" stage of calls. + + * jit/JITStubs.cpp: + (JSC::JITThunks::JITThunks): + (JSC::JITThunks::tryCachePutByID): + (JSC::JITThunks::tryCacheGetByID): + (JSC::JITStubs::DEFINE_STUB_FUNCTION): + (JSC::JITStubs::getPolymorphicAccessStructureListSlot): + - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check. + + * jit/JITStubs.h: + (JSC::JITThunks::ctiStringLengthTrampoline): + (JSC::JITStubs::): + - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check. + + * wtf/PtrAndFlags.h: + (WTF::PtrAndFlags::PtrAndFlags): + (WTF::PtrAndFlags::operator!): + (WTF::PtrAndFlags::operator->): + - Add ! and -> operators, add constuctor with pointer argument. + +2009-08-06 Zoltan Horvath + + Reviewed by Adam Barth. + + Allow custom memory allocation control for Noncopyable class + https://bugs.webkit.org/show_bug.cgi?id=27879 + + Several classes which inherited from Noncopyable are instantiated by + operator new, so Noncopyable class has been inherited from FastAllocBase. + + * wtf/Noncopyable.h: + +2009-08-06 Mark Rowe + + Rubber-stamped by Sam Weinig. + + Add explicit dependencies for our build verification scripts to ensure that they always run after linking has completed. + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2009-08-06 Mark Rowe + + Bring a little order to our otherwise out of control lives. + + * JavaScriptCore.xcodeproj/project.pbxproj: + +2009-08-06 Zoltan Horvath + + Reviewed by Darin Adler. + + Allow custom memory allocation control for JavaScriptCore's PolymorphicAccessStructureList struct + https://bugs.webkit.org/show_bug.cgi?id=27877 + + Inherits PolymorphicAccessStructureList struct from FastAllocBase because it has been instantiated by + 'new' in JavaScriptCore/jit/JITStubs.cpp:1229. + + * bytecode/Instruction.h: + +2009-08-05 Zoltan Horvath + + Reviewed by Darin Adler. + + Allow custom memory allocation control for JavaScriptCore's ScopeNodeData struct + https://bugs.webkit.org/show_bug.cgi?id=27875 + + Inherits ScopeNodeData struct from FastAllocBase because it has been instantiated by + 'new' in JavaScriptCore/parser/Nodes.cpp:1848. + + * parser/Nodes.h: + +2009-08-05 Zoltan Herczeg + + Reviewed by Gavin Barraclough. + + Add floating point support for generic ARM port. + https://bugs.webkit.org/show_bug.cgi?id=24986 + + * assembler/ARMAssembler.cpp: + (JSC::ARMAssembler::doubleTransfer): + * assembler/ARMAssembler.h: + (JSC::ARM::): + (JSC::ARMAssembler::): + (JSC::ARMAssembler::faddd_r): + (JSC::ARMAssembler::fsubd_r): + (JSC::ARMAssembler::fmuld_r): + (JSC::ARMAssembler::fcmpd_r): + (JSC::ARMAssembler::fdtr_u): + (JSC::ARMAssembler::fdtr_d): + (JSC::ARMAssembler::fmsr_r): + (JSC::ARMAssembler::fsitod_r): + (JSC::ARMAssembler::fmstat): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::): + (JSC::MacroAssemblerARM::supportsFloatingPoint): + (JSC::MacroAssemblerARM::loadDouble): + (JSC::MacroAssemblerARM::storeDouble): + (JSC::MacroAssemblerARM::addDouble): + (JSC::MacroAssemblerARM::subDouble): + (JSC::MacroAssemblerARM::mulDouble): + (JSC::MacroAssemblerARM::convertInt32ToDouble): + (JSC::MacroAssemblerARM::branchDouble): + * jit/JIT.h: + +2009-08-05 Zoltan Herczeg + + Reviewed by Gavin Barraclough. + + Add JIT support for generic ARM port without optimizations. + https://bugs.webkit.org/show_bug.cgi?id=24986 + + All JIT optimizations are disabled. + + Signed off by Zoltan Herczeg + Signed off by Gabor Loki + + * assembler/ARMAssembler.cpp: + (JSC::ARMAssembler::baseIndexTransfer32): + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::Imm32::Imm32): + * assembler/MacroAssemblerARM.h: + (JSC::MacroAssemblerARM::store32): + (JSC::MacroAssemblerARM::move): + (JSC::MacroAssemblerARM::branch32): + (JSC::MacroAssemblerARM::add32): + (JSC::MacroAssemblerARM::sub32): + (JSC::MacroAssemblerARM::load32): + * bytecode/CodeBlock.h: + (JSC::CodeBlock::getBytecodeIndex): + * jit/JIT.h: + * jit/JITInlineMethods.h: + (JSC::JIT::restoreArgumentReference): + * jit/JITOpcodes.cpp: + * jit/JITStubs.cpp: + * jit/JITStubs.h: + (JSC::JITStackFrame::returnAddressSlot): + * wtf/Platform.h: + +2009-08-04 Gavin Barraclough + + Rubber Stamped by Oiver Hunt. + + Revert r46643 since this breaks the Yarr::Interpreter running the v8 tests. + https://bugs.webkit.org/show_bug.cgi?id=27874 + + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::allocDisjunctionContext): + (JSC::Yarr::Interpreter::freeDisjunctionContext): + (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext): + (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext): + +2009-08-04 Oliver Hunt + + PPC64 Build fix + + * wtf/Platform.h: + +2009-08-04 Benjamin C Meyer + + Reviewed by Adam Treat + + Explicitly include limits.h header when using INT_MAX and INT_MIN + + * interpreter/Interpreter.cpp + +2009-08-03 Harald Fernengel + + Reviewed by Darin Adler. + + Fix compile error for ambigous call to abs() + https://bugs.webkit.org/show_bug.cgi?id=27873 + + Fix ambiguity in abs(long int) call by calling labs() instead + + * wtf/DateMath.cpp: replace call to abs() with labs() + +2009-08-03 Laszlo Gombos + + Reviewed by Eric Seidel. + + [Qt] Consolidate common gcc flags to WebKit.pri + https://bugs.webkit.org/show_bug.cgi?id=27934 + + * JavaScriptCore.pro: + +2009-08-03 Ada Chan + + Fixed the Tiger build. + + * wtf/FastMalloc.cpp: + +2009-08-03 Ada Chan + + Reviewed by Darin Adler. + + Don't use background thread to scavenge memory on Tiger until we figure out why it causes a crash. + https://bugs.webkit.org/show_bug.cgi?id=27900 + + * wtf/FastMalloc.cpp: + +2009-08-03 Fumitoshi Ukai + + Reviewed by Jan Alonzo. + + Fix build break on Gtk/x86_64. + https://bugs.webkit.org/show_bug.cgi?id=27936 + + Use JSVALUE64 for X86_64 LINUX, except Qt. + + * wtf/Platform.h: + +2009-08-02 Xan Lopez + + Fix the GTK+ build. + + * wtf/Platform.h: + +2009-08-02 Geoffrey Garen + + Reviewed by Sam Weinig. + + Disabled JSVALUE32_64 on Qt builds, since all layout tests mysteriously + crash with it enabled. + + * wtf/Platform.h: + +2009-08-02 Geoffrey Garen + + Qt build fix. + + Added JSAPIValueWrapper.cpp to the build. + + * JavaScriptCore.pri: + +2009-08-02 Geoffrey Garen + + Windows build fix. + + Exported symbols for JSAPIValueWrapper. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-08-02 Geoffrey Garen + + GTK build fix. + + * jit/JITStubs.cpp: #include , for a definition of va_start. + +2009-08-02 Geoffrey Garen + + Qt build fix. + + * runtime/Collector.cpp: #include , for a definition of ULONG_MAX. + +2009-08-02 Geoffrey Garen + + Windows build fix: Nixed JSImmediate::prototype, JSImmediate::toObject, + and JSImmediate::toThisObject, and removed their exported symbols. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + * runtime/JSImmediate.cpp: + * runtime/JSImmediate.h: + +2009-08-02 Geoffrey Garen + + Reviewed by Mark Rowe. + + Enabled JSVALUE32_64 by default on all platforms other than x86_64 (which uses JSVALUE64). + + * wtf/Platform.h: + +2009-08-02 Kevin Ollivier + + Reviewed by Jan Alonzo. + + Script for building the JavaScriptCore library for wx. + https://bugs.webkit.org/show_bug.cgi?id=27619 + + * wscript: Added. + +2009-08-02 Yong Li + + Reviewed by George Staikos. + + DateMath depends on strftime and localtime, which need to be imported manually on WinCE + https://bugs.webkit.org/show_bug.cgi?id=26558 + + * wtf/DateMath.cpp: + +2009-08-01 David Kilzer + + wtf/Threading.h: added include of Platform.h + + Reviewed by Mark Rowe. + + * wtf/Threading.h: Added #include "Platform.h" since this header + uses PLATFORM() and other macros. + +2009-08-01 Mark Rowe + + Rubber-stamped by Oliver Hunt. + + Roll out r46668 as it was misinformed. ScopeChain is only used with placement new. + + * runtime/ScopeChain.h: + +2009-08-01 Zoltan Horvath + + Allow custom memory allocation control for JavaScriptCore's HashMap class + http://bugs.webkit.org/show_bug.cgi?id=27871 + + Inherits HashMap class from FastAllocBase because it has been + instantiated by 'new' in JavaScriptCore/API/JSClassRef.cpp:148. + + * wtf/RefPtrHashMap.h: + (WTF::): + +2009-08-01 Zoltan Horvath + + Allow custom memory allocation control for JavaScriptCore's ScopeChain class + https://bugs.webkit.org/show_bug.cgi?id=27834 + + Inherits ScopeChain class from FastAllocBase because it has been + instantiated by 'new' in JavaScriptCore/runtime/JSFunction.h:109. + + * runtime/ScopeChain.h: + +2009-08-01 Zoltan Horvath + + Reviewed by Darin Adler. + + Allow custom memory allocation control for JavaScriptCore's RegExpConstructorPrivate struct + https://bugs.webkit.org/show_bug.cgi?id=27833 + + Inherits RegExpConstructorPrivate class from FastAllocBase because it has been + instantiated by 'new' in JavaScriptCore/runtime/RegExpConstructor.cpp:152. + + * runtime/RegExpConstructor.cpp: + +2009-07-31 Yong Li + + Reviewed by George Staikos. + + Resurrect the old GetTickCount implementation of currentTime, controlled by WTF_USE_QUERY_PERFORMANCE_COUNTER + currentSystemTime taken from older WebKit; currentTime written by Yong Li ; cleanup by Joe Mason + https://bugs.webkit.org/show_bug.cgi?id=27848 + + * wtf/CurrentTime.cpp: + (WTF::currentSystemTime): get current time with GetCurrentFT + (WTF::currentTime): track msec elapsed since first currentSystemTime call using GetTickCount + * wtf/Platform.h: + +2009-07-31 Ada Chan + + Fixes the Windows release-PGO build. + + Reviewed by Jon Honeycutt. + + * JavaScriptCore.vcproj/WTF/WTF.vcproj: Suppresses the warning about unreachable code that we get by adding "return 0" to WTF::TCMalloc_PageHeap::runScavengerThread(). + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::runScavengerThread): Fixes the error about the method not returning a value in the release-PGO build. + +2009-07-31 Zoltan Horvath + + Change malloc to fastMalloc and free to fastFree in Yarr's RegexInterpreter.cpp + https://bugs.webkit.org/show_bug.cgi?id=27874 + + Use fastMalloc and fastFree instead of malloc and free in RegexInterpreter.cpp's methods. + + * yarr/RegexInterpreter.cpp: + (JSC::Yarr::Interpreter::allocDisjunctionContext): + (JSC::Yarr::Interpreter::freeDisjunctionContext): + (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext): + (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext): + +2009-07-30 Xan Lopez + + Reviewed by Jan Alonzo. + + Fix compiler warning. + + GCC does not like C++-style comments in preprocessor directives. + + * wtf/Platform.h: + +2009-07-30 John McCall + + Reviewed by Gavin Barraclough. + + Optimize the X86_64 trampolines: avoid the need for filler arguments + and move the stub-args area closer to the stack pointer. + + * jit/JIT.h: adjust patch offsets because of slight code-size change + * jit/JITCode.h: + (JSC::JITCode::execute): don't pass filler args + * jit/JITStubs.cpp: + (ctiTrampoline): (X86_64): push args onto stack, use args directly + (ctiVMThrowTrampoline): (X86_64): adjust %rsp by correct displacement + (ctiOpThrowNotCaught): (X86_64): adjust %rsp by correct displacement + * jit/JITStubs.h: + (JITStackFrame): (X86_64): move args area earlier + (ctiTrampoline): remove filler args from prototype + +2009-07-30 Gavin Barraclough + + Temporarily revert r46618 since this is b0rking on Linux. + +2009-07-23 Gavin Barraclough + + Reviewed by Oliver Hunt. + + Make get_by_id/put_by_id/method_check/call defer optimization using a data flag rather than a code modification. + ( https://bugs.webkit.org/show_bug.cgi?id=27635 ) + + This improves performance of ENABLE(ASSEMBLER_WX_EXCLUSIVE) builds by 2-2.5%, reducing the overhead to about 2.5%. + (No performance impact with ASSEMBLER_WX_EXCLUSIVE disabled). + + * bytecode/CodeBlock.cpp: + (JSC::printStructureStubInfo): + - Make StructureStubInfo store the type as an integer, rather than an OpcodeID. + + * bytecode/CodeBlock.h: + (JSC::): + (JSC::CallLinkInfo::seenOnce): + (JSC::CallLinkInfo::setSeen): + (JSC::MethodCallLinkInfo::seenOnce): + (JSC::MethodCallLinkInfo::setSeen): + - Change a pointer in CallLinkInfo/MethodCallLinkInfo to use a PtrAndFlags, use a flag to track when an op has been executed once. + + * bytecode/StructureStubInfo.cpp: + (JSC::StructureStubInfo::deref): + - Make StructureStubInfo store the type as an integer, rather than an OpcodeID. + + * bytecode/StructureStubInfo.h: + (JSC::StructureStubInfo::StructureStubInfo): + (JSC::StructureStubInfo::initGetByIdSelf): + (JSC::StructureStubInfo::initGetByIdProto): + (JSC::StructureStubInfo::initGetByIdChain): + (JSC::StructureStubInfo::initGetByIdSelfList): + (JSC::StructureStubInfo::initGetByIdProtoList): + (JSC::StructureStubInfo::initPutByIdTransition): + (JSC::StructureStubInfo::initPutByIdReplace): + (JSC::StructureStubInfo::seenOnce): + (JSC::StructureStubInfo::setSeen): + - Make StructureStubInfo store the type as an integer, rather than an OpcodeID, add a flag to track when an op has been executed once. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitGetById): + (JSC::BytecodeGenerator::emitPutById): + - Make StructureStubInfo store the type as an integer, rather than an OpcodeID. + + * jit/JIT.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + (JSC::JIT::unlinkCall): + - Remove the "don't lazy link" stage of calls. + + * jit/JIT.h: + (JSC::JIT::compileCTIMachineTrampolines): + - Remove the "don't lazy link" stage of calls. + + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallSlowCase): + - Remove the "don't lazy link" stage of calls. + + * jit/JITStubs.cpp: + (JSC::JITThunks::JITThunks): + (JSC::JITThunks::tryCachePutByID): + (JSC::JITThunks::tryCacheGetByID): + (JSC::JITStubs::DEFINE_STUB_FUNCTION): + (JSC::JITStubs::getPolymorphicAccessStructureListSlot): + - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check. + + * jit/JITStubs.h: + (JSC::JITThunks::ctiStringLengthTrampoline): + (JSC::JITStubs::): + - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check. + + * wtf/PtrAndFlags.h: + (WTF::PtrAndFlags::PtrAndFlags): + (WTF::PtrAndFlags::operator!): + (WTF::PtrAndFlags::operator->): + - Add ! and -> operators, add constuctor with pointer argument. + +2009-07-30 Geoffrey Garen + + Reviewed by Gavin Barraclough. + + Fixed failing tests seen on Windows buildbot. + + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + (JSC::): Use "int" instead of "bool" to guarantee a 32-bit result, + regardless of compiler. gcc on mac uses 32-bit values for bool, + but gcc on linux and MSVC on Windows use 8-bit values. + +2009-07-30 Geoffrey Garen + + Windows build fix: added missing symbols on Windows. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-07-30 Geoffrey Garen + + Windows build fix: removed stale symbols on Windows. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +=== End merge of nitro-extreme branch 2009-07-30 === + +2009-07-20 Geoffrey Garen + + Fixed a post-review typo in r46066 that caused tons of test failures. + + SunSpider reports no change. + + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): Initialize the full vector capacity, to avoid + uninitialized members at the end. + +2009-07-20 Geoffrey Garen + + Windows WebKit build fix: Added some missing exports. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-07-17 Geoffrey Garen + + Reviewed by Sam Weinig. + + Get the branch working on windows. + https://bugs.webkit.org/show_bug.cgi?id=27391 + + SunSpider says 0.3% faster. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Updated + MSVC export lists to fix linker errors. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Added / removed + new / old project files. + + * jit/JIT.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): Used #pragma pack to tell + MSVC that these structures represent actual memory layout, and should not be + automatically aligned. Changed the return value load to load a 64bit quantity + into the canonical registers. + + * jit/JIT.h: Moved OBJECT_OFFSETOF definition to StdLibExtras.h because + it's needed by more than just the JIT, and it supplements a standard library + macro (offsetof). + + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallInitializeCallFrame): Fixed an incorrectly signed + cast to resolve an MSVC warning. + + * jit/JITStubs.h: Used #pragma pack to tell MSVC that these structures + represent actual memory layout, and should not be automatically aligned. + + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): Replaced memset_pattern8 with a for loop, since + memset_pattern8 is not portable. (I verified that this version of the loop + gives the best performance / generated code in GCC.) + + * runtime/JSObject.h: + (JSC::JSObject::JSObject): Removed accidental usage of FIELD_OFFSET -- + OBJECT_OFFSETOF is our new macro name. (FIELD_OFFSET conflicts with a + definition in winnt.h.) + + * runtime/JSValue.cpp: Added some headers needed by non-all-in-one builds. + + * runtime/JSValue.h: + (JSC::JSValue::): Made the tag signed, to match MSVC's signed enum values. + (GCC doesn't seem to care one way or the other.) + + * wtf/MainThread.cpp: Moved the StdLibExtras.h #include -- I did this a + while ago to resolve a conflict with winnt.h. I can't remember if it's truly + still needed, but what the heck. + + * wtf/StdLibExtras.h: Moved OBJECT_OFFSETOF definition here. + +2009-07-06 Geoffrey Garen + + Reviewed by Sam Weinig (?). + + Fixed an assertion seen during the stress test. + + Don't assume that, if op1 is constant, op2 is not, and vice versa. Sadly, + not all constants get folded. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_jnless): + (JSC::JIT::emitSlow_op_jnless): + (JSC::JIT::emit_op_jnlesseq): + (JSC::JIT::emitSlow_op_jnlesseq): + +2009-07-06 Geoffrey Garen + + Reviewed by Sam Weinig. + + Include op_convert_this in result caching. + + No change on SunSpider or v8. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_convert_this): + + * jit/JITStubs.cpp: + (JSC::DEFINE_STUB_FUNCTION): + * jit/JITStubs.h: + (JSC::): Made the op_convert_this JIT stub return an EncodedJSValue, so + to maintain the result caching contract that { tag, payload } can be + found in { regT1, regT0 }. + +2009-07-06 Geoffrey Garen + + Reviewed by Sam Weinig. + + Implemented result chaining. + + 1% faster on SunSpider. 4%-5% faster on v8. + + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::move): + * assembler/X86Assembler.h: + (JSC::X86Assembler::movl_rr): Added an optimization to eliminate + no-op mov instructions, to simplify chaining. + + * jit/JIT.cpp: + (JSC::JIT::JIT): + * jit/JIT.h: Added data members and helper functions for recording + chained results. We record both a mapping from virtual to machine register + and the opcode for which the mapping is valid, to help ensure that the + mapping isn't used after the mapped register has been stomped by other + instructions. + + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::compileOpCallVarargsSlowCase): + (JSC::JIT::emit_op_ret): + (JSC::JIT::emit_op_construct_verify): + (JSC::JIT::compileOpCall): + (JSC::JIT::compileOpCallSlowCase): Chain function call results. + + * jit/JITInlineMethods.h: + (JSC::JIT::emitLoadTag): + (JSC::JIT::emitLoadPayload): + (JSC::JIT::emitLoad): + (JSC::JIT::emitLoad2): + (JSC::JIT::isLabeled): + (JSC::JIT::map): + (JSC::JIT::unmap): + (JSC::JIT::isMapped): + (JSC::JIT::getMappedPayload): + (JSC::JIT::getMappedTag): Use helper functions when loading virtual + registers into machine registers, in case the loads can be eliminated + by chaining. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_mov): + (JSC::JIT::emit_op_end): + (JSC::JIT::emit_op_instanceof): + (JSC::JIT::emit_op_get_global_var): + (JSC::JIT::emit_op_put_global_var): + (JSC::JIT::emit_op_get_scoped_var): + (JSC::JIT::emit_op_put_scoped_var): + (JSC::JIT::emit_op_to_primitive): + (JSC::JIT::emit_op_resolve_global): + (JSC::JIT::emit_op_jneq_ptr): + (JSC::JIT::emit_op_next_pname): + (JSC::JIT::emit_op_to_jsnumber): + (JSC::JIT::emit_op_catch): Chain results from these opcodes. + + (JSC::JIT::emit_op_profile_will_call): + (JSC::JIT::emit_op_profile_did_call): Load the profiler into regT2 to + avoid stomping a chained result. + + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_method_check): + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_get_by_id): Chain results from these opcodes. + + * jit/JITStubCall.h: + (JSC::JITStubCall::addArgument): Always use { regT1, regT0 }, to facilitate + chaining. + + (JSC::JITStubCall::call): Unmap all mapped registers, since our callee + stub might stomp them. + +2009-07-01 Sam Weinig + + Reviewed by Gavin Barraclough. + + Don't reload values in emitBinaryDoubleOp. + + SunSpider reports a 0.6% progression. + + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_jnless): + (JSC::JIT::emit_op_jnlesseq): + (JSC::JIT::emitBinaryDoubleOp): + +2009-07-01 Sam Weinig + + Reviewed by Geoffrey Garen. + + Convert op_div to load op1 and op2 up front. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_div): + +2009-07-01 Sam Weinig + + Reviewed by Geoffrey Garen. + + Don't emit code in emitBinaryDoubleOp if code is unreachable, observable + via an empty (unlinked) jumplist passed in. This only effects op_jnless + and op_jnlesseq at present. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emitSlow_op_jnless): + (JSC::JIT::emitSlow_op_jnlesseq): + (JSC::JIT::emitBinaryDoubleOp): + +2009-07-01 Geoffrey Garen + + Reviewed by Sam Weinig. + + Converted op_mod to put { tag, payload } in { regT1, regT0 }, and + tidied up its constant case. + + SunSpider reports a 0.2% regression, but a micro-benchmark of op_mod + shows a 12% speedup, and the SunSpider test that uses op_mod most should + benefit a lot from result caching in the end, since it almost always + performs (expression) % constant. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_mod): + (JSC::JIT::emitSlow_op_mod): + +2009-06-30 Sam Weinig + + Reviewed by Geoffrey Garen. + + Converted some more arithmetic ops to put { tag, payload } in + { regT1, regT0 }. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_mul): + (JSC::JIT::emitSlow_op_mul): + +2009-06-30 Geoffrey Garen + + Reviewed by Sam Weinig. + + Converted some more arithmetic ops to put { tag, payload } in + { regT1, regT0 }, and added a case for subtract constant. + + SunSpider says no change. v8 says 0.3% slower. + + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_add): + (JSC::JIT::emitAdd32Constant): + (JSC::JIT::emitSlow_op_add): + (JSC::JIT::emit_op_sub): + (JSC::JIT::emitSub32Constant): + (JSC::JIT::emitSlow_op_sub): + +2009-06-30 Gavin Barraclough + + Reviewed by Sam Weinig. + + Remove more uses of addressFor(), load double constants directly from + the constantpool in the CodeBlock, rather than from the register file. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emitAdd32Constant): + (JSC::JIT::emitBinaryDoubleOp): + +2009-06-30 Geoffrey Garen + + Reviewed by Sam Weinig. + + Fixed a bug in postfix ops, where we would treat x = x++ and x = x-- + as a no-op, even if x were not an int, and the ++/-- could have side-effects. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_post_inc): + (JSC::JIT::emitSlow_op_post_inc): + (JSC::JIT::emit_op_post_dec): + (JSC::JIT::emitSlow_op_post_dec): + +2009-06-30 Geoffrey Garen + + Reviewed by Sam Weinig. + + Converted some arithmetic ops to put { tag, payload } in + { regT1, regT0 }. + + SunSpider says 0.7% faster. v8 says no change. + + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_jnless): + (JSC::JIT::emit_op_jnlesseq): + (JSC::JIT::emit_op_lshift): + (JSC::JIT::emit_op_rshift): + (JSC::JIT::emit_op_bitand): + (JSC::JIT::emit_op_bitor): + (JSC::JIT::emit_op_bitxor): + * jit/JITInlineMethods.h: + (JSC::JIT::isOperandConstantImmediateInt): + (JSC::JIT::getOperandConstantImmediateInt): + +2009-06-30 Gavin Barraclough + + Reviewed by Sam Weinig. + + Start removing cases of addressFor(). + + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emitAdd32Constant): + (JSC::JIT::emitBinaryDoubleOp): + (JSC::JIT::emit_op_div): + * jit/JITInlineMethods.h: + (JSC::JIT::emitLoadDouble): + (JSC::JIT::emitLoadInt32ToDouble): + (JSC::JIT::emitStoreDouble): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_jfalse): + (JSC::JIT::emit_op_jtrue): + +2009-06-30 Geoffrey Garen + + Rolled back in my last patch with regression fixed. + + * jit/JIT.cpp: + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_loop_if_less): + (JSC::JIT::emit_op_loop_if_lesseq): + (JSC::JIT::emit_op_resolve_global): + (JSC::JIT::emitSlow_op_resolve_global): + (JSC::JIT::emit_op_eq): + (JSC::JIT::emitSlow_op_eq): + (JSC::JIT::emit_op_neq): + (JSC::JIT::emitSlow_op_neq): + +2009-06-30 Geoffrey Garen + + Rolled out my last patch because it was a 2% SunSpider regression. + + * jit/JIT.cpp: + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_loop_if_less): + (JSC::JIT::emit_op_loop_if_lesseq): + (JSC::JIT::emit_op_resolve_global): + (JSC::JIT::emit_op_eq): + (JSC::JIT::emitSlow_op_eq): + (JSC::JIT::emit_op_neq): + (JSC::JIT::emitSlow_op_neq): + +2009-06-30 Geoffrey Garen + + Reviewed by Gavin "Sam Weinig" Barraclough. + + Standardized the rest of our opcodes to put { tag, payload } in + { regT1, regT0 } where possible. + + * jit/JIT.cpp: + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_loop_if_less): + (JSC::JIT::emit_op_loop_if_lesseq): + (JSC::JIT::emit_op_resolve_global): + (JSC::JIT::emitSlow_op_resolve_global): + (JSC::JIT::emit_op_eq): + (JSC::JIT::emitSlow_op_eq): + (JSC::JIT::emit_op_neq): + (JSC::JIT::emitSlow_op_neq): + +2009-06-30 Gavin Barraclough + + Reviewed by Geoffrey Garen. + + Replace calls to store32(tagFor()) and store32(payloadFor()) + with emitStoreInt32(), emitStoreBool(), and emitStoreCell(). + + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_negate): + (JSC::JIT::emit_op_lshift): + (JSC::JIT::emit_op_rshift): + (JSC::JIT::emit_op_bitand): + (JSC::JIT::emitBitAnd32Constant): + (JSC::JIT::emit_op_bitor): + (JSC::JIT::emitBitOr32Constant): + (JSC::JIT::emit_op_bitxor): + (JSC::JIT::emitBitXor32Constant): + (JSC::JIT::emit_op_bitnot): + (JSC::JIT::emit_op_post_inc): + (JSC::JIT::emit_op_post_dec): + (JSC::JIT::emit_op_pre_inc): + (JSC::JIT::emit_op_pre_dec): + (JSC::JIT::emit_op_add): + (JSC::JIT::emitAdd32Constant): + (JSC::JIT::emit_op_sub): + (JSC::JIT::emitSub32ConstantLeft): + (JSC::JIT::emitSub32ConstantRight): + (JSC::JIT::emit_op_mul): + (JSC::JIT::emitSlow_op_mul): + (JSC::JIT::emit_op_div): + (JSC::JIT::emit_op_mod): + * jit/JITCall.cpp: + (JSC::JIT::emit_op_load_varargs): + * jit/JITInlineMethods.h: + (JSC::JIT::emitStoreInt32): + (JSC::JIT::emitStoreCell): + (JSC::JIT::emitStoreBool): + (JSC::JIT::emitStore): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_instanceof): + (JSC::JIT::emit_op_not): + (JSC::JIT::emit_op_eq): + (JSC::JIT::emitSlow_op_eq): + (JSC::JIT::emit_op_neq): + (JSC::JIT::emitSlow_op_neq): + (JSC::JIT::compileOpStrictEq): + (JSC::JIT::emit_op_eq_null): + (JSC::JIT::emit_op_neq_null): + * jit/JITStubCall.h: + (JSC::JITStubCall::call): + +2009-06-30 Geoffrey Garen + + Reviewed by Sam Weinig. + + Standardized the rest of the property access instructions to put { tag, + payload } in { regT1, regT0 }. + + Small v8 speedup, 0.2% SunSpider slowdown. + + * jit/JIT.h: + * jit/JITInlineMethods.h: + (JSC::JIT::emitLoad): + (JSC::JIT::emitLoad2): + * jit/JITPropertyAccess.cpp: + (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_put_by_id): + (JSC::JIT::emitSlow_op_put_by_id): + (JSC::JIT::patchPutByIdReplace): + +2009-06-29 Sam Weinig + + Reviewed by Gavin Barraclough. + + Various cleanups. + - Use fpRegT* instead of X86::xmm*. + - Use a switch statement in emitBinaryDoubleOp instead of a bunch of + if/elses. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emitAdd32Constant): + (JSC::JIT::emitBinaryDoubleOp): + (JSC::JIT::emit_op_div): + +2009-06-29 Sam Weinig + + Reviewed by Geoffrey Garen. + + Add inline code dealing with doubles for op_jfalse and op_jtrue. + + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::): + (JSC::MacroAssemblerX86Common::zeroDouble): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_jfalse): + (JSC::JIT::emit_op_jtrue): + +2009-06-28 Geoffrey Garen + + Reviewed by Sam Weinig. + + Standardized op_get_by_id to put { tag, payload } in { regT1, regT0 }. + + SunSpider and v8 report maybe 0.2%-0.4% regressions, but the optimization + this enables will win much more than that back. + + * jit/JIT.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JIT.h: + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_method_check): + (JSC::JIT::emit_op_get_by_id): + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::compileGetByIdSlowCase): + (JSC::JIT::patchGetByIdSelf): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + +2009-06-26 Geoffrey Garen + + Reviewed by Maciej Stachowiak. + + Standardized op_call to put { tag, payload } in { regT1, regT0 }. + + SunSpider and v8 report no change. + + * jit/JIT.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallInitializeCallFrame): + (JSC::JIT::compileOpCallSetupArgs): + (JSC::JIT::compileOpConstructSetupArgs): + (JSC::JIT::compileOpCallVarargsSetupArgs): + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::compileOpCall): + (JSC::JIT::compileOpCallSlowCase): + +2009-06-26 Sam Weinig + + Reviewed by Geoffrey Garen. + + Handle multiplying by zero a little better by + inlining the case that both operands are non-negative + into the slowpath. + + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::branchOr32): + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_mul): + (JSC::JIT::emitSlow_op_mul): + +2009-06-25 Geoffrey Garen + + Reviewed by Sam Weinig. + + Optimize x++ to ++x inside for loops. + + Sadly, no measurable speedup, but this should help with result chaining. + + * parser/Nodes.cpp: + (JSC::ForNode::emitBytecode): + +2009-06-25 Geoffrey Garen + + Reviewed by Sam Weinig. + + Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emitSlow_op_bitnot): + (JSC::JIT::emit_op_post_inc): + +2009-06-25 Geoffrey Garen + + Reviewed by Sam Weinig. + + Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_bitnot): + (JSC::JIT::emit_op_post_dec): + (JSC::JIT::emit_op_pre_inc): + (JSC::JIT::emitSlow_op_pre_inc): + (JSC::JIT::emit_op_pre_dec): + (JSC::JIT::emitSlow_op_pre_dec): + +2009-06-25 Geoffrey Garen + + Reviewed by Sam Weinig. + + Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_negate): + (JSC::JIT::emitSlow_op_negate): + * jit/JITCall.cpp: + (JSC::JIT::emit_op_construct_verify): + (JSC::JIT::emitSlow_op_construct_verify): + +2009-06-25 Geoffrey Garen + + Reviewed by Sam Weinig. + + Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_loop_if_true): + (JSC::JIT::emit_op_jfalse): + (JSC::JIT::emit_op_jtrue): + (JSC::JIT::emit_op_jeq_null): + (JSC::JIT::emit_op_jneq_null): + (JSC::JIT::emit_op_eq_null): + (JSC::JIT::emit_op_neq_null): + +2009-06-25 Geoffrey Garen + + Reviewed by Sam Weinig (sort of, maybe). + + Fixed some ASSERTs in http/tests/security. + + These ASSERTs were introduced by http://trac.webkit.org/changeset/45057, + but the underlying problem was actually older. http://trac.webkit.org/changeset/45057 + just exposed the problem by enabling optimization in more cases. + + The ASSERTs fired because we tested PropertySlot::slotBase() for validity, + but slotBase() ASSERTs if it's invalid, so we would ASSERT before + the test could happen. Solution: Remove the ASSERT. Maybe it was valid + once, but it clearly goes against a pattern we've deployed of late. + + The underlying problem was that WebCore would re-use a PropertySlot in + the case of a forwarding access, and the second use would not completely + overwrite the first use. Solution: Make sure to overwrite m_offset when + setting a value on a PropertySlot. (Other values already get implicitly + overwritten during reuse.) + + * runtime/PropertySlot.h: + (JSC::PropertySlot::PropertySlot): + (JSC::PropertySlot::setValueSlot): + (JSC::PropertySlot::setValue): + (JSC::PropertySlot::setRegisterSlot): + (JSC::PropertySlot::setUndefined): + (JSC::PropertySlot::slotBase): + (JSC::PropertySlot::clearOffset): + +2009-06-24 Gavin Barraclough + + Reviewed by Geoff Garen. + + Enable JIT_OPTIMIZE_METHOD_CALLS on the branch, implementation matches current implemenatation in ToT. + + * jit/JIT.h: + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_method_check): + (JSC::JIT::emitSlow_op_method_check): + (JSC::JIT::emit_op_get_by_id): + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::emitSlow_op_get_by_id): + (JSC::JIT::compileGetByIdSlowCase): + +2009-06-23 Geoffrey Garen + + Reviewed by Sam Weinig. + + Bit off a tiny bit more of standardizing opcode behavior to help with result + caching. + + SunSpider reports no change, v8 maybe a tiny speedup. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_to_jsnumber): + (JSC::JIT::emitSlow_op_to_jsnumber): + (JSC::JIT::emit_op_convert_this): + (JSC::JIT::emitSlow_op_convert_this): + +2009-06-23 Geoffrey Garen + + Reviewed by Sam Weinig. + + Bit off a tiny bit more of standardizing opcode behavior to help with result + caching -- including removing my old enemy, op_resolve_function, because + it was non-standard, and removing it felt better than helping it limp along. + + SunSpider reports no change, v8 maybe a tiny speedup. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + * bytecompiler/BytecodeGenerator.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + * jit/JIT.h: + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_get_scoped_var): + (JSC::JIT::emit_op_put_scoped_var): + (JSC::JIT::emit_op_to_primitive): + (JSC::JIT::emitSlow_op_to_primitive): + * jit/JITStubs.cpp: + * jit/JITStubs.h: + * parser/Nodes.cpp: + (JSC::FunctionCallResolveNode::emitBytecode): + +2009-06-23 Geoffrey Garen + + Reviewed by Sam Weinig. + + Bit off a tiny bit of standardizing opcode behavior to help with result + caching. + + 0.6% SunSpider speedup. 0.3% v8 speedup. + + * jit/JITInlineMethods.h: + (JSC::JIT::emitLoad): Accomodate a base register that overlaps with payload + by loading tag before payload, to avoid stomping base/payload. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_mov): Abide by the standard "tag in regT1, payload in + regT0" semantics. + + (JSC::JIT::emit_op_get_global_var): + (JSC::JIT::emit_op_put_global_var): Ditto. Also, removed some irrelevent + loads while I was at it. The global object's "d" pointer never changes + after construction. + +2009-06-23 Gavin Barraclough + + Reviewed by Sam Weinig. + + Remove 'arguments' field from Register union (again). + This time do so without breaking tests (radical, I know). + + * interpreter/CallFrame.h: + (JSC::ExecState::optionalCalleeArguments): + (JSC::ExecState::setArgumentCount): + (JSC::ExecState::init): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::dumpRegisters): + (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::privateExecute): + (JSC::Interpreter::retrieveArguments): + * interpreter/Register.h: + (JSC::Register::withInt): + (JSC::Register::): + (JSC::Register::Register): + (JSC::Register::i): + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_tear_off_arguments): + * runtime/Arguments.h: + (JSC::JSActivation::copyRegisters): + (JSC::Register::arguments): + * runtime/JSActivation.cpp: + (JSC::JSActivation::argumentsGetter): + * runtime/JSActivation.h: + +2009-06-23 Geoffrey Garen + + Reviewed by Sam Weinig. + + Removed some result register tracking cruft in preparation for a new + result tracking mechanism. + + SunSpider reports no change. + + * assembler/AbstractMacroAssembler.h: + * assembler/X86Assembler.h: + (JSC::X86Assembler::JmpDst::JmpDst): No need to track jump targets in + machine code; we already do this in bytecode. + + * jit/JIT.cpp: + (JSC::JIT::JIT): + (JSC::JIT::emitTimeoutCheck): Make sure to save and restore the result + registers, so an opcode with a timeout check can still benefit from result + register caching. + + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): Removed calls to killLastResultRegister() + in preparation for something new. + + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_jnless): + (JSC::JIT::emit_op_jnlesseq): + * jit/JITInlineMethods.h: + (JSC::JIT::emitGetFromCallFrameHeaderPtr): + (JSC::JIT::emitGetFromCallFrameHeader32): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_jmp): + (JSC::JIT::emit_op_jfalse): + (JSC::JIT::emit_op_jtrue): + (JSC::JIT::emit_op_jeq_null): + (JSC::JIT::emit_op_jneq_null): + (JSC::JIT::emit_op_jneq_ptr): + (JSC::JIT::emit_op_jsr): + (JSC::JIT::emit_op_sret): + (JSC::JIT::emit_op_jmp_scopes): ditto + + * jit/JITStubCall.h: + (JSC::JITStubCall::JITStubCall): + (JSC::JITStubCall::getArgument): added a mechanism for reloading an argument + you passed to a JIT stub, for use in emitTimeoutCheck. + +2009-06-23 Sam Weinig + + Reviewed by Geoffrey Garen. + + Remove now-useless inplace variants of binary ops. + + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_bitand): + (JSC::JIT::emit_op_bitor): + (JSC::JIT::emit_op_bitxor): + (JSC::JIT::emit_op_add): + (JSC::JIT::emit_op_sub): + (JSC::JIT::emit_op_mul): + +2009-06-23 Sam Weinig + + Reviewed by Geoffrey Garen. + + Move off memory operands to aid in re-enabling result caching. + + - No regression measured. + + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_negate): + (JSC::JIT::emit_op_jnless): + (JSC::JIT::emit_op_jnlesseq): + (JSC::JIT::emit_op_lshift): + (JSC::JIT::emit_op_rshift): + (JSC::JIT::emit_op_bitand): + (JSC::JIT::emitBitAnd32Constant): + (JSC::JIT::emitBitAnd32InPlace): + (JSC::JIT::emit_op_bitor): + (JSC::JIT::emitBitOr32Constant): + (JSC::JIT::emitBitOr32InPlace): + (JSC::JIT::emit_op_bitxor): + (JSC::JIT::emitBitXor32Constant): + (JSC::JIT::emitBitXor32InPlace): + (JSC::JIT::emit_op_bitnot): + (JSC::JIT::emit_op_post_inc): + (JSC::JIT::emit_op_post_dec): + (JSC::JIT::emit_op_pre_inc): + (JSC::JIT::emitSlow_op_pre_inc): + (JSC::JIT::emit_op_pre_dec): + (JSC::JIT::emitSlow_op_pre_dec): + (JSC::JIT::emit_op_add): + (JSC::JIT::emitAdd32Constant): + (JSC::JIT::emitAdd32InPlace): + (JSC::JIT::emitSlow_op_add): + (JSC::JIT::emitSlowAdd32Constant): + (JSC::JIT::emit_op_sub): + (JSC::JIT::emitSlow_op_sub): + (JSC::JIT::emitSub32ConstantLeft): + (JSC::JIT::emitSub32ConstantRight): + (JSC::JIT::emitSub32InPlaceLeft): + (JSC::JIT::emitSub32InPlaceRight): + (JSC::JIT::emitBinaryDoubleOp): + (JSC::JIT::emit_op_mul): + (JSC::JIT::emitMul32InPlace): + (JSC::JIT::emit_op_div): + (JSC::JIT::emit_op_mod): + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallVarargs): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_loop_if_less): + (JSC::JIT::emit_op_loop_if_lesseq): + (JSC::JIT::emit_op_instanceof): + (JSC::JIT::emit_op_to_primitive): + (JSC::JIT::emit_op_not): + (JSC::JIT::emit_op_jneq_ptr): + (JSC::JIT::emit_op_eq): + (JSC::JIT::emit_op_neq): + (JSC::JIT::emit_op_to_jsnumber): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + +2009-06-23 Geoffrey Garen + + Reviewed by Sam Weinig. + + Fixed some missing and/or misplaced labels in bytecode generation, so + we don't have to work around them in JIT code generation. + + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitJumpSubroutine): + * parser/Nodes.cpp: + (JSC::TryNode::emitBytecode): + +2009-06-22 Geoffrey Garen + + Reviewed by Sam Weinig. + + For member function calls, emit "this" directly into the "this" slot + for the function call, instead of moving it there later. This reduces + time spent in op_mov during certain calls, like "a.b.c()". + + 1%-2% speedup on v8, mostly richards and delta-blue. + + * parser/Nodes.cpp: + (JSC::FunctionCallDotNode::emitBytecode): + +2009-06-22 Gavin Barraclough + + Reviewed by Sam Weinig. + + Remove 'arguments' field from Register union. Having JSCell derived types in the union is + dangerous since it opens the possibility for the field to be written as a raw pointer but + then read as a JSValue. This will lead to statle data being read for the tag, which may + be dangerous. Having removed Arguments* types form Register, all arguments objects must + always explicitly be stored in the register file as JSValues. + + * interpreter/CallFrame.h: + (JSC::ExecState::optionalCalleeArguments): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::unwindCallFrame): + (JSC::Interpreter::privateExecute): + (JSC::Interpreter::retrieveArguments): + * interpreter/Register.h: + (JSC::Register::): + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_tear_off_arguments): + * runtime/Arguments.h: + (JSC::JSActivation::copyRegisters): + * runtime/JSActivation.cpp: + (JSC::JSActivation::argumentsGetter): + * runtime/JSActivation.h: + +2009-06-03 Sam Weinig + + Reviewed by Geoffrey Garen. + + Add back known this value optimization by abstracting + slow case if not JSCell jumps. + + * jit/JIT.h: + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::compileOpCallVarargsSlowCase): + (JSC::JIT::compileOpCall): + (JSC::JIT::compileOpCallSlowCase): + * jit/JITInlineMethods.h: + (JSC::JIT::emitJumpSlowCaseIfNotJSCell): + (JSC::JIT::linkSlowCaseIfNotJSCell): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_instanceof): + (JSC::JIT::emitSlow_op_instanceof): + * jit/JITPropertyAccess.cpp: + (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): + +2009-06-01 Geoffrey Garen + + Reviewed by Sam Weinig. + + Fixed some of the regression in crypto-aes.js. (8.5% speedup in + crypto-aes.js.) + + SunSpider reports no change overall. + + Division was producing double results, which took the slow path through + array access code. + + Strangely, all my attempts at versions of this patch that modified array + access code to accept ints encoded as doubles along the fast or slow paths + were regressions. So I did this instead. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_div): When dividing an int by an int, go ahead and try + to turn the result into an int. Don't just do int division, though, because + testing shows it to be slower than SSE double division, and the corner + cases are pretty complicated / lengthy on top of that. Also, don't try + to canonicalize division of known tiny numerators into ints, since that's a + waste of time. + +2009-05-26 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Fixed a regression caused by my recent fix for NaN. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emitBinaryDoubleOp): Actually do the comparison in reverse + order, like the ChangeLog said we would, bokay? + +2009-05-26 Geoffrey Garen + + Reviewed by Sam Weinig and Oliver Hunt. + + Fixed two edge cases in %: + + - Don't do -2147483648 % x as a fast case, since you might do -2147483648 % -1, + which will signal a hardware exception due to overflow. + + - In the case of a zero remainder, be sure to store negative zero if the + dividend was zero. + + SunSpider reports no change. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_mod): + (JSC::JIT::emitSlow_op_mod): + +2009-05-25 Geoffrey Garen + + Reviewed by Maciej Stachowiak. + + Fixed a regression when comparing to NaN. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emitBinaryDoubleOp): For op_jnless and op_jnless_eq, do the + comparison in reverse order, and jump if the result is below or + below-or-equal. This ensures that we do jump in the case of NaN. + +2009-05-25 Geoffrey Garen + + Reviewed by Oliver Hunt. + + SunSpider says no change. + + Fixed regressions in fast/js/var-declarations-shadowing.html and + fast/js/equality.html, caused by recent == and != optimizations. + + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_eq): Don't treat "compare to string" as always + numeric or string comparison. If the second operand is an object, you + need to ToPrimitive it, and start all over again. Also, I wrote out each + of the possible cases explicitly, to cut down on redundant branching. + +2009-05-25 Sam Weinig + + Reviewed by Mark Rowe. + + Fix bug in fast/js/constant-folding.html where we were not negating + -0 properly. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_negate): + +2009-05-23 Geoffrey Garen + + Reviewed by Oliver Hunt. + + Refactored new slow case codegen for == and !=. + + SunSpider reports no change, maybe a tiny speedup. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emitSlow_op_eq): + (JSC::JIT::emitSlow_op_neq): Made a vptr comparison a *Ptr operation, + instead of *32, to make it portable to 64bit. Reorganized the string + and generic cases to make their control flow a little clearer. + +2009-05-23 Geoffrey Garen + + Reviewed by Maciej Stachowiak. + + Optimized == and != for our new value representation -- especially for strings. + + 14% speedup on date-format-tofte. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_eq): + (JSC::JIT::emitSlow_op_eq): + (JSC::JIT::emit_op_neq): + (JSC::JIT::emitSlow_op_neq): + * jit/JITStubCall.h: + (JSC::JITStubCall::JITStubCall): + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_eq): + (JSC::JITStubs::cti_op_eq_strings): + (JSC::JITStubs::cti_op_call_eval): + * jit/JITStubs.h: + (JSC::): + * runtime/JSValue.h: + +2009-05-22 Sam Weinig + + Reviewed by Gavin Barraclough. + + Fix non-SSE enabled builds. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emitSlow_op_add): Don't early return here, we still need to call the JIT stub. + (JSC::JIT::emitSlow_op_sub): Ditto. + +2009-05-22 Geoffrey Garen + + Reviewed by Sam Weinig. + + Here's a thought: let's not take a jit stub call just to multiply by 1, + bokay? + + imul doesn't set the zero flag, so to test for a zero result, we need + an explicit instruction. (Luckily, it does set the overflow flag, so + we can still use that.) + + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_mul): + (JSC::JIT::emitSlow_op_mul): + (JSC::JIT::emitMul32InPlace): + +2009-05-22 Sam Weinig + + Reviewed by Geoffrey "Premature Commit" Garen. + + Add back constant integer cases for op_add. + + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_add): + (JSC::JIT::emitAdd32Constant): + (JSC::JIT::emitSlow_op_add): + (JSC::JIT::emitSlowAdd32Constant): + * jit/JITInlineMethods.h: + (JSC::JIT::getConstantOperandImmediateDouble): + (JSC::JIT::isOperandConstantImmediateDouble): + +2009-05-22 Geoffrey Garen + + Reviewed by Sam Weinig. + + Added fast double cases for op_jnless and op_jnlesseq. + + * assembler/AbstractMacroAssembler.h: + (JSC::AbstractMacroAssembler::JumpList::jumps): New accesor, used by + addSlowCase. + + * assembler/X86Assembler.h: + (JSC::X86Assembler::ucomisd_rm): New method for comparing register to + memory. + + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_jnless): + (JSC::JIT::emitSlow_op_jnless): + (JSC::JIT::emit_op_jnlesseq): + (JSC::JIT::emitSlow_op_jnlesseq): + (JSC::JIT::emit_op_add): + (JSC::JIT::emit_op_sub): + (JSC::JIT::emitBinaryDoubleOp): + (JSC::JIT::emit_op_mul): + (JSC::JIT::emit_op_div): Modified emitBinaryDoubleOp to accept comparison/jump + operations in addition to operations with explicit result registers. + + * jit/JITInlineMethods.h: + (JSC::JIT::addSlowCase): Added an "addSlowCase" for JumpLists, so clients + can track multiple jumps to the same slow case condition together. + +2009-05-21 Sam Weinig + + Reviewed by Gavin Barraclough. + + Implement op_negate inline fast cases. + + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::neg32): + * assembler/X86Assembler.h: + (JSC::X86Assembler::): + (JSC::X86Assembler::negl_m): + (JSC::X86Assembler::xorpd_rr): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_negate): + (JSC::JIT::emitSlow_op_negate): + +2009-05-20 Sam Weinig + + Reviewed by Gavin Barraclough. + + Update the patchOffsetGetByIdSlowCaseCall constant for the + case that OPCODE_SAMPLING is enabled. + + * jit/JIT.h: + +2009-05-20 Geoffrey Garen + + Reviewed by Sam Weinig. + + Added support for inline subtraction of doubles. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_sub): + (JSC::JIT::emitSlow_op_sub): + (JSC::JIT::emitSlowSub32InPlaceLeft): + (JSC::JIT::emitBinaryDoubleOp): + +2009-05-20 Sam Weinig + + Reviewed by Geoffrey Garen. + + Added support for inline division. + + * assembler/X86Assembler.h: + (JSC::X86Assembler::): + (JSC::X86Assembler::divsd_rr): + (JSC::X86Assembler::divsd_mr): + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::dump): + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitBinaryOp): + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JIT.cpp: + (JSC::JIT::privateCompileMainPass): + (JSC::JIT::privateCompileSlowCases): + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emitBinaryDoubleOp): + (JSC::JIT::emit_op_div): + (JSC::JIT::emitSlow_op_div): + +2009-05-20 Geoffrey Garen + + Reviewed by Sam Weinig. + + Added support for inline addition of doubles. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_add): + (JSC::JIT::emitSlow_op_add): + (JSC::JIT::emitSlowAdd32InPlace): + (JSC::JIT::emitBinaryDoubleOp): + (JSC::JIT::emit_op_mul): + (JSC::JIT::emitSlow_op_mul): + +2009-05-20 Geoffrey Garen + + Reviewed by Sam Weinig. + + Factored inline double operations into a helper function, so that we + can reuse this code for other math operations. + + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emitBinaryDoubleOp): + (JSC::JIT::emit_op_mul): + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallInitializeCallFrame): + +2009-05-20 Geoffrey Garen + + Reviewed by Sam Weinig. + + Added support for inline multiplication of doubles. + + * assembler/X86Assembler.h: + (JSC::X86Assembler::cvtsi2sd_mr): New function, useful for loading an + int32 into a double register. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_mul): + (JSC::JIT::emitSlow_op_mul): Filled out these cases for double arithmetic. + + * jit/JIT.h: + * jit/JITInlineMethods.h: + (JSC::JIT::addressFor): New function, useful for addressing a JSValue's + full 64bits as a double. + +2009-05-19 Sam Weinig + + Reviewed by Geoffrey Garen. + + Implement and enable optimized calls. + + * jit/JIT.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): Add ENABLE(JIT_OPTIMIZE_CALL) guards + around the the optimize call only trampolines (virtualCallPreLink and virtualCallLink). + Update the trampolines to account for the new JSValue representation. + (JSC::JIT::unlinkCall): Use NULL instead of JSValue noValue. + + * jit/JITCall.cpp: + (JSC::JIT::compileOpCall): Update to account for the new JSValue representation + (JSC::JIT::compileOpCallSlowCase): Ditto. + + * jit/JITStubs.h: Remove incorrect !ENABLE(JIT_OPTIMIZE_CALL) guard. + + * wtf/Platform.h: Enable ENABLE_JIT_OPTIMIZE_CALL. + +2009-05-19 Sam Weinig + + Reviewed by Geoffrey Garen. + + Implement and enable optimized property access. + + * assembler/AbstractMacroAssembler.h: Fix comment. + * jit/JIT.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): Remove array length trampoline + and implement the string length trampoline. + * jit/JIT.h: Add new constants for patch offsets. + * jit/JITInlineMethods.h: Remove FIELD_OFFSET which is now in StdLibExtras.h. + * jit/JITPropertyAccess.cpp: + (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::compilePutDirectOffset): + (JSC::JIT::compileGetDirectOffset): + (JSC::JIT::privateCompilePutByIdTransition): + (JSC::JIT::patchGetByIdSelf): + (JSC::JIT::patchPutByIdReplace): + (JSC::JIT::privateCompilePatchGetArrayLength): + (JSC::JIT::privateCompileGetByIdProto): + (JSC::JIT::privateCompileGetByIdSelfList): + (JSC::JIT::privateCompileGetByIdProtoList): + (JSC::JIT::privateCompileGetByIdChainList): + (JSC::JIT::privateCompileGetByIdChain): + * jit/JITStubCall.h: + (JSC::JITStubCall::addArgument): Add version of addArgument that takes + two registers for the tag and payload. + * jit/JITStubs.cpp: + (JSC::JITStubs::JITStubs): Remove array length trampoline pointer. + (JSC::JITStubs::cti_op_get_by_id_self_fail): + * jit/JITStubs.h: + * runtime/JSObject.h: + (JSC::JSObject::JSObject): Move m_inheritorID below the property storage + to align it to a 16 byte boundary. + * wtf/Platform.h: Enable ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS + * wtf/StdLibExtras.h: Move FIELD_OFFSET here. + +2009-05-17 Sam Weinig + + Reviewed by Geoffrey Garen. + + Remove unneeded ExecState parameter from the number JSValue constructors. + + * runtime/JSValue.h: + (JSC::jsNumber): + (JSC::jsNaN): + (JSC::JSValue::JSValue): + +2009-05-15 Sam Weinig + + Reviewed by Geoffrey Garen. + + Implemented fast path for op_put_by_val when putting to arrays. + + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_put_by_val): + (JSC::JIT::emitSlow_op_put_by_val): + +2009-05-15 Geoffrey Garen (Mostly by Sam) + + Reviewed by Sam Weinig. + + Implemented fast path for op_get_by_val when accessing array. + + * jit/JIT.cpp: + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emitSlow_op_get_by_val): + +2009-05-14 Geoffrey Garen + + Reviewed by Sam Weinig. + + Fixed a failure in fast/js/math-transforms.html caused by failing to + preserve -0 in multiplication. + + * assembler/X86Assembler.h: + (JSC::X86Assembler::jz): + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_mul): + (JSC::JIT::emitSlow_op_mul): + (JSC::JIT::emitMul32Constant): + (JSC::JIT::emitMul32InPlace): Check both for overflow and for zero when + doing multiplication. Use a slow case to get these right. + +2009-05-14 Geoffrey Garen + + Reviewed by Sam Weinig. + + Fixed a bug in the varargs calling convention. + + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallVarargs): Move the argument count into regT1, + since that's where ctiVirtualCall expects it to be. + +2009-05-14 Geoffrey Garen + + Reviewed by Sam Weinig. + + Fixed a small bug in instanceof's looping code. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_instanceof): NULL means the object has no prototype, + so only loop when *not* equal to NULL. + +2009-05-14 Geoffrey Garen + + Reviewed by Sam Weinig. + + Fixed a small bug in instanceof's result writing code. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_instanceof): Make sure to fill out the payload bits + in all cases. + +2009-05-14 Sam Weinig + + Reviewed by Geoffrey Garen. + + Removed an invalid assertion in cti_op_urshift which + depended on a fast path for op_urshift which has + never existed. + + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_urshift): + +2009-05-14 Geoffrey Garen + + Reviewed by Sam Weinig. + + Fixed loop_if_true, which had the same reversed test that jtrue had. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_loop_if_true): + +2009-05-14 Sam Weinig + + Reviewed by Geoffrey Garen. + + In op_neq, we apparently want to check that one value + does *not* equal another. Go figure. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_neq): + +2009-05-14 Sam Weinig + + Reviewed by Geoffrey Garen. + + The slow case of op_mod should call op_mod's jit stub, + not op_mul. That would be dumb. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emitSlow_op_mod): + +2009-05-14 Geoffrey Garen + + Reviewed by Sam Weinig. + + Fixed problems when using 'arguments' due to a half-initialized register. + + * interpreter/CallFrame.h: + (JSC::ExecState::setCalleeArguments): + (JSC::ExecState::init): Require a full JSValue when setting up the + 'arguments' virtual register, since this register is accessible from JIT + code and bytecode, and needs to be a true JSValue. + + * interpreter/CallFrameClosure.h: + (JSC::CallFrameClosure::resetCallFrame): ditto + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): ditto + + * interpreter/Register.h: Removed the constructor that allowed assignment + of a JSArguments* to a register. That is not safe. See above. + + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_create_arguments): + (JSC::JITStubs::cti_op_create_arguments_no_params): ditto + +2009-05-14 Sam Weinig + + Reviewed by Geoffrey Garen. + + We really want to go to the slow case in op_jfalse and + op_jtrue if the value is *not* boolean. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_jfalse): + (JSC::JIT::emit_op_jtrue): + +2009-05-14 Sam Weinig + + Reviewed by Geoffrey Garen. + + Flipped the condition when emitting a an op_loop_if_less or op_loop_if_lesseq + if the first operand is a constant. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_loop_if_less): + (JSC::JIT::emit_op_loop_if_lesseq): + +2009-05-14 Sam Weinig + + Reviewed by Geoffrey Garen. + + Added missing return in op_jnless and op_jnlesseq. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_jnless): + (JSC::JIT::emit_op_jnlesseq): + +2009-05-14 Sam Weinig + + Reviewed by Geoffrey Garen. + + Load constants into the the register file as a temporary measure to + aid bring up. This allows us to use to treat constants like any + other virtual register. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_enter): + (JSC::JIT::emit_op_enter_with_activation): + +2009-05-14 Geoffrey Garen + + Reviewed by Sam Weinig. + + Implemented op_strict_eq. Original patch by Snowy, by way of Sam and Gavin. + + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::set8): Added set8, since it's slightly + faster than set32, and the new value representation usually doesn't + need set32. + + * jit/JIT.cpp: + * jit/JIT.h: + * jit/JITInlineMethods.h: + (JSC::JIT::emitLoadTag): + (JSC::JIT::emitLoadPayload): Added helper functions for dealing with + constants. Eventually, we should write special cases for all constants, + but these are helpful in the short term. + + * jit/JITOpcodes.cpp: + (JSC::JIT::compileOpStrictEq): + (JSC::JIT::emitSlow_op_stricteq): + (JSC::JIT::emitSlow_op_nstricteq): teh opcodez. + + * runtime/JSValue.h: + (JSC::JSValue::): + (JSC::JSValue::isDouble): Added a LowestTag for clarity. + +2009-05-13 Geoffrey Garen + + Reviewed by Sam Weinig. + + Fixed some bugs in host function calls. + + testapi now passes! + + * jit/JIT.cpp: Changed some registers around to avoid overwriting edx:eax, + which is how JSValues are now returned. Also changed the code that + passes thisValue to pass the full 64bits of the value. Also added + an #error compiler directive to other platform builds, since the JSValue + return signature probably won't return in edx:eax on those platforms, + and we'll have to investigate a solution. + +2009-05-13 Geoffrey Garen + + Reviewed by Sam Weinig. + + Removed parameters from functions that are intended never to use their + parameters. + + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emitSlow_op_get_by_val): + (JSC::JIT::emitSlow_op_put_by_val): + +2009-05-13 Geoffrey Garen + + Reviewed by Sam Weinig. + + Ported op_instance_of from TOT. It's basically the same, but some register + stuff changed to memory stuff. + + * jit/JITInlineMethods.h: + (JSC::JIT::emitPutJITStubArgFromVirtualRegister): + (JSC::JIT::emitStore): Changed to use helper functions. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_instanceof): + (JSC::JIT::emitSlow_op_instanceof): Ported from TOT. + +2009-05-13 Geoffrey Garen + + Reviewed by Gavin Barraclough. + + Added a comment to explain an exception-handling subtelty that we found + hard to remember when reviewing my last patch. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_catch): + +2009-05-13 Geoffrey Garen + + Reviewed by Sam Weinig. + + Implemented try/catch. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_throw): Updated to use JITStackFrame abstraction. + (JSC::JIT::emit_op_catch): Filled out. + +2009-05-13 Sam Weinig + + Reviewed by Geoffrey Garen. + + Implemented op_loop_if_true, op_jfalse, op_jtrue, op_jeq_null and op_jneq_null + + * jit/JITOpcodes.cpp: + (JSC::JIT::emitSlow_op_instanceof): Moved from below to be next to its + fast brother. + + (JSC::JIT::emit_op_loop_if_true): Similar to the old version + in that it tries to do the integer case first and reduce the + number of jumps you might need to take. + (JSC::JIT::emitSlow_op_loop_if_true): + + (JSC::JIT::emit_op_jfalse): Very similar to op_loop_if_true, only + the inverse and without a timeout check. + (JSC::JIT::emitSlow_op_jfalse): + + (JSC::JIT::emit_op_jtrue): Very similar to op_loop_if_true except + without the timeout check. + (JSC::JIT::emitSlow_op_jtrue): + + (JSC::JIT::emit_op_jeq_null): Very similar to the implementation + of op_eq, except it takes jumps instead of copying the condition + to a dst. + (JSC::JIT::emit_op_jneq_null): Ditto but for op_neq. + +2009-05-13 Geoffrey Garen + + Reviewed by Sam Weinig. + + Implemented op_call_varargs. + + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallVarargsSetupArgs): + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::emit_op_call): + (JSC::JIT::emit_op_call_eval): + (JSC::JIT::emit_op_load_varargs): + (JSC::JIT::emit_op_call_varargs): + (JSC::JIT::emit_op_construct): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_jneq_ptr): + +2009-05-13 Geoffrey Garen + + Reviewed by Sam Weinig. + + Implemented op_call_eval. + + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallVarargsSetupArgs): + (JSC::JIT::compileOpCall): + * jit/JITStubCall.h: + (JSC::CallEvalJITStub::CallEvalJITStub): + +2009-05-13 Sam Weinig + + Reviewed by Gavin Barraclough. + + Implemented op_not. (Gavin did most of the work!) + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_not): + (JSC::JIT::emitSlow_op_not): + +2009-05-13 Geoffrey Garen + + Reviewed by Sam Weinig. + + Implemented op_global_resolve. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_loop_if_less): + (JSC::JIT::emit_op_loop_if_lesseq): Added back accidentally removed + early returns. + + (JSC::JIT::emit_op_resolve_global): + * jit/JITStubs.cpp: + (JSC::JITStubs::cti_op_resolve_global): Pretty similar to the old code, + but we need two reads and a TimesEight step in order to account for the + 64bit value size. + + * jit/JITStubs.h: + (JSC::): Slightly tweaked this code to specialize for a JSGlobalObject*, + to avoid having to pass an irrelevant tag pointer to the stub. + +2009-05-13 Sam Weinig + + Reviewed by Geoffrey Garen. + + Implemented op_to_jsnumber. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_to_jsnumber): + (JSC::JIT::emitSlow_op_to_jsnumber): + +2009-05-13 Sam Weinig + + Reviewed by Geoffrey Garen. + + Implemented op_convert_this. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_convert_this): + (JSC::JIT::emitSlow_op_convert_this): + +2009-05-13 Geoffrey Garen + + Reviewed by Sam Weinig. + + Got basic JS function and constructor calls working. + + * jit/JIT.cpp: + (JSC::JIT::privateCompileCTIMachineTrampolines): + * jit/JIT.h: + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallSetupArgs): + (JSC::JIT::compileOpCallVarargsSetupArgs): + (JSC::JIT::compileOpConstructSetupArgs): + (JSC::JIT::emit_op_ret): + (JSC::JIT::emit_op_construct_verify): + (JSC::JIT::emitSlow_op_construct_verify): + (JSC::JIT::emitSlow_op_call): + (JSC::JIT::emitSlow_op_call_eval): + (JSC::JIT::emitSlow_op_call_varargs): + (JSC::JIT::emitSlow_op_construct): + (JSC::JIT::compileOpCall): Filled out these cases, with call_eval #if'd out. + + * jit/JITInlineMethods.h: + (JSC::JIT::emitPutJITStubArgFromVirtualRegister): + (JSC::JIT::emitLoad): Restored some legacy "*CTIArg*" functions, + since I wanted to avoid the complexity of revamping the API here while + trying to bring it up. Eventually, we should re-remove all of these functions. + + (JSC::JIT::recordJumpTarget): Removed unnecessary macro cruft. You will + not silence me, Sam Weinig! The world will know that you are a crufty, + crufty, crufty programmer!!! + + * jit/JITOpcodes.cpp: + * jit/JITStubs.cpp: + (JSC::): + * jit/JITStubs.h: Changed up some offsets in the JITStackFrame class, since + and off-by-one error was causing stack misalignment. + +2009-05-13 Sam Weinig + + Reviewed by Geoffrey Garen. + + Implement op_eq_null and op_neq_null. + + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::set8): + (JSC::MacroAssemblerX86Common::setTest8): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_stricteq): + (JSC::JIT::emitSlow_op_stricteq): + (JSC::JIT::emit_op_nstricteq): + (JSC::JIT::emitSlow_op_nstricteq): + (JSC::JIT::emit_op_eq_null): + (JSC::JIT::emit_op_neq_null): + * jsc.cpp: + +2009-05-12 Sam Weinig + + Reviewed by Geoffrey Garen. + + Implement op_new_error. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_new_error): + * jit/JITStubCall.h: + (JSC::JITStubCall::addArgument): Add a version of addArgument + that takes a constant JSValue. + +2009-05-12 Sam Weinig + + Reviewed by Geoffrey Garen. + + Remove now unused emitGetVariableObjectRegister and emitPutVariableObjectRegister. + + * jit/JIT.cpp: + * jit/JIT.h: + +2009-05-12 Sam Weinig + + Reviewed by Geoffrey Garen. + + Implement op_to_primitive and op_next_pname. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emitSlow_op_construct_verify): + (JSC::JIT::emit_op_to_primitive): + (JSC::JIT::emitSlow_op_to_primitive): + (JSC::JIT::emitSlow_op_loop_if_true): + (JSC::JIT::emit_op_jtrue): + (JSC::JIT::emit_op_next_pname): + +2009-05-12 Sam Weinig + + Reviewed by Geoffrey Garen. + + Add op_get_global_var, op_put_global_var, emit_op_get_scoped_var, emit_op_put_scoped_var and + op_unexpected_load. + + * jit/JIT.h: + * jit/JITInlineMethods.h: + (JSC::JIT::tagFor): + (JSC::JIT::payloadFor): + (JSC::JIT::emitLoad): + (JSC::JIT::emitStore): + (JSC::JIT::emitLoadReturnValue): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_get_global_var): + (JSC::JIT::emit_op_put_global_var): + (JSC::JIT::emit_op_get_scoped_var): + (JSC::JIT::emit_op_put_scoped_var): + (JSC::JIT::emit_op_unexpected_load): + +2009-05-12 Geoffrey Garen + + Reviewed by Sam Weinig. + + Added overflow handling to op_sub. + + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emitSlow_op_sub): + (JSC::JIT::emitSlowSub32InPlaceLeft): + +2009-05-12 Sam Weinig + + Reviewed by Geoffrey Garen. + + Remove a function call by folding op_get_by_id and op_put_by_id into + their respective compile functions. + + * jit/JIT.h: + * jit/JITPropertyAccess.cpp: + (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): + +2009-05-12 Sam Weinig + + Reviewed by Geoffrey Garen. + + Make JITStubCall work in 64bit by making the stack index + step dependent on the size of void*. + + * jit/JITStubCall.h: + (JSC::JITStubCall::JITStubCall): + (JSC::JITStubCall::addArgument): + +2009-05-12 Sam Weinig + + Reviewed by Geoffrey Garen. + + Implement simple version of property access opcodes + which just call a stub functions. + + * jit/JITOpcodes.cpp: + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emitSlow_op_put_by_id): + (JSC::JIT::emitSlow_op_get_by_id): + (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_put_by_index): + (JSC::JIT::emit_op_put_getter): + (JSC::JIT::emit_op_put_setter): + (JSC::JIT::emit_op_del_by_id): + (JSC::JIT::compileGetByIdHotPath): + (JSC::JIT::compilePutByIdHotPath): + * jit/JITStubCall.h: + (JSC::JITStubCall::addArgument): + * jsc.cpp: + +2009-05-12 Geoffrey Garen + + Reviewed by Sam Weinig. + + Added work-around for XCode debugging echo problem. + + * jsc.cpp: + (runInteractive): + +2009-05-12 Geoffrey Garen + + Reviewed by Sam Weinig. + + Added overflow handling to op_add. + + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emitSlow_op_add): + (JSC::JIT::emitSlowAdd32InPlace): + +2009-05-12 Sam Weinig + + Reviewed by Geoffrey Garen. + + Add slow cases for op_jnless or emit_op_jnlesseq. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emitSlow_op_jnless): + (JSC::JIT::emitSlow_op_jnlesseq): + +2009-05-12 Sam Weinig + + Reviewed by Geoffrey Garen. + + Add implementations for op_jnless, emit_op_jnlesseq, op_loop_if_less and op_loop_if_lesseq. + No slow cases for op_jnless or emit_op_jnlesseq yet. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_jnless): + (JSC::JIT::emitSlow_op_jnless): + (JSC::JIT::emit_op_jnlesseq): + (JSC::JIT::emitSlow_op_jnlesseq): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_loop_if_less): + (JSC::JIT::emitSlow_op_loop_if_less): + (JSC::JIT::emit_op_loop_if_lesseq): + (JSC::JIT::emitSlow_op_loop_if_lesseq): + +2009-05-12 Sam Weinig + + Reviewed by Geoffrey Garen. + + Turn the RECORD_JUMP_TARGET macro into an inline function. + + * jit/JIT.h: + * jit/JITInlineMethods.h: + (JSC::JIT::recordJumpTarget): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_jmp): + (JSC::JIT::emit_op_jsr): + (JSC::JIT::emit_op_jmp_scopes): + +2009-05-12 Sam Weinig + + Add MacroAssemblerX86Common::set8 to fix the build. + + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::set8): + +2009-05-12 Geoffrey Garen + + Reviewed by Sam Weinig. + + Added overflow recovery for pre_inc and pre_dec. + + Turned some short-circuit code into early returns, as is the WebKit style. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_post_inc): + (JSC::JIT::emitSlow_op_post_inc): + (JSC::JIT::emit_op_post_dec): + (JSC::JIT::emitSlow_op_post_dec): + (JSC::JIT::emitSlow_op_pre_inc): + (JSC::JIT::emitSlow_op_pre_dec): + +2009-05-12 Sam Weinig + + Reviewed by Geoffrey Garen. + + Implement op_jmp, op_loop, op_eq and op_neq. + + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_jmp): + (JSC::JIT::emit_op_loop): + (JSC::JIT::emit_op_eq): + (JSC::JIT::emitSlow_op_eq): + (JSC::JIT::emit_op_neq): + (JSC::JIT::emitSlow_op_neq): + (JSC::JIT::emit_op_enter): + (JSC::JIT::emit_op_enter_with_activation): + +2009-05-12 Sam Weinig + + Reviewed by Geoffrey Garen. + + Implement the slow cases for arithmetic opcodes. + + * jit/JITArithmetic.cpp: + (JSC::JIT::emitSlow_op_lshift): + (JSC::JIT::emitSlow_op_rshift): + (JSC::JIT::emitSlow_op_bitand): + (JSC::JIT::emitSlow_op_bitor): + (JSC::JIT::emitSlow_op_bitxor): + (JSC::JIT::emitSlow_op_bitnot): + (JSC::JIT::emitSlow_op_sub): + (JSC::JIT::emitSlow_op_mul): + (JSC::JIT::emitSlow_op_mod): + (JSC::JIT::emit_op_mod): + +2009-05-12 Sam Weinig + + Reviewed by Geoffrey Garen. + + Implement op_bitnot. + + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::not32): + * assembler/X86Assembler.h: + (JSC::X86Assembler::notl_m): + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_bitnot): + +2009-05-12 Sam Weinig + + Reviewed by Geoffrey Garen. + + Add arithmetic opcode implementations from the old nitro-extreme branch. + + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_jnless): + (JSC::JIT::emitSlow_op_jnless): + (JSC::JIT::emit_op_jnlesseq): + (JSC::JIT::emitSlow_op_jnlesseq): + (JSC::JIT::emit_op_lshift): + (JSC::JIT::emitSlow_op_lshift): + (JSC::JIT::emit_op_rshift): + (JSC::JIT::emitSlow_op_rshift): + (JSC::JIT::emit_op_bitand): + (JSC::JIT::emitBitAnd32Constant): + (JSC::JIT::emitBitAnd32InPlace): + (JSC::JIT::emit_op_bitor): + (JSC::JIT::emitSlow_op_bitor): + (JSC::JIT::emitBitOr32Constant): + (JSC::JIT::emitBitOr32InPlace): + (JSC::JIT::emit_op_bitxor): + (JSC::JIT::emitSlow_op_bitxor): + (JSC::JIT::emitBitXor32Constant): + (JSC::JIT::emitBitXor32InPlace): + (JSC::JIT::emit_op_bitnot): + (JSC::JIT::emitSlow_op_bitnot): + (JSC::JIT::emit_op_post_inc): + (JSC::JIT::emitSlow_op_post_inc): + (JSC::JIT::emit_op_post_dec): + (JSC::JIT::emitSlow_op_post_dec): + (JSC::JIT::emit_op_pre_inc): + (JSC::JIT::emitSlow_op_pre_inc): + (JSC::JIT::emit_op_pre_dec): + (JSC::JIT::emitSlow_op_pre_dec): + (JSC::JIT::emit_op_add): + (JSC::JIT::emitAdd32Constant): + (JSC::JIT::emitAdd32InPlace): + (JSC::JIT::emitSlow_op_add): + (JSC::JIT::emit_op_sub): + (JSC::JIT::emitSlow_op_sub): + (JSC::JIT::emitSub32ConstantLeft): + (JSC::JIT::emitSub32ConstantRight): + (JSC::JIT::emitSub32InPlaceLeft): + (JSC::JIT::emitSub32InPlaceRight): + (JSC::JIT::emit_op_mul): + (JSC::JIT::emitSlow_op_mul): + (JSC::JIT::emitMul32Constant): + (JSC::JIT::emitMul32InPlace): + (JSC::JIT::emit_op_mod): + (JSC::JIT::emitSlow_op_mod): + * jit/JITOpcodes.cpp: + +2009-05-12 Geoffrey Garen + + Removed JIT_OPTIMIZE_ARITHMETIC setting, since it was all about 32bit + value representations. + + Added JSAPIValueWrapper to the repository. + + * jit/JIT.h: + * jit/JITArithmetic.cpp: + * runtime/JSAPIValueWrapper.cpp: Added. + (JSC::JSAPIValueWrapper::toPrimitive): + (JSC::JSAPIValueWrapper::getPrimitiveNumber): + (JSC::JSAPIValueWrapper::toBoolean): + (JSC::JSAPIValueWrapper::toNumber): + (JSC::JSAPIValueWrapper::toString): + (JSC::JSAPIValueWrapper::toObject): + * runtime/JSAPIValueWrapper.h: Added. + (JSC::JSAPIValueWrapper::value): + (JSC::JSAPIValueWrapper::isAPIValueWrapper): + (JSC::JSAPIValueWrapper::JSAPIValueWrapper): + (JSC::jsAPIValueWrapper): + * wtf/Platform.h: + +2009-05-12 Geoffrey Garen + + Turned on the JIT and got it building and running the most trivial of + programs. + + All configurable optimizations are turned off, and a few opcodes are ad + hoc #if'd out. + + So far, I've only merged op_mov and op_end, but some stub-reliant + opcodes work as-is from TOT. + + * bytecode/CodeBlock.cpp: + (JSC::CodeBlock::~CodeBlock): + * bytecode/CodeBlock.h: + * jit/JIT.cpp: + (JSC::JIT::compileOpStrictEq): + * jit/JIT.h: + * jit/JITArithmetic.cpp: + (JSC::JIT::emit_op_lshift): + (JSC::JIT::emitSlow_op_lshift): + (JSC::JIT::emit_op_rshift): + (JSC::JIT::emitSlow_op_rshift): + (JSC::JIT::emit_op_jnless): + (JSC::JIT::emitSlow_op_jnless): + (JSC::JIT::emit_op_jnlesseq): + (JSC::JIT::emitSlow_op_jnlesseq): + (JSC::JIT::emit_op_bitand): + (JSC::JIT::emitSlow_op_bitand): + (JSC::JIT::emit_op_post_inc): + (JSC::JIT::emitSlow_op_post_inc): + (JSC::JIT::emit_op_post_dec): + (JSC::JIT::emitSlow_op_post_dec): + (JSC::JIT::emit_op_pre_inc): + (JSC::JIT::emitSlow_op_pre_inc): + (JSC::JIT::emit_op_pre_dec): + (JSC::JIT::emitSlow_op_pre_dec): + (JSC::JIT::emit_op_mod): + (JSC::JIT::emitSlow_op_mod): + (JSC::JIT::emit_op_add): + (JSC::JIT::emit_op_mul): + (JSC::JIT::emit_op_sub): + (JSC::JIT::compileBinaryArithOpSlowCase): + (JSC::JIT::emitSlow_op_add): + (JSC::JIT::emitSlow_op_mul): + * jit/JITCall.cpp: + (JSC::JIT::compileOpCallInitializeCallFrame): + (JSC::JIT::compileOpConstructSetupArgs): + (JSC::JIT::compileOpCallVarargs): + (JSC::JIT::compileOpCall): + (JSC::JIT::compileOpCallSlowCase): + * jit/JITInlineMethods.h: + (JSC::JIT::getConstantOperandImmediateInt): + (JSC::JIT::isOperandConstantImmediateInt): + (JSC::JIT::emitInitRegister): + (JSC::JIT::addSlowCase): + (JSC::JIT::addJump): + (JSC::JIT::emitJumpSlowToHot): + (JSC::JIT::tagFor): + (JSC::JIT::payloadFor): + (JSC::JIT::emitLoad): + (JSC::JIT::emitLoadReturnValue): + (JSC::JIT::emitStore): + (JSC::JIT::emitStoreReturnValue): + * jit/JITOpcodes.cpp: + (JSC::JIT::emit_op_mov): + (JSC::JIT::emit_op_end): + (JSC::JIT::emit_op_jmp): + (JSC::JIT::emit_op_loop): + (JSC::JIT::emit_op_loop_if_less): + (JSC::JIT::emit_op_loop_if_lesseq): + (JSC::JIT::emit_op_instanceof): + (JSC::JIT::emit_op_get_global_var): + (JSC::JIT::emit_op_put_global_var): + (JSC::JIT::emit_op_get_scoped_var): + (JSC::JIT::emit_op_put_scoped_var): + (JSC::JIT::emit_op_tear_off_activation): + (JSC::JIT::emit_op_ret): + (JSC::JIT::emit_op_construct_verify): + (JSC::JIT::emit_op_to_primitive): + (JSC::JIT::emit_op_loop_if_true): + (JSC::JIT::emit_op_resolve_global): + (JSC::JIT::emit_op_not): + (JSC::JIT::emit_op_jfalse): + (JSC::JIT::emit_op_jeq_null): + (JSC::JIT::emit_op_jneq_null): + (JSC::JIT::emit_op_jneq_ptr): + (JSC::JIT::emit_op_unexpected_load): + (JSC::JIT::emit_op_eq): + (JSC::JIT::emit_op_bitnot): + (JSC::JIT::emit_op_jtrue): + (JSC::JIT::emit_op_neq): + (JSC::JIT::emit_op_bitxor): + (JSC::JIT::emit_op_bitor): + (JSC::JIT::emit_op_throw): + (JSC::JIT::emit_op_next_pname): + (JSC::JIT::emit_op_push_scope): + (JSC::JIT::emit_op_to_jsnumber): + (JSC::JIT::emit_op_push_new_scope): + (JSC::JIT::emit_op_catch): + (JSC::JIT::emit_op_switch_imm): + (JSC::JIT::emit_op_switch_char): + (JSC::JIT::emit_op_switch_string): + (JSC::JIT::emit_op_new_error): + (JSC::JIT::emit_op_eq_null): + (JSC::JIT::emit_op_neq_null): + (JSC::JIT::emit_op_convert_this): + (JSC::JIT::emit_op_profile_will_call): + (JSC::JIT::emit_op_profile_did_call): + (JSC::JIT::emitSlow_op_construct_verify): + (JSC::JIT::emitSlow_op_get_by_val): + (JSC::JIT::emitSlow_op_loop_if_less): + (JSC::JIT::emitSlow_op_loop_if_lesseq): + (JSC::JIT::emitSlow_op_put_by_val): + (JSC::JIT::emitSlow_op_not): + (JSC::JIT::emitSlow_op_instanceof): + * jit/JITPropertyAccess.cpp: + (JSC::JIT::emit_op_get_by_val): + (JSC::JIT::emit_op_put_by_val): + (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::compileGetByIdHotPath): + (JSC::JIT::compilePutByIdHotPath): + * jit/JITStubCall.h: + (JSC::JITStubCall::JITStubCall): + (JSC::JITStubCall::addArgument): + (JSC::JITStubCall::call): + (JSC::JITStubCall::): + (JSC::CallEvalJITStub::CallEvalJITStub): + * jit/JITStubs.cpp: + (JSC::): + (JSC::JITStubs::cti_op_add): + (JSC::JITStubs::cti_op_pre_inc): + (JSC::JITStubs::cti_op_mul): + (JSC::JITStubs::cti_op_get_by_val): + (JSC::JITStubs::cti_op_get_by_val_string): + (JSC::JITStubs::cti_op_get_by_val_byte_array): + (JSC::JITStubs::cti_op_sub): + (JSC::JITStubs::cti_op_put_by_val): + (JSC::JITStubs::cti_op_put_by_val_array): + (JSC::JITStubs::cti_op_put_by_val_byte_array): + (JSC::JITStubs::cti_op_negate): + (JSC::JITStubs::cti_op_div): + (JSC::JITStubs::cti_op_pre_dec): + (JSC::JITStubs::cti_op_post_inc): + (JSC::JITStubs::cti_op_eq): + (JSC::JITStubs::cti_op_lshift): + (JSC::JITStubs::cti_op_bitand): + (JSC::JITStubs::cti_op_rshift): + (JSC::JITStubs::cti_op_bitnot): + (JSC::JITStubs::cti_op_mod): + (JSC::JITStubs::cti_op_neq): + (JSC::JITStubs::cti_op_post_dec): + (JSC::JITStubs::cti_op_urshift): + (JSC::JITStubs::cti_op_bitxor): + (JSC::JITStubs::cti_op_bitor): + (JSC::JITStubs::cti_op_switch_imm): + * jit/JITStubs.h: + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + * runtime/JSFunction.cpp: + (JSC::JSFunction::~JSFunction): + * runtime/JSValue.h: + (JSC::JSValue::payload): + * wtf/Platform.h: + +2009-05-07 Sam Weinig + + Reviewed by Geoffrey Garen. + + Add some new MacroAssembler and assembler functions that will be needed shortly. + + * assembler/MacroAssemblerX86Common.h: + (JSC::MacroAssemblerX86Common::add32): + (JSC::MacroAssemblerX86Common::and32): + (JSC::MacroAssemblerX86Common::mul32): + (JSC::MacroAssemblerX86Common::neg32): + (JSC::MacroAssemblerX86Common::or32): + (JSC::MacroAssemblerX86Common::sub32): + (JSC::MacroAssemblerX86Common::xor32): + (JSC::MacroAssemblerX86Common::branchAdd32): + (JSC::MacroAssemblerX86Common::branchMul32): + (JSC::MacroAssemblerX86Common::branchSub32): + * assembler/X86Assembler.h: + (JSC::X86Assembler::): + (JSC::X86Assembler::addl_rm): + (JSC::X86Assembler::andl_mr): + (JSC::X86Assembler::andl_rm): + (JSC::X86Assembler::andl_im): + (JSC::X86Assembler::negl_r): + (JSC::X86Assembler::notl_r): + (JSC::X86Assembler::orl_rm): + (JSC::X86Assembler::orl_im): + (JSC::X86Assembler::subl_rm): + (JSC::X86Assembler::xorl_mr): + (JSC::X86Assembler::xorl_rm): + (JSC::X86Assembler::xorl_im): + (JSC::X86Assembler::imull_mr): + +2009-05-11 Sam Weinig + + Reviewed by Cameron Zwarich. + + Remove the NumberHeap. + + * JavaScriptCore.exp: + * runtime/Collector.cpp: + (JSC::Heap::Heap): + (JSC::Heap::destroy): + (JSC::Heap::recordExtraCost): + (JSC::Heap::heapAllocate): + (JSC::Heap::markConservatively): + (JSC::Heap::sweep): + (JSC::Heap::collect): + (JSC::Heap::objectCount): + (JSC::Heap::statistics): + (JSC::typeName): + (JSC::Heap::isBusy): + * runtime/Collector.h: + (JSC::Heap::globalData): + * runtime/JSCell.h: + +2009-05-11 Geoffrey Garen + + Reviewed by Sam Weinig. + + Land initial commit of new number representation for 32 bit platforms, + with JIT disabled. + + * API/APICast.h: + (toJS): + (toRef): + * API/JSCallbackObjectFunctions.h: + (JSC::::hasInstance): + (JSC::::toNumber): + (JSC::::toString): + * API/tests/testapi.c: + (EvilExceptionObject_convertToType): + * AllInOneFile.cpp: + * JavaScriptCore.exp: + * JavaScriptCore.xcodeproj/project.pbxproj: + * bytecode/CodeBlock.cpp: + (JSC::valueToSourceString): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitLoad): + (JSC::BytecodeGenerator::emitUnexpectedLoad): + (JSC::keyForImmediateSwitch): + * bytecompiler/BytecodeGenerator.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::dumpRegisters): + (JSC::Interpreter::privateExecute): + * parser/Nodes.cpp: + (JSC::ArrayNode::emitBytecode): + (JSC::processClauseList): + * runtime/ArgList.h: + * runtime/Collector.h: + (JSC::sizeof): + * runtime/DateMath.cpp: + * runtime/ExceptionHelpers.h: + * runtime/InitializeThreading.cpp: + * runtime/JSArray.cpp: + (JSC::JSArray::JSArray): + * runtime/JSCell.cpp: + * runtime/JSCell.h: + (JSC::JSCell::isAPIValueWrapper): + (JSC::JSValue::isString): + (JSC::JSValue::isGetterSetter): + (JSC::JSValue::isObject): + (JSC::JSValue::getString): + (JSC::JSValue::getObject): + (JSC::JSValue::getCallData): + (JSC::JSValue::getConstructData): + (JSC::JSValue::getUInt32): + (JSC::JSValue::marked): + (JSC::JSValue::toPrimitive): + (JSC::JSValue::getPrimitiveNumber): + (JSC::JSValue::toBoolean): + (JSC::JSValue::toNumber): + (JSC::JSValue::toString): + (JSC::JSValue::needsThisConversion): + (JSC::JSValue::toThisString): + (JSC::JSValue::getJSNumber): + (JSC::JSValue::toObject): + (JSC::JSValue::toThisObject): + * runtime/JSGlobalData.cpp: + (JSC::JSGlobalData::JSGlobalData): + * runtime/JSGlobalData.h: + * runtime/JSGlobalObject.h: + (JSC::Structure::prototypeForLookup): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncParseInt): + * runtime/JSImmediate.h: + * runtime/JSNumberCell.cpp: Removed. + * runtime/JSNumberCell.h: Removed. + * runtime/JSObject.h: + (JSC::JSValue::get): + (JSC::JSValue::put): + * runtime/JSString.h: + (JSC::JSValue::toThisJSString): + * runtime/JSValue.cpp: + (JSC::JSValue::toInteger): + (JSC::JSValue::toIntegerPreserveNaN): + (JSC::JSValue::toObjectSlowCase): + (JSC::JSValue::toThisObjectSlowCase): + (JSC::JSValue::synthesizeObject): + (JSC::JSValue::synthesizePrototype): + (JSC::JSValue::description): + (JSC::nonInlineNaN): + * runtime/JSValue.h: + (JSC::JSValue::): + (JSC::EncodedJSValueHashTraits::emptyValue): + (JSC::jsNaN): + (JSC::operator==): + (JSC::operator!=): + (JSC::toInt32): + (JSC::toUInt32): + (JSC::JSValue::encode): + (JSC::JSValue::decode): + (JSC::JSValue::JSValue): + (JSC::JSValue::operator bool): + (JSC::JSValue::operator==): + (JSC::JSValue::operator!=): + (JSC::JSValue::isUndefined): + (JSC::JSValue::isNull): + (JSC::JSValue::isUndefinedOrNull): + (JSC::JSValue::isCell): + (JSC::JSValue::isInt32): + (JSC::JSValue::isUInt32): + (JSC::JSValue::isDouble): + (JSC::JSValue::isTrue): + (JSC::JSValue::isFalse): + (JSC::JSValue::tag): + (JSC::JSValue::asInt32): + (JSC::JSValue::asUInt32): + (JSC::JSValue::asDouble): + (JSC::JSValue::asCell): + (JSC::JSValue::isNumber): + (JSC::JSValue::isBoolean): + (JSC::JSValue::getBoolean): + (JSC::JSValue::uncheckedGetNumber): + (JSC::JSValue::toJSNumber): + (JSC::JSValue::getNumber): + (JSC::JSValue::toInt32): + (JSC::JSValue::toUInt32): + * runtime/Operations.h: + (JSC::JSValue::equal): + (JSC::JSValue::equalSlowCaseInline): + (JSC::JSValue::strictEqual): + (JSC::JSValue::strictEqualSlowCaseInline): + (JSC::jsLess): + (JSC::jsLessEq): + (JSC::jsAdd): + * runtime/PropertySlot.h: + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncCharAt): + (JSC::stringProtoFuncCharCodeAt): + (JSC::stringProtoFuncIndexOf): + * wtf/Platform.h: + +=== Start merge of nitro-extreme branch 2009-07-30 === + +2009-07-29 Laszlo Gombos + + Reviewed by George Staikos. + + Resolve class/struct mixup in forward declarations + https://bugs.webkit.org/show_bug.cgi?id=27708 + + * API/JSClassRef.h: + * bytecode/SamplingTool.h: + * interpreter/Interpreter.h: + * jit/JIT.h: + * profiler/ProfileGenerator.h: + * profiler/Profiler.h: + * runtime/ClassInfo.h: + * runtime/ExceptionHelpers.h: + * runtime/JSByteArray.h: + * runtime/JSCell.h: + * runtime/JSFunction.h: + * runtime/JSGlobalData.h: + * runtime/JSObject.h: + * runtime/JSString.h: + +2009-07-28 Ada Chan + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=27236 + - Implement TCMalloc_SystemRelease and TCMalloc_SystemCommit for Windows. + - Use a background thread to periodically scavenge memory to release back to the system. + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_PageHeap::init): + (WTF::TCMalloc_PageHeap::runScavengerThread): + (WTF::TCMalloc_PageHeap::scavenge): + (WTF::TCMalloc_PageHeap::shouldContinueScavenging): + (WTF::TCMalloc_PageHeap::New): + (WTF::TCMalloc_PageHeap::AllocLarge): + (WTF::TCMalloc_PageHeap::Delete): + (WTF::TCMalloc_PageHeap::GrowHeap): + (WTF::sleep): + (WTF::TCMalloc_PageHeap::scavengerThread): + * wtf/TCSystemAlloc.cpp: + (TCMalloc_SystemRelease): + (TCMalloc_SystemCommit): + * wtf/TCSystemAlloc.h: + 2009-07-28 Xan Lopez Add new files, fixes distcheck. @@ -429,8 +7385,6 @@ 2009-07-20 Oliver Hunt - Reviewed by NOBODY (Build fix). - Build fix attempt #2 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: @@ -438,8 +7392,6 @@ 2009-07-20 Oliver Hunt - Reviewed by NOBODY (Build fix). - Build fix attempt #1 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: @@ -1455,8 +8407,6 @@ 2009-07-09 Oliver Hunt - Reviewed by NOBODY (Build fix). - * interpreter/Interpreter.cpp: (JSC::Interpreter::privateExecute): @@ -2091,8 +9041,6 @@ 2009-06-21 Oliver Hunt - Reviewed by NOBODY (Build fix). - Remove dead code. * runtime/LiteralParser.cpp: diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi index 5a75ab7..15a0c0f 100644 --- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi +++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.gypi @@ -255,6 +255,7 @@ 'runtime/JSString.cpp', 'runtime/JSString.h', 'runtime/JSType.h', + 'runtime/JSTypeInfo.h', 'runtime/JSValue.cpp', 'runtime/JSValue.h', 'runtime/JSVariableObject.cpp', @@ -265,6 +266,9 @@ 'runtime/LiteralParser.h', 'runtime/Lookup.cpp', 'runtime/Lookup.h', + 'runtime/MarkStack.cpp', + 'runtime/MarkStack.h', + 'runtime/MarkStackWin.cpp', 'runtime/MathObject.cpp', 'runtime/MathObject.h', 'runtime/NativeErrorConstructor.cpp', @@ -284,6 +288,8 @@ 'runtime/ObjectPrototype.h', 'runtime/Operations.cpp', 'runtime/Operations.h', + 'runtime/PropertyDescriptor.cpp', + 'runtime/PropertyDescriptor.h', 'runtime/PropertyMapHashTable.h', 'runtime/PropertyNameArray.cpp', 'runtime/PropertyNameArray.h', @@ -323,7 +329,6 @@ 'runtime/TimeoutChecker.cpp', 'runtime/TimeoutChecker.h', 'runtime/Tracing.h', - 'runtime/JSTypeInfo.h', 'runtime/UString.cpp', 'runtime/UString.h', 'wrec/CharacterClass.cpp', diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri index 85645be..cbd7dbe 100644 --- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri +++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri @@ -105,11 +105,13 @@ SOURCES += \ 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 \ jit/JITArithmetic.cpp \ @@ -128,8 +130,13 @@ SOURCES += \ yarr/RegexJIT.cpp \ interpreter/RegisterFile.cpp -win32-*|wince*: SOURCES += jit/ExecutableAllocatorWin.cpp -else: SOURCES += jit/ExecutableAllocatorPosix.cpp +win32-*|wince* { + SOURCES += jit/ExecutableAllocatorWin.cpp \ + runtime/MarkStackWin.cpp +} else { + SOURCES += jit/ExecutableAllocatorPosix.cpp \ + runtime/MarkStackPosix.cpp +} # AllInOneFile.cpp helps gcc analize and optimize code # Other compilers may be able to do this at link time @@ -159,6 +166,7 @@ SOURCES += \ runtime/ErrorInstance.cpp \ runtime/ErrorPrototype.cpp \ interpreter/CallFrame.cpp \ + runtime/Executable.cpp \ runtime/FunctionConstructor.cpp \ runtime/FunctionPrototype.cpp \ runtime/GetterSetter.cpp \ @@ -167,6 +175,7 @@ SOURCES += \ runtime/InternalFunction.cpp \ runtime/Completion.cpp \ runtime/JSArray.cpp \ + runtime/JSAPIValueWrapper.cpp \ runtime/JSByteArray.cpp \ runtime/JSCell.cpp \ runtime/JSFunction.cpp \ @@ -192,6 +201,7 @@ SOURCES += \ runtime/Operations.cpp \ parser/Parser.cpp \ parser/ParserArena.cpp \ + runtime/PropertyDescriptor.cpp \ runtime/PropertyNameArray.cpp \ runtime/PropertySlot.cpp \ runtime/PrototypeFunction.cpp \ @@ -216,8 +226,7 @@ SOURCES += \ wtf/DateMath.cpp \ wtf/FastMalloc.cpp \ wtf/Threading.cpp \ - wtf/qt/MainThreadQt.cpp \ - parser/SourcePoolQt.cpp + wtf/qt/MainThreadQt.cpp !contains(DEFINES, ENABLE_SINGLE_THREADED=1) { SOURCES += wtf/qt/ThreadingQt.cpp diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro index f881c05..0cd2e1a 100644 --- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro +++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro @@ -33,10 +33,6 @@ INCLUDEPATH += $$GENERATED_SOURCES_DIR } } -CONFIG -= warn_on -*-g++*:QMAKE_CXXFLAGS += -Wreturn-type -fno-strict-aliasing -#QMAKE_CXXFLAGS += -Wall -Wno-undef -Wno-unused-parameter - CONFIG(release):!CONFIG(QTDIR_build) { contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.cpp b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.cpp index dafc482..77d7a53 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.cpp @@ -49,11 +49,11 @@ ARMWord* ARMAssembler::getLdrImmAddress(ARMWord* insn, uint32_t* constPool) return reinterpret_cast(addr - (*insn & SDT_OFFSET_MASK)); } -void ARMAssembler::linkBranch(void* code, JmpSrc from, void* to) +void ARMAssembler::linkBranch(void* code, JmpSrc from, void* to, int useConstantPool) { ARMWord* insn = reinterpret_cast(code) + (from.m_offset / sizeof(ARMWord)); - if (!from.m_latePatch) { + if (!useConstantPool) { int diff = reinterpret_cast(to) - reinterpret_cast(insn + 2); if ((diff <= BOFFSET_MAX && diff >= BOFFSET_MIN)) { @@ -291,10 +291,10 @@ void ARMAssembler::dataTransfer32(bool isLoad, RegisterID srcDst, RegisterID bas if (offset <= 0xfff) dtr_u(isLoad, srcDst, base, offset); else if (offset <= 0xfffff) { - add_r(ARM::S0, base, OP2_IMM | (offset >> 12) | (10 << 8)); - dtr_u(isLoad, srcDst, ARM::S0, offset & 0xfff); + add_r(ARMRegisters::S0, base, OP2_IMM | (offset >> 12) | (10 << 8)); + dtr_u(isLoad, srcDst, ARMRegisters::S0, offset & 0xfff); } else { - ARMWord reg = getImm(offset, ARM::S0); + ARMWord reg = getImm(offset, ARMRegisters::S0); dtr_ur(isLoad, srcDst, base, reg); } } else { @@ -302,10 +302,10 @@ void ARMAssembler::dataTransfer32(bool isLoad, RegisterID srcDst, RegisterID bas if (offset <= 0xfff) dtr_d(isLoad, srcDst, base, offset); else if (offset <= 0xfffff) { - sub_r(ARM::S0, base, OP2_IMM | (offset >> 12) | (10 << 8)); - dtr_d(isLoad, srcDst, ARM::S0, offset & 0xfff); + sub_r(ARMRegisters::S0, base, OP2_IMM | (offset >> 12) | (10 << 8)); + dtr_d(isLoad, srcDst, ARMRegisters::S0, offset & 0xfff); } else { - ARMWord reg = getImm(offset, ARM::S0); + ARMWord reg = getImm(offset, ARMRegisters::S0); dtr_dr(isLoad, srcDst, base, reg); } } @@ -319,30 +319,70 @@ void ARMAssembler::baseIndexTransfer32(bool isLoad, RegisterID srcDst, RegisterI op2 = lsl(index, scale); if (offset >= 0 && offset <= 0xfff) { - add_r(ARM::S0, base, op2); - dtr_u(isLoad, srcDst, ARM::S0, offset); + add_r(ARMRegisters::S0, base, op2); + dtr_u(isLoad, srcDst, ARMRegisters::S0, offset); return; } if (offset <= 0 && offset >= -0xfff) { - add_r(ARM::S0, base, op2); - dtr_d(isLoad, srcDst, ARM::S0, -offset); + add_r(ARMRegisters::S0, base, op2); + dtr_d(isLoad, srcDst, ARMRegisters::S0, -offset); return; } - moveImm(offset, ARM::S0); - add_r(ARM::S0, ARM::S0, op2); - dtr_ur(isLoad, srcDst, base, ARM::S0); + ldr_un_imm(ARMRegisters::S0, offset); + add_r(ARMRegisters::S0, ARMRegisters::S0, op2); + dtr_ur(isLoad, srcDst, base, ARMRegisters::S0); +} + +void ARMAssembler::doubleTransfer(bool isLoad, FPRegisterID srcDst, RegisterID base, int32_t offset) +{ + if (offset & 0x3) { + if (offset <= 0x3ff && offset >= 0) { + fdtr_u(isLoad, srcDst, base, offset >> 2); + return; + } + if (offset <= 0x3ffff && offset >= 0) { + add_r(ARMRegisters::S0, base, OP2_IMM | (offset >> 10) | (11 << 8)); + fdtr_u(isLoad, srcDst, ARMRegisters::S0, (offset >> 2) & 0xff); + return; + } + offset = -offset; + + if (offset <= 0x3ff && offset >= 0) { + fdtr_d(isLoad, srcDst, base, offset >> 2); + return; + } + if (offset <= 0x3ffff && offset >= 0) { + sub_r(ARMRegisters::S0, base, OP2_IMM | (offset >> 10) | (11 << 8)); + fdtr_d(isLoad, srcDst, ARMRegisters::S0, (offset >> 2) & 0xff); + return; + } + offset = -offset; + } + + ldr_un_imm(ARMRegisters::S0, offset); + add_r(ARMRegisters::S0, ARMRegisters::S0, base); + fdtr_u(isLoad, srcDst, ARMRegisters::S0, 0); } void* ARMAssembler::executableCopy(ExecutablePool* allocator) { + // 64-bit alignment is required for next constant pool and JIT code as well + m_buffer.flushWithoutBarrier(true); + if (m_buffer.uncheckedSize() & 0x7) + bkpt(0); + char* data = reinterpret_cast(m_buffer.executableCopy(allocator)); for (Jumps::Iterator iter = m_jumps.begin(); iter != m_jumps.end(); ++iter) { - ARMWord* ldrAddr = reinterpret_cast(data + *iter); - ARMWord* offset = getLdrImmAddress(ldrAddr); - if (*offset != 0xffffffff) - linkBranch(data, JmpSrc(*iter), data + *offset); + // 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)); + } } return data; diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.h index d6bb43e..0b04bb4 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.h @@ -35,44 +35,49 @@ #include namespace JSC { -typedef uint32_t ARMWord; - -namespace ARM { - typedef enum { - r0 = 0, - r1, - r2, - r3, - S0 = r3, - r4, - r5, - r6, - r7, - r8, - S1 = r8, - r9, - r10, - r11, - r12, - r13, - sp = r13, - r14, - lr = r14, - r15, - pc = r15 - } RegisterID; - - typedef enum { - fp0 //FIXME - } FPRegisterID; -} // namespace ARM + typedef uint32_t ARMWord; + + namespace ARMRegisters { + typedef enum { + r0 = 0, + r1, + r2, + r3, + S0 = r3, + r4, + r5, + r6, + r7, + r8, + S1 = r8, + r9, + r10, + r11, + r12, + r13, + sp = r13, + r14, + lr = r14, + r15, + pc = r15 + } RegisterID; + + typedef enum { + d0, + d1, + d2, + d3, + SD0 = d3 + } FPRegisterID; + + } // namespace ARMRegisters class ARMAssembler { public: - typedef ARM::RegisterID RegisterID; - typedef ARM::FPRegisterID FPRegisterID; + typedef ARMRegisters::RegisterID RegisterID; + typedef ARMRegisters::FPRegisterID FPRegisterID; typedef AssemblerBufferWithConstantPool<2048, 4, 4, ARMAssembler> ARMBuffer; - typedef WTF::SegmentedVector Jumps; + typedef SegmentedVector Jumps; ARMAssembler() { } @@ -115,13 +120,21 @@ namespace ARM { MVN = (0xf << 21), MUL = 0x00000090, MULL = 0x00c00090, + FADDD = 0x0e300b00, + FSUBD = 0x0e300b40, + FMULD = 0x0e200b00, + FCMPD = 0x0eb40b40, DTR = 0x05000000, LDRH = 0x00100090, STRH = 0x00000090, STMDB = 0x09200000, LDMIA = 0x08b00000, + FDTR = 0x0d000b00, B = 0x0a000000, BL = 0x0b000000, + FMSR = 0x0e000a10, + FSITOD = 0x0eb80bc0, + FMSTAT = 0x0ef1fa10, #if ARM_ARCH_VERSION >= 5 CLZ = 0x016f0f10, BKPT = 0xe120070, @@ -167,20 +180,16 @@ namespace ARM { public: JmpSrc() : m_offset(-1) - , m_latePatch(false) { } - void enableLatePatch() { m_latePatch = true; } private: JmpSrc(int offset) : m_offset(offset) - , m_latePatch(false) { } - int m_offset : 31; - int m_latePatch : 1; + int m_offset; }; class JmpDst { @@ -321,12 +330,12 @@ namespace ARM { void mov_r(int rd, ARMWord op2, Condition cc = AL) { - emitInst(static_cast(cc) | MOV, rd, ARM::r0, op2); + emitInst(static_cast(cc) | MOV, rd, ARMRegisters::r0, op2); } void movs_r(int rd, ARMWord op2, Condition cc = AL) { - emitInst(static_cast(cc) | MOV | SET_CC, rd, ARM::r0, op2); + emitInst(static_cast(cc) | MOV | SET_CC, rd, ARMRegisters::r0, op2); } void bic_r(int rd, int rn, ARMWord op2, Condition cc = AL) @@ -341,12 +350,12 @@ namespace ARM { void mvn_r(int rd, ARMWord op2, Condition cc = AL) { - emitInst(static_cast(cc) | MVN, rd, ARM::r0, op2); + emitInst(static_cast(cc) | MVN, rd, ARMRegisters::r0, op2); } void mvns_r(int rd, ARMWord op2, Condition cc = AL) { - emitInst(static_cast(cc) | MVN | SET_CC, rd, ARM::r0, op2); + emitInst(static_cast(cc) | MVN | SET_CC, rd, ARMRegisters::r0, op2); } void mul_r(int rd, int rn, int rm, Condition cc = AL) @@ -364,14 +373,34 @@ namespace ARM { m_buffer.putInt(static_cast(cc) | MULL | RN(rdhi) | RD(rdlo) | RS(rn) | RM(rm)); } + void faddd_r(int dd, int dn, int dm, Condition cc = AL) + { + emitInst(static_cast(cc) | FADDD, dd, dn, dm); + } + + void fsubd_r(int dd, int dn, int dm, Condition cc = AL) + { + emitInst(static_cast(cc) | FSUBD, dd, dn, dm); + } + + void fmuld_r(int dd, int dn, int dm, Condition cc = AL) + { + emitInst(static_cast(cc) | FMULD, dd, dn, dm); + } + + void fcmpd_r(int dd, int dm, Condition cc = AL) + { + emitInst(static_cast(cc) | FCMPD, dd, 0, dm); + } + void ldr_imm(int rd, ARMWord imm, Condition cc = AL) { - m_buffer.putIntWithConstantInt(static_cast(cc) | DTR | DT_LOAD | DT_UP | RN(ARM::pc) | RD(rd), imm, true); + m_buffer.putIntWithConstantInt(static_cast(cc) | DTR | DT_LOAD | DT_UP | RN(ARMRegisters::pc) | RD(rd), imm, true); } void ldr_un_imm(int rd, ARMWord imm, Condition cc = AL) { - m_buffer.putIntWithConstantInt(static_cast(cc) | DTR | DT_LOAD | DT_UP | RN(ARM::pc) | RD(rd), imm); + m_buffer.putIntWithConstantInt(static_cast(cc) | DTR | DT_LOAD | DT_UP | RN(ARMRegisters::pc) | RD(rd), imm); } void dtr_u(bool isLoad, int rd, int rb, ARMWord op2, Condition cc = AL) @@ -414,26 +443,53 @@ namespace ARM { emitInst(static_cast(cc) | STRH | HDT_UH | DT_UP | DT_PRE, rd, rn, rm); } + void fdtr_u(bool isLoad, int rd, int rb, ARMWord op2, Condition cc = AL) + { + ASSERT(op2 <= 0xff); + emitInst(static_cast(cc) | FDTR | DT_UP | (isLoad ? DT_LOAD : 0), rd, rb, op2); + } + + void fdtr_d(bool isLoad, int rd, int rb, ARMWord op2, Condition cc = AL) + { + ASSERT(op2 <= 0xff); + emitInst(static_cast(cc) | FDTR | (isLoad ? DT_LOAD : 0), rd, rb, op2); + } + void push_r(int reg, Condition cc = AL) { ASSERT(ARMWord(reg) <= 0xf); - m_buffer.putInt(cc | DTR | DT_WB | RN(ARM::sp) | RD(reg) | 0x4); + m_buffer.putInt(cc | DTR | DT_WB | RN(ARMRegisters::sp) | RD(reg) | 0x4); } void pop_r(int reg, Condition cc = AL) { ASSERT(ARMWord(reg) <= 0xf); - m_buffer.putInt(cc | (DTR ^ DT_PRE) | DT_LOAD | DT_UP | RN(ARM::sp) | RD(reg) | 0x4); + m_buffer.putInt(cc | (DTR ^ DT_PRE) | DT_LOAD | DT_UP | RN(ARMRegisters::sp) | RD(reg) | 0x4); } inline void poke_r(int reg, Condition cc = AL) { - dtr_d(false, ARM::sp, 0, reg, cc); + dtr_d(false, ARMRegisters::sp, 0, reg, cc); } inline void peek_r(int reg, Condition cc = AL) { - dtr_u(true, reg, ARM::sp, 0, cc); + dtr_u(true, reg, ARMRegisters::sp, 0, cc); + } + + void fmsr_r(int dd, int rn, Condition cc = AL) + { + emitInst(static_cast(cc) | FMSR, rn, dd, 0); + } + + void fsitod_r(int dd, int dm, Condition cc = AL) + { + emitInst(static_cast(cc) | FSITOD, dd, 0, dm); + } + + void fmstat(Condition cc = AL) + { + m_buffer.putInt(static_cast(cc) | FMSTAT); } #if ARM_ARCH_VERSION >= 5 @@ -449,49 +505,49 @@ namespace ARM { m_buffer.putInt(BKPT | ((value & 0xff0) << 4) | (value & 0xf)); #else // Cannot access to Zero memory address - dtr_dr(true, ARM::S0, ARM::S0, ARM::S0); + dtr_dr(true, ARMRegisters::S0, ARMRegisters::S0, ARMRegisters::S0); #endif } static ARMWord lsl(int reg, ARMWord value) { - ASSERT(reg <= ARM::pc); + ASSERT(reg <= ARMRegisters::pc); ASSERT(value <= 0x1f); return reg | (value << 7) | 0x00; } static ARMWord lsr(int reg, ARMWord value) { - ASSERT(reg <= ARM::pc); + ASSERT(reg <= ARMRegisters::pc); ASSERT(value <= 0x1f); return reg | (value << 7) | 0x20; } static ARMWord asr(int reg, ARMWord value) { - ASSERT(reg <= ARM::pc); + ASSERT(reg <= ARMRegisters::pc); ASSERT(value <= 0x1f); return reg | (value << 7) | 0x40; } static ARMWord lsl_r(int reg, int shiftReg) { - ASSERT(reg <= ARM::pc); - ASSERT(shiftReg <= ARM::pc); + ASSERT(reg <= ARMRegisters::pc); + ASSERT(shiftReg <= ARMRegisters::pc); return reg | (shiftReg << 8) | 0x10; } static ARMWord lsr_r(int reg, int shiftReg) { - ASSERT(reg <= ARM::pc); - ASSERT(shiftReg <= ARM::pc); + ASSERT(reg <= ARMRegisters::pc); + ASSERT(shiftReg <= ARMRegisters::pc); return reg | (shiftReg << 8) | 0x30; } static ARMWord asr_r(int reg, int shiftReg) { - ASSERT(reg <= ARM::pc); - ASSERT(shiftReg <= ARM::pc); + ASSERT(reg <= ARMRegisters::pc); + ASSERT(shiftReg <= ARMRegisters::pc); return reg | (shiftReg << 8) | 0x50; } @@ -507,6 +563,11 @@ namespace ARM { m_buffer.ensureSpace(insnSpace, constSpace); } + int sizeOfConstantPool() + { + return m_buffer.sizeOfConstantPool(); + } + JmpDst label() { return JmpDst(m_buffer.size()); @@ -515,16 +576,17 @@ namespace ARM { JmpDst align(int alignment) { while (!m_buffer.isAligned(alignment)) - mov_r(ARM::r0, ARM::r0); + mov_r(ARMRegisters::r0, ARMRegisters::r0); return label(); } - JmpSrc jmp(Condition cc = AL) + JmpSrc jmp(Condition cc = AL, int useConstantPool = 0) { - int s = size(); - ldr_un_imm(ARM::pc, 0xffffffff, cc); - m_jumps.append(s); + ensureSpace(sizeof(ARMWord), sizeof(ARMWord)); + int s = m_buffer.uncheckedSize(); + ldr_un_imm(ARMRegisters::pc, 0xffffffff, cc); + m_jumps.append(s | (useConstantPool & 0x1)); return JmpSrc(s); } @@ -533,7 +595,7 @@ namespace ARM { // Patching helpers static ARMWord* getLdrImmAddress(ARMWord* insn, uint32_t* constPool = 0); - static void linkBranch(void* code, JmpSrc from, void* to); + static void linkBranch(void* code, JmpSrc from, void* to, int useConstantPool = 0); static void patchPointerInternal(intptr_t from, void* to) { @@ -600,7 +662,7 @@ namespace ARM { static void linkCall(void* code, JmpSrc from, void* to) { - linkBranch(code, from, to); + linkBranch(code, from, to, true); } static void relinkCall(void* from, void* to) @@ -653,6 +715,7 @@ namespace ARM { void dataTransfer32(bool isLoad, RegisterID srcDst, RegisterID base, int32_t offset); void baseIndexTransfer32(bool isLoad, RegisterID srcDst, RegisterID base, RegisterID index, int scale, int32_t offset); + void doubleTransfer(bool isLoad, FPRegisterID srcDst, RegisterID base, int32_t offset); // Constant pool hnadlers @@ -666,25 +729,25 @@ namespace ARM { private: ARMWord RM(int reg) { - ASSERT(reg <= ARM::pc); + ASSERT(reg <= ARMRegisters::pc); return reg; } ARMWord RS(int reg) { - ASSERT(reg <= ARM::pc); + ASSERT(reg <= ARMRegisters::pc); return reg << 8; } ARMWord RD(int reg) { - ASSERT(reg <= ARM::pc); + ASSERT(reg <= ARMRegisters::pc); return reg << 12; } ARMWord RN(int reg) { - ASSERT(reg <= ARM::pc); + ASSERT(reg <= ARMRegisters::pc); return reg << 16; } diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h index f7e2fb4..e920255 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h @@ -37,7 +37,7 @@ namespace JSC { -namespace ARM { +namespace ARMRegisters { typedef enum { r0, r1, @@ -199,7 +199,7 @@ class ARMThumbImmediate { }; } PatternBytes; - ALWAYS_INLINE static int32_t countLeadingZerosPartial(uint32_t& value, int32_t& zeros, const int N) + 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 */ \ @@ -407,8 +407,8 @@ register writeback class ARMv7Assembler { public: - typedef ARM::RegisterID RegisterID; - typedef ARM::FPRegisterID FPRegisterID; + typedef ARMRegisters::RegisterID RegisterID; + typedef ARMRegisters::FPRegisterID FPRegisterID; // (HS, LO, HI, LS) -> (AE, B, A, BE) // (VS, VC) -> (O, NO) @@ -442,7 +442,6 @@ public: { } - void enableLatePatch() { } private: JmpSrc(int offset) : m_offset(offset) @@ -481,7 +480,7 @@ private: // ARMv7, Appx-A.6.3 bool BadReg(RegisterID reg) { - return (reg == ARM::sp) || (reg == ARM::pc); + return (reg == ARMRegisters::sp) || (reg == ARMRegisters::pc); } bool isSingleRegister(FPRegisterID reg) @@ -693,16 +692,16 @@ public: void add(RegisterID rd, RegisterID rn, ARMThumbImmediate imm) { // Rd can only be SP if Rn is also SP. - ASSERT((rd != ARM::sp) || (rn == ARM::sp)); - ASSERT(rd != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT((rd != ARMRegisters::sp) || (rn == ARMRegisters::sp)); + ASSERT(rd != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(imm.isValid()); - if (rn == ARM::sp) { + if (rn == ARMRegisters::sp) { if (!(rd & 8) && imm.isUInt10()) { m_formatter.oneWordOp5Reg3Imm8(OP_ADD_SP_imm_T1, rd, imm.getUInt10() >> 2); return; - } else if ((rd == ARM::sp) && imm.isUInt9()) { + } else if ((rd == ARMRegisters::sp) && imm.isUInt9()) { m_formatter.oneWordOp9Imm7(OP_ADD_SP_imm_T2, imm.getUInt9() >> 2); return; } @@ -726,9 +725,9 @@ public: void add(RegisterID rd, RegisterID rn, RegisterID rm, ShiftTypeAndAmount shift) { - ASSERT((rd != ARM::sp) || (rn == ARM::sp)); - ASSERT(rd != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT((rd != ARMRegisters::sp) || (rn == ARMRegisters::sp)); + ASSERT(rd != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(!BadReg(rm)); m_formatter.twoWordOp12Reg4FourFours(OP_ADD_reg_T3, rn, FourFours(shift.hi4(), rd, shift.lo4(), rm)); } @@ -750,9 +749,9 @@ public: void add_S(RegisterID rd, RegisterID rn, ARMThumbImmediate imm) { // Rd can only be SP if Rn is also SP. - ASSERT((rd != ARM::sp) || (rn == ARM::sp)); - ASSERT(rd != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT((rd != ARMRegisters::sp) || (rn == ARMRegisters::sp)); + ASSERT(rd != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(imm.isEncodedImm()); if (!((rd | rn) & 8)) { @@ -771,9 +770,9 @@ public: // Not allowed in an IT (if then) block? void add_S(RegisterID rd, RegisterID rn, RegisterID rm, ShiftTypeAndAmount shift) { - ASSERT((rd != ARM::sp) || (rn == ARM::sp)); - ASSERT(rd != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT((rd != ARMRegisters::sp) || (rn == ARMRegisters::sp)); + ASSERT(rd != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(!BadReg(rm)); m_formatter.twoWordOp12Reg4FourFours(OP_ADD_S_reg_T3, rn, FourFours(shift.hi4(), rd, shift.lo4(), rm)); } @@ -839,7 +838,7 @@ public: // Only allowed in IT (if then) block if last instruction. JmpSrc blx(RegisterID rm) { - ASSERT(rm != ARM::pc); + ASSERT(rm != ARMRegisters::pc); m_formatter.oneWordOp8RegReg143(OP_BLX, rm, (RegisterID)8); return JmpSrc(m_formatter.size()); } @@ -858,7 +857,7 @@ public: void cmn(RegisterID rn, ARMThumbImmediate imm) { - ASSERT(rn != ARM::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(imm.isEncodedImm()); m_formatter.twoWordOp5i6Imm4Reg4EncodedImm(OP_CMN_imm, rn, (RegisterID)0xf, imm); @@ -866,7 +865,7 @@ public: void cmp(RegisterID rn, ARMThumbImmediate imm) { - ASSERT(rn != ARM::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(imm.isEncodedImm()); if (!(rn & 8) && imm.isUInt8()) @@ -877,7 +876,7 @@ public: void cmp(RegisterID rn, RegisterID rm, ShiftTypeAndAmount shift) { - ASSERT(rn != ARM::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(!BadReg(rm)); m_formatter.twoWordOp12Reg4FourFours(OP_CMP_reg_T2, rn, FourFours(shift.hi4(), 0xf, shift.lo4(), rm)); } @@ -939,15 +938,15 @@ public: m_formatter.oneWordOp8Imm8(OP_IT, ifThenElse(cond, inst2if, inst3if, inst4if)); } - // rt == ARM::pc only allowed if last instruction in IT (if then) block. + // rt == ARMRegisters::pc only allowed if last instruction in IT (if then) block. void ldr(RegisterID rt, RegisterID rn, ARMThumbImmediate imm) { - ASSERT(rn != ARM::pc); // LDR (literal) + ASSERT(rn != ARMRegisters::pc); // LDR (literal) ASSERT(imm.isUInt12()); if (!((rt | rn) & 8) && imm.isUInt7()) m_formatter.oneWordOp5Imm5Reg3Reg3(OP_LDR_imm_T1, imm.getUInt7() >> 2, rn, rt); - else if ((rn == ARM::sp) && !(rt & 8) && imm.isUInt10()) + else if ((rn == ARMRegisters::sp) && !(rt & 8) && imm.isUInt10()) m_formatter.oneWordOp5Reg3Imm8(OP_LDR_imm_T2, rt, imm.getUInt10() >> 2); else m_formatter.twoWordOp12Reg4Reg4Imm12(OP_LDR_imm_T3, rn, rt, imm.getUInt12()); @@ -966,8 +965,8 @@ public: // if (wback) REG[rn] = _tmp void ldr(RegisterID rt, RegisterID rn, int offset, bool index, bool wback) { - ASSERT(rt != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT(rt != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(index || wback); ASSERT(!wback | (rt != rn)); @@ -986,10 +985,10 @@ public: m_formatter.twoWordOp12Reg4Reg4Imm12(OP_LDR_imm_T4, rn, rt, offset); } - // rt == ARM::pc only allowed if last instruction in IT (if then) block. + // rt == ARMRegisters::pc only allowed if last instruction in IT (if then) block. void ldr(RegisterID rt, RegisterID rn, RegisterID rm, unsigned shift=0) { - ASSERT(rn != ARM::pc); // LDR (literal) + ASSERT(rn != ARMRegisters::pc); // LDR (literal) ASSERT(!BadReg(rm)); ASSERT(shift <= 3); @@ -999,10 +998,10 @@ public: m_formatter.twoWordOp12Reg4FourFours(OP_LDR_reg_T2, rn, FourFours(rt, 0, shift, rm)); } - // rt == ARM::pc only allowed if last instruction in IT (if then) block. + // rt == ARMRegisters::pc only allowed if last instruction in IT (if then) block. void ldrh(RegisterID rt, RegisterID rn, ARMThumbImmediate imm) { - ASSERT(rn != ARM::pc); // LDR (literal) + ASSERT(rn != ARMRegisters::pc); // LDR (literal) ASSERT(imm.isUInt12()); if (!((rt | rn) & 8) && imm.isUInt6()) @@ -1024,8 +1023,8 @@ public: // if (wback) REG[rn] = _tmp void ldrh(RegisterID rt, RegisterID rn, int offset, bool index, bool wback) { - ASSERT(rt != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT(rt != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(index || wback); ASSERT(!wback | (rt != rn)); @@ -1047,7 +1046,7 @@ public: void ldrh(RegisterID rt, RegisterID rn, RegisterID rm, unsigned shift=0) { ASSERT(!BadReg(rt)); // Memory hint - ASSERT(rn != ARM::pc); // LDRH (literal) + ASSERT(rn != ARMRegisters::pc); // LDRH (literal) ASSERT(!BadReg(rm)); ASSERT(shift <= 3); @@ -1198,16 +1197,16 @@ public: m_formatter.twoWordOp12Reg4FourFours(OP_SMULL_T1, rn, FourFours(rdLo, rdHi, 0, rm)); } - // rt == ARM::pc only allowed if last instruction in IT (if then) block. + // rt == ARMRegisters::pc only allowed if last instruction in IT (if then) block. void str(RegisterID rt, RegisterID rn, ARMThumbImmediate imm) { - ASSERT(rt != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT(rt != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(imm.isUInt12()); if (!((rt | rn) & 8) && imm.isUInt7()) m_formatter.oneWordOp5Imm5Reg3Reg3(OP_STR_imm_T1, imm.getUInt7() >> 2, rn, rt); - else if ((rn == ARM::sp) && !(rt & 8) && imm.isUInt10()) + else if ((rn == ARMRegisters::sp) && !(rt & 8) && imm.isUInt10()) m_formatter.oneWordOp5Reg3Imm8(OP_STR_imm_T2, rt, imm.getUInt10() >> 2); else m_formatter.twoWordOp12Reg4Reg4Imm12(OP_STR_imm_T3, rn, rt, imm.getUInt12()); @@ -1226,8 +1225,8 @@ public: // if (wback) REG[rn] = _tmp void str(RegisterID rt, RegisterID rn, int offset, bool index, bool wback) { - ASSERT(rt != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT(rt != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(index || wback); ASSERT(!wback | (rt != rn)); @@ -1246,10 +1245,10 @@ public: m_formatter.twoWordOp12Reg4Reg4Imm12(OP_STR_imm_T4, rn, rt, offset); } - // rt == ARM::pc only allowed if last instruction in IT (if then) block. + // rt == ARMRegisters::pc only allowed if last instruction in IT (if then) block. void str(RegisterID rt, RegisterID rn, RegisterID rm, unsigned shift=0) { - ASSERT(rn != ARM::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(!BadReg(rm)); ASSERT(shift <= 3); @@ -1262,12 +1261,12 @@ public: void sub(RegisterID rd, RegisterID rn, ARMThumbImmediate imm) { // Rd can only be SP if Rn is also SP. - ASSERT((rd != ARM::sp) || (rn == ARM::sp)); - ASSERT(rd != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT((rd != ARMRegisters::sp) || (rn == ARMRegisters::sp)); + ASSERT(rd != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(imm.isValid()); - if ((rn == ARM::sp) && (rd == ARM::sp) && imm.isUInt9()) { + if ((rn == ARMRegisters::sp) && (rd == ARMRegisters::sp) && imm.isUInt9()) { m_formatter.oneWordOp9Imm7(OP_SUB_SP_imm_T1, imm.getUInt9() >> 2); return; } else if (!((rd | rn) & 8)) { @@ -1290,9 +1289,9 @@ public: void sub(RegisterID rd, RegisterID rn, RegisterID rm, ShiftTypeAndAmount shift) { - ASSERT((rd != ARM::sp) || (rn == ARM::sp)); - ASSERT(rd != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT((rd != ARMRegisters::sp) || (rn == ARMRegisters::sp)); + ASSERT(rd != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(!BadReg(rm)); m_formatter.twoWordOp12Reg4FourFours(OP_SUB_reg_T2, rn, FourFours(shift.hi4(), rd, shift.lo4(), rm)); } @@ -1310,12 +1309,12 @@ public: void sub_S(RegisterID rd, RegisterID rn, ARMThumbImmediate imm) { // Rd can only be SP if Rn is also SP. - ASSERT((rd != ARM::sp) || (rn == ARM::sp)); - ASSERT(rd != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT((rd != ARMRegisters::sp) || (rn == ARMRegisters::sp)); + ASSERT(rd != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(imm.isValid()); - if ((rn == ARM::sp) && (rd == ARM::sp) && imm.isUInt9()) { + if ((rn == ARMRegisters::sp) && (rd == ARMRegisters::sp) && imm.isUInt9()) { m_formatter.oneWordOp9Imm7(OP_SUB_SP_imm_T1, imm.getUInt9() >> 2); return; } else if (!((rd | rn) & 8)) { @@ -1334,9 +1333,9 @@ public: // Not allowed in an IT (if then) block? void sub_S(RegisterID rd, RegisterID rn, RegisterID rm, ShiftTypeAndAmount shift) { - ASSERT((rd != ARM::sp) || (rn == ARM::sp)); - ASSERT(rd != ARM::pc); - ASSERT(rn != ARM::pc); + ASSERT((rd != ARMRegisters::sp) || (rn == ARMRegisters::sp)); + ASSERT(rd != ARMRegisters::pc); + ASSERT(rn != ARMRegisters::pc); ASSERT(!BadReg(rm)); m_formatter.twoWordOp12Reg4FourFours(OP_SUB_S_reg_T2, rn, FourFours(shift.hi4(), rd, shift.lo4(), rm)); } diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/AbstractMacroAssembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/AbstractMacroAssembler.h index 95b5afc..525fe98 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/AbstractMacroAssembler.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/AbstractMacroAssembler.h @@ -173,7 +173,7 @@ public: struct Imm32 { explicit Imm32(int32_t value) : m_value(value) -#if PLATFORM_ARM_ARCH(7) +#if PLATFORM(ARM) , m_isPointer(false) #endif { @@ -182,7 +182,7 @@ public: #if !PLATFORM(X86_64) explicit Imm32(ImmPtr ptr) : m_value(ptr.asIntptr()) -#if PLATFORM_ARM_ARCH(7) +#if PLATFORM(ARM) , m_isPointer(true) #endif { @@ -190,7 +190,7 @@ public: #endif int32_t m_value; -#if PLATFORM_ARM_ARCH(7) +#if PLATFORM(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. @@ -320,11 +320,6 @@ public: return Call(jump.m_jmp, Linkable); } - void enableLatePatch() - { - m_jmp.enableLatePatch(); - } - JmpSrc m_jmp; private: Flags m_flags; @@ -361,11 +356,6 @@ public: masm->m_assembler.linkJump(m_jmp, label.m_label); } - void enableLatePatch() - { - m_jmp.enableLatePatch(); - } - private: JmpSrc m_jmp; }; @@ -378,6 +368,8 @@ public: friend class LinkBuffer; public: + typedef Vector JumpVector; + void link(AbstractMacroAssembler* masm) { size_t size = m_jumps.size(); @@ -408,9 +400,11 @@ public: { return !m_jumps.size(); } + + const JumpVector& jumps() { return m_jumps; } private: - Vector m_jumps; + JumpVector m_jumps; }; diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h b/src/3rdparty/webkit/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h index f15b7f3..af3c3be 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/AssemblerBufferWithConstantPool.h @@ -34,6 +34,8 @@ #include "AssemblerBuffer.h" #include +#define ASSEMBLER_HAS_CONSTANT_POOL 1 + namespace JSC { /* @@ -84,7 +86,7 @@ namespace JSC { template class AssemblerBufferWithConstantPool: public AssemblerBuffer { - typedef WTF::SegmentedVector LoadOffsets; + typedef SegmentedVector LoadOffsets; public: enum { UniqueConst, @@ -177,6 +179,11 @@ public: return AssemblerBuffer::size(); } + int uncheckedSize() + { + return AssemblerBuffer::size(); + } + void* executableCopy(ExecutablePool* allocator) { flushConstantPool(false); @@ -207,10 +214,10 @@ public: } // This flushing mechanism can be called after any unconditional jumps. - void flushWithoutBarrier() + void flushWithoutBarrier(bool isForced = false) { // Flush if constant pool is more than 60% full to avoid overuse of this function. - if (5 * m_numConsts > 3 * maxPoolSize / sizeof(uint32_t)) + if (isForced || 5 * m_numConsts > 3 * maxPoolSize / sizeof(uint32_t)) flushConstantPool(false); } @@ -219,6 +226,11 @@ public: return m_pool; } + int sizeOfConstantPool() + { + return m_numConsts; + } + private: void correctDeltas(int insnSize) { @@ -276,7 +288,8 @@ private: { if (m_numConsts == 0) return; - if ((m_maxDistance < nextInsnSize + m_lastConstDelta + barrierSize + (int)sizeof(uint32_t))) + int lastConstDelta = m_lastConstDelta > nextInsnSize ? m_lastConstDelta - nextInsnSize : 0; + if ((m_maxDistance < nextInsnSize + lastConstDelta + barrierSize + (int)sizeof(uint32_t))) flushConstantPool(); } @@ -284,8 +297,8 @@ private: { if (m_numConsts == 0) return; - if ((m_maxDistance < nextInsnSize + m_lastConstDelta + barrierSize + (int)sizeof(uint32_t)) || - (m_numConsts + nextConstSize / sizeof(uint32_t) >= maxPoolSize)) + if ((m_maxDistance < nextInsnSize + m_lastConstDelta + nextConstSize + barrierSize + (int)sizeof(uint32_t)) || + (m_numConsts * sizeof(uint32_t) + nextConstSize >= maxPoolSize)) flushConstantPool(); } diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.cpp b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.cpp new file mode 100644 index 0000000..33fac64 --- /dev/null +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.cpp @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2009 University of Szeged + * 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 UNIVERSITY OF SZEGED ``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 UNIVERSITY OF SZEGED 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. + */ + +#include "config.h" + +#if ENABLE(ASSEMBLER) && PLATFORM(ARM) && !PLATFORM_ARM_ARCH(7) + +#include "MacroAssemblerARM.h" + +#if PLATFORM(LINUX) +#include +#include +#include +#include +#include +#include +#endif + +namespace JSC { + +static bool isVFPPresent() +{ +#if PLATFORM(LINUX) + int fd = open("/proc/self/auxv", O_RDONLY); + if (fd > 0) { + Elf32_auxv_t aux; + while (read(fd, &aux, sizeof(Elf32_auxv_t))) { + if (aux.a_type == AT_HWCAP) { + close(fd); + return aux.a_un.a_val & HWCAP_VFP; + } + } + close(fd); + } +#endif + + return false; +} + +const bool MacroAssemblerARM::s_isVFPPresent = isVFPPresent(); + +} + +#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM) && !PLATFORM_ARM_ARCH(7) diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h index 27879a9..4a7c10a 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) +#if ENABLE(ASSEMBLER) && PLATFORM(ARM) && !PLATFORM_ARM_ARCH(7) #include "ARMAssembler.h" #include "AbstractMacroAssembler.h" @@ -57,15 +57,14 @@ public: }; enum DoubleCondition { - DoubleEqual, //FIXME - DoubleNotEqual, //FIXME - DoubleGreaterThan, //FIXME - DoubleGreaterThanOrEqual, //FIXME - DoubleLessThan, //FIXME - DoubleLessThanOrEqual, //FIXME + DoubleEqual = ARMAssembler::EQ, + DoubleGreaterThan = ARMAssembler::GT, + DoubleGreaterThanOrEqual = ARMAssembler::GE, + DoubleLessThan = ARMAssembler::LT, + DoubleLessThanOrEqual = ARMAssembler::LE, }; - static const RegisterID stackPointerRegister = ARM::sp; + static const RegisterID stackPointerRegister = ARMRegisters::sp; static const Scale ScalePtr = TimesFour; @@ -76,20 +75,20 @@ public: void add32(Imm32 imm, Address address) { - load32(address, ARM::S1); - add32(imm, ARM::S1); - store32(ARM::S1, address); + load32(address, ARMRegisters::S1); + add32(imm, ARMRegisters::S1); + store32(ARMRegisters::S1, address); } void add32(Imm32 imm, RegisterID dest) { - m_assembler.adds_r(dest, dest, m_assembler.getImm(imm.m_value, ARM::S0)); + m_assembler.adds_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); } void add32(Address src, RegisterID dest) { - load32(src, ARM::S1); - add32(ARM::S1, dest); + load32(src, ARMRegisters::S1); + add32(ARMRegisters::S1, dest); } void and32(RegisterID src, RegisterID dest) @@ -99,7 +98,7 @@ public: void and32(Imm32 imm, RegisterID dest) { - ARMWord w = m_assembler.getImm(imm.m_value, ARM::S0, true); + ARMWord w = m_assembler.getImm(imm.m_value, ARMRegisters::S0, true); if (w & ARMAssembler::OP2_INV_IMM) m_assembler.bics_r(dest, dest, w & ~ARMAssembler::OP2_INV_IMM); else @@ -119,16 +118,16 @@ public: void mul32(RegisterID src, RegisterID dest) { if (src == dest) { - move(src, ARM::S0); - src = ARM::S0; + move(src, ARMRegisters::S0); + src = ARMRegisters::S0; } m_assembler.muls_r(dest, dest, src); } void mul32(Imm32 imm, RegisterID src, RegisterID dest) { - move(imm, ARM::S0); - m_assembler.muls_r(dest, src, ARM::S0); + move(imm, ARMRegisters::S0); + m_assembler.muls_r(dest, src, ARMRegisters::S0); } void not32(RegisterID dest) @@ -143,7 +142,7 @@ public: void or32(Imm32 imm, RegisterID dest) { - m_assembler.orrs_r(dest, dest, m_assembler.getImm(imm.m_value, ARM::S0)); + m_assembler.orrs_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); } void rshift32(RegisterID shift_amount, RegisterID dest) @@ -163,20 +162,20 @@ public: void sub32(Imm32 imm, RegisterID dest) { - m_assembler.subs_r(dest, dest, m_assembler.getImm(imm.m_value, ARM::S0)); + m_assembler.subs_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); } void sub32(Imm32 imm, Address address) { - load32(address, ARM::S1); - sub32(imm, ARM::S1); - store32(ARM::S1, address); + load32(address, ARMRegisters::S1); + sub32(imm, ARMRegisters::S1); + store32(ARMRegisters::S1, address); } void sub32(Address src, RegisterID dest) { - load32(src, ARM::S1); - sub32(ARM::S1, dest); + load32(src, ARMRegisters::S1); + sub32(ARMRegisters::S1, dest); } void xor32(RegisterID src, RegisterID dest) @@ -186,7 +185,7 @@ public: void xor32(Imm32 imm, RegisterID dest) { - m_assembler.eors_r(dest, dest, m_assembler.getImm(imm.m_value, ARM::S0)); + m_assembler.eors_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); } void load32(ImplicitAddress address, RegisterID dest) @@ -202,8 +201,8 @@ public: DataLabel32 load32WithAddressOffsetPatch(Address address, RegisterID dest) { DataLabel32 dataLabel(this); - m_assembler.ldr_un_imm(ARM::S0, 0); - m_assembler.dtr_ur(true, dest, address.base, ARM::S0); + m_assembler.ldr_un_imm(ARMRegisters::S0, 0); + m_assembler.dtr_ur(true, dest, address.base, ARMRegisters::S0); return dataLabel; } @@ -216,18 +215,18 @@ public: void load16(BaseIndex address, RegisterID dest) { - m_assembler.add_r(ARM::S0, address.base, m_assembler.lsl(address.index, address.scale)); + m_assembler.add_r(ARMRegisters::S0, address.base, m_assembler.lsl(address.index, address.scale)); if (address.offset>=0) - m_assembler.ldrh_u(dest, ARM::S0, ARMAssembler::getOp2Byte(address.offset)); + m_assembler.ldrh_u(dest, ARMRegisters::S0, ARMAssembler::getOp2Byte(address.offset)); else - m_assembler.ldrh_d(dest, ARM::S0, ARMAssembler::getOp2Byte(-address.offset)); + m_assembler.ldrh_d(dest, ARMRegisters::S0, ARMAssembler::getOp2Byte(-address.offset)); } DataLabel32 store32WithAddressOffsetPatch(RegisterID src, Address address) { DataLabel32 dataLabel(this); - m_assembler.ldr_un_imm(ARM::S0, 0); - m_assembler.dtr_ur(false, src, address.base, ARM::S0); + m_assembler.ldr_un_imm(ARMRegisters::S0, 0); + m_assembler.dtr_ur(false, src, address.base, ARMRegisters::S0); return dataLabel; } @@ -243,21 +242,27 @@ public: void store32(Imm32 imm, ImplicitAddress address) { - move(imm, ARM::S1); - store32(ARM::S1, address); + if (imm.m_isPointer) + m_assembler.ldr_un_imm(ARMRegisters::S1, imm.m_value); + else + move(imm, ARMRegisters::S1); + store32(ARMRegisters::S1, address); } void store32(RegisterID src, void* address) { - m_assembler.moveImm(reinterpret_cast(address), ARM::S0); - m_assembler.dtr_u(false, src, ARM::S0, 0); + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); + m_assembler.dtr_u(false, src, ARMRegisters::S0, 0); } void store32(Imm32 imm, void* address) { - m_assembler.moveImm(reinterpret_cast(address), ARM::S0); - m_assembler.moveImm(imm.m_value, ARM::S1); - m_assembler.dtr_u(false, ARM::S1, ARM::S0, 0); + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); + if (imm.m_isPointer) + m_assembler.ldr_un_imm(ARMRegisters::S1, imm.m_value); + else + m_assembler.moveImm(imm.m_value, ARMRegisters::S1); + m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 0); } void pop(RegisterID dest) @@ -272,19 +277,22 @@ public: void push(Address address) { - load32(address, ARM::S1); - push(ARM::S1); + load32(address, ARMRegisters::S1); + push(ARMRegisters::S1); } void push(Imm32 imm) { - move(imm, ARM::S0); - push(ARM::S0); + move(imm, ARMRegisters::S0); + push(ARMRegisters::S0); } void move(Imm32 imm, RegisterID dest) { - m_assembler.moveImm(imm.m_value, dest); + if (imm.m_isPointer) + m_assembler.ldr_un_imm(dest, imm.m_value); + else + m_assembler.moveImm(imm.m_value, dest); } void move(RegisterID src, RegisterID dest) @@ -294,14 +302,14 @@ public: void move(ImmPtr imm, RegisterID dest) { - m_assembler.mov_r(dest, m_assembler.getImm(reinterpret_cast(imm.m_value), ARM::S0)); + move(Imm32(imm), dest); } void swap(RegisterID reg1, RegisterID reg2) { - m_assembler.mov_r(ARM::S0, reg1); + m_assembler.mov_r(ARMRegisters::S0, reg1); m_assembler.mov_r(reg1, reg2); - m_assembler.mov_r(reg2, ARM::S0); + m_assembler.mov_r(reg2, ARMRegisters::S0); } void signExtend32ToPtr(RegisterID src, RegisterID dest) @@ -316,40 +324,44 @@ public: move(src, dest); } - Jump branch32(Condition cond, RegisterID left, RegisterID right) + Jump branch32(Condition cond, RegisterID left, RegisterID right, int useConstantPool = 0) { m_assembler.cmp_r(left, right); - return Jump(m_assembler.jmp(ARMCondition(cond))); + return Jump(m_assembler.jmp(ARMCondition(cond), useConstantPool)); } - Jump branch32(Condition cond, RegisterID left, Imm32 right) + Jump branch32(Condition cond, RegisterID left, Imm32 right, int useConstantPool = 0) { - m_assembler.cmp_r(left, m_assembler.getImm(right.m_value, ARM::S0)); - return Jump(m_assembler.jmp(ARMCondition(cond))); + if (right.m_isPointer) { + m_assembler.ldr_un_imm(ARMRegisters::S0, right.m_value); + m_assembler.cmp_r(left, ARMRegisters::S0); + } else + m_assembler.cmp_r(left, m_assembler.getImm(right.m_value, ARMRegisters::S0)); + return Jump(m_assembler.jmp(ARMCondition(cond), useConstantPool)); } Jump branch32(Condition cond, RegisterID left, Address right) { - load32(right, ARM::S1); - return branch32(cond, left, ARM::S1); + load32(right, ARMRegisters::S1); + return branch32(cond, left, ARMRegisters::S1); } Jump branch32(Condition cond, Address left, RegisterID right) { - load32(left, ARM::S1); - return branch32(cond, ARM::S1, right); + load32(left, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); } Jump branch32(Condition cond, Address left, Imm32 right) { - load32(left, ARM::S1); - return branch32(cond, ARM::S1, right); + load32(left, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); } Jump branch32(Condition cond, BaseIndex left, Imm32 right) { - load32(left, ARM::S1); - return branch32(cond, ARM::S1, right); + load32(left, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); } Jump branch16(Condition cond, BaseIndex left, RegisterID right) @@ -363,9 +375,9 @@ public: Jump branch16(Condition cond, BaseIndex left, Imm32 right) { - load16(left, ARM::S0); - move(right, ARM::S1); - m_assembler.cmp_r(ARM::S0, ARM::S1); + load16(left, ARMRegisters::S0); + move(right, ARMRegisters::S1); + m_assembler.cmp_r(ARMRegisters::S0, ARMRegisters::S1); return m_assembler.jmp(ARMCondition(cond)); } @@ -379,9 +391,9 @@ public: Jump branchTest32(Condition cond, RegisterID reg, Imm32 mask = Imm32(-1)) { ASSERT((cond == Zero) || (cond == NonZero)); - ARMWord w = m_assembler.getImm(mask.m_value, ARM::S0, true); + ARMWord w = m_assembler.getImm(mask.m_value, ARMRegisters::S0, true); if (w & ARMAssembler::OP2_INV_IMM) - m_assembler.bics_r(ARM::S0, reg, w & ~ARMAssembler::OP2_INV_IMM); + m_assembler.bics_r(ARMRegisters::S0, reg, w & ~ARMAssembler::OP2_INV_IMM); else m_assembler.tst_r(reg, w); return Jump(m_assembler.jmp(ARMCondition(cond))); @@ -389,14 +401,14 @@ public: Jump branchTest32(Condition cond, Address address, Imm32 mask = Imm32(-1)) { - load32(address, ARM::S1); - return branchTest32(cond, ARM::S1, mask); + load32(address, ARMRegisters::S1); + return branchTest32(cond, ARMRegisters::S1, mask); } Jump branchTest32(Condition cond, BaseIndex address, Imm32 mask = Imm32(-1)) { - load32(address, ARM::S1); - return branchTest32(cond, ARM::S1, mask); + load32(address, ARMRegisters::S1); + return branchTest32(cond, ARMRegisters::S1, mask); } Jump jump() @@ -406,12 +418,12 @@ public: void jump(RegisterID target) { - move(target, ARM::pc); + move(target, ARMRegisters::pc); } void jump(Address address) { - load32(address, ARM::pc); + load32(address, ARMRegisters::pc); } Jump branchAdd32(Condition cond, RegisterID src, RegisterID dest) @@ -431,11 +443,11 @@ public: void mull32(RegisterID src1, RegisterID src2, RegisterID dest) { if (src1 == dest) { - move(src1, ARM::S0); - src1 = ARM::S0; + move(src1, ARMRegisters::S0); + src1 = ARMRegisters::S0; } - m_assembler.mull_r(ARM::S1, dest, src2, src1); - m_assembler.cmp_r(ARM::S1, m_assembler.asr(dest, 31)); + m_assembler.mull_r(ARMRegisters::S1, dest, src2, src1); + m_assembler.cmp_r(ARMRegisters::S1, m_assembler.asr(dest, 31)); } Jump branchMul32(Condition cond, RegisterID src, RegisterID dest) @@ -454,8 +466,8 @@ public: { ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); if (cond == Overflow) { - move(imm, ARM::S0); - mull32(ARM::S0, src, dest); + move(imm, ARMRegisters::S0); + mull32(ARMRegisters::S0, src, dest); cond = NonZero; } else @@ -485,13 +497,13 @@ public: Call nearCall() { prepareCall(); - return Call(m_assembler.jmp(), Call::LinkableNear); + return Call(m_assembler.jmp(ARMAssembler::AL, true), Call::LinkableNear); } Call call(RegisterID target) { prepareCall(); - move(ARM::pc, target); + move(ARMRegisters::pc, target); JmpSrc jmpSrc; return Call(jmpSrc, Call::None); } @@ -503,7 +515,7 @@ public: void ret() { - pop(ARM::pc); + pop(ARMRegisters::pc); } void set32(Condition cond, RegisterID left, RegisterID right, RegisterID dest) @@ -515,67 +527,67 @@ public: void set32(Condition cond, RegisterID left, Imm32 right, RegisterID dest) { - m_assembler.cmp_r(left, m_assembler.getImm(right.m_value, ARM::S0)); + m_assembler.cmp_r(left, m_assembler.getImm(right.m_value, ARMRegisters::S0)); m_assembler.mov_r(dest, ARMAssembler::getOp2(0)); m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond)); } void setTest32(Condition cond, Address address, Imm32 mask, RegisterID dest) { - load32(address, ARM::S1); + load32(address, ARMRegisters::S1); if (mask.m_value == -1) - m_assembler.cmp_r(0, ARM::S1); + m_assembler.cmp_r(0, ARMRegisters::S1); else - m_assembler.tst_r(ARM::S1, m_assembler.getImm(mask.m_value, ARM::S0)); + m_assembler.tst_r(ARMRegisters::S1, m_assembler.getImm(mask.m_value, ARMRegisters::S0)); m_assembler.mov_r(dest, ARMAssembler::getOp2(0)); m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond)); } void add32(Imm32 imm, RegisterID src, RegisterID dest) { - m_assembler.add_r(dest, src, m_assembler.getImm(imm.m_value, ARM::S0)); + m_assembler.add_r(dest, src, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); } void add32(Imm32 imm, AbsoluteAddress address) { - m_assembler.moveImm(reinterpret_cast(address.m_ptr), ARM::S1); - m_assembler.dtr_u(true, ARM::S1, ARM::S1, 0); - add32(imm, ARM::S1); - m_assembler.moveImm(reinterpret_cast(address.m_ptr), ARM::S0); - m_assembler.dtr_u(false, ARM::S1, ARM::S0, 0); + m_assembler.ldr_un_imm(ARMRegisters::S1, reinterpret_cast(address.m_ptr)); + m_assembler.dtr_u(true, ARMRegisters::S1, ARMRegisters::S1, 0); + add32(imm, ARMRegisters::S1); + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address.m_ptr)); + m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 0); } void sub32(Imm32 imm, AbsoluteAddress address) { - m_assembler.moveImm(reinterpret_cast(address.m_ptr), ARM::S1); - m_assembler.dtr_u(true, ARM::S1, ARM::S1, 0); - sub32(imm, ARM::S1); - m_assembler.moveImm(reinterpret_cast(address.m_ptr), ARM::S0); - m_assembler.dtr_u(false, ARM::S1, ARM::S0, 0); + m_assembler.ldr_un_imm(ARMRegisters::S1, reinterpret_cast(address.m_ptr)); + m_assembler.dtr_u(true, ARMRegisters::S1, ARMRegisters::S1, 0); + sub32(imm, ARMRegisters::S1); + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address.m_ptr)); + m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 0); } void load32(void* address, RegisterID dest) { - m_assembler.moveImm(reinterpret_cast(address), ARM::S0); - m_assembler.dtr_u(true, dest, ARM::S0, 0); + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); + m_assembler.dtr_u(true, dest, ARMRegisters::S0, 0); } Jump branch32(Condition cond, AbsoluteAddress left, RegisterID right) { - load32(left.m_ptr, ARM::S1); - return branch32(cond, ARM::S1, right); + load32(left.m_ptr, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); } Jump branch32(Condition cond, AbsoluteAddress left, Imm32 right) { - load32(left.m_ptr, ARM::S1); - return branch32(cond, ARM::S1, right); + load32(left.m_ptr, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); } Call call() { prepareCall(); - return Call(m_assembler.jmp(), Call::Linkable); + return Call(m_assembler.jmp(ARMAssembler::AL, true), Call::Linkable); } Call tailRecursiveCall() @@ -597,25 +609,23 @@ public: Jump branchPtrWithPatch(Condition cond, RegisterID left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0)) { - dataLabel = moveWithPatch(initialRightValue, ARM::S1); - Jump jump = branch32(cond, left, ARM::S1); - jump.enableLatePatch(); + dataLabel = moveWithPatch(initialRightValue, ARMRegisters::S1); + Jump jump = branch32(cond, left, ARMRegisters::S1, true); return jump; } Jump branchPtrWithPatch(Condition cond, Address left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0)) { - load32(left, ARM::S1); - dataLabel = moveWithPatch(initialRightValue, ARM::S0); - Jump jump = branch32(cond, ARM::S0, ARM::S1); - jump.enableLatePatch(); + load32(left, ARMRegisters::S1); + dataLabel = moveWithPatch(initialRightValue, ARMRegisters::S0); + Jump jump = branch32(cond, ARMRegisters::S0, ARMRegisters::S1, true); return jump; } DataLabelPtr storePtrWithPatch(ImmPtr initialValue, ImplicitAddress address) { - DataLabelPtr dataLabel = moveWithPatch(initialValue, ARM::S1); - store32(ARM::S1, address); + DataLabelPtr dataLabel = moveWithPatch(initialValue, ARMRegisters::S1); + store32(ARMRegisters::S1, address); return dataLabel; } @@ -627,7 +637,7 @@ public: // Floating point operators bool supportsFloatingPoint() const { - return false; + return s_isVFPPresent; } bool supportsFloatingPointTruncate() const @@ -637,74 +647,58 @@ public: void loadDouble(ImplicitAddress address, FPRegisterID dest) { - UNUSED_PARAM(address); - UNUSED_PARAM(dest); - ASSERT_NOT_REACHED(); + m_assembler.doubleTransfer(true, dest, address.base, address.offset); } void storeDouble(FPRegisterID src, ImplicitAddress address) { - UNUSED_PARAM(src); - UNUSED_PARAM(address); - ASSERT_NOT_REACHED(); + m_assembler.doubleTransfer(false, src, address.base, address.offset); } void addDouble(FPRegisterID src, FPRegisterID dest) { - UNUSED_PARAM(src); - UNUSED_PARAM(dest); - ASSERT_NOT_REACHED(); + m_assembler.faddd_r(dest, dest, src); } void addDouble(Address src, FPRegisterID dest) { - UNUSED_PARAM(src); - UNUSED_PARAM(dest); - ASSERT_NOT_REACHED(); + loadDouble(src, ARMRegisters::SD0); + addDouble(ARMRegisters::SD0, dest); } void subDouble(FPRegisterID src, FPRegisterID dest) { - UNUSED_PARAM(src); - UNUSED_PARAM(dest); - ASSERT_NOT_REACHED(); + m_assembler.fsubd_r(dest, dest, src); } void subDouble(Address src, FPRegisterID dest) { - UNUSED_PARAM(src); - UNUSED_PARAM(dest); - ASSERT_NOT_REACHED(); + loadDouble(src, ARMRegisters::SD0); + subDouble(ARMRegisters::SD0, dest); } void mulDouble(FPRegisterID src, FPRegisterID dest) { - UNUSED_PARAM(src); - UNUSED_PARAM(dest); - ASSERT_NOT_REACHED(); + m_assembler.fmuld_r(dest, dest, src); } void mulDouble(Address src, FPRegisterID dest) { - UNUSED_PARAM(src); - UNUSED_PARAM(dest); - ASSERT_NOT_REACHED(); + loadDouble(src, ARMRegisters::SD0); + mulDouble(ARMRegisters::SD0, dest); } void convertInt32ToDouble(RegisterID src, FPRegisterID dest) { - UNUSED_PARAM(src); - UNUSED_PARAM(dest); - ASSERT_NOT_REACHED(); + m_assembler.fmsr_r(dest, src); + m_assembler.fsitod_r(dest, dest); } Jump branchDouble(DoubleCondition cond, FPRegisterID left, FPRegisterID right) { - UNUSED_PARAM(cond); - UNUSED_PARAM(left); - UNUSED_PARAM(right); - ASSERT_NOT_REACHED(); - return jump(); + m_assembler.fcmpd_r(left, right); + m_assembler.fmstat(); + return Jump(m_assembler.jmp(static_cast(cond))); } // Truncates 'src' to an integer, and places the resulting 'dest'. @@ -725,46 +719,56 @@ protected: return static_cast(cond); } + void ensureSpace(int insnSpace, int constSpace) + { + m_assembler.ensureSpace(insnSpace, constSpace); + } + + int sizeOfConstantPool() + { + return m_assembler.sizeOfConstantPool(); + } + void prepareCall() { - m_assembler.ensureSpace(3 * sizeof(ARMWord), sizeof(ARMWord)); + ensureSpace(3 * sizeof(ARMWord), sizeof(ARMWord)); // S0 might be used for parameter passing - m_assembler.add_r(ARM::S1, ARM::pc, ARMAssembler::OP2_IMM | 0x4); - m_assembler.push_r(ARM::S1); + m_assembler.add_r(ARMRegisters::S1, ARMRegisters::pc, ARMAssembler::OP2_IMM | 0x4); + m_assembler.push_r(ARMRegisters::S1); } void call32(RegisterID base, int32_t offset) { - if (base == ARM::sp) + if (base == ARMRegisters::sp) offset += 4; if (offset >= 0) { if (offset <= 0xfff) { prepareCall(); - m_assembler.dtr_u(true, ARM::pc, base, offset); + m_assembler.dtr_u(true, ARMRegisters::pc, base, offset); } else if (offset <= 0xfffff) { - m_assembler.add_r(ARM::S0, base, ARMAssembler::OP2_IMM | (offset >> 12) | (10 << 8)); + m_assembler.add_r(ARMRegisters::S0, base, ARMAssembler::OP2_IMM | (offset >> 12) | (10 << 8)); prepareCall(); - m_assembler.dtr_u(true, ARM::pc, ARM::S0, offset & 0xfff); + m_assembler.dtr_u(true, ARMRegisters::pc, ARMRegisters::S0, offset & 0xfff); } else { - ARMWord reg = m_assembler.getImm(offset, ARM::S0); + ARMWord reg = m_assembler.getImm(offset, ARMRegisters::S0); prepareCall(); - m_assembler.dtr_ur(true, ARM::pc, base, reg); + m_assembler.dtr_ur(true, ARMRegisters::pc, base, reg); } } else { offset = -offset; if (offset <= 0xfff) { prepareCall(); - m_assembler.dtr_d(true, ARM::pc, base, offset); + m_assembler.dtr_d(true, ARMRegisters::pc, base, offset); } else if (offset <= 0xfffff) { - m_assembler.sub_r(ARM::S0, base, ARMAssembler::OP2_IMM | (offset >> 12) | (10 << 8)); + m_assembler.sub_r(ARMRegisters::S0, base, ARMAssembler::OP2_IMM | (offset >> 12) | (10 << 8)); prepareCall(); - m_assembler.dtr_d(true, ARM::pc, ARM::S0, offset & 0xfff); + m_assembler.dtr_d(true, ARMRegisters::pc, ARMRegisters::S0, offset & 0xfff); } else { - ARMWord reg = m_assembler.getImm(offset, ARM::S0); + ARMWord reg = m_assembler.getImm(offset, ARMRegisters::S0); prepareCall(); - m_assembler.dtr_dr(true, ARM::pc, base, reg); + m_assembler.dtr_dr(true, ARMRegisters::pc, base, reg); } } } @@ -788,10 +792,11 @@ private: ARMAssembler::relinkCall(call.dataLocation(), destination.executableAddress()); } + static const bool s_isVFPPresent; }; } -#endif +#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM) && !PLATFORM_ARM_ARCH(7) #endif // MacroAssemblerARM_h diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h index f7a8402..999056b 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h @@ -39,9 +39,9 @@ class MacroAssemblerARMv7 : public AbstractMacroAssembler { // FIXME: switch dataTempRegister & addressTempRegister, or possibly use r7? // - dTR is likely used more than aTR, and we'll get better instruction // encoding if it's in the low 8 registers. - static const ARM::RegisterID dataTempRegister = ARM::ip; - static const RegisterID addressTempRegister = ARM::r3; - static const FPRegisterID fpTempRegister = ARM::d7; + static const ARMRegisters::RegisterID dataTempRegister = ARMRegisters::ip; + static const RegisterID addressTempRegister = ARMRegisters::r3; + static const FPRegisterID fpTempRegister = ARMRegisters::d7; struct ArmAddress { enum AddressType { @@ -102,8 +102,8 @@ public: DoubleLessThanOrEqual = ARMv7Assembler::ConditionLS, }; - static const RegisterID stackPointerRegister = ARM::sp; - static const RegisterID linkRegister = ARM::lr; + static const RegisterID stackPointerRegister = ARMRegisters::sp; + static const RegisterID linkRegister = ARMRegisters::lr; // Integer arithmetic operations: // @@ -532,6 +532,7 @@ public: Jump branchTruncateDoubleToInt32(FPRegisterID, RegisterID) { ASSERT_NOT_REACHED(); + return jump(); } @@ -546,13 +547,13 @@ public: void pop(RegisterID dest) { // store postindexed with writeback - m_assembler.ldr(dest, ARM::sp, sizeof(void*), false, true); + m_assembler.ldr(dest, ARMRegisters::sp, sizeof(void*), false, true); } void push(RegisterID src) { // store preindexed with writeback - m_assembler.str(src, ARM::sp, -sizeof(void*), true, true); + m_assembler.str(src, ARMRegisters::sp, -sizeof(void*), true, true); } void push(Address address) @@ -1038,7 +1039,7 @@ protected: return addressTempRegister; } - DataLabel32 moveFixedWidthEncoding(Imm32 imm, RegisterID dst) + void moveFixedWidthEncoding(Imm32 imm, RegisterID dst) { uint32_t value = imm.m_value; m_assembler.movT3(dst, ARMThumbImmediate::makeUInt16(value & 0xffff)); diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86.h index 0b9ff35..6e96240 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86.h @@ -51,6 +51,8 @@ public: using MacroAssemblerX86Common::store32; using MacroAssemblerX86Common::branch32; using MacroAssemblerX86Common::call; + using MacroAssemblerX86Common::loadDouble; + using MacroAssemblerX86Common::convertInt32ToDouble; void add32(Imm32 imm, RegisterID src, RegisterID dest) { @@ -87,6 +89,17 @@ public: m_assembler.movl_mr(address, dest); } + void loadDouble(void* address, FPRegisterID dest) + { + ASSERT(isSSE2Present()); + m_assembler.movsd_mr(address, dest); + } + + void convertInt32ToDouble(AbsoluteAddress src, FPRegisterID dest) + { + m_assembler.cvtsi2sd_mr(src.m_ptr, dest); + } + void store32(Imm32 imm, void* address) { m_assembler.movl_i32m(imm.m_value, address); diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86Common.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86Common.h index cea691e..61e0e17 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86Common.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86Common.h @@ -57,13 +57,14 @@ public: enum DoubleCondition { DoubleEqual = X86Assembler::ConditionE, + DoubleNotEqual = X86Assembler::ConditionNE, DoubleGreaterThan = X86Assembler::ConditionA, DoubleGreaterThanOrEqual = X86Assembler::ConditionAE, DoubleLessThan = X86Assembler::ConditionB, DoubleLessThanOrEqual = X86Assembler::ConditionBE, }; - static const RegisterID stackPointerRegister = X86::esp; + static const RegisterID stackPointerRegister = X86Registers::esp; // Integer arithmetic operations: // @@ -91,6 +92,11 @@ public: { m_assembler.addl_mr(src.offset, src.base, dest); } + + void add32(RegisterID src, Address dest) + { + m_assembler.addl_rm(src, dest.offset, dest.base); + } void and32(RegisterID src, RegisterID dest) { @@ -102,6 +108,16 @@ public: m_assembler.andl_ir(imm.m_value, dest); } + void and32(RegisterID src, Address dest) + { + m_assembler.andl_rm(src, dest.offset, dest.base); + } + + void and32(Address src, RegisterID dest) + { + m_assembler.andl_mr(src.offset, src.base, dest); + } + void and32(Imm32 imm, Address address) { m_assembler.andl_im(imm.m_value, address.offset, address.base); @@ -116,20 +132,20 @@ public: { // 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 != X86::ecx) { - swap(shift_amount, X86::ecx); + 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.shll_CLr(X86::ecx); + m_assembler.shll_CLr(X86Registers::ecx); // E.g. transform "shll %eax, %ecx" -> "xchgl %eax, %ecx; shll %ecx, %eax; xchgl %eax, %ecx" - else if (dest == X86::ecx) + else if (dest == X86Registers::ecx) m_assembler.shll_CLr(shift_amount); // E.g. transform "shll %eax, %ebx" -> "xchgl %eax, %ecx; shll %ecx, %ebx; xchgl %eax, %ecx" else m_assembler.shll_CLr(dest); - swap(shift_amount, X86::ecx); + swap(shift_amount, X86Registers::ecx); } else m_assembler.shll_CLr(dest); } @@ -138,16 +154,36 @@ public: { m_assembler.imull_rr(src, dest); } + + void mul32(Address src, RegisterID dest) + { + m_assembler.imull_mr(src.offset, src.base, dest); + } void mul32(Imm32 imm, RegisterID src, RegisterID dest) { m_assembler.imull_i32r(src, imm.m_value, dest); } - + + void neg32(RegisterID srcDest) + { + m_assembler.negl_r(srcDest); + } + + void neg32(Address srcDest) + { + m_assembler.negl_m(srcDest.offset, srcDest.base); + } + void not32(RegisterID srcDest) { m_assembler.notl_r(srcDest); } + + void not32(Address srcDest) + { + m_assembler.notl_m(srcDest.offset, srcDest.base); + } void or32(RegisterID src, RegisterID dest) { @@ -159,6 +195,16 @@ public: m_assembler.orl_ir(imm.m_value, dest); } + void or32(RegisterID src, Address dest) + { + m_assembler.orl_rm(src, dest.offset, dest.base); + } + + void or32(Address src, RegisterID dest) + { + m_assembler.orl_mr(src.offset, src.base, dest); + } + void or32(Imm32 imm, Address address) { m_assembler.orl_im(imm.m_value, address.offset, address.base); @@ -168,20 +214,20 @@ public: { // 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 != X86::ecx) { - swap(shift_amount, X86::ecx); + 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.sarl_CLr(X86::ecx); + m_assembler.sarl_CLr(X86Registers::ecx); // E.g. transform "shll %eax, %ecx" -> "xchgl %eax, %ecx; shll %ecx, %eax; xchgl %eax, %ecx" - else if (dest == X86::ecx) + else if (dest == X86Registers::ecx) m_assembler.sarl_CLr(shift_amount); // E.g. transform "shll %eax, %ebx" -> "xchgl %eax, %ecx; shll %ecx, %ebx; xchgl %eax, %ecx" else m_assembler.sarl_CLr(dest); - swap(shift_amount, X86::ecx); + swap(shift_amount, X86Registers::ecx); } else m_assembler.sarl_CLr(dest); } @@ -211,14 +257,35 @@ public: m_assembler.subl_mr(src.offset, src.base, dest); } + void sub32(RegisterID src, Address dest) + { + m_assembler.subl_rm(src, dest.offset, dest.base); + } + + void xor32(RegisterID src, RegisterID dest) { m_assembler.xorl_rr(src, dest); } - void xor32(Imm32 imm, RegisterID srcDest) + void xor32(Imm32 imm, Address dest) { - m_assembler.xorl_ir(imm.m_value, srcDest); + m_assembler.xorl_im(imm.m_value, dest.offset, dest.base); + } + + void xor32(Imm32 imm, RegisterID dest) + { + m_assembler.xorl_ir(imm.m_value, dest); + } + + void xor32(RegisterID src, Address dest) + { + m_assembler.xorl_rm(src, dest.offset, dest.base); + } + + void xor32(Address src, RegisterID dest) + { + m_assembler.xorl_mr(src.offset, src.base, dest); } @@ -300,6 +367,18 @@ public: m_assembler.addsd_mr(src.offset, src.base, dest); } + void divDouble(FPRegisterID src, FPRegisterID dest) + { + ASSERT(isSSE2Present()); + m_assembler.divsd_rr(src, dest); + } + + void divDouble(Address src, FPRegisterID dest) + { + ASSERT(isSSE2Present()); + m_assembler.divsd_mr(src.offset, src.base, dest); + } + void subDouble(FPRegisterID src, FPRegisterID dest) { ASSERT(isSSE2Present()); @@ -330,6 +409,11 @@ public: m_assembler.cvtsi2sd_rr(src, dest); } + void convertInt32ToDouble(Address src, FPRegisterID dest) + { + m_assembler.cvtsi2sd_mr(src.offset, src.base, dest); + } + Jump branchDouble(DoubleCondition cond, FPRegisterID left, FPRegisterID right) { ASSERT(isSSE2Present()); @@ -337,6 +421,12 @@ public: 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))); + } + // Truncates '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 @@ -348,6 +438,12 @@ public: return branch32(Equal, dest, Imm32(0x80000000)); } + void zeroDouble(FPRegisterID srcDest) + { + ASSERT(isSSE2Present()); + m_assembler.xorpd_rr(srcDest, srcDest); + } + // Stack manipulation operations: // @@ -397,15 +493,13 @@ public: { // Note: on 64-bit this is is a full register move; perhaps it would be // useful to have separate move32 & movePtr, with move32 zero extending? - m_assembler.movq_rr(src, dest); + if (src != dest) + m_assembler.movq_rr(src, dest); } void move(ImmPtr imm, RegisterID dest) { - if (CAN_SIGN_EXTEND_U32_64(imm.asIntptr())) - m_assembler.movl_i32r(static_cast(imm.asIntptr()), dest); - else - m_assembler.movq_i64r(imm.asIntptr(), dest); + m_assembler.movq_i64r(imm.asIntptr(), dest); } void swap(RegisterID reg1, RegisterID reg2) @@ -605,12 +699,40 @@ public: return Jump(m_assembler.jCC(x86Condition(cond))); } + Jump branchAdd32(Condition cond, Imm32 src, Address dest) + { + ASSERT((cond == Overflow) || (cond == Zero) || (cond == NonZero)); + add32(src, dest); + return Jump(m_assembler.jCC(x86Condition(cond))); + } + + Jump branchAdd32(Condition cond, RegisterID src, Address dest) + { + ASSERT((cond == Overflow) || (cond == Zero) || (cond == NonZero)); + add32(src, dest); + return Jump(m_assembler.jCC(x86Condition(cond))); + } + + Jump branchAdd32(Condition cond, Address src, RegisterID dest) + { + ASSERT((cond == Overflow) || (cond == Zero) || (cond == NonZero)); + add32(src, dest); + return Jump(m_assembler.jCC(x86Condition(cond))); + } + Jump branchMul32(Condition cond, RegisterID src, RegisterID dest) { ASSERT(cond == Overflow); mul32(src, dest); return Jump(m_assembler.jCC(x86Condition(cond))); } + + Jump branchMul32(Condition cond, Address src, RegisterID dest) + { + ASSERT((cond == Overflow) || (cond == Zero) || (cond == NonZero)); + mul32(src, dest); + return Jump(m_assembler.jCC(x86Condition(cond))); + } Jump branchMul32(Condition cond, Imm32 imm, RegisterID src, RegisterID dest) { @@ -632,7 +754,35 @@ public: sub32(imm, dest); return Jump(m_assembler.jCC(x86Condition(cond))); } - + + Jump branchSub32(Condition cond, Imm32 imm, Address dest) + { + ASSERT((cond == Overflow) || (cond == Zero) || (cond == NonZero)); + sub32(imm, dest); + return Jump(m_assembler.jCC(x86Condition(cond))); + } + + Jump branchSub32(Condition cond, RegisterID src, Address dest) + { + ASSERT((cond == Overflow) || (cond == Zero) || (cond == NonZero)); + sub32(src, dest); + return Jump(m_assembler.jCC(x86Condition(cond))); + } + + Jump branchSub32(Condition cond, Address src, RegisterID dest) + { + ASSERT((cond == Overflow) || (cond == Zero) || (cond == NonZero)); + sub32(src, dest); + return Jump(m_assembler.jCC(x86Condition(cond))); + } + + Jump branchOr32(Condition cond, RegisterID src, RegisterID dest) + { + ASSERT((cond == Signed) || (cond == Zero) || (cond == NonZero)); + or32(src, dest); + return Jump(m_assembler.jCC(x86Condition(cond))); + } + // Miscellaneous operations: @@ -661,6 +811,27 @@ public: m_assembler.ret(); } + void set8(Condition cond, RegisterID left, RegisterID right, RegisterID dest) + { + m_assembler.cmpl_rr(right, left); + m_assembler.setCC_r(x86Condition(cond), dest); + } + + void set8(Condition cond, Address left, RegisterID right, RegisterID dest) + { + m_assembler.cmpl_mr(left.offset, left.base, right); + m_assembler.setCC_r(x86Condition(cond), dest); + } + + void set8(Condition cond, RegisterID left, Imm32 right, RegisterID dest) + { + if (((cond == Equal) || (cond == NotEqual)) && !right.m_value) + m_assembler.testl_rr(left, left); + else + m_assembler.cmpl_ir(right.m_value, left); + m_assembler.setCC_r(x86Condition(cond), dest); + } + void set32(Condition cond, RegisterID left, RegisterID right, RegisterID dest) { m_assembler.cmpl_rr(right, left); @@ -682,6 +853,16 @@ public: // The mask should be optional... paerhaps the argument order should be // dest-src, operations always have a dest? ... possibly not true, considering // asm ops like test, or pseudo ops like pop(). + + void setTest8(Condition cond, Address address, Imm32 mask, RegisterID dest) + { + if (mask.m_value == -1) + m_assembler.cmpl_im(0, address.offset, address.base); + else + m_assembler.testl_i32m(mask.m_value, address.offset, address.base); + m_assembler.setCC_r(x86Condition(cond), dest); + } + void setTest32(Condition cond, Address address, Imm32 mask, RegisterID dest) { if (mask.m_value == -1) diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86_64.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86_64.h index df0090a..0f95fe6 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86_64.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86_64.h @@ -38,7 +38,7 @@ namespace JSC { class MacroAssemblerX86_64 : public MacroAssemblerX86Common { protected: - static const X86::RegisterID scratchRegister = X86::r11; + static const X86Registers::RegisterID scratchRegister = X86Registers::r11; public: static const Scale ScalePtr = TimesEight; @@ -50,6 +50,8 @@ public: using MacroAssemblerX86Common::load32; using MacroAssemblerX86Common::store32; using MacroAssemblerX86Common::call; + using MacroAssemblerX86Common::loadDouble; + using MacroAssemblerX86Common::convertInt32ToDouble; void add32(Imm32 imm, AbsoluteAddress address) { @@ -77,21 +79,33 @@ public: void load32(void* address, RegisterID dest) { - if (dest == X86::eax) + if (dest == X86Registers::eax) m_assembler.movl_mEAX(address); else { - move(X86::eax, dest); + move(X86Registers::eax, dest); m_assembler.movl_mEAX(address); - swap(X86::eax, dest); + swap(X86Registers::eax, dest); } } + void loadDouble(void* address, FPRegisterID dest) + { + move(ImmPtr(address), scratchRegister); + loadDouble(scratchRegister, dest); + } + + void convertInt32ToDouble(AbsoluteAddress src, FPRegisterID dest) + { + move(Imm32(*static_cast(src.m_ptr)), scratchRegister); + m_assembler.cvtsi2sd_rr(scratchRegister, dest); + } + void store32(Imm32 imm, void* address) { - move(X86::eax, scratchRegister); - move(imm, X86::eax); + move(X86Registers::eax, scratchRegister); + move(imm, X86Registers::eax); m_assembler.movl_EAXm(address); - move(scratchRegister, X86::eax); + move(scratchRegister, X86Registers::eax); } Call call() @@ -182,20 +196,20 @@ public: { // 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 != X86::ecx) { - swap(shift_amount, X86::ecx); + 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(X86::ecx); + m_assembler.sarq_CLr(X86Registers::ecx); // E.g. transform "shll %eax, %ecx" -> "xchgl %eax, %ecx; shll %ecx, %eax; xchgl %eax, %ecx" - else if (dest == X86::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, X86::ecx); + swap(shift_amount, X86Registers::ecx); } else m_assembler.sarq_CLr(dest); } @@ -244,12 +258,12 @@ public: void loadPtr(void* address, RegisterID dest) { - if (dest == X86::eax) + if (dest == X86Registers::eax) m_assembler.movq_mEAX(address); else { - move(X86::eax, dest); + move(X86Registers::eax, dest); m_assembler.movq_mEAX(address); - swap(X86::eax, dest); + swap(X86Registers::eax, dest); } } @@ -271,24 +285,19 @@ public: void storePtr(RegisterID src, void* address) { - if (src == X86::eax) + if (src == X86Registers::eax) m_assembler.movq_EAXm(address); else { - swap(X86::eax, src); + swap(X86Registers::eax, src); m_assembler.movq_EAXm(address); - swap(X86::eax, src); + swap(X86Registers::eax, src); } } void storePtr(ImmPtr imm, ImplicitAddress address) { - intptr_t ptr = imm.asIntptr(); - if (CAN_SIGN_EXTEND_32_64(ptr)) - m_assembler.movq_i32m(static_cast(ptr), address.offset, address.base); - else { - move(imm, scratchRegister); - storePtr(scratchRegister, address); - } + move(imm, scratchRegister); + storePtr(scratchRegister, address); } DataLabel32 storePtrWithAddressOffsetPatch(RegisterID src, Address address) @@ -325,17 +334,8 @@ public: Jump branchPtr(Condition cond, RegisterID left, ImmPtr right) { - intptr_t imm = right.asIntptr(); - if (CAN_SIGN_EXTEND_32_64(imm)) { - if (!imm) - m_assembler.testq_rr(left, left); - else - m_assembler.cmpq_ir(imm, left); - return Jump(m_assembler.jCC(x86Condition(cond))); - } else { - move(right, scratchRegister); - return branchPtr(cond, left, scratchRegister); - } + move(right, scratchRegister); + return branchPtr(cond, left, scratchRegister); } Jump branchPtr(Condition cond, RegisterID left, Address right) diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/X86Assembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/X86Assembler.h index 745bc60..cbbaaa5 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/X86Assembler.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/X86Assembler.h @@ -38,12 +38,8 @@ namespace JSC { inline bool CAN_SIGN_EXTEND_8_32(int32_t value) { return value == (int32_t)(signed char)value; } -#if PLATFORM(X86_64) -inline bool CAN_SIGN_EXTEND_32_64(intptr_t value) { return value == (intptr_t)(int32_t)value; } -inline bool CAN_SIGN_EXTEND_U32_64(intptr_t value) { return value == (intptr_t)(uint32_t)value; } -#endif -namespace X86 { +namespace X86Registers { typedef enum { eax, ecx, @@ -80,8 +76,8 @@ namespace X86 { class X86Assembler { public: - typedef X86::RegisterID RegisterID; - typedef X86::XMMRegisterID XMMRegisterID; + typedef X86Registers::RegisterID RegisterID; + typedef X86Registers::XMMRegisterID XMMRegisterID; typedef XMMRegisterID FPRegisterID; typedef enum { @@ -114,10 +110,12 @@ private: OP_OR_GvEv = 0x0B, OP_2BYTE_ESCAPE = 0x0F, OP_AND_EvGv = 0x21, + OP_AND_GvEv = 0x23, OP_SUB_EvGv = 0x29, OP_SUB_GvEv = 0x2B, PRE_PREDICT_BRANCH_NOT_TAKEN = 0x2E, OP_XOR_EvGv = 0x31, + OP_XOR_GvEv = 0x33, OP_CMP_EvGv = 0x39, OP_CMP_GvEv = 0x3B, #if PLATFORM(X86_64) @@ -169,6 +167,8 @@ private: OP2_ADDSD_VsdWsd = 0x58, OP2_MULSD_VsdWsd = 0x59, OP2_SUBSD_VsdWsd = 0x5C, + OP2_DIVSD_VsdWsd = 0x5E, + OP2_XORPD_VpdWpd = 0x57, OP2_MOVD_VdEd = 0x6E, OP2_MOVD_EdVd = 0x7E, OP2_JCC_rel32 = 0x80, @@ -205,6 +205,7 @@ private: GROUP3_OP_TEST = 0, GROUP3_OP_NOT = 2, + GROUP3_OP_NEG = 3, GROUP3_OP_IDIV = 7, GROUP5_OP_CALLN = 2, @@ -226,7 +227,6 @@ public: { } - void enableLatePatch() { } private: JmpSrc(int offset) : m_offset(offset) @@ -319,6 +319,11 @@ public: m_formatter.oneByteOp(OP_ADD_GvEv, dst, base, offset); } + void addl_rm(RegisterID src, int offset, RegisterID base) + { + m_formatter.oneByteOp(OP_ADD_EvGv, src, base, offset); + } + void addl_ir(int imm, RegisterID dst) { if (CAN_SIGN_EXTEND_8_32(imm)) { @@ -386,6 +391,16 @@ public: m_formatter.oneByteOp(OP_AND_EvGv, src, dst); } + void andl_mr(int offset, RegisterID base, RegisterID dst) + { + m_formatter.oneByteOp(OP_AND_GvEv, dst, base, offset); + } + + void andl_rm(RegisterID src, int offset, RegisterID base) + { + m_formatter.oneByteOp(OP_AND_EvGv, src, base, offset); + } + void andl_ir(int imm, RegisterID dst) { if (CAN_SIGN_EXTEND_8_32(imm)) { @@ -437,11 +452,26 @@ public: } #endif + void negl_r(RegisterID dst) + { + m_formatter.oneByteOp(OP_GROUP3_Ev, GROUP3_OP_NEG, dst); + } + + void negl_m(int offset, RegisterID base) + { + m_formatter.oneByteOp(OP_GROUP3_Ev, GROUP3_OP_NEG, base, offset); + } + void notl_r(RegisterID dst) { m_formatter.oneByteOp(OP_GROUP3_Ev, GROUP3_OP_NOT, dst); } + void notl_m(int offset, RegisterID base) + { + m_formatter.oneByteOp(OP_GROUP3_Ev, GROUP3_OP_NOT, base, offset); + } + void orl_rr(RegisterID src, RegisterID dst) { m_formatter.oneByteOp(OP_OR_EvGv, src, dst); @@ -452,6 +482,11 @@ public: m_formatter.oneByteOp(OP_OR_GvEv, dst, base, offset); } + void orl_rm(RegisterID src, int offset, RegisterID base) + { + m_formatter.oneByteOp(OP_OR_EvGv, src, base, offset); + } + void orl_ir(int imm, RegisterID dst) { if (CAN_SIGN_EXTEND_8_32(imm)) { @@ -513,6 +548,11 @@ public: m_formatter.oneByteOp(OP_SUB_GvEv, dst, base, offset); } + void subl_rm(RegisterID src, int offset, RegisterID base) + { + m_formatter.oneByteOp(OP_SUB_EvGv, src, base, offset); + } + void subl_ir(int imm, RegisterID dst) { if (CAN_SIGN_EXTEND_8_32(imm)) { @@ -569,6 +609,27 @@ public: m_formatter.oneByteOp(OP_XOR_EvGv, src, dst); } + void xorl_mr(int offset, RegisterID base, RegisterID dst) + { + m_formatter.oneByteOp(OP_XOR_GvEv, dst, base, offset); + } + + void xorl_rm(RegisterID src, int offset, RegisterID base) + { + m_formatter.oneByteOp(OP_XOR_EvGv, src, base, offset); + } + + void xorl_im(int imm, int offset, RegisterID base) + { + if (CAN_SIGN_EXTEND_8_32(imm)) { + m_formatter.oneByteOp(OP_GROUP1_EvIb, GROUP1_OP_XOR, base, offset); + m_formatter.immediate8(imm); + } else { + m_formatter.oneByteOp(OP_GROUP1_EvIz, GROUP1_OP_XOR, base, offset); + m_formatter.immediate32(imm); + } + } + void xorl_ir(int imm, RegisterID dst) { if (CAN_SIGN_EXTEND_8_32(imm)) { @@ -649,7 +710,12 @@ public: { m_formatter.twoByteOp(OP2_IMUL_GvEv, dst, src); } - + + void imull_mr(int offset, RegisterID base, RegisterID dst) + { + m_formatter.twoByteOp(OP2_IMUL_GvEv, dst, base, offset); + } + void imull_i32r(RegisterID src, int32_t value, RegisterID dst) { m_formatter.oneByteOp(OP_IMUL_GvEvIz, dst, src); @@ -1048,7 +1114,7 @@ public: #else void movl_rm(RegisterID src, void* addr) { - if (src == X86::eax) + if (src == X86Registers::eax) movl_EAXm(addr); else m_formatter.oneByteOp(OP_MOV_EvGv, src, addr); @@ -1056,7 +1122,7 @@ public: void movl_mr(void* addr, RegisterID dst) { - if (dst == X86::eax) + if (dst == X86Registers::eax) movl_mEAX(addr); else m_formatter.oneByteOp(OP_MOV_GvEv, dst, addr); @@ -1154,6 +1220,11 @@ public: return m_formatter.immediateRel32(); } + JmpSrc jz() + { + return je(); + } + JmpSrc jl() { m_formatter.twoByteOp(jccRel32(ConditionL)); @@ -1246,6 +1317,20 @@ public: m_formatter.twoByteOp(OP2_CVTSI2SD_VsdEd, (RegisterID)dst, src); } + void cvtsi2sd_mr(int offset, RegisterID base, XMMRegisterID dst) + { + m_formatter.prefix(PRE_SSE_F2); + m_formatter.twoByteOp(OP2_CVTSI2SD_VsdEd, (RegisterID)dst, base, offset); + } + +#if !PLATFORM(X86_64) + void cvtsi2sd_mr(void* address, XMMRegisterID dst) + { + m_formatter.prefix(PRE_SSE_F2); + m_formatter.twoByteOp(OP2_CVTSI2SD_VsdEd, (RegisterID)dst, address); + } +#endif + void cvttsd2si_rr(XMMRegisterID src, RegisterID dst) { m_formatter.prefix(PRE_SSE_F2); @@ -1284,6 +1369,14 @@ public: m_formatter.twoByteOp(OP2_MOVSD_VsdWsd, (RegisterID)dst, base, offset); } +#if !PLATFORM(X86_64) + void movsd_mr(void* address, XMMRegisterID dst) + { + m_formatter.prefix(PRE_SSE_F2); + m_formatter.twoByteOp(OP2_MOVSD_VsdWsd, (RegisterID)dst, address); + } +#endif + void mulsd_rr(XMMRegisterID src, XMMRegisterID dst) { m_formatter.prefix(PRE_SSE_F2); @@ -1321,6 +1414,30 @@ public: m_formatter.twoByteOp(OP2_UCOMISD_VsdWsd, (RegisterID)dst, (RegisterID)src); } + void ucomisd_mr(int offset, RegisterID base, XMMRegisterID dst) + { + m_formatter.prefix(PRE_SSE_66); + m_formatter.twoByteOp(OP2_UCOMISD_VsdWsd, (RegisterID)dst, base, offset); + } + + void divsd_rr(XMMRegisterID src, XMMRegisterID dst) + { + m_formatter.prefix(PRE_SSE_F2); + m_formatter.twoByteOp(OP2_DIVSD_VsdWsd, (RegisterID)dst, (RegisterID)src); + } + + void divsd_mr(int offset, RegisterID base, XMMRegisterID dst) + { + m_formatter.prefix(PRE_SSE_F2); + m_formatter.twoByteOp(OP2_DIVSD_VsdWsd, (RegisterID)dst, base, offset); + } + + void xorpd_rr(XMMRegisterID src, XMMRegisterID dst) + { + m_formatter.prefix(PRE_SSE_66); + m_formatter.twoByteOp(OP2_XORPD_VpdWpd, (RegisterID)dst, (RegisterID)src); + } + // Misc instructions: void int3() @@ -1605,6 +1722,16 @@ private: memoryModRM(reg, base, index, scale, offset); } +#if !PLATFORM(X86_64) + void twoByteOp(TwoByteOpcodeID opcode, int reg, void* address) + { + m_buffer.ensureSpace(maxInstructionSize); + m_buffer.putByteUnchecked(OP_2BYTE_ESCAPE); + m_buffer.putByteUnchecked(opcode); + memoryModRM(reg, address); + } +#endif + #if PLATFORM(X86_64) // Quad-word-sized operands: // @@ -1761,23 +1888,23 @@ private: // Internals; ModRm and REX formatters. - static const RegisterID noBase = X86::ebp; - static const RegisterID hasSib = X86::esp; - static const RegisterID noIndex = X86::esp; + static const RegisterID noBase = X86Registers::ebp; + static const RegisterID hasSib = X86Registers::esp; + static const RegisterID noIndex = X86Registers::esp; #if PLATFORM(X86_64) - static const RegisterID noBase2 = X86::r13; - static const RegisterID hasSib2 = X86::r12; + static const RegisterID noBase2 = X86Registers::r13; + static const RegisterID hasSib2 = X86Registers::r12; // Registers r8 & above require a REX prefixe. inline bool regRequiresRex(int reg) { - return (reg >= X86::r8); + return (reg >= X86Registers::r8); } // Byte operand register spl & above require a REX prefix (to prevent the 'H' registers be accessed). inline bool byteRegRequiresRex(int reg) { - return (reg >= X86::esp); + return (reg >= X86Registers::esp); } // Format a REX prefix byte. diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp index 596d89a..6bac9b9 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.cpp @@ -33,6 +33,8 @@ #include "JIT.h" #include "JSValue.h" #include "Interpreter.h" +#include "JSFunction.h" +#include "JSStaticScopeObject.h" #include "Debugger.h" #include "BytecodeGenerator.h" #include @@ -57,6 +59,9 @@ static UString escapeQuotes(const UString& str) static UString valueToSourceString(ExecState* exec, JSValue val) { + if (!val) + return "0"; + if (val.isString()) { UString result("\""); result += escapeQuotes(val.toString(exec)) + "\""; @@ -227,44 +232,44 @@ static void printGlobalResolveInfo(const GlobalResolveInfo& resolveInfo, unsigne static void printStructureStubInfo(const StructureStubInfo& stubInfo, unsigned instructionOffset) { - switch (stubInfo.opcodeID) { - case op_get_by_id_self: + switch (stubInfo.accessType) { + case access_get_by_id_self: printf(" [%4d] %s: %s\n", instructionOffset, "get_by_id_self", pointerToSourceString(stubInfo.u.getByIdSelf.baseObjectStructure).UTF8String().c_str()); return; - case op_get_by_id_proto: + case access_get_by_id_proto: printf(" [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_proto", pointerToSourceString(stubInfo.u.getByIdProto.baseObjectStructure).UTF8String().c_str(), pointerToSourceString(stubInfo.u.getByIdProto.prototypeStructure).UTF8String().c_str()); return; - case op_get_by_id_chain: + case access_get_by_id_chain: printf(" [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_chain", pointerToSourceString(stubInfo.u.getByIdChain.baseObjectStructure).UTF8String().c_str(), pointerToSourceString(stubInfo.u.getByIdChain.chain).UTF8String().c_str()); return; - case op_get_by_id_self_list: + case access_get_by_id_self_list: printf(" [%4d] %s: %s (%d)\n", instructionOffset, "op_get_by_id_self_list", pointerToSourceString(stubInfo.u.getByIdSelfList.structureList).UTF8String().c_str(), stubInfo.u.getByIdSelfList.listSize); return; - case op_get_by_id_proto_list: + case access_get_by_id_proto_list: printf(" [%4d] %s: %s (%d)\n", instructionOffset, "op_get_by_id_proto_list", pointerToSourceString(stubInfo.u.getByIdProtoList.structureList).UTF8String().c_str(), stubInfo.u.getByIdProtoList.listSize); return; - case op_put_by_id_transition: + case access_put_by_id_transition: printf(" [%4d] %s: %s, %s, %s\n", instructionOffset, "put_by_id_transition", pointerToSourceString(stubInfo.u.putByIdTransition.previousStructure).UTF8String().c_str(), pointerToSourceString(stubInfo.u.putByIdTransition.structure).UTF8String().c_str(), pointerToSourceString(stubInfo.u.putByIdTransition.chain).UTF8String().c_str()); return; - case op_put_by_id_replace: + case access_put_by_id_replace: printf(" [%4d] %s: %s\n", instructionOffset, "put_by_id_replace", pointerToSourceString(stubInfo.u.putByIdReplace.baseObjectStructure).UTF8String().c_str()); return; - case op_get_by_id: + case access_get_by_id: printf(" [%4d] %s\n", instructionOffset, "get_by_id"); return; - case op_put_by_id: + case access_put_by_id: printf(" [%4d] %s\n", instructionOffset, "put_by_id"); return; - case op_get_by_id_generic: + case access_get_by_id_generic: printf(" [%4d] %s\n", instructionOffset, "op_get_by_id_generic"); return; - case op_put_by_id_generic: + case access_put_by_id_generic: printf(" [%4d] %s\n", instructionOffset, "op_put_by_id_generic"); return; - case op_get_array_length: + case access_get_array_length: printf(" [%4d] %s\n", instructionOffset, "op_get_array_length"); return; - case op_get_string_length: + case access_get_string_length: printf(" [%4d] %s\n", instructionOffset, "op_get_string_length"); return; default: @@ -595,6 +600,7 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& } case op_div: { printBinaryOp(location, it, "div"); + ++it; break; } case op_mod: { @@ -739,13 +745,6 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& 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()); break; } - case op_resolve_func: { - int r0 = (++it)->u.operand; - int r1 = (++it)->u.operand; - int id0 = (++it)->u.operand; - printf("[%4d] resolve_func\t %s, %s, %s\n", location, registerName(r0).c_str(), registerName(r1).c_str(), idName(id0, m_identifiers[id0]).c_str()); - break; - } case op_get_by_id: { printGetByIdOp(location, it, m_identifiers, "get_by_id"); break; @@ -1087,8 +1086,7 @@ void CodeBlock::dump(ExecState* exec, const Vector::const_iterator& int debugHookID = (++it)->u.operand; int firstLine = (++it)->u.operand; int lastLine = (++it)->u.operand; - int column = (++it)->u.operand; - printf("[%4d] debug\t\t %s, %d, %d, %d\n", location, debugHookName(debugHookID), firstLine, lastLine, column); + printf("[%4d] debug\t\t %s, %d, %d\n", location, debugHookName(debugHookID), firstLine, lastLine); break; } case op_profile_will_call: { @@ -1250,45 +1248,22 @@ void CodeBlock::dumpStatistics() #endif } -CodeBlock::CodeBlock(ScopeNode* ownerNode) - : m_numCalleeRegisters(0) - , m_numVars(0) - , m_numParameters(0) - , m_ownerNode(ownerNode) - , m_globalData(0) -#ifndef NDEBUG - , m_instructionCount(0) -#endif - , m_needsFullScopeChain(false) - , m_usesEval(false) - , m_usesArguments(false) - , m_isNumericCompareFunction(false) - , m_codeType(NativeCode) - , m_source(0) - , m_sourceOffset(0) - , m_exceptionInfo(0) -{ -#if DUMP_CODE_BLOCK_STATISTICS - liveCodeBlockSet.add(this); -#endif -} - -CodeBlock::CodeBlock(ScopeNode* ownerNode, CodeType codeType, PassRefPtr sourceProvider, unsigned sourceOffset) +CodeBlock::CodeBlock(ScriptExecutable* ownerExecutable, CodeType codeType, PassRefPtr sourceProvider, unsigned sourceOffset, SymbolTable* symTab) : m_numCalleeRegisters(0) , m_numVars(0) , m_numParameters(0) - , m_ownerNode(ownerNode) + , m_ownerExecutable(ownerExecutable) , m_globalData(0) #ifndef NDEBUG , m_instructionCount(0) #endif - , m_needsFullScopeChain(ownerNode->needsActivation()) - , m_usesEval(ownerNode->usesEval()) - , m_usesArguments(ownerNode->usesArguments()) + , m_needsFullScopeChain(ownerExecutable->needsActivation()) + , m_usesEval(ownerExecutable->usesEval()) , m_isNumericCompareFunction(false) , m_codeType(codeType) , m_source(sourceProvider) , m_sourceOffset(sourceOffset) + , m_symbolTable(symTab) , m_exceptionInfo(new ExceptionInfo) { ASSERT(m_source); @@ -1325,20 +1300,23 @@ CodeBlock::~CodeBlock() if (Structure* structure = m_methodCallLinkInfos[i].cachedStructure) { structure->deref(); // Both members must be filled at the same time - ASSERT(m_methodCallLinkInfos[i].cachedPrototypeStructure); + ASSERT(!!m_methodCallLinkInfos[i].cachedPrototypeStructure); m_methodCallLinkInfos[i].cachedPrototypeStructure->deref(); } } +#if ENABLE(JIT_OPTIMIZE_CALL) unlinkCallers(); #endif +#endif // !ENABLE(JIT) + #if DUMP_CODE_BLOCK_STATISTICS liveCodeBlockSet.remove(this); #endif } -#if ENABLE(JIT) +#if ENABLE(JIT_OPTIMIZE_CALL) void CodeBlock::unlinkCallers() { size_t size = m_linkedCallerList.size(); @@ -1353,7 +1331,6 @@ void CodeBlock::unlinkCallers() void CodeBlock::derefStructures(Instruction* vPC) const { - ASSERT(m_codeType != NativeCode); Interpreter* interpreter = m_globalData->interpreter; if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self)) { @@ -1399,7 +1376,6 @@ void CodeBlock::derefStructures(Instruction* vPC) const void CodeBlock::refStructures(Instruction* vPC) const { - ASSERT(m_codeType != NativeCode); Interpreter* interpreter = m_globalData->interpreter; if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self)) { @@ -1431,26 +1407,18 @@ void CodeBlock::refStructures(Instruction* vPC) const ASSERT(vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id) || vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_generic) || vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_generic)); } -void CodeBlock::mark() +void CodeBlock::markAggregate(MarkStack& markStack) { for (size_t i = 0; i < m_constantRegisters.size(); ++i) - if (!m_constantRegisters[i].marked()) - m_constantRegisters[i].mark(); - - for (size_t i = 0; i < m_functionExpressions.size(); ++i) - m_functionExpressions[i]->body()->mark(); - - if (m_rareData) { - for (size_t i = 0; i < m_rareData->m_functions.size(); ++i) - m_rareData->m_functions[i]->body()->mark(); - - m_rareData->m_evalCodeCache.mark(); - } + markStack.append(m_constantRegisters[i].jsValue()); + for (size_t i = 0; i < m_functionExprs.size(); ++i) + m_functionExprs[i]->markAggregate(markStack); + for (size_t i = 0; i < m_functionDecls.size(); ++i) + m_functionDecls[i]->markAggregate(markStack); } void CodeBlock::reparseForExceptionInfoIfNecessary(CallFrame* callFrame) { - ASSERT(m_codeType != NativeCode); if (m_exceptionInfo) return; @@ -1467,61 +1435,11 @@ void CodeBlock::reparseForExceptionInfoIfNecessary(CallFrame* callFrame) scopeChain = scopeChain->next; } - switch (m_codeType) { - case FunctionCode: { - FunctionBodyNode* ownerFunctionBodyNode = static_cast(m_ownerNode); - RefPtr newFunctionBody = m_globalData->parser->reparse(m_globalData, ownerFunctionBodyNode); - ASSERT(newFunctionBody); - newFunctionBody->finishParsing(ownerFunctionBodyNode->copyParameters(), ownerFunctionBodyNode->parameterCount()); - - m_globalData->scopeNodeBeingReparsed = newFunctionBody.get(); - - CodeBlock& newCodeBlock = newFunctionBody->bytecodeForExceptionInfoReparse(scopeChain, this); - ASSERT(newCodeBlock.m_exceptionInfo); - ASSERT(newCodeBlock.m_instructionCount == m_instructionCount); - -#if ENABLE(JIT) - JIT::compile(m_globalData, &newCodeBlock); - ASSERT(newFunctionBody->generatedJITCode().size() == ownerNode()->generatedJITCode().size()); -#endif - - m_exceptionInfo.set(newCodeBlock.m_exceptionInfo.release()); - - m_globalData->scopeNodeBeingReparsed = 0; - - break; - } - case EvalCode: { - EvalNode* ownerEvalNode = static_cast(m_ownerNode); - RefPtr newEvalBody = m_globalData->parser->reparse(m_globalData, ownerEvalNode); - - m_globalData->scopeNodeBeingReparsed = newEvalBody.get(); - - EvalCodeBlock& newCodeBlock = newEvalBody->bytecodeForExceptionInfoReparse(scopeChain, this); - ASSERT(newCodeBlock.m_exceptionInfo); - ASSERT(newCodeBlock.m_instructionCount == m_instructionCount); - -#if ENABLE(JIT) - JIT::compile(m_globalData, &newCodeBlock); - ASSERT(newEvalBody->generatedJITCode().size() == ownerNode()->generatedJITCode().size()); -#endif - - m_exceptionInfo.set(newCodeBlock.m_exceptionInfo.release()); - - m_globalData->scopeNodeBeingReparsed = 0; - - break; - } - default: - // CodeBlocks for Global code blocks are transient and therefore to not gain from - // from throwing out there exception information. - ASSERT_NOT_REACHED(); - } + m_exceptionInfo.set(m_ownerExecutable->reparseExceptionInfo(m_globalData, scopeChain, this)); } HandlerInfo* CodeBlock::handlerForBytecodeOffset(unsigned bytecodeOffset) { - ASSERT(m_codeType != NativeCode); ASSERT(bytecodeOffset < m_instructionCount); if (!m_rareData) @@ -1540,14 +1458,13 @@ HandlerInfo* CodeBlock::handlerForBytecodeOffset(unsigned bytecodeOffset) int CodeBlock::lineNumberForBytecodeOffset(CallFrame* callFrame, unsigned bytecodeOffset) { - ASSERT(m_codeType != NativeCode); ASSERT(bytecodeOffset < m_instructionCount); reparseForExceptionInfoIfNecessary(callFrame); ASSERT(m_exceptionInfo); if (!m_exceptionInfo->m_lineInfo.size()) - return m_ownerNode->source().firstLine(); // Empty function + return m_ownerExecutable->source().firstLine(); // Empty function int low = 0; int high = m_exceptionInfo->m_lineInfo.size(); @@ -1560,13 +1477,12 @@ int CodeBlock::lineNumberForBytecodeOffset(CallFrame* callFrame, unsigned byteco } if (!low) - return m_ownerNode->source().firstLine(); + return m_ownerExecutable->source().firstLine(); return m_exceptionInfo->m_lineInfo[low - 1].lineNumber; } int CodeBlock::expressionRangeForBytecodeOffset(CallFrame* callFrame, unsigned bytecodeOffset, int& divot, int& startOffset, int& endOffset) { - ASSERT(m_codeType != NativeCode); ASSERT(bytecodeOffset < m_instructionCount); reparseForExceptionInfoIfNecessary(callFrame); @@ -1606,7 +1522,6 @@ int CodeBlock::expressionRangeForBytecodeOffset(CallFrame* callFrame, unsigned b bool CodeBlock::getByIdExceptionInfoForBytecodeOffset(CallFrame* callFrame, unsigned bytecodeOffset, OpcodeID& opcodeID) { - ASSERT(m_codeType != NativeCode); ASSERT(bytecodeOffset < m_instructionCount); reparseForExceptionInfoIfNecessary(callFrame); @@ -1635,7 +1550,6 @@ bool CodeBlock::getByIdExceptionInfoForBytecodeOffset(CallFrame* callFrame, unsi #if ENABLE(JIT) bool CodeBlock::functionRegisterForBytecodeOffset(unsigned bytecodeOffset, int& functionRegisterIndex) { - ASSERT(m_codeType != NativeCode); ASSERT(bytecodeOffset < m_instructionCount); if (!m_rareData || !m_rareData->m_functionRegisterInfos.size()) @@ -1662,7 +1576,6 @@ bool CodeBlock::functionRegisterForBytecodeOffset(unsigned bytecodeOffset, int& #if !ENABLE(JIT) bool CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset(unsigned bytecodeOffset) { - ASSERT(m_codeType != NativeCode); if (m_globalResolveInstructions.isEmpty()) return false; @@ -1683,7 +1596,6 @@ bool CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset(unsigned bytecodeOff #else bool CodeBlock::hasGlobalResolveInfoAtBytecodeOffset(unsigned bytecodeOffset) { - ASSERT(m_codeType != NativeCode); if (m_globalResolveInfos.isEmpty()) return false; @@ -1703,18 +1615,6 @@ bool CodeBlock::hasGlobalResolveInfoAtBytecodeOffset(unsigned bytecodeOffset) } #endif -#if ENABLE(JIT) -void CodeBlock::setJITCode(JITCode jitCode) -{ - ASSERT(m_codeType != NativeCode); - ownerNode()->setJITCode(jitCode); -#if !ENABLE(OPCODE_SAMPLING) - if (!BytecodeGenerator::dumpsGeneratedCode()) - m_instructions.clear(); -#endif -} -#endif - void CodeBlock::shrinkToFit() { m_instructions.shrinkToFit(); @@ -1730,7 +1630,8 @@ void CodeBlock::shrinkToFit() #endif m_identifiers.shrinkToFit(); - m_functionExpressions.shrinkToFit(); + m_functionDecls.shrinkToFit(); + m_functionExprs.shrinkToFit(); m_constantRegisters.shrinkToFit(); if (m_exceptionInfo) { @@ -1741,7 +1642,6 @@ void CodeBlock::shrinkToFit() if (m_rareData) { m_rareData->m_exceptionHandlers.shrinkToFit(); - m_rareData->m_functions.shrinkToFit(); m_rareData->m_regexps.shrinkToFit(); m_rareData->m_immediateSwitchJumpTables.shrinkToFit(); m_rareData->m_characterSwitchJumpTables.shrinkToFit(); diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h index e9f2697..0163540 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/CodeBlock.h @@ -36,6 +36,7 @@ #include "JSGlobalObject.h" #include "JumpTable.h" #include "Nodes.h" +#include "PtrAndFlags.h" #include "RegExp.h" #include "UString.h" #include @@ -54,9 +55,13 @@ static const int FirstConstantRegisterIndex = 0x40000000; namespace JSC { + enum HasSeenShouldRepatch { + hasSeenShouldRepatch + }; + class ExecState; - enum CodeType { GlobalCode, EvalCode, FunctionCode, NativeCode }; + enum CodeType { GlobalCode, EvalCode, FunctionCode }; static ALWAYS_INLINE int missingThisObjectMarker() { return std::numeric_limits::max(); } @@ -105,25 +110,44 @@ namespace JSC { CodeLocationNearCall callReturnLocation; CodeLocationDataLabelPtr hotPathBegin; CodeLocationNearCall hotPathOther; - CodeBlock* ownerCodeBlock; + PtrAndFlags ownerCodeBlock; CodeBlock* callee; unsigned position; void setUnlinked() { callee = 0; } bool isLinked() { return callee; } + + bool seenOnce() + { + return ownerCodeBlock.isFlagSet(hasSeenShouldRepatch); + } + + void setSeen() + { + ownerCodeBlock.setFlag(hasSeenShouldRepatch); + } }; struct MethodCallLinkInfo { MethodCallLinkInfo() : cachedStructure(0) - , cachedPrototypeStructure(0) { } + bool seenOnce() + { + return cachedPrototypeStructure.isFlagSet(hasSeenShouldRepatch); + } + + void setSeen() + { + cachedPrototypeStructure.setFlag(hasSeenShouldRepatch); + } + CodeLocationCall callReturnLocation; CodeLocationDataLabelPtr structureLabel; Structure* cachedStructure; - Structure* cachedPrototypeStructure; + PtrAndFlags cachedPrototypeStructure; }; struct FunctionRegisterInfo { @@ -224,17 +248,27 @@ namespace JSC { } #endif + struct ExceptionInfo : FastAllocBase { + Vector m_expressionInfo; + Vector m_lineInfo; + Vector m_getByIdExceptionInfo; + +#if ENABLE(JIT) + Vector m_callReturnIndexVector; +#endif + }; + class CodeBlock : public FastAllocBase { friend class JIT; + protected: + CodeBlock(ScriptExecutable* ownerExecutable, CodeType, PassRefPtr, unsigned sourceOffset, SymbolTable* symbolTable); public: - CodeBlock(ScopeNode* ownerNode); - CodeBlock(ScopeNode* ownerNode, CodeType, PassRefPtr, unsigned sourceOffset); - ~CodeBlock(); + virtual ~CodeBlock(); - void mark(); + void markAggregate(MarkStack&); void refStructures(Instruction* vPC) const; void derefStructures(Instruction* vPC) const; -#if ENABLE(JIT) +#if ENABLE(JIT_OPTIMIZE_CALL) void unlinkCallers(); #endif @@ -305,7 +339,7 @@ namespace JSC { unsigned getBytecodeIndex(CallFrame* callFrame, ReturnAddressPtr returnAddress) { reparseForExceptionInfoIfNecessary(callFrame); - return binaryChop(m_exceptionInfo->m_callReturnIndexVector.begin(), m_exceptionInfo->m_callReturnIndexVector.size(), ownerNode()->generatedJITCode().offsetOf(returnAddress.value()))->bytecodeIndex; + return binaryChop(callReturnIndexVector().begin(), callReturnIndexVector().size(), ownerExecutable()->generatedJITCode().offsetOf(returnAddress.value()))->bytecodeIndex; } bool functionRegisterForBytecodeOffset(unsigned bytecodeOffset, int& functionRegisterIndex); @@ -315,17 +349,19 @@ namespace JSC { bool isNumericCompareFunction() { return m_isNumericCompareFunction; } Vector& instructions() { return m_instructions; } + void discardBytecode() { m_instructions.clear(); } + #ifndef NDEBUG + unsigned instructionCount() { return m_instructionCount; } void setInstructionCount(unsigned instructionCount) { m_instructionCount = instructionCount; } #endif #if ENABLE(JIT) - JITCode& getJITCode() { return ownerNode()->generatedJITCode(); } - void setJITCode(JITCode); - ExecutablePool* executablePool() { return ownerNode()->getExecutablePool(); } + JITCode& getJITCode() { return ownerExecutable()->generatedJITCode(); } + ExecutablePool* executablePool() { return ownerExecutable()->getExecutablePool(); } #endif - ScopeNode* ownerNode() const { return m_ownerNode; } + ScriptExecutable* ownerExecutable() const { return m_ownerExecutable; } void setGlobalData(JSGlobalData* globalData) { m_globalData = globalData; } @@ -341,8 +377,8 @@ namespace JSC { CodeType codeType() const { return m_codeType; } - SourceProvider* source() const { ASSERT(m_codeType != NativeCode); return m_source.get(); } - unsigned sourceOffset() const { ASSERT(m_codeType != NativeCode); return m_sourceOffset; } + SourceProvider* source() const { return m_source.get(); } + unsigned sourceOffset() const { return m_sourceOffset; } size_t numberOfJumpTargets() const { return m_jumpTargets.size(); } void addJumpTarget(unsigned jumpTarget) { m_jumpTargets.append(jumpTarget); } @@ -380,6 +416,7 @@ namespace JSC { bool hasExceptionInfo() const { return m_exceptionInfo; } void clearExceptionInfo() { m_exceptionInfo.clear(); } + ExceptionInfo* extractExceptionInfo() { ASSERT(m_exceptionInfo); return m_exceptionInfo.release(); } void addExpressionInfo(const ExpressionRangeInfo& expressionInfo) { ASSERT(m_exceptionInfo); m_exceptionInfo->m_expressionInfo.append(expressionInfo); } void addGetByIdExceptionInfo(const GetByIdExceptionInfo& info) { ASSERT(m_exceptionInfo); m_exceptionInfo->m_getByIdExceptionInfo.append(info); } @@ -404,13 +441,11 @@ namespace JSC { ALWAYS_INLINE bool isConstantRegisterIndex(int index) { return index >= FirstConstantRegisterIndex; } ALWAYS_INLINE JSValue getConstant(int index) const { return m_constantRegisters[index - FirstConstantRegisterIndex].jsValue(); } - unsigned addFunctionExpression(FuncExprNode* n) { unsigned size = m_functionExpressions.size(); m_functionExpressions.append(n); return size; } - FuncExprNode* functionExpression(int index) const { return m_functionExpressions[index].get(); } - - unsigned addFunction(FuncDeclNode* n) { createRareDataIfNecessary(); unsigned size = m_rareData->m_functions.size(); m_rareData->m_functions.append(n); return size; } - FuncDeclNode* function(int index) const { ASSERT(m_rareData); return m_rareData->m_functions[index].get(); } - - bool hasFunctions() const { return m_functionExpressions.size() || (m_rareData && m_rareData->m_functions.size()); } + unsigned addFunctionDecl(PassRefPtr n) { unsigned size = m_functionDecls.size(); m_functionDecls.append(n); return size; } + FunctionExecutable* functionDecl(int index) { return m_functionDecls[index].get(); } + int numberOfFunctionDecls() { return m_functionDecls.size(); } + unsigned addFunctionExpr(PassRefPtr n) { unsigned size = m_functionExprs.size(); m_functionExprs.append(n); return size; } + FunctionExecutable* functionExpr(int index) { return m_functionExprs[index].get(); } unsigned addRegExp(RegExp* r) { createRareDataIfNecessary(); unsigned size = m_rareData->m_regexps.size(); m_rareData->m_regexps.append(r); return size; } RegExp* regexp(int index) const { ASSERT(m_rareData); return m_rareData->m_regexps[index].get(); } @@ -431,9 +466,10 @@ namespace JSC { StringJumpTable& stringSwitchJumpTable(int tableIndex) { ASSERT(m_rareData); return m_rareData->m_stringSwitchJumpTables[tableIndex]; } - SymbolTable& symbolTable() { return m_symbolTable; } + SymbolTable* symbolTable() { return m_symbolTable; } + SharedSymbolTable* sharedSymbolTable() { ASSERT(m_codeType == FunctionCode); return static_cast(m_symbolTable); } - EvalCodeCache& evalCodeCache() { ASSERT(m_codeType != NativeCode); createRareDataIfNecessary(); return m_rareData->m_evalCodeCache; } + EvalCodeCache& evalCodeCache() { createRareDataIfNecessary(); return m_rareData->m_evalCodeCache; } void shrinkToFit(); @@ -452,12 +488,11 @@ namespace JSC { void createRareDataIfNecessary() { - ASSERT(m_codeType != NativeCode); if (!m_rareData) m_rareData.set(new RareData); } - ScopeNode* m_ownerNode; + ScriptExecutable* m_ownerExecutable; JSGlobalData* m_globalData; Vector m_instructions; @@ -493,26 +528,17 @@ namespace JSC { // Constant Pool Vector m_identifiers; Vector m_constantRegisters; - Vector > m_functionExpressions; - - SymbolTable m_symbolTable; + Vector > m_functionDecls; + Vector > m_functionExprs; - struct ExceptionInfo : FastAllocBase { - Vector m_expressionInfo; - Vector m_lineInfo; - Vector m_getByIdExceptionInfo; + SymbolTable* m_symbolTable; -#if ENABLE(JIT) - Vector m_callReturnIndexVector; -#endif - }; OwnPtr m_exceptionInfo; struct RareData : FastAllocBase { Vector m_exceptionHandlers; // Rare Constants - Vector > m_functions; Vector > m_regexps; // Jump Tables @@ -532,16 +558,16 @@ namespace JSC { // Program code is not marked by any function, so we make the global object // responsible for marking it. - class ProgramCodeBlock : public CodeBlock { + class GlobalCodeBlock : public CodeBlock { public: - ProgramCodeBlock(ScopeNode* ownerNode, CodeType codeType, JSGlobalObject* globalObject, PassRefPtr sourceProvider) - : CodeBlock(ownerNode, codeType, sourceProvider, 0) + GlobalCodeBlock(ScriptExecutable* ownerExecutable, CodeType codeType, PassRefPtr sourceProvider, unsigned sourceOffset, JSGlobalObject* globalObject) + : CodeBlock(ownerExecutable, codeType, sourceProvider, sourceOffset, &m_unsharedSymbolTable) , m_globalObject(globalObject) { m_globalObject->codeBlocks().add(this); } - ~ProgramCodeBlock() + ~GlobalCodeBlock() { if (m_globalObject) m_globalObject->codeBlocks().remove(this); @@ -551,20 +577,54 @@ namespace JSC { private: JSGlobalObject* m_globalObject; // For program and eval nodes, the global object that marks the constant pool. + SymbolTable m_unsharedSymbolTable; + }; + + class ProgramCodeBlock : public GlobalCodeBlock { + public: + ProgramCodeBlock(ProgramExecutable* ownerExecutable, CodeType codeType, JSGlobalObject* globalObject, PassRefPtr sourceProvider) + : GlobalCodeBlock(ownerExecutable, codeType, sourceProvider, 0, globalObject) + { + } }; - class EvalCodeBlock : public ProgramCodeBlock { + class EvalCodeBlock : public GlobalCodeBlock { public: - EvalCodeBlock(ScopeNode* ownerNode, JSGlobalObject* globalObject, PassRefPtr sourceProvider, int baseScopeDepth) - : ProgramCodeBlock(ownerNode, EvalCode, globalObject, sourceProvider) + EvalCodeBlock(EvalExecutable* ownerExecutable, JSGlobalObject* globalObject, PassRefPtr sourceProvider, int baseScopeDepth) + : GlobalCodeBlock(ownerExecutable, EvalCode, sourceProvider, 0, globalObject) , m_baseScopeDepth(baseScopeDepth) { } int baseScopeDepth() const { return m_baseScopeDepth; } + const Identifier& variable(unsigned index) { return m_variables[index]; } + unsigned numVariables() { return m_variables.size(); } + void adoptVariables(Vector& variables) + { + ASSERT(m_variables.isEmpty()); + m_variables.swap(variables); + } + private: int m_baseScopeDepth; + Vector m_variables; + }; + + class FunctionCodeBlock : public CodeBlock { + public: + // Rather than using the usual RefCounted::create idiom for SharedSymbolTable we just use new + // as we need to initialise the CodeBlock before we could initialise any RefPtr to hold the shared + // symbol table, so we just pass as a raw pointer with a ref count of 1. We then manually deref + // in the destructor. + FunctionCodeBlock(FunctionExecutable* ownerExecutable, CodeType codeType, PassRefPtr sourceProvider, unsigned sourceOffset) + : CodeBlock(ownerExecutable, codeType, sourceProvider, sourceOffset, new SharedSymbolTable) + { + } + ~FunctionCodeBlock() + { + sharedSymbolTable()->deref(); + } }; inline Register& ExecState::r(int index) diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/EvalCodeCache.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/EvalCodeCache.h index f0ce73e..0e1fb1e 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/EvalCodeCache.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/EvalCodeCache.h @@ -29,6 +29,7 @@ #ifndef EvalCodeCache_h #define EvalCodeCache_h +#include "Executable.h" #include "JSGlobalObject.h" #include "Nodes.h" #include "Parser.h" @@ -41,44 +42,33 @@ namespace JSC { class EvalCodeCache { public: - PassRefPtr get(ExecState* exec, const UString& evalSource, ScopeChainNode* scopeChain, JSValue& exceptionValue) + PassRefPtr get(ExecState* exec, const UString& evalSource, ScopeChainNode* scopeChain, JSValue& exceptionValue) { - RefPtr evalNode; + RefPtr evalExecutable; if (evalSource.size() < maxCacheableSourceLength && (*scopeChain->begin())->isVariableObject()) - evalNode = m_cacheMap.get(evalSource.rep()); + evalExecutable = m_cacheMap.get(evalSource.rep()); - if (!evalNode) { - int errorLine; - UString errorMessage; - - SourceCode source = makeSource(evalSource); - evalNode = exec->globalData().parser->parse(exec, exec->dynamicGlobalObject()->debugger(), source, &errorLine, &errorMessage); - if (evalNode) { - if (evalSource.size() < maxCacheableSourceLength && (*scopeChain->begin())->isVariableObject() && m_cacheMap.size() < maxCacheEntries) - m_cacheMap.set(evalSource.rep(), evalNode); - } else { - exceptionValue = Error::create(exec, SyntaxError, errorMessage, errorLine, source.provider()->asID(), 0); + if (!evalExecutable) { + evalExecutable = EvalExecutable::create(makeSource(evalSource)); + exceptionValue = evalExecutable->compile(exec, scopeChain); + if (exceptionValue) return 0; - } + + if (evalSource.size() < maxCacheableSourceLength && (*scopeChain->begin())->isVariableObject() && m_cacheMap.size() < maxCacheEntries) + m_cacheMap.set(evalSource.rep(), evalExecutable); } - return evalNode.release(); + return evalExecutable.release(); } bool isEmpty() const { return m_cacheMap.isEmpty(); } - void mark() - { - EvalCacheMap::iterator end = m_cacheMap.end(); - for (EvalCacheMap::iterator ptr = m_cacheMap.begin(); ptr != end; ++ptr) - ptr->second->mark(); - } private: static const int maxCacheableSourceLength = 256; static const int maxCacheEntries = 64; - typedef HashMap, RefPtr > EvalCacheMap; + typedef HashMap, RefPtr > EvalCacheMap; EvalCacheMap m_cacheMap; }; diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/Instruction.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/Instruction.h index 594c4dd..bcef7fb 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/Instruction.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/Instruction.h @@ -32,7 +32,6 @@ #include "MacroAssembler.h" #include "Opcode.h" #include "Structure.h" -#include "StructureChain.h" #include #define POLYMORPHIC_LIST_CACHE_SIZE 8 @@ -54,7 +53,7 @@ namespace JSC { class StructureChain; // Structure used by op_get_by_id_self_list and op_get_by_id_proto_list instruction to hold data off the main opcode stream. - struct PolymorphicAccessStructureList { + struct PolymorphicAccessStructureList : FastAllocBase { struct PolymorphicStubInfo { bool isChain; PolymorphicAccessStructureListStubRoutineType stubRoutine; diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h index 4baa0be..c9196ce 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h @@ -67,7 +67,7 @@ namespace JSC { macro(op_negate, 3) \ macro(op_add, 5) \ macro(op_mul, 5) \ - macro(op_div, 4) \ + macro(op_div, 5) \ macro(op_mod, 4) \ macro(op_sub, 5) \ \ @@ -98,7 +98,6 @@ namespace JSC { macro(op_put_global_var, 4) \ macro(op_resolve_base, 3) \ macro(op_resolve_with_base, 4) \ - macro(op_resolve_func, 4) \ macro(op_get_by_id, 8) \ macro(op_get_by_id_self, 8) \ macro(op_get_by_id_self_list, 8) \ @@ -167,7 +166,7 @@ namespace JSC { macro(op_jsr, 3) \ macro(op_sret, 2) \ \ - macro(op_debug, 5) \ + macro(op_debug, 4) \ macro(op_profile_will_call, 2) \ macro(op_profile_did_call, 2) \ \ diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.cpp b/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.cpp index 8651723..8d0faa1 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.cpp @@ -197,7 +197,7 @@ void SamplingTool::doRun() #if ENABLE(CODEBLOCK_SAMPLING) if (CodeBlock* codeBlock = sample.codeBlock()) { MutexLocker locker(m_scopeSampleMapMutex); - ScopeSampleRecord* record = m_scopeSampleMap->get(codeBlock->ownerNode()); + ScopeSampleRecord* record = m_scopeSampleMap->get(codeBlock->ownerExecutable()); ASSERT(record); record->sample(codeBlock, sample.vPC()); } diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.h index fa95603..1a3f7cf 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.h @@ -136,7 +136,7 @@ namespace JSC { class SamplingTool { public: - friend class CallRecord; + friend struct CallRecord; friend class HostCallRecord; #if ENABLE(OPCODE_SAMPLING) diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/StructureStubInfo.cpp b/src/3rdparty/webkit/JavaScriptCore/bytecode/StructureStubInfo.cpp index bf3fdc4..018d832 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/StructureStubInfo.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/StructureStubInfo.cpp @@ -31,44 +31,44 @@ namespace JSC { #if ENABLE(JIT) void StructureStubInfo::deref() { - switch (opcodeID) { - case op_get_by_id_self: + switch (accessType) { + case access_get_by_id_self: u.getByIdSelf.baseObjectStructure->deref(); return; - case op_get_by_id_proto: + case access_get_by_id_proto: u.getByIdProto.baseObjectStructure->deref(); u.getByIdProto.prototypeStructure->deref(); return; - case op_get_by_id_chain: + case access_get_by_id_chain: u.getByIdChain.baseObjectStructure->deref(); u.getByIdChain.chain->deref(); return; - case op_get_by_id_self_list: { + case access_get_by_id_self_list: { PolymorphicAccessStructureList* polymorphicStructures = u.getByIdSelfList.structureList; polymorphicStructures->derefStructures(u.getByIdSelfList.listSize); delete polymorphicStructures; return; } - case op_get_by_id_proto_list: { + case access_get_by_id_proto_list: { PolymorphicAccessStructureList* polymorphicStructures = u.getByIdProtoList.structureList; polymorphicStructures->derefStructures(u.getByIdProtoList.listSize); delete polymorphicStructures; return; } - case op_put_by_id_transition: + case access_put_by_id_transition: u.putByIdTransition.previousStructure->deref(); u.putByIdTransition.structure->deref(); u.putByIdTransition.chain->deref(); return; - case op_put_by_id_replace: + case access_put_by_id_replace: u.putByIdReplace.baseObjectStructure->deref(); return; - case op_get_by_id: - case op_put_by_id: - case op_get_by_id_generic: - case op_put_by_id_generic: - case op_get_array_length: - case op_get_string_length: + case access_get_by_id: + case access_put_by_id: + case access_get_by_id_generic: + case access_put_by_id_generic: + case access_get_array_length: + case access_get_string_length: // These instructions don't ref their Structures. return; default: diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/StructureStubInfo.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/StructureStubInfo.h index 95dd266..8e2c489 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/StructureStubInfo.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/StructureStubInfo.h @@ -35,15 +35,32 @@ namespace JSC { + enum AccessType { + access_get_by_id_self, + access_get_by_id_proto, + access_get_by_id_chain, + access_get_by_id_self_list, + access_get_by_id_proto_list, + access_put_by_id_transition, + access_put_by_id_replace, + access_get_by_id, + access_put_by_id, + access_get_by_id_generic, + access_put_by_id_generic, + access_get_array_length, + access_get_string_length, + }; + struct StructureStubInfo { - StructureStubInfo(OpcodeID opcodeID) - : opcodeID(opcodeID) + StructureStubInfo(AccessType accessType) + : accessType(accessType) + , seen(false) { } void initGetByIdSelf(Structure* baseObjectStructure) { - opcodeID = op_get_by_id_self; + accessType = access_get_by_id_self; u.getByIdSelf.baseObjectStructure = baseObjectStructure; baseObjectStructure->ref(); @@ -51,7 +68,7 @@ namespace JSC { void initGetByIdProto(Structure* baseObjectStructure, Structure* prototypeStructure) { - opcodeID = op_get_by_id_proto; + accessType = access_get_by_id_proto; u.getByIdProto.baseObjectStructure = baseObjectStructure; baseObjectStructure->ref(); @@ -62,7 +79,7 @@ namespace JSC { void initGetByIdChain(Structure* baseObjectStructure, StructureChain* chain) { - opcodeID = op_get_by_id_chain; + accessType = access_get_by_id_chain; u.getByIdChain.baseObjectStructure = baseObjectStructure; baseObjectStructure->ref(); @@ -73,7 +90,7 @@ namespace JSC { void initGetByIdSelfList(PolymorphicAccessStructureList* structureList, int listSize) { - opcodeID = op_get_by_id_self_list; + accessType = access_get_by_id_self_list; u.getByIdProtoList.structureList = structureList; u.getByIdProtoList.listSize = listSize; @@ -81,7 +98,7 @@ namespace JSC { void initGetByIdProtoList(PolymorphicAccessStructureList* structureList, int listSize) { - opcodeID = op_get_by_id_proto_list; + accessType = access_get_by_id_proto_list; u.getByIdProtoList.structureList = structureList; u.getByIdProtoList.listSize = listSize; @@ -91,7 +108,7 @@ namespace JSC { void initPutByIdTransition(Structure* previousStructure, Structure* structure, StructureChain* chain) { - opcodeID = op_put_by_id_transition; + accessType = access_put_by_id_transition; u.putByIdTransition.previousStructure = previousStructure; previousStructure->ref(); @@ -105,7 +122,7 @@ namespace JSC { void initPutByIdReplace(Structure* baseObjectStructure) { - opcodeID = op_put_by_id_replace; + accessType = access_put_by_id_replace; u.putByIdReplace.baseObjectStructure = baseObjectStructure; baseObjectStructure->ref(); @@ -113,7 +130,19 @@ namespace JSC { void deref(); - OpcodeID opcodeID; + bool seenOnce() + { + return seen; + } + + void setSeen() + { + seen = true; + } + + int accessType : 31; + int seen : 1; + union { struct { Structure* baseObjectStructure; diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp index 711beb4..af8f784 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp @@ -256,15 +256,15 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, const Debugger* d m_nextGlobalIndex -= symbolTable->size(); for (size_t i = 0; i < functionStack.size(); ++i) { - FuncDeclNode* funcDecl = functionStack[i]; - globalObject->removeDirect(funcDecl->m_ident); // Make sure our new function is not shadowed by an old property. - emitNewFunction(addGlobalVar(funcDecl->m_ident, false), funcDecl); + FunctionBodyNode* function = functionStack[i]; + globalObject->removeDirect(function->ident()); // Make sure our new function is not shadowed by an old property. + emitNewFunction(addGlobalVar(function->ident(), false), function); } Vector newVars; for (size_t i = 0; i < varStack.size(); ++i) - if (!globalObject->hasProperty(exec, varStack[i].first)) - newVars.append(addGlobalVar(varStack[i].first, varStack[i].second & DeclarationStacks::IsConstant)); + if (!globalObject->hasProperty(exec, *varStack[i].first)) + newVars.append(addGlobalVar(*varStack[i].first, varStack[i].second & DeclarationStacks::IsConstant)); preserveLastVar(); @@ -272,16 +272,16 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, const Debugger* d emitLoad(newVars[i], jsUndefined()); } else { for (size_t i = 0; i < functionStack.size(); ++i) { - FuncDeclNode* funcDecl = functionStack[i]; - globalObject->putWithAttributes(exec, funcDecl->m_ident, funcDecl->makeFunction(exec, scopeChain.node()), DontDelete); + FunctionBodyNode* function = functionStack[i]; + globalObject->putWithAttributes(exec, function->ident(), new (exec) JSFunction(exec, makeFunction(function), scopeChain.node()), DontDelete); } for (size_t i = 0; i < varStack.size(); ++i) { - if (globalObject->hasProperty(exec, varStack[i].first)) + if (globalObject->hasProperty(exec, *varStack[i].first)) continue; int attributes = DontDelete; if (varStack[i].second & DeclarationStacks::IsConstant) attributes |= ReadOnly; - globalObject->putWithAttributes(exec, varStack[i].first, jsUndefined(), attributes); + globalObject->putWithAttributes(exec, *varStack[i].first, jsUndefined(), attributes); } preserveLastVar(); @@ -327,7 +327,7 @@ BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, const Debug } else emitOpcode(op_enter); - if (usesArguments) { + if (usesArguments) { emitOpcode(op_init_arguments); // The debugger currently retrieves the arguments object from an activation rather than pulling @@ -339,18 +339,18 @@ BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, const Debug const DeclarationStacks::FunctionStack& functionStack = functionBody->functionStack(); for (size_t i = 0; i < functionStack.size(); ++i) { - FuncDeclNode* funcDecl = functionStack[i]; - const Identifier& ident = funcDecl->m_ident; + FunctionBodyNode* function = functionStack[i]; + const Identifier& ident = function->ident(); m_functions.add(ident.ustring().rep()); - emitNewFunction(addVar(ident, false), funcDecl); + emitNewFunction(addVar(ident, false), function); } const DeclarationStacks::VarStack& varStack = functionBody->varStack(); for (size_t i = 0; i < varStack.size(); ++i) - addVar(varStack[i].first, varStack[i].second & DeclarationStacks::IsConstant); + addVar(*varStack[i].first, varStack[i].second & DeclarationStacks::IsConstant); - const Identifier* parameters = functionBody->parameters(); - size_t parameterCount = functionBody->parameterCount(); + FunctionParameters& parameters = *functionBody->parameters(); + size_t parameterCount = parameters.size(); m_nextParameterIndex = -RegisterFile::CallFrameHeaderSize - parameterCount - 1; m_parameters.grow(1 + parameterCount); // reserve space for "this" @@ -397,6 +397,18 @@ BytecodeGenerator::BytecodeGenerator(EvalNode* evalNode, const Debugger* debugge codeBlock->setGlobalData(m_globalData); m_codeBlock->m_numParameters = 1; // Allocate space for "this" + const DeclarationStacks::FunctionStack& functionStack = evalNode->functionStack(); + for (size_t i = 0; i < functionStack.size(); ++i) + m_codeBlock->addFunctionDecl(makeFunction(functionStack[i])); + + const DeclarationStacks::VarStack& varStack = evalNode->varStack(); + unsigned numVariables = varStack.size(); + Vector variables; + variables.reserveCapacity(numVariables); + for (size_t i = 0; i < numVariables; ++i) + variables.append(*varStack[i].first); + codeBlock->adoptVariables(variables); + preserveLastVar(); } @@ -470,7 +482,8 @@ RegisterID* BytecodeGenerator::constRegisterFor(const Identifier& ident) return 0; SymbolTableEntry entry = symbolTable().get(ident.ustring().rep()); - ASSERT(!entry.isNull()); + if (entry.isNull()) + return 0; return ®isterFor(entry.getIndex()); } @@ -521,7 +534,7 @@ PassRefPtr BytecodeGenerator::newLabelScope(LabelScope::Type type, c m_labelScopes.removeLast(); // Allocate new label scope. - LabelScope scope(type, name, scopeDepth(), newLabel(), type == LabelScope::Loop ? newLabel() : PassRefPtr