From f74dd380f30306bb2cf93ef61bb35dc8db045a11 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 22 Sep 2009 11:45:22 +0200 Subject: fix tst_QMenu::task242454_sizeHint for Windows mobile QMenu actually doesn't use QFontMetrics::width to calculate its bounding rect but QFontMetrics::boundingRect. That's why this test failed on Windows CE. Reviewed-by: thierry --- tests/auto/qmenu/tst_qmenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp index 174d1d7..abf8246 100644 --- a/tests/auto/qmenu/tst_qmenu.cpp +++ b/tests/auto/qmenu/tst_qmenu.cpp @@ -658,7 +658,7 @@ void tst_QMenu::task242454_sizeHint() QMenu menu; QString s = QLatin1String("foo\nfoo\nfoo\nfoo"); menu.addAction(s); - QVERIFY(menu.sizeHint().width() > menu.fontMetrics().width(s)); + QVERIFY(menu.sizeHint().width() > menu.fontMetrics().boundingRect(QRect(), Qt::TextSingleLine, s).width()); } -- cgit v0.12 From 1053d8564ca33e18a813e0f0fa1ec1f381e4a937 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Tue, 22 Sep 2009 12:38:56 +0200 Subject: Fix broken drop-down arrows on Windows 7 This issue affects both tool buttons and buttosn with menus. The problem is that the Windows metric we were using to calculate the size changed on Windows 7. It seems not to be the correct metric so it seems more reliable to use the dpi-scaled constant 12 as we were doing in common style already. This should make appearance consistent between the windows versions. Task-number: QTBUG-4241 Reviewed-by: denis --- src/gui/styles/qwindowsxpstyle.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp index ed2ee8a..1a9f4f2 100644 --- a/src/gui/styles/qwindowsxpstyle.cpp +++ b/src/gui/styles/qwindowsxpstyle.cpp @@ -3276,17 +3276,6 @@ int QWindowsXPStyle::pixelMetric(PixelMetric pm, const QStyleOption *option, con } break; - case PM_MenuButtonIndicator: - { - XPThemeData theme(widget, 0, QLatin1String("TOOLBAR"), TP_SPLITBUTTONDROPDOWN); - if (theme.isValid()) { - SIZE size; - pGetThemePartSize(theme.handle(), 0, theme.partId, theme.stateId, 0, TS_TRUE, &size); - res = size.cx; - } - } - break; - case PM_TitleBarHeight: { #ifdef QT3_SUPPORT -- cgit v0.12 From e410d2711ae2aba15b9da7b07a4f8e40a50ab9c5 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Tue, 22 Sep 2009 14:38:09 +0200 Subject: Ensure that QStandardItem::clone() is used when a prototype is set This fixes a regression introduced in Qt 4.5.0, when dragging an item within a QTreeView it would not call clone() when it was dropped even if a prototype was set on the QStandardItemModel. Reviewed-by: Marius Bugge Monsen --- src/gui/itemviews/qstandarditemmodel.cpp | 9 +++++---- src/gui/itemviews/qstandarditemmodel_p.h | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/gui/itemviews/qstandarditemmodel.cpp b/src/gui/itemviews/qstandarditemmodel.cpp index bc25edd..8c9a2fd 100644 --- a/src/gui/itemviews/qstandarditemmodel.cpp +++ b/src/gui/itemviews/qstandarditemmodel.cpp @@ -2965,7 +2965,7 @@ QMimeData *QStandardItemModel::mimeData(const QModelIndexList &indexes) const Used by QStandardItemModel::dropMimeData stream out an item and his children */ -static void decodeDataRecursive(QDataStream &stream, QStandardItem *item) +void QStandardItemModelPrivate::decodeDataRecursive(QDataStream &stream, QStandardItem *item) { int colCount, childCount; stream >> *item; @@ -2976,7 +2976,7 @@ static void decodeDataRecursive(QDataStream &stream, QStandardItem *item) while(childPos > 0) { childPos--; - QStandardItem *child = new QStandardItem; + QStandardItem *child = createItem(); decodeDataRecursive(stream, child); item->setChild( childPos / colCount, childPos % colCount, child); } @@ -2989,6 +2989,7 @@ static void decodeDataRecursive(QDataStream &stream, QStandardItem *item) bool QStandardItemModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) { + Q_D(QStandardItemModel); // check if the action is supported if (!data || !(action == Qt::CopyAction || action == Qt::MoveAction)) return false; @@ -3020,9 +3021,9 @@ bool QStandardItemModel::dropMimeData(const QMimeData *data, Qt::DropAction acti while (!stream.atEnd()) { int r, c; - QStandardItem *item = new QStandardItem; + QStandardItem *item = d->createItem(); stream >> r >> c; - decodeDataRecursive(stream, item); + d->decodeDataRecursive(stream, item); rows.append(r); columns.append(c); diff --git a/src/gui/itemviews/qstandarditemmodel_p.h b/src/gui/itemviews/qstandarditemmodel_p.h index 3d842f3..430fcb6 100644 --- a/src/gui/itemviews/qstandarditemmodel_p.h +++ b/src/gui/itemviews/qstandarditemmodel_p.h @@ -175,6 +175,8 @@ public: void _q_emitItemChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight); + void decodeDataRecursive(QDataStream &stream, QStandardItem *item); + QVector columnHeaderItems; QVector rowHeaderItems; QStandardItem *root; -- cgit v0.12 From 3a00b2bc8590e0ac43313681ba690629efdcbeab Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Wed, 23 Sep 2009 10:42:12 +0300 Subject: Removed symbian specific cache location from qabstractnetworkcache test. This has been just workaround for misbehaving QDesktopServices implementation, and now QDesktopServices::CacheLocation has been fixed for Symbian. Reviewed-by: Aleksandar Sasha Babic --- tests/auto/qabstractnetworkcache/tst_qabstractnetworkcache.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/auto/qabstractnetworkcache/tst_qabstractnetworkcache.cpp b/tests/auto/qabstractnetworkcache/tst_qabstractnetworkcache.cpp index 2377c18..5ef95cd 100644 --- a/tests/auto/qabstractnetworkcache/tst_qabstractnetworkcache.cpp +++ b/tests/auto/qabstractnetworkcache/tst_qabstractnetworkcache.cpp @@ -83,12 +83,8 @@ public: : QNetworkDiskCache(parent) , gotData(false) { -#ifdef Q_OS_SYMBIAN - QString location = QLatin1String("./cache/"); -#else QString location = QDesktopServices::storageLocation(QDesktopServices::CacheLocation) + QLatin1String("/qnetworkdiskcache/"); -#endif setCacheDirectory(location); clear(); } -- cgit v0.12 From 6d3764ee563db117d03b9c759e491b70a3c1df7d Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Wed, 23 Sep 2009 10:12:24 +0200 Subject: Make sure fontextractor example is found by qtdemo Qt Demo seems to assume the executable name is the same as the directory name, so change the name to all lower case to avoid getting the message that the example has not been built even when it has. Found by Black Team. --- examples/webkit/formextractor/formextractor.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/webkit/formextractor/formextractor.pro b/examples/webkit/formextractor/formextractor.pro index d2cb240..e748c74 100644 --- a/examples/webkit/formextractor/formextractor.pro +++ b/examples/webkit/formextractor/formextractor.pro @@ -1,5 +1,5 @@ QT += webkit -TARGET = formExtractor +TARGET = formextractor TEMPLATE = app SOURCES += main.cpp \ formextractor.cpp \ -- cgit v0.12 From 33d104723a02297ffef53020d42b789284699534 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Wed, 23 Sep 2009 10:22:49 +0200 Subject: Paint arrow on top of node, not underneath it It looked strange that the node and its drop shadow was painted on top of the arrow. Flip the z-axis around to make sure the arrow is painted on top. Task-number: QTBUG-4544 Reviewed-by: Gunnar --- examples/graphicsview/elasticnodes/node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/graphicsview/elasticnodes/node.cpp b/examples/graphicsview/elasticnodes/node.cpp index 3a218e7..b878011 100644 --- a/examples/graphicsview/elasticnodes/node.cpp +++ b/examples/graphicsview/elasticnodes/node.cpp @@ -53,7 +53,7 @@ Node::Node(GraphWidget *graphWidget) { setFlag(ItemIsMovable); setCacheMode(DeviceCoordinateCache); - setZValue(1); + setZValue(-1); } void Node::addEdge(Edge *edge) -- cgit v0.12 From 9262ee16906fd8e030cd5d2a81d22fe9b791b9f6 Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Wed, 23 Sep 2009 12:42:58 +0200 Subject: Calling raise() on a hidden windows makes it visible on Cocoa. [NSWindow orderFront:] on a hidden window will make it visible. So raise_sys() will now check if window is visible before this method is called. Task-number: 255428 Reviewed-by: Richard Moe Gustavsen --- src/gui/kernel/qwidget_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 987d2ae..ef71194 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -3613,7 +3613,7 @@ void QWidgetPrivate::raise_sys() QMacCocoaAutoReleasePool pool; if (isRealWindow()) { // Calling orderFront shows the window on Cocoa too. - if (!q->testAttribute(Qt::WA_DontShowOnScreen)) { + if (!q->testAttribute(Qt::WA_DontShowOnScreen) && q->isVisible()) { [qt_mac_window_for(q) orderFront:qt_mac_window_for(q)]; } if (qt_mac_raise_process) { //we get to be the active process now -- cgit v0.12 From 94ffd7e298a4ffa0440fd18a30b1823a71c6bb77 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 23 Sep 2009 14:35:06 +0200 Subject: Try to support Qt 4.4-style Phonon includes in Qt. This introduces an undocumented "phonon_compat" subdir and also adds it to the INCLUDEPATH when QT += phonon is specified. With this, these styles of #includes should be supported: #include #include #include #include #include #include Still need to check if the headers get installed during "make install". I couldn't find where in our code that is done. BT: yes Reviewed-By: Trust Me (cherry picked from commit 0cb5038a3e5d3a6b0c33d081b89c6fe47cfc0b1b) --- bin/syncqt | 10 ++++++++-- mkspecs/features/qt.prf | 7 ++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/bin/syncqt b/bin/syncqt index a3addd8..edabeca 100755 --- a/bin/syncqt +++ b/bin/syncqt @@ -840,9 +840,15 @@ foreach (@modules_to_sync) { $master_contents .= "#endif\n"; unless($showonly) { - unless ($lib eq "phonon") { + my @master_includes; + if ($lib eq "phonon") { + push @master_includes, "$out_basedir/include/phonon_compat/phonon/phonon"; + push @master_includes, "$out_basedir/include/phonon/Phonon/Phonon"; + } else { + push @master_includes, "$out_basedir/include/$lib/$lib"; + } + foreach my $master_include (@master_includes) { #generate the "master" include file - my $master_include = "$out_basedir/include/$lib/$lib"; $pri_install_files .= fixPaths($master_include, "$modules{$lib}") . " "; #get the master file installed too if($master_include && -e "$master_include") { open MASTERINCLUDE, "<$master_include"; diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index 0c6e09a..dc833e7 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -149,8 +149,13 @@ for(QTLIB, $$list($$lower($$unique(QT)))) { else:isEqual(QTLIB, scripttools):qlib = QtScriptTools else:isEqual(QTLIB, testlib):qlib = QtTest else:isEqual(QTLIB, dbus):qlib = QtDBus - else:isEqual(QTLIB, phonon):qlib = phonon else:isEqual(QTLIB, webkit):qlib = QtWebKit + else:isEqual(QTLIB, phonon) { + qlib = phonon + INCLUDEPATH += $$QMAKE_INCDIR_QT/phonon_compat/phonon + INCLUDEPATH += $$QMAKE_INCDIR_QT/phonon_compat + INCLUDEPATH += $$QMAKE_INCDIR_QT/phonon/Phonon + } else:isEqual(QTLIB, webkit):qlib = QtWebKit else:message("Unknown QT: $$QTLIB"):qlib = !isEmpty(qlib) { target_qt:isEqual(TARGET, qlib) { -- cgit v0.12 From df47e0d40290f5e40054a9612f75177d9ef8537a Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 23 Sep 2009 14:51:23 +0200 Subject: Autotest: This test does requires internal builds (with autotests). Reviewed-By: TrustMe --- tests/auto/qkeysequence/qkeysequence.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/qkeysequence/qkeysequence.pro b/tests/auto/qkeysequence/qkeysequence.pro index bd85402..d4779af 100644 --- a/tests/auto/qkeysequence/qkeysequence.pro +++ b/tests/auto/qkeysequence/qkeysequence.pro @@ -1,4 +1,5 @@ load(qttest_p4) +requires(contains(QT_CONFIG,private_tests)) SOURCES += tst_qkeysequence.cpp RESOURCES += qkeysequence.qrc \ No newline at end of file -- cgit v0.12 From 40f2c3ffdbcd700ed65b72a8cad1e7ce2c009e68 Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Wed, 23 Sep 2009 15:37:12 +0200 Subject: Fixed clipping of non-cosmetic dashed strokes in raster paint engine. Reviewed-by: Samuel --- src/gui/painting/qpaintengineex.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp index 7c49190..b563735 100644 --- a/src/gui/painting/qpaintengineex.cpp +++ b/src/gui/painting/qpaintengineex.cpp @@ -328,12 +328,7 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) flags |= QVectorPath::CurvedShapeHint; // ### Perspective Xforms are currently not supported... - qreal txscale = 1; - if (!(pen.isCosmetic() || (qt_scaleForTransform(state()->matrix, &txscale) && txscale != 1))) { - // We include cosmetic pens in this case to avoid having to - // change the current transform. Normal transformed, - // non-cosmetic pens will be transformed as part of fill - // later, so they are also covered here.. + if (!pen.isCosmetic()) { if (types) { while (points < lastPoint) { switch (*types) { @@ -385,8 +380,6 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) QVectorPath::WindingFill); fill(strokePath, pen.brush()); } else { - const qreal strokeWidth = d->stroker.strokeWidth(); - d->stroker.setStrokeWidth(strokeWidth * txscale); // For cosmetic pens we need a bit of trickery... We to process xform the input points if (types) { while (points < lastPoint) { @@ -440,7 +433,6 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) } d->activeStroker->end(); - d->stroker.setStrokeWidth(strokeWidth); QVectorPath strokePath(d->strokeHandler->pts.data(), d->strokeHandler->types.size(), d->strokeHandler->types.data(), -- cgit v0.12 From c89cd924858c4fce30b0855e295e0a6adfaea875 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Thu, 24 Sep 2009 08:51:24 +0300 Subject: Fixed "warning: variable / argument 'window' is not used in function" The warning was reported by Nokia X86 compiler when compiling for S60 emulator. The fix was a t rivial change to add Q_UNUSED macro for #ifdef branches where window parameter was not used. --- src/testlib/qtestsystem.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/testlib/qtestsystem.h b/src/testlib/qtestsystem.h index 540b18d..a9a2193 100644 --- a/src/testlib/qtestsystem.h +++ b/src/testlib/qtestsystem.h @@ -76,8 +76,10 @@ namespace QTest #if defined(Q_WS_X11) qt_x11_wait_for_window_manager(window); #elif defined(Q_WS_QWS) + Q_UNUSED(window); qWait(100); #else + Q_UNUSED(window); qWait(50); #endif return true; -- cgit v0.12 From 39d0ded8f6e94df2a08876ee1cf00253ef2b7de3 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Thu, 24 Sep 2009 09:36:27 +0300 Subject: Fixed compiler error in qsqldatabase auto test. Nokia X86 compiler i.e. S60 emulator compiler reported the following error when compiling qsqldatabase auto test. function call '[QLatin1String].QLatin1String(const QString)' does not match Reviewed-by: Aleksandar Sasha Babic --- tests/auto/qsqldatabase/tst_qsqldatabase.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp index 675b170..4198bfc 100644 --- a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp +++ b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp @@ -2182,18 +2182,18 @@ void tst_QSqlDatabase::oci_synonymstest() QSqlQuery q(db); QString creator(qTableName("CREATOR")), appuser(qTableName("APPUSER")), table1(qTableName("TABLE1")); // QVERIFY_SQL(q, exec("drop public synonym "+table1)); - QVERIFY_SQL(q, exec(QLatin1String("create user "+creator+" identified by "+creator+" default tablespace users temporary tablespace temp"))); - QVERIFY_SQL(q, exec(QLatin1String("grant CONNECT to "+creator))); - QVERIFY_SQL(q, exec(QLatin1String("grant RESOURCE to "+creator))); + QVERIFY_SQL(q, exec(QString("create user %1 identified by %2 default tablespace users temporary tablespace temp").arg(creator).arg(creator))); + QVERIFY_SQL(q, exec(QString("grant CONNECT to %1").arg(creator))); + QVERIFY_SQL(q, exec(QString("grant RESOURCE to %1").arg(creator))); QSqlDatabase db2=db.cloneDatabase(db, QLatin1String("oci_synonymstest")); db2.close(); QVERIFY_SQL(db2, open(creator,creator)); QSqlQuery q2(db2); - QVERIFY_SQL(q2, exec("create table "+table1+"(id int primary key)")); - QVERIFY_SQL(q, exec(QLatin1String("create user "+appuser+" identified by "+appuser+" default tablespace users temporary tablespace temp"))); - QVERIFY_SQL(q, exec(QLatin1String("grant CREATE ANY SYNONYM to "+appuser))); - QVERIFY_SQL(q, exec(QLatin1String("grant CONNECT to "+appuser))); - QVERIFY_SQL(q2, exec(QLatin1String("grant select, insert, update, delete on "+table1+" to "+appuser))); + QVERIFY_SQL(q2, exec(QString("create table %1(id int primary key)").arg(table1))); + QVERIFY_SQL(q, exec(QString("create user %1 identified by %2 default tablespace users temporary tablespace temp").arg(appuser).arg(appuser))); + QVERIFY_SQL(q, exec(QString("grant CREATE ANY SYNONYM to %1").arg(appuser))); + QVERIFY_SQL(q, exec(QString("grant CONNECT to %1").arg(appuser))); + QVERIFY_SQL(q2, exec(QString("grant select, insert, update, delete on %1 to %2").arg(table1).arg(appuser))); QSqlDatabase db3=db.cloneDatabase(db, QLatin1String("oci_synonymstest2")); db3.close(); QVERIFY_SQL(db3, open(appuser,appuser)); -- cgit v0.12 From e8a71fcacb21897418b80ac1977b3a5c64b4fb71 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 24 Sep 2009 01:12:29 +0200 Subject: Fixes for WebKit trunk import Updated file lists. Reviewed-by: Trust me --- util/webkit/mkdist-webkit | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util/webkit/mkdist-webkit b/util/webkit/mkdist-webkit index 49d4785..3afccba 100755 --- a/util/webkit/mkdist-webkit +++ b/util/webkit/mkdist-webkit @@ -42,7 +42,7 @@ excluded_directories="$excluded_directories JavaScriptCore/JavaScriptCore.xcodep excluded_directories="$excluded_directories JavaScriptCore/tests" excluded_directories="$excluded_directories JavaScriptCore/API/tests" excluded_directories="$excluded_directories JavaScriptCore/JavaScriptCore.vcproj" -excluded_directories="$excluded_directories JavaScriptCore/JavaScriptCore.pro" +excluded_directories="$excluded_directories JavaScriptCore/JavaScriptCore.gyp" excluded_directories="$excluded_directories JavaScriptCore/wtf/wx" excluded_directories="$excluded_directories JavaScriptCore/wtf/gtk" excluded_directories="$excluded_directories JavaScriptCore/wtf/mac" @@ -51,9 +51,12 @@ excluded_directories="$excluded_directories JavaScriptCore/wtf/chromium" excluded_directories="$excluded_directories JavaScriptCore/wtf/haiku" excluded_directories="$excluded_directories WebCore/WebCore.vcproj" +excluded_directories="$excluded_directories WebCore/WebCore.gyp" excluded_directories="$excluded_directories WebCore/DerivedSources.make" excluded_directories="$excluded_directories WebCore/GNUmakefile.am" excluded_directories="$excluded_directories WebCore/WebCore.base.exp" +excluded_directories="$excluded_directories WebCore/WebCore.PluginHostProcess.exp" +excluded_directories="$excluded_directories WebCore/WebCore.OrientationEvents.exp" excluded_directories="$excluded_directories WebCore/WebCore.xcodeproj" excluded_directories="$excluded_directories WebCore/Configurations" @@ -145,6 +148,7 @@ excluded_directories="$excluded_directories WebKit/win" excluded_directories="$excluded_directories WebKit/wx" excluded_directories="$excluded_directories WebKit/cf" excluded_directories="$excluded_directories WebKit/haiku" +excluded_directories="$excluded_directories WebKit/chromium" excluded_directories="$excluded_directories WebKit/English.lproj WebKit/WebKit.xcodeproj" excluded_directories="$excluded_directories WebCore/English.lproj" -- cgit v0.12 From 3ec68c8948284437b8591010bbbbe2ea97b8cc46 Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Thu, 24 Sep 2009 10:33:39 +0200 Subject: Fixed background scrolling in the SVG viewer example. Reviewed-by: Trond --- examples/painting/svgviewer/svgview.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/painting/svgviewer/svgview.cpp b/examples/painting/svgviewer/svgview.cpp index 0938ff8..76c6469 100644 --- a/examples/painting/svgviewer/svgview.cpp +++ b/examples/painting/svgviewer/svgview.cpp @@ -62,6 +62,7 @@ SvgView::SvgView(QWidget *parent) setScene(new QGraphicsScene(this)); setTransformationAnchor(AnchorUnderMouse); setDragMode(ScrollHandDrag); + setViewportUpdateMode(FullViewportUpdate); // Prepare background check-board pattern QPixmap tilePixmap(64, 64); -- cgit v0.12 From 600cef0aa62dedafac9190809230e01e3b200356 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 24 Sep 2009 10:53:30 +0200 Subject: Revert "Autotest: This test does requires internal builds (with autotests)." This reverts commit df47e0d40290f5e40054a9612f75177d9ef8537a. There is no "private_build" in Qt 4.5 Reviewed-By: thiago --- tests/auto/qkeysequence/qkeysequence.pro | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/auto/qkeysequence/qkeysequence.pro b/tests/auto/qkeysequence/qkeysequence.pro index d4779af..bd85402 100644 --- a/tests/auto/qkeysequence/qkeysequence.pro +++ b/tests/auto/qkeysequence/qkeysequence.pro @@ -1,5 +1,4 @@ load(qttest_p4) -requires(contains(QT_CONFIG,private_tests)) SOURCES += tst_qkeysequence.cpp RESOURCES += qkeysequence.qrc \ No newline at end of file -- cgit v0.12 From 6d21ee6269a40c0d70e358cc1149d332ca84f868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 23 Sep 2009 14:22:03 +0200 Subject: Made fast blur in GL 2 engine be radius independent. This is useful when animating the blur radius, as you don't want to suffer the hit of compiling / linking a new shader program for each radius the first time the animation is played. Also use the fast blur when the radius is 5 or below, as the quality difference is insignificant. Reviewed-by: Rhys Weatherley --- .../gl2paintengineex/qpaintengineex_opengl2_p.h | 1 + src/opengl/qglpixmapfilter.cpp | 236 +++++++++------------ 2 files changed, 97 insertions(+), 140 deletions(-) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index 738626f..f245945 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -273,6 +273,7 @@ public: QScopedPointer convolutionFilter; QScopedPointer colorizeFilter; QScopedPointer blurFilter; + QScopedPointer fastBlurFilter; }; QT_END_NAMESPACE diff --git a/src/opengl/qglpixmapfilter.cpp b/src/opengl/qglpixmapfilter.cpp index b48c497..b68ff45 100644 --- a/src/opengl/qglpixmapfilter.cpp +++ b/src/opengl/qglpixmapfilter.cpp @@ -102,7 +102,7 @@ private: class QGLPixmapBlurFilter : public QGLCustomShaderStage, public QGLPixmapFilter { public: - QGLPixmapBlurFilter(); + QGLPixmapBlurFilter(Qt::TransformationMode quality); void setUniforms(QGLShaderProgram *program); @@ -110,15 +110,14 @@ protected: bool processGL(QPainter *painter, const QPointF &pos, const QPixmap &src, const QRectF &srcRect) const; private: - static QByteArray generateBlurShader(int radius, bool gaussianBlur); + static QByteArray generateGaussianShader(int radius); mutable QSize m_textureSize; - mutable bool m_horizontalBlur; mutable bool m_haveCached; mutable int m_cachedRadius; - mutable Qt::TransformationMode m_cachedQuality; + mutable Qt::TransformationMode m_quality; }; extern QGLWidget *qt_gl_share_widget(); @@ -132,10 +131,17 @@ QPixmapFilter *QGL2PaintEngineEx::pixmapFilter(int type, const QPixmapFilter *pr d->colorizeFilter.reset(new QGLPixmapColorizeFilter); return d->colorizeFilter.data(); - case QPixmapFilter::BlurFilter: + case QPixmapFilter::BlurFilter: { + const QPixmapBlurFilter *proto = static_cast(prototype); + if (proto->quality() == Qt::FastTransformation || proto->radius() <= 5) { + if (!d->fastBlurFilter) + d->fastBlurFilter.reset(new QGLPixmapBlurFilter(Qt::FastTransformation)); + return d->fastBlurFilter.data(); + } if (!d->blurFilter) - d->blurFilter.reset(new QGLPixmapBlurFilter); + d->blurFilter.reset(new QGLPixmapBlurFilter(Qt::SmoothTransformation)); return d->blurFilter.data(); + } case QPixmapFilter::ConvolutionFilter: if (!d->convolutionFilter) @@ -309,10 +315,29 @@ bool QGLPixmapConvolutionFilter::processGL(QPainter *, const QPointF &pos, const return true; } -QGLPixmapBlurFilter::QGLPixmapBlurFilter() - : m_haveCached(false), m_cachedRadius(5), - m_cachedQuality(Qt::FastTransformation) +static const char *qt_gl_blur_filter_fast = + "const int samples = 9;" + "uniform mediump vec2 delta;" + "lowp vec4 customShader(lowp sampler2D src, highp vec2 srcCoords) {" + " mediump vec4 color = vec4(0.0, 0.0, 0.0, 0.0);" + " mediump float offset = (float(samples) - 1.0) / 2.0;" + " for (int i = 0; i < samples; i++) {" + " mediump vec2 coord = srcCoords + delta * (offset - float(i)) / offset;" + " color += texture2D(src, coord);" + " }" + " return color * (1.0 / float(samples));" + "}"; + +QGLPixmapBlurFilter::QGLPixmapBlurFilter(Qt::TransformationMode quality) + : m_haveCached(false) + , m_cachedRadius(5) + , m_quality(quality) { + if (quality == Qt::FastTransformation) { + QGLPixmapBlurFilter *filter = const_cast(this); + filter->setSource(qt_gl_blur_filter_fast); + m_haveCached = true; + } } bool QGLPixmapBlurFilter::processGL(QPainter *painter, const QPointF &pos, const QPixmap &src, const QRectF &) const @@ -320,15 +345,11 @@ bool QGLPixmapBlurFilter::processGL(QPainter *painter, const QPointF &pos, const QGLPixmapBlurFilter *filter = const_cast(this); int radius = this->radius(); - Qt::TransformationMode quality = this->quality(); - - if (!m_haveCached || radius != m_cachedRadius || - quality != m_cachedQuality) { + if (!m_haveCached || (m_quality == Qt::SmoothTransformation && radius != m_cachedRadius)) { // Only regenerate the shader from source if parameters have changed. m_haveCached = true; m_cachedRadius = radius; - m_cachedQuality = quality; - filter->setSource(generateBlurShader(radius, quality == Qt::SmoothTransformation)); + filter->setSource(generateGaussianShader(radius)); } QGLFramebufferObjectFormat format; @@ -386,12 +407,21 @@ bool QGLPixmapBlurFilter::processGL(QPainter *painter, const QPointF &pos, const void QGLPixmapBlurFilter::setUniforms(QGLShaderProgram *program) { - program->setUniformValue("invTextureSize", 1.0 / m_textureSize.width(), 1.0 / m_textureSize.height()); + if (m_quality == Qt::SmoothTransformation) { + if (m_horizontalBlur) + program->setUniformValue("delta", 1.0 / m_textureSize.width(), 0.0); + else + program->setUniformValue("delta", 0.0, 1.0 / m_textureSize.height()); + } else { + // 1.4 is chosen to most closely match the blurriness of the gaussian blur + // at low radii + qreal blur = radius() / 1.4f; - if (m_horizontalBlur) - program->setUniformValue("delta", 1.0, 0.0); - else - program->setUniformValue("delta", 0.0, 1.0); + if (m_horizontalBlur) + program->setUniformValue("delta", blur / m_textureSize.width(), 0.0); + else + program->setUniformValue("delta", 0.0, blur / m_textureSize.height()); + } } static inline qreal gaussian(qreal dx, qreal sigma) @@ -399,68 +429,46 @@ static inline qreal gaussian(qreal dx, qreal sigma) return exp(-dx * dx / (2 * sigma * sigma)) / (Q_2PI * sigma * sigma); } -QByteArray QGLPixmapBlurFilter::generateBlurShader(int radius, bool gaussianBlur) +QByteArray QGLPixmapBlurFilter::generateGaussianShader(int radius) { Q_ASSERT(radius >= 1); QByteArray source; source.reserve(1000); - source.append("uniform highp vec2 invTextureSize;\n"); - - bool separateXY = true; - bool clip = false; - - if (separateXY) { - source.append("uniform highp vec2 delta;\n"); - - if (clip) - source.append("uniform highp vec2 clip;\n"); - } else if (clip) { - source.append("uniform highp vec4 clip;\n"); - } - + source.append("uniform highp vec2 delta;\n"); source.append("lowp vec4 customShader(lowp sampler2D src, highp vec2 srcCoords) {\n"); QVector sampleOffsets; QVector weights; - if (gaussianBlur) { - QVector gaussianComponents; + QVector gaussianComponents; - qreal sigma = radius / 1.65; + qreal sigma = radius / 1.65; - qreal sum = 0; - for (int i = -radius; i <= radius; ++i) { - float value = gaussian(i, sigma); - gaussianComponents << value; - sum += value; - } + qreal sum = 0; + for (int i = -radius; i <= radius; ++i) { + float value = gaussian(i, sigma); + gaussianComponents << value; + sum += value; + } - // normalize - for (int i = 0; i < gaussianComponents.size(); ++i) - gaussianComponents[i] /= sum; + // normalize + for (int i = 0; i < gaussianComponents.size(); ++i) + gaussianComponents[i] /= sum; - for (int i = 0; i < gaussianComponents.size() - 1; i += 2) { - qreal weight = gaussianComponents.at(i) + gaussianComponents.at(i + 1); - qreal offset = i - radius + gaussianComponents.at(i + 1) / weight; + for (int i = 0; i < gaussianComponents.size() - 1; i += 2) { + qreal weight = gaussianComponents.at(i) + gaussianComponents.at(i + 1); + qreal offset = i - radius + gaussianComponents.at(i + 1) / weight; - sampleOffsets << offset; - weights << weight; - } + sampleOffsets << offset; + weights << weight; + } - // odd size ? - if (gaussianComponents.size() & 1) { - sampleOffsets << radius; - weights << gaussianComponents.last(); - } - } else { - for (int i = 0; i < radius; ++i) { - sampleOffsets << 2 * i - radius + 0.5; - weights << qreal(1); - } + // odd size ? + if (gaussianComponents.size() & 1) { sampleOffsets << radius; - weights << qreal(0.5); + weights << gaussianComponents.last(); } int currentVariable = 1; @@ -468,88 +476,36 @@ QByteArray QGLPixmapBlurFilter::generateBlurShader(int radius, bool gaussianBlur source.append(" mediump vec2 coord;\n"); qreal weightSum = 0; - if (separateXY) { - source.append(" mediump float c;\n"); - for (int i = 0; i < sampleOffsets.size(); ++i) { - qreal delta = sampleOffsets.at(i); - - ++currentVariable; - - QByteArray coordinate = "srcCoords"; - if (delta != qreal(0)) { - coordinate.append(" + invTextureSize * delta * float("); - coordinate.append(QByteArray::number(delta)); - coordinate.append(")"); - } - - source.append(" coord = "); - source.append(coordinate); - source.append(";\n"); + source.append(" mediump float c;\n"); + for (int i = 0; i < sampleOffsets.size(); ++i) { + qreal delta = sampleOffsets.at(i); + + ++currentVariable; - if (clip) { - source.append(" c = dot(coord, delta);\n"); - source.append(" if (c > clip.x && c < clip.y)\n "); - } - - source.append(" sample += texture2D(src, coord)"); - - weightSum += weights.at(i); - if (weights.at(i) != qreal(1)) { - source.append(" * float("); - source.append(QByteArray::number(weights.at(i))); - source.append(");\n"); - } else { - source.append(";\n"); - } + QByteArray coordinate = "srcCoords"; + if (delta != qreal(0)) { + coordinate.append(" + delta * float("); + coordinate.append(QByteArray::number(delta)); + coordinate.append(")"); } - } else { - for (int y = 0; y < sampleOffsets.size(); ++y) { - for (int x = 0; x < sampleOffsets.size(); ++x) { - QByteArray coordinate = "srcCoords"; - - qreal dx = sampleOffsets.at(x); - qreal dy = sampleOffsets.at(y); - - if (dx != qreal(0) || dy != qreal(0)) { - coordinate.append(" + invTextureSize * vec2(float("); - coordinate.append(QByteArray::number(dx)); - coordinate.append("), float("); - coordinate.append(QByteArray::number(dy)); - coordinate.append("))"); - } - - source.append(" coord = "); - source.append(coordinate); - source.append(";\n"); - - if (clip) - source.append(" if (coord.x > clip.x && coord.x < clip.y && coord.y > clip.z && coord.y < clip.w)\n "); - - source.append(" sample += texture2D(src, coord)"); - - ++currentVariable; - - weightSum += weights.at(x) * weights.at(y); - if ((weights.at(x) != qreal(1) || weights.at(y) != qreal(1))) { - source.append(" * float("); - source.append(QByteArray::number(weights.at(x) * weights.at(y))); - source.append(");\n"); - } else { - source.append(";\n"); - } - } + + source.append(" coord = "); + source.append(coordinate); + source.append(";\n"); + + source.append(" sample += texture2D(src, coord)"); + + weightSum += weights.at(i); + if (weights.at(i) != qreal(1)) { + source.append(" * float("); + source.append(QByteArray::number(weights.at(i))); + source.append(");\n"); + } else { + source.append(";\n"); } } source.append(" return "); - if (!gaussianBlur) { - source.append("float("); - if (separateXY) - source.append(QByteArray::number(1 / weightSum)); - else - source.append(QByteArray::number(1 / weightSum)); - source.append(") * "); - } source.append("sample;\n"); source.append("}\n"); -- cgit v0.12 From d57e2f4d01534f44dde629b71398783777fdad4e Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 24 Sep 2009 09:36:35 +0200 Subject: Stabilize Q3Table test If there is no focus widget while doing keyClick, the test crashes --- tests/auto/q3table/tst_q3table.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/auto/q3table/tst_q3table.cpp b/tests/auto/q3table/tst_q3table.cpp index f911dd4..770bf4d 100644 --- a/tests/auto/q3table/tst_q3table.cpp +++ b/tests/auto/q3table/tst_q3table.cpp @@ -523,6 +523,7 @@ void tst_Q3Table::simpleKeyboardNavigation() // After the first keyevent, the table starts editing the item w = testWidget->cellWidget(0, 0); + QVERIFY(w); #ifdef WAITS QTest::qWait(50); @@ -1205,12 +1206,17 @@ void tst_Q3Table::editCheck() EditCheckQ3Table table(10, 10, 0); table.show(); + QApplication::setActiveWindow(&table); QTest::qWaitForWindowShown(&table); + QTRY_COMPARE(QApplication::activeWindow(), &table); table.setCurrentCell(0, 0); #ifdef WAITS QTest::qWait(50); #endif QTest::keyClick(table.viewport(), Qt::Key_T); +#ifdef WAITS + QTest::qWait(50); +#endif // After the first keyevent, the table starts editing the item QLineEdit *le = qFindChild(testWidget->viewport(), "qt_lineeditor"); #ifdef WAITS @@ -1337,6 +1343,9 @@ void tst_Q3Table::valueChanged() testWidget->setItem(0, 0, ti); connect(testWidget,SIGNAL(valueChanged(int,int)),this,SLOT(onValueChanged(int,int))); testWidget->show(); + QApplication::setActiveWindow(testWidget); + QTest::qWaitForWindowShown(testWidget); + QTRY_COMPARE(QApplication::activeWindow(), testWidget); #ifdef WAITS QTest::qWait(50); #endif @@ -1344,6 +1353,7 @@ void tst_Q3Table::valueChanged() #ifdef WAITS QTest::qWait(50); #endif + QTRY_VERIFY(qApp->focusWidget()); QTest::keyClick(qApp->focusWidget(), Qt::Key_Enter); #ifdef WAITS QTest::qWait(50); @@ -1383,7 +1393,9 @@ void tst_Q3Table::dateTimeEdit() TimeTableItem *ti = new TimeTableItem(testWidget); testWidget->setItem(0, 0, ti); testWidget->show(); + QApplication::setActiveWindow(testWidget); QTest::qWaitForWindowShown(testWidget); + QTRY_COMPARE(QApplication::activeWindow(), testWidget); #ifdef WAITS QTest::qWait(50); #endif @@ -1391,6 +1403,7 @@ void tst_Q3Table::dateTimeEdit() #ifdef WAITS QTest::qWait(50); #endif + QTRY_VERIFY(qApp->focusWidget()); QTest::keyClick(qApp->focusWidget(), Qt::Key_Enter); #ifdef WAITS QTest::qWait(50); -- cgit v0.12 From 06aa9b6704637864130e318e8700f1b0b4f8a5e3 Mon Sep 17 00:00:00 2001 From: mae Date: Thu, 24 Sep 2009 12:31:51 +0200 Subject: Fix QTextDocument::revision() The revision was bound to the current depth of the undo stack. This had the negative side effect, that equal revisions could point to different documents, and sometimes changes would not even increase the revision (in the case of undo command merging). Reviewed-by: Roberto Raggi --- src/gui/text/qtextdocument.cpp | 2 +- src/gui/text/qtextdocument_p.cpp | 33 +++++++++------------- src/gui/text/qtextdocument_p.h | 5 ++-- tests/auto/qtextdocument/tst_qtextdocument.cpp | 39 ++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 23 deletions(-) diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index 57d4b7a..5540958 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -985,7 +985,7 @@ bool QTextDocument::isRedoAvailable() const int QTextDocument::revision() const { Q_D(const QTextDocument); - return d->undoState; + return d->revision; } diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp index 7bfdf6c..2ad6512 100644 --- a/src/gui/text/qtextdocument_p.cpp +++ b/src/gui/text/qtextdocument_p.cpp @@ -195,6 +195,7 @@ QTextDocumentPrivate::QTextDocumentPrivate() docChangeFrom = -1; undoState = 0; + revision = -1; // init() inserts a block, bringing it to 0 lout = 0; @@ -203,7 +204,6 @@ QTextDocumentPrivate::QTextDocumentPrivate() undoEnabled = true; inContentsChange = false; - inEdit = false; defaultTextOption.setTabStop(80); // same as in qtextengine.cpp defaultTextOption.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere); @@ -429,11 +429,11 @@ int QTextDocumentPrivate::insertBlock(const QChar &blockSeparator, Q_ASSERT(undoState == undoStack.size()); // update revision numbers of the modified blocks. - B->revision = (atBlockEnd && !atBlockStart)? oldRevision : undoState; + B->revision = (atBlockEnd && !atBlockStart)? oldRevision : revision; b = blocks.next(b); if (b) { B = blocks.fragment(b); - B->revision = atBlockStart ? oldRevision : undoState; + B->revision = atBlockStart ? oldRevision : revision; } if (formats.charFormat(charFormat).objectIndex() == -1) @@ -456,7 +456,6 @@ void QTextDocumentPrivate::insert(int pos, int strPos, int strLength, int format Q_ASSERT(pos >= 0 && pos < fragments.length()); Q_ASSERT(formats.format(format).isCharFormat()); - beginEdit(); insert_string(pos, strPos, strLength, format, QTextUndoCommand::MoveCursor); if (undoEnabled) { int b = blocks.findNode(pos); @@ -466,7 +465,7 @@ void QTextDocumentPrivate::insert(int pos, int strPos, int strLength, int format QTextUndoCommand::MoveCursor, format, strPos, pos, strLength, B->revision); appendUndoItem(c); - B->revision = undoState; + B->revision = revision; Q_ASSERT(undoState == undoStack.size()); } finishEdit(); @@ -582,7 +581,6 @@ void QTextDocumentPrivate::move(int pos, int to, int length, QTextUndoCommand::O if (pos == to) return; - beginEdit(); const bool needsInsert = to != -1; #if !defined(QT_NO_DEBUG) @@ -653,7 +651,7 @@ void QTextDocumentPrivate::move(int pos, int to, int length, QTextUndoCommand::O } appendUndoItem(c); if (B) - B->revision = undoState; + B->revision = revision; x = n; if (needsInsert) @@ -1111,6 +1109,7 @@ void QTextDocumentPrivate::joinPreviousEditBlock() void QTextDocumentPrivate::endEditBlock() { + Q_ASSERT(editBlock > 0); if (--editBlock) return; @@ -1131,8 +1130,6 @@ void QTextDocumentPrivate::finishEdit() if (editBlock) return; - inEdit = false; - if (framesDirty) scan_frames(docChangeFrom, docChangeOldLength, docChangeLength); @@ -1195,19 +1192,19 @@ void QTextDocumentPrivate::documentChange(int from, int length) adjustDocumentChangesAndCursors is called whenever there is an insert or remove of characters. param from is the cursor position in the document param addedOrRemoved is the amount of characters added or removed. A negative number means characters are removed. + + The function stores information to be emitted when finishEdit() is called. */ void QTextDocumentPrivate::adjustDocumentChangesAndCursors(int from, int addedOrRemoved, QTextUndoCommand::Operation op) { - Q_Q(QTextDocument); + if (!editBlock) + ++revision; + for (int i = 0; i < cursors.size(); ++i) { QTextCursorPrivate *curs = cursors.at(i); if (curs->adjustPosition(from, addedOrRemoved, op) == QTextCursorPrivate::CursorMoved) { - if (editBlock || inEdit) { - if (!changedCursors.contains(curs)) - changedCursors.append(curs); - } else { - emit q->cursorPositionChanged(QTextCursor(curs)); - } + if (!changedCursors.contains(curs)) + changedCursors.append(curs); } } @@ -1223,7 +1220,6 @@ void QTextDocumentPrivate::adjustDocumentChangesAndCursors(int from, int addedOr } // qDebug("adjustDocumentChanges:"); // qDebug(" -> %d %d %d", docChangeFrom, docChangeOldLength, docChangeLength); - contentsChanged(); return; } @@ -1248,7 +1244,6 @@ void QTextDocumentPrivate::adjustDocumentChangesAndCursors(int from, int addedOr docChangeLength += added - removedInside + diff; // qDebug(" -> %d %d %d", docChangeFrom, docChangeOldLength, docChangeLength); - contentsChanged(); } @@ -1541,7 +1536,7 @@ void QTextDocumentPrivate::deleteObject(QTextObject *object) void QTextDocumentPrivate::contentsChanged() { Q_Q(QTextDocument); - if (editBlock || inEdit) + if (editBlock) return; bool m = undoEnabled ? (modifiedState != undoState) : true; diff --git a/src/gui/text/qtextdocument_p.h b/src/gui/text/qtextdocument_p.h index 36f3241..ce25c57 100644 --- a/src/gui/text/qtextdocument_p.h +++ b/src/gui/text/qtextdocument_p.h @@ -201,10 +201,9 @@ public: inline void undo() { undoRedo(true); } inline void redo() { undoRedo(false); } void appendUndoItem(QAbstractUndoItem *); - inline void beginEditBlock() { editBlock++; } + inline void beginEditBlock() { if (0 == editBlock++) ++revision; } void joinPreviousEditBlock(); void endEditBlock(); - inline void beginEdit() { inEdit = true; } void finishEdit(); inline bool isInEditBlock() const { return editBlock; } void enableUndoRedo(bool enable); @@ -306,6 +305,7 @@ private: QVector undoStack; bool undoEnabled; int undoState; + int revision; // position in undo stack of the last setModified(false) call int modifiedState; bool modified; @@ -340,7 +340,6 @@ public: int maximumBlockCount; uint needsEnsureMaximumBlockCount : 1; uint inContentsChange : 1; - uint inEdit : 1; // between beginEdit() and finishEdit() QSizeF pageSize; QString title; QString url; diff --git a/tests/auto/qtextdocument/tst_qtextdocument.cpp b/tests/auto/qtextdocument/tst_qtextdocument.cpp index 323df58..c0d7ed3 100644 --- a/tests/auto/qtextdocument/tst_qtextdocument.cpp +++ b/tests/auto/qtextdocument/tst_qtextdocument.cpp @@ -168,6 +168,7 @@ private slots: void characterAt(); void revisions(); + void revisionWithUndoCompressionAndUndo(); void testUndoCommandAdded(); @@ -2499,6 +2500,44 @@ void tst_QTextDocument::revisions() QCOMPARE(cursor.block().revision(), 5); } +void tst_QTextDocument::revisionWithUndoCompressionAndUndo() +{ + QTextDocument doc; + QTextCursor cursor(&doc); + cursor.insertText("This is the beginning of it all."); + QCOMPARE(doc.firstBlock().revision(), 1); + QCOMPARE(doc.revision(), 1); + cursor.insertBlock(); + QCOMPARE(doc.revision(), 2); + cursor.insertText("this"); + QCOMPARE(doc.revision(), 3); + cursor.insertText("is"); + QCOMPARE(doc.revision(), 4); + cursor.insertText("compressed"); + QCOMPARE(doc.revision(), 5); + doc.undo(); + QCOMPARE(doc.revision(), 6); + QCOMPARE(doc.toPlainText(), QString("This is the beginning of it all.\n")) ; + cursor.setPosition(0); + QCOMPARE(doc.firstBlock().revision(), 1); + cursor.insertText("Very beginnig"); + QCOMPARE(doc.firstBlock().revision(), 7); + doc.undo(); + QCOMPARE(doc.revision(), 8); + QCOMPARE(doc.firstBlock().revision(), 1); + + cursor.beginEditBlock(); + cursor.insertText("Hello"); + cursor.insertBlock(); + cursor.insertText("world"); + cursor.endEditBlock(); + QCOMPARE(doc.revision(), 9); + doc.undo(); + QCOMPARE(doc.revision(), 10); + + +} + void tst_QTextDocument::testUndoCommandAdded() { QVERIFY(doc); -- cgit v0.12 From 6e2e8f79eb941e9ed302f0d12b2a09f2e9ca46cf Mon Sep 17 00:00:00 2001 From: mread Date: Thu, 24 Sep 2009 11:29:10 +0100 Subject: Uninitialised variable fix for qfilesystemwatcher_symbian The errorCode member was uninitialised, this caused the watcher thread startup to fail. Reviewed-by: Miikka Heikkinen --- src/corelib/io/qfilesystemwatcher_symbian.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/io/qfilesystemwatcher_symbian.cpp b/src/corelib/io/qfilesystemwatcher_symbian.cpp index be0e8a9..a07d084 100644 --- a/src/corelib/io/qfilesystemwatcher_symbian.cpp +++ b/src/corelib/io/qfilesystemwatcher_symbian.cpp @@ -106,7 +106,7 @@ void QNotifyChangeEvent::DoCancel() } QSymbianFileSystemWatcherEngine::QSymbianFileSystemWatcherEngine() : - watcherStarted(false) + errorCode(KErrNone), watcherStarted(false) { moveToThread(this); } -- cgit v0.12 From 8f6b71b2ea4453d6d1f2c070145970630df9ee27 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Thu, 24 Sep 2009 13:03:51 +0200 Subject: Use '=' for comparison in shell script, not '==' Fixes the build with some ancient shells --- configure | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/configure b/configure index a9ad276..6a4b079 100755 --- a/configure +++ b/configure @@ -2919,7 +2919,7 @@ elif [ "$CFG_PRECOMPILE" = "yes" ] && [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; fi #auto-detect DWARF2 on the mac -if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" == "auto" ]; then +if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "auto" ]; then if "$mactests/dwarf2.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then CFG_MAC_DWARF2=no else @@ -2928,7 +2928,7 @@ if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" == "auto" ]; then fi # auto-detect support for -Xarch on the mac -if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" == "auto" ]; then +if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" = "auto" ]; then if "$mactests/xarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" ; then CFG_MAC_XARCH=no else @@ -5739,7 +5739,7 @@ if [ "$CFG_OPENVG" != "no" ]; then CFG_OPENVG=no fi fi - if [ "$CFG_OPENVG" == "yes" ] && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/shivavg" "ShivaVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then + if [ "$CFG_OPENVG" = "yes" ] && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/shivavg" "ShivaVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then CFG_OPENVG_SHIVA=yes fi fi @@ -5814,13 +5814,13 @@ fi # Carbon builds: 32 bit x86/ppc. # For "-cocoa" builds on snow leopard : compiler default (64-bit). # For "-cocoa" builds on leopard : compiler default (32-bit). -if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" == "" ]; then +if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" = "" ]; then source "$mactests/defaultarch.test" "$TEST_COMPILER" "$OPT_VERBOSE" "$mactests" if [ "$CFG_MAC_COCOA" != "yes" ]; then - if [ "$QT_MAC_DEFAULT_ARCH" == "x86_64" ]; then + if [ "$QT_MAC_DEFAULT_ARCH" = "x86_64" ]; then CFG_MAC_ARCHS=" x86" - elif [ "$QT_MAC_DEFAULT_ARCH" == "ppc64" ]; then + elif [ "$QT_MAC_DEFAULT_ARCH" = "ppc64" ]; then CFG_MAC_ARCHS=" ppc" else CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH" @@ -5829,7 +5829,7 @@ if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_ARCHS" == "" ]; then CFG_MAC_ARCHS=" $QT_MAC_DEFAULT_ARCH" fi - [ "$OPT_VERBOSE" == "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS." + [ "$OPT_VERBOSE" = "yes" ] && echo "Setting Mac architechture to$CFG_MAC_ARCHS." fi # enable cocoa and/or carbon on Mac @@ -7197,7 +7197,7 @@ EOF *) ;; esac -if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" == "no" ] && [ "$CFG_WEBKIT" = "yes" ] && [ "$CFG_DEBUG_RELEASE" == "yes" ]; then +if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then cat < Date: Thu, 24 Sep 2009 13:07:38 +0200 Subject: Fixed a text drawing problem in the GL2 engine under X11. In certain situations text would toggle between sub-pixel hinted and normal antialiased, when e.g. drawing menus with -graphicssystem opengl. Reviewed-by: Samuel --- src/gui/text/qfontengine_ft.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index 788417a..3da1593 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -1856,7 +1856,7 @@ QImage QFontEngineFT::alphaMapForGlyph(glyph_t g) QImage QFontEngineFT::alphaRGBMapForGlyph(glyph_t g, int margin, const QTransform &t) { - if (t.type() != QTransform::TxTranslate) + if (t.type() > QTransform::TxTranslate) return QFontEngine::alphaRGBMapForGlyph(g, margin, t); lockFace(); -- cgit v0.12 From bc101d83b313d9ebf7c54789077d6710d3e78cd9 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Thu, 24 Sep 2009 22:09:03 +1000 Subject: Fixed compile of tests. Test qaudiodeviceid was replaced with qaudiodeviceinfo. Reviewed-by: Paul --- tests/auto/auto.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index 0638679..a2e1407 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -278,7 +278,7 @@ SUBDIRS += \ qsocks5socketengine \ qsortfilterproxymodel \ qsound \ - qaudiodeviceid \ + qaudiodeviceinfo \ qaudioformat \ qaudiooutput \ qaudioinput \ -- cgit v0.12 From 121349cb90d66625728fdcecc8e4f75f268b3a53 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 24 Sep 2009 14:31:17 +0200 Subject: Only account for a negative right bearing in QTextLayout We only want to expand the width of the text, never shrink it. This is so that we can account for text where the pixels of the text extend beyond the edge of the last glyph. When we shrinked the width, code that depended on the natural text width equalling the advance of the text (such as WebKit) broke, and some text items would be positioned wrongly. We now only take negative right bearings into account (right bearing is left-bound), meaning that we only expand the text width, never shrink it due to right bearing. Reviewed-by: Simon Hausmann --- src/gui/text/qtextlayout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index 39a8bb8..c5f0e35 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -1813,7 +1813,7 @@ void QTextLine::layout_helper(int maxGlyphs) glyph_t glyph = glyphs.glyphs[logClusters[pos - 1]]; glyph_metrics_t gi = fontEngine->boundingBox(glyph); if (gi.isValid()) - lbh.rightBearing = -qRound(gi.xoff - gi.x - gi.width); + lbh.rightBearing = qMax(QFixed(), -(gi.xoff - gi.x - gi.width)); } if ((sb_or_ws|breakany) && lbh.checkFullOtherwiseExtend(line)) { -- cgit v0.12 From cb89aab6b29fd5761f3b9d41354abcde11e103dc Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Thu, 24 Sep 2009 14:53:53 +0200 Subject: Update mkdist-webkit script to use latest tag 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 3afccba..09a99b9 100755 --- a/util/webkit/mkdist-webkit +++ b/util/webkit/mkdist-webkit @@ -5,7 +5,7 @@ die() { exit 1 } -default_tag="qtwebkit-4.6-snapshot-18092009" +default_tag="qtwebkit-4.6-snapshot-24092009" if [ $# -eq 0 ]; then tag="$default_tag" -- cgit v0.12 From 512d332d21860b1d08e86d6de96b80ce12d742bf Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Thu, 24 Sep 2009 14:56:11 +0200 Subject: Updated WebKit from /home/joce/dev/qtwebkit3/ to qtwebkit-4.6-snapshot-24092009 ( 75c44947a340d74a9e0098a3dfffabce0c9512ef ) 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-24 Martin Smith Reviewed by Simon Hausmann. qdoc: Added \brief texts to all the since 4.6 functions. * Api/qwebhistory.cpp: 2009-09-23 J-P Nurmi Reviewed by Simon Hausmann. Prevent QWebPage::setView() from changing the viewport size on the fly in case the view doesn't actually change. QWebPage::setView() is called upon every QWebGraphicsItem::hoverMoveEvent(), which forced the viewport size to be equal to the size of the whole graphics view. https://bugs.webkit.org/show_bug.cgi?id=29676 * Api/qwebpage.cpp: (QWebPage::setView): 2009-09-23 Jedrzej Nowacki Reviewed by Simon Hausmann. [Qt] Crash fix in QWebHistory back and forward methods. QWebHistory::back() and QWebHistory::forward() were crashing on ASSERT in WebCore::BackForwardList. The methods should check canGoBack() and canGoForward() at the beginning. https://bugs.webkit.org/show_bug.cgi?id=29675 * Api/qwebhistory.cpp: (QWebHistory::back): (QWebHistory::forward): 2009-09-23 Jedrzej Nowacki Reviewed by Simon Hausmann. [Qt] Bug fix. QWebHistory should call QWebPage::updateNavigationActions In QWebHistory's methods that change item count or current item call to QWebPage::updateNavigationActions should be executed. QWebHistory::clear() and QWebHistory::restorState() were changed. New helper method, QWebPagePrivate accesor, were created in QWebHistoryPrivate class. Two autotest were developed. https://bugs.webkit.org/show_bug.cgi?id=29246 * Api/qwebhistory.cpp: (QWebHistory::clear): (QWebHistory::restoreState): (QWebHistoryPrivate::page): * Api/qwebhistory_p.h: * tests/qwebhistory/tst_qwebhistory.cpp: (tst_QWebHistory::saveAndRestore_1): (tst_QWebHistory::clear): 2009-09-23 Norbert Leser Reviewed by Tor Arne Vestbø. Need to guard QX11Info include with Q_WS_X11. That class may not be available (in QT 4.5 for Symbian, for instance). Completes fixes in r48627 and r48604. * Api/qwebgraphicsitem.cpp: * Api/qwebview.cpp: 2009-09-22 Jocelyn Turcotte Reviewed by Simon Hausmann. [Qt] Add default timeout while waiting for signals in QWebPage auto tests. https://bugs.webkit.org/show_bug.cgi?id=29637 * tests/qwebpage/tst_qwebpage.cpp: (waitForSignal): 2009-09-22 Tor Arne Vestbø Reivewed by Simon Hausmann. Fix the Qt/Mac build after r48604 (Implement new QWebPageClient class) There's no QWidget::x11Info() on Mac, and setPlatformPluginWidget() takes a QWidget*, not a QWebPageClient* * Api/qwebgraphicsitem.cpp: (QWebGraphicsItemPrivate::screenNumber): * Api/qwebview.cpp: (QWebViewPrivate::screenNumber): 2009-09-21 Kenneth Rohde Christiansen Reviewed by Simon Hausmann. For Qt, platformPageClient() will now return a class derived from the QWebPageClient, so the patch adapts our Qt hooks to go though this class and not depend on the QWebView. * Api/qwebgraphicsitem.cpp: (QWebGraphicsItemPrivate::scroll): (QWebGraphicsItemPrivate::update): (QWebGraphicsItemPrivate::cursor): (QWebGraphicsItemPrivate::updateCursor): (QWebGraphicsItemPrivate::screenNumber): (QWebGraphicsItemPrivate::winId): (QWebGraphicsItem::event): (QWebGraphicsItem::setPage): * Api/qwebgraphicsitem.h: * Api/qwebpage.cpp: (QWebPagePrivate::QWebPagePrivate): * Api/qwebpage_p.h: * Api/qwebview.cpp: (QWebViewPrivate::scroll): (QWebViewPrivate::update): (QWebViewPrivate::cursor): (QWebViewPrivate::updateCursor): (QWebViewPrivate::screenNumber): (QWebViewPrivate::winId): (QWebView::setPage): (QWebView::event): * WebCoreSupport/ChromeClientQt.cpp: (WebCore::ChromeClientQt::repaint): (WebCore::ChromeClientQt::scroll): (WebCore::ChromeClientQt::platformPageClient): 2009-09-21 Yael Aharon Reviewed by Simon Hausmann. https://bugs.webkit.org/show_bug.cgi?id=29609 Build fix for windows when using Qt 4.5.0. * Api/qwebpage.cpp: (QWebPage::userAgentForUrl): 2009-09-19 Benjamin Poulain Reviewed by Simon Hausmann. https://bugs.webkit.org/show_bug.cgi?id=29345 The tests of QWebFrame did not use QTRY_VERIFY for tests involving the event loop. * tests/qwebframe/tst_qwebframe.cpp: * tests/util.h: Added. Copy of tests/shared/util.h of Qt 2009-09-19 Jakub Wieczorek Reviewed by Simon Hausmann. [Qt] Add an autotest stub for QWebGraphicsItem. It just calls all the functions and makes sure they don't crash. * tests/qwebgraphicsitem/qwebgraphicsitem.pro: Added. * tests/qwebgraphicsitem/tst_qwebgraphicsitem.cpp: Added. (tst_QWebGraphicsItem::qwebgraphicsitem): * tests/tests.pro: 2009-09-18 Norbert Leser Reviewed by Eric Seidel. Corrected the Symbian specific UID3 values to be assigned from the "unprotected" pool that permits self-signing of those test and demo executables. (Added new UID3 values where they were missing for new components.) * QGVLauncher/QGVLauncher.pro: * QtLauncher/QtLauncher.pro: * tests/benchmarks/loading/tst_loading.pro: * tests/benchmarks/painting/tst_painting.pro: * tests/qwebelement/qwebelement.pro: * tests/qwebframe/qwebframe.pro: * tests/qwebhistory/qwebhistory.pro: * tests/qwebhistoryinterface/qwebhistoryinterface.pro: * tests/qwebpage/qwebpage.pro: * tests/qwebplugindatabase/qwebplugindatabase.pro: * tests/qwebview/qwebview.pro: 2009-09-17 Kenneth Rohde Christiansen Reviewed by Simon Hausmann. Make PlatformWindow return something else than PlatformWidget https://bugs.webkit.org/show_bug.cgi?id=29085 Reflect the rename of platformWindow and it's return type. * WebCoreSupport/ChromeClientQt.cpp: (WebCore::ChromeClientQt::platformPageClient): * WebCoreSupport/ChromeClientQt.h: 2009-09-18 Jocelyn Turcotte Reviewed by Simon Hausmann. [Qt] Add persistence support for configuration options in the inspector. * Api/qwebinspector.cpp: * QtLauncher/main.cpp: (main): * WebCoreSupport/InspectorClientQt.cpp: (WebCore::InspectorClientQt::populateSetting): (WebCore::InspectorClientQt::storeSetting): (WebCore::variantToSetting): (WebCore::settingToVariant): 2009-09-17 Kenneth Rohde Christiansen Reviewed by Simon Hausmann. Improve documentation for Page Cache. * Api/qwebsettings.cpp: 2009-09-17 Tor Arne Vestbø Reviewed by Simon Hausmann. [Qt] Update QWebSettings::setUserStyleSheetUrl() docs and test https://bugs.webkit.org/show_bug.cgi?id=29081 The documentation now specifies that the URL has to be a local file or a a data-URL (with utf-8 and base64-encoded data), as these are the only two schemes that the current code path accepts. The auto-test has been updated to reflect this limitation. At a later point we should concider adding API for the new way of doing both user defined stylesheets and scripts. * Api/qwebsettings.cpp: * tests/qwebpage/tst_qwebpage.cpp: --- src/3rdparty/webkit/ChangeLog | 81 + .../webkit/JavaScriptCore/API/JSStringRef.h | 2 +- src/3rdparty/webkit/JavaScriptCore/ChangeLog | 529 ++++ .../webkit/JavaScriptCore/JavaScriptCore.pri | 3 +- .../webkit/JavaScriptCore/JavaScriptCore.pro | 69 + .../JavaScriptCore/assembler/ARMAssembler.cpp | 4 +- .../webkit/JavaScriptCore/assembler/ARMAssembler.h | 4 +- .../JavaScriptCore/assembler/ARMv7Assembler.h | 4 +- .../JavaScriptCore/assembler/MacroAssembler.h | 4 +- .../JavaScriptCore/assembler/MacroAssemblerARM.cpp | 4 +- .../JavaScriptCore/assembler/MacroAssemblerARM.h | 4 +- .../assembler/MacroAssemblerCodeRef.h | 6 +- .../webkit/JavaScriptCore/bytecode/EvalCodeCache.h | 2 +- .../JavaScriptCore/bytecode/SamplingTool.cpp | 30 +- .../webkit/JavaScriptCore/bytecode/SamplingTool.h | 22 +- .../bytecompiler/BytecodeGenerator.cpp | 8 +- .../bytecompiler/BytecodeGenerator.h | 9 +- .../webkit/JavaScriptCore/debugger/Debugger.cpp | 2 +- .../JavaScriptCore/debugger/DebuggerActivation.cpp | 8 +- .../JavaScriptCore/debugger/DebuggerActivation.h | 4 +- .../JavaScriptCore/debugger/DebuggerCallFrame.cpp | 2 +- .../JavaScriptCore/interpreter/Interpreter.cpp | 12 +- .../JavaScriptCore/interpreter/RegisterFile.cpp | 3 + .../JavaScriptCore/jit/ExecutableAllocator.h | 35 +- src/3rdparty/webkit/JavaScriptCore/jit/JIT.h | 10 +- .../webkit/JavaScriptCore/jit/JITInlineMethods.h | 22 +- .../webkit/JavaScriptCore/jit/JITOpcodes.cpp | 2 +- .../webkit/JavaScriptCore/jit/JITStubs.cpp | 52 +- src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.h | 6 +- .../webkit/JavaScriptCore/parser/Nodes.cpp | 8 - .../webkit/JavaScriptCore/parser/SourceCode.h | 3 +- .../runtime/BatchedTransitionOptimizer.h | 2 +- .../JavaScriptCore/runtime/CommonIdentifiers.h | 3 + .../webkit/JavaScriptCore/runtime/Completion.cpp | 4 +- .../webkit/JavaScriptCore/runtime/Executable.cpp | 2 +- .../webkit/JavaScriptCore/runtime/Executable.h | 58 +- .../webkit/JavaScriptCore/runtime/JSArray.cpp | 2 +- .../JavaScriptCore/runtime/JSGlobalObject.cpp | 8 +- .../webkit/JavaScriptCore/runtime/JSGlobalObject.h | 4 +- .../runtime/JSGlobalObjectFunctions.cpp | 2 +- .../webkit/JavaScriptCore/runtime/JSObject.cpp | 137 +- .../webkit/JavaScriptCore/runtime/JSObject.h | 5 +- .../JavaScriptCore/runtime/MarkStackPosix.cpp | 22 + .../JavaScriptCore/runtime/ObjectConstructor.cpp | 174 +- .../JavaScriptCore/runtime/PropertyDescriptor.cpp | 116 +- .../JavaScriptCore/runtime/PropertyDescriptor.h | 31 +- .../webkit/JavaScriptCore/runtime/Structure.cpp | 44 +- .../webkit/JavaScriptCore/runtime/Structure.h | 17 +- .../JavaScriptCore/runtime/StructureChain.cpp | 1 + .../webkit/JavaScriptCore/wtf/Assertions.h | 24 +- src/3rdparty/webkit/JavaScriptCore/wtf/Forward.h | 5 +- .../webkit/JavaScriptCore/wtf/HashCountedSet.h | 24 +- .../webkit/JavaScriptCore/wtf/ListRefPtr.h | 20 +- src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h | 61 +- src/3rdparty/webkit/JavaScriptCore/wtf/RefPtr.h | 2 +- src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h | 28 + .../webkit/JavaScriptCore/wtf/unicode/Unicode.h | 4 + .../webkit/JavaScriptCore/yarr/RegexJIT.cpp | 2 +- src/3rdparty/webkit/VERSION | 4 +- src/3rdparty/webkit/WebCore/ChangeLog | 2657 ++++++++++++++++++++ src/3rdparty/webkit/WebCore/DerivedSources.cpp | 1 - src/3rdparty/webkit/WebCore/WebCore.LP64.exp | 15 - src/3rdparty/webkit/WebCore/WebCore.gypi | 6 +- src/3rdparty/webkit/WebCore/WebCore.pro | 21 +- .../WebCore/accessibility/AccessibilityObject.h | 1 + .../accessibility/AccessibilityRenderObject.cpp | 40 +- .../accessibility/AccessibilityRenderObject.h | 2 + .../WebCore/bindings/js/JSAbstractWorkerCustom.cpp | 15 - .../bindings/js/JSCustomXPathNSResolver.cpp | 22 +- .../WebCore/bindings/js/JSCustomXPathNSResolver.h | 8 +- .../bindings/js/JSDOMApplicationCacheCustom.cpp | 22 - .../webkit/WebCore/bindings/js/JSDOMBinding.cpp | 13 +- .../webkit/WebCore/bindings/js/JSDOMBinding.h | 2 + .../WebCore/bindings/js/JSDOMWindowCustom.cpp | 46 +- .../WebCore/bindings/js/JSDOMWindowShell.cpp | 13 +- .../webkit/WebCore/bindings/js/JSDOMWindowShell.h | 5 +- .../bindings/js/JSDedicatedWorkerContextCustom.cpp | 7 - .../webkit/WebCore/bindings/js/JSEventListener.cpp | 19 +- .../webkit/WebCore/bindings/js/JSEventListener.h | 2 +- .../WebCore/bindings/js/JSEventSourceCustom.cpp | 17 - .../WebCore/bindings/js/JSGeolocationCustom.cpp | 22 +- .../WebCore/bindings/js/JSHTMLCollectionCustom.cpp | 11 +- .../bindings/js/JSHTMLFormElementCustom.cpp | 13 +- .../WebCore/bindings/js/JSLocationCustom.cpp | 26 +- .../WebCore/bindings/js/JSMessagePortCustom.cpp | 10 +- .../WebCore/bindings/js/JSNamedNodesCollection.cpp | 125 - .../WebCore/bindings/js/JSNamedNodesCollection.h | 67 - .../webkit/WebCore/bindings/js/JSNodeCustom.cpp | 6 +- .../bindings/js/JSQuarantinedObjectWrapper.cpp | 29 +- .../bindings/js/JSQuarantinedObjectWrapper.h | 1 + .../bindings/js/JSSharedWorkerConstructor.cpp | 7 +- .../bindings/js/JSSharedWorkerContextCustom.cpp | 50 - .../WebCore/bindings/js/JSWebSocketCustom.cpp | 8 - .../WebCore/bindings/js/JSWorkerContextCustom.cpp | 10 +- .../webkit/WebCore/bindings/js/JSWorkerCustom.cpp | 7 - .../WebCore/bindings/js/JSXMLHttpRequestCustom.cpp | 15 +- .../bindings/js/JSXMLHttpRequestUploadCustom.cpp | 14 +- .../WebCore/bindings/js/ScriptController.cpp | 7 +- .../WebCore/bindings/scripts/CodeGeneratorJS.pm | 48 +- .../WebCore/bindings/scripts/CodeGeneratorV8.pm | 7 +- .../webkit/WebCore/bridge/qt/qt_instance.cpp | 39 +- .../webkit/WebCore/bridge/qt/qt_instance.h | 2 +- src/3rdparty/webkit/WebCore/bridge/runtime.cpp | 30 +- src/3rdparty/webkit/WebCore/bridge/runtime.h | 12 +- .../webkit/WebCore/bridge/runtime_object.cpp | 65 +- .../webkit/WebCore/bridge/runtime_object.h | 12 +- .../WebCore/css/CSSComputedStyleDeclaration.cpp | 2 +- src/3rdparty/webkit/WebCore/css/CSSParser.cpp | 2 +- .../webkit/WebCore/css/CSSPrimitiveValueMappings.h | 5 +- .../webkit/WebCore/css/CSSStyleSelector.cpp | 15 +- src/3rdparty/webkit/WebCore/css/mathml.css | 170 ++ .../webkit/WebCore/css/mediaControlsChromium.css | 1 + src/3rdparty/webkit/WebCore/dom/ActiveDOMObject.h | 6 +- src/3rdparty/webkit/WebCore/dom/CharacterData.cpp | 6 +- src/3rdparty/webkit/WebCore/dom/ContainerNode.cpp | 53 +- src/3rdparty/webkit/WebCore/dom/Document.cpp | 52 +- src/3rdparty/webkit/WebCore/dom/Document.h | 51 +- src/3rdparty/webkit/WebCore/dom/Element.h | 45 + src/3rdparty/webkit/WebCore/dom/EventListener.h | 9 +- src/3rdparty/webkit/WebCore/dom/EventNames.h | 3 + src/3rdparty/webkit/WebCore/dom/EventTarget.cpp | 181 +- src/3rdparty/webkit/WebCore/dom/EventTarget.h | 133 +- src/3rdparty/webkit/WebCore/dom/InputElement.cpp | 59 +- src/3rdparty/webkit/WebCore/dom/MessageEvent.h | 2 +- src/3rdparty/webkit/WebCore/dom/MessagePort.cpp | 75 +- src/3rdparty/webkit/WebCore/dom/MessagePort.h | 25 +- src/3rdparty/webkit/WebCore/dom/MessagePort.idl | 1 + src/3rdparty/webkit/WebCore/dom/MutationEvent.h | 7 +- src/3rdparty/webkit/WebCore/dom/Node.cpp | 601 +---- src/3rdparty/webkit/WebCore/dom/Node.h | 124 +- src/3rdparty/webkit/WebCore/dom/Node.idl | 1 + src/3rdparty/webkit/WebCore/dom/NodeRareData.h | 12 +- .../webkit/WebCore/dom/RegisteredEventListener.cpp | 8 - .../webkit/WebCore/dom/RegisteredEventListener.h | 44 +- .../webkit/WebCore/generated/HTMLNames.cpp | 6 +- src/3rdparty/webkit/WebCore/generated/HTMLNames.h | 1 + .../webkit/WebCore/generated/JSAbstractWorker.cpp | 10 +- .../webkit/WebCore/generated/JSBarInfo.cpp | 2 +- .../webkit/WebCore/generated/JSCSSRule.cpp | 2 +- .../webkit/WebCore/generated/JSCSSRuleList.cpp | 2 +- .../WebCore/generated/JSCSSStyleDeclaration.cpp | 2 +- .../webkit/WebCore/generated/JSCSSValue.cpp | 2 +- .../generated/JSCSSVariablesDeclaration.cpp | 2 +- .../webkit/WebCore/generated/JSCanvasArray.cpp | 2 +- .../WebCore/generated/JSCanvasArrayBuffer.cpp | 2 +- .../webkit/WebCore/generated/JSCanvasGradient.cpp | 2 +- .../webkit/WebCore/generated/JSCanvasPattern.cpp | 2 +- .../WebCore/generated/JSCanvasRenderingContext.cpp | 2 +- .../webkit/WebCore/generated/JSClientRect.cpp | 2 +- .../webkit/WebCore/generated/JSClientRectList.cpp | 2 +- .../webkit/WebCore/generated/JSClipboard.cpp | 2 +- .../webkit/WebCore/generated/JSConsole.cpp | 2 +- .../webkit/WebCore/generated/JSCoordinates.cpp | 2 +- .../webkit/WebCore/generated/JSCounter.cpp | 2 +- .../WebCore/generated/JSDOMApplicationCache.cpp | 10 +- .../WebCore/generated/JSDOMCoreException.cpp | 2 +- .../WebCore/generated/JSDOMImplementation.cpp | 2 +- .../webkit/WebCore/generated/JSDOMParser.cpp | 2 +- .../webkit/WebCore/generated/JSDOMSelection.cpp | 2 +- .../webkit/WebCore/generated/JSDOMWindow.cpp | 25 +- .../webkit/WebCore/generated/JSDOMWindow.h | 8 +- .../webkit/WebCore/generated/JSDataGridColumn.cpp | 2 +- .../WebCore/generated/JSDataGridColumnList.cpp | 2 +- .../webkit/WebCore/generated/JSDatabase.cpp | 2 +- .../WebCore/generated/JSDedicatedWorkerContext.h | 4 +- src/3rdparty/webkit/WebCore/generated/JSEvent.cpp | 2 +- .../webkit/WebCore/generated/JSEventException.cpp | 2 +- .../webkit/WebCore/generated/JSEventSource.cpp | 10 +- src/3rdparty/webkit/WebCore/generated/JSFile.cpp | 2 +- .../webkit/WebCore/generated/JSFileList.cpp | 2 +- .../webkit/WebCore/generated/JSGeolocation.cpp | 2 +- .../webkit/WebCore/generated/JSGeoposition.cpp | 2 +- .../webkit/WebCore/generated/JSHTMLCollection.cpp | 2 +- .../WebCore/generated/JSHTMLTextAreaElement.cpp | 17 +- .../WebCore/generated/JSHTMLTextAreaElement.h | 2 + .../webkit/WebCore/generated/JSHistory.cpp | 2 +- .../webkit/WebCore/generated/JSImageData.cpp | 2 +- .../WebCore/generated/JSInspectorBackend.cpp | 52 +- .../webkit/WebCore/generated/JSInspectorBackend.h | 3 + .../WebCore/generated/JSJavaScriptCallFrame.cpp | 2 +- .../webkit/WebCore/generated/JSLocation.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSLocation.h | 4 +- src/3rdparty/webkit/WebCore/generated/JSMedia.cpp | 2 +- .../webkit/WebCore/generated/JSMediaError.cpp | 2 +- .../webkit/WebCore/generated/JSMediaList.cpp | 2 +- .../webkit/WebCore/generated/JSMessageChannel.cpp | 2 +- .../webkit/WebCore/generated/JSMessagePort.cpp | 4 +- .../webkit/WebCore/generated/JSMimeType.cpp | 2 +- .../webkit/WebCore/generated/JSMimeTypeArray.cpp | 2 +- .../webkit/WebCore/generated/JSNamedNodeMap.cpp | 2 +- .../webkit/WebCore/generated/JSNavigator.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSNode.cpp | 4 +- .../webkit/WebCore/generated/JSNodeFilter.cpp | 2 +- .../webkit/WebCore/generated/JSNodeIterator.cpp | 2 +- .../webkit/WebCore/generated/JSNodeList.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSPlugin.cpp | 2 +- .../webkit/WebCore/generated/JSPluginArray.cpp | 2 +- .../webkit/WebCore/generated/JSPositionError.cpp | 2 +- .../webkit/WebCore/generated/JSRGBColor.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSRange.cpp | 2 +- .../webkit/WebCore/generated/JSRangeException.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSRect.cpp | 2 +- .../webkit/WebCore/generated/JSSQLError.cpp | 2 +- .../webkit/WebCore/generated/JSSQLResultSet.cpp | 2 +- .../WebCore/generated/JSSQLResultSetRowList.cpp | 2 +- .../webkit/WebCore/generated/JSSQLTransaction.cpp | 2 +- .../webkit/WebCore/generated/JSSVGAngle.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedAngle.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedBoolean.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedEnumeration.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedInteger.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedLength.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedLengthList.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedNumber.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedNumberList.cpp | 2 +- .../generated/JSSVGAnimatedPreserveAspectRatio.cpp | 2 +- .../webkit/WebCore/generated/JSSVGAnimatedRect.cpp | 2 +- .../WebCore/generated/JSSVGAnimatedString.cpp | 2 +- .../generated/JSSVGAnimatedTransformList.cpp | 2 +- .../WebCore/generated/JSSVGElementInstance.cpp | 2 +- .../WebCore/generated/JSSVGElementInstanceList.cpp | 2 +- .../webkit/WebCore/generated/JSSVGException.cpp | 2 +- .../webkit/WebCore/generated/JSSVGLength.cpp | 2 +- .../webkit/WebCore/generated/JSSVGLengthList.cpp | 2 +- .../webkit/WebCore/generated/JSSVGMatrix.cpp | 2 +- .../webkit/WebCore/generated/JSSVGNumber.cpp | 2 +- .../webkit/WebCore/generated/JSSVGNumberList.cpp | 2 +- .../webkit/WebCore/generated/JSSVGPathSeg.cpp | 2 +- .../webkit/WebCore/generated/JSSVGPathSegList.cpp | 2 +- .../webkit/WebCore/generated/JSSVGPoint.cpp | 2 +- .../webkit/WebCore/generated/JSSVGPointList.cpp | 2 +- .../WebCore/generated/JSSVGPreserveAspectRatio.cpp | 2 +- .../webkit/WebCore/generated/JSSVGRect.cpp | 2 +- .../WebCore/generated/JSSVGRenderingIntent.cpp | 2 +- .../webkit/WebCore/generated/JSSVGStringList.cpp | 2 +- .../webkit/WebCore/generated/JSSVGTransform.cpp | 2 +- .../WebCore/generated/JSSVGTransformList.cpp | 2 +- .../webkit/WebCore/generated/JSSVGUnitTypes.cpp | 2 +- src/3rdparty/webkit/WebCore/generated/JSScreen.cpp | 2 +- .../WebCore/generated/JSSharedWorkerContext.h | 6 - .../webkit/WebCore/generated/JSStorage.cpp | 2 +- .../webkit/WebCore/generated/JSStyleSheet.cpp | 2 +- .../webkit/WebCore/generated/JSStyleSheetList.cpp | 2 +- .../webkit/WebCore/generated/JSTextMetrics.cpp | 2 +- .../webkit/WebCore/generated/JSTimeRanges.cpp | 2 +- .../webkit/WebCore/generated/JSTreeWalker.cpp | 2 +- .../webkit/WebCore/generated/JSValidityState.cpp | 2 +- .../webkit/WebCore/generated/JSVoidCallback.cpp | 2 +- .../webkit/WebCore/generated/JSWebKitCSSMatrix.cpp | 2 +- .../webkit/WebCore/generated/JSWebKitPoint.cpp | 2 +- .../webkit/WebCore/generated/JSWebSocket.cpp | 10 +- src/3rdparty/webkit/WebCore/generated/JSWorker.h | 4 +- .../webkit/WebCore/generated/JSWorkerContext.cpp | 7 + .../webkit/WebCore/generated/JSWorkerContext.h | 1 + .../webkit/WebCore/generated/JSWorkerLocation.cpp | 2 +- .../webkit/WebCore/generated/JSWorkerNavigator.cpp | 2 +- .../webkit/WebCore/generated/JSXMLHttpRequest.cpp | 4 +- .../generated/JSXMLHttpRequestException.cpp | 2 +- .../WebCore/generated/JSXMLHttpRequestUpload.cpp | 4 +- .../webkit/WebCore/generated/JSXMLSerializer.cpp | 2 +- .../webkit/WebCore/generated/JSXPathEvaluator.cpp | 2 +- .../webkit/WebCore/generated/JSXPathException.cpp | 2 +- .../webkit/WebCore/generated/JSXPathExpression.cpp | 2 +- .../webkit/WebCore/generated/JSXPathNSResolver.cpp | 2 +- .../webkit/WebCore/generated/JSXPathResult.cpp | 2 +- .../webkit/WebCore/generated/JSXSLTProcessor.cpp | 2 +- .../webkit/WebCore/generated/WebKitVersion.h | 2 +- .../webkit/WebCore/history/CachedFrame.cpp | 4 +- .../webkit/WebCore/html/HTMLAttributeNames.in | 1 + .../webkit/WebCore/html/HTMLBodyElement.cpp | 124 +- src/3rdparty/webkit/WebCore/html/HTMLBodyElement.h | 41 +- .../webkit/WebCore/html/HTMLBodyElement.idl | 4 + .../webkit/WebCore/html/HTMLFormControlElement.cpp | 5 +- .../webkit/WebCore/html/HTMLFormElement.cpp | 10 +- src/3rdparty/webkit/WebCore/html/HTMLFormElement.h | 2 +- .../webkit/WebCore/html/HTMLFrameSetElement.cpp | 124 +- .../webkit/WebCore/html/HTMLFrameSetElement.h | 46 +- .../webkit/WebCore/html/HTMLFrameSetElement.idl | 4 + .../webkit/WebCore/html/HTMLImageLoader.cpp | 3 +- .../webkit/WebCore/html/HTMLInputElement.cpp | 2 +- .../webkit/WebCore/html/HTMLMediaElement.cpp | 90 +- .../webkit/WebCore/html/HTMLMediaElement.h | 3 +- .../webkit/WebCore/html/HTMLScriptElement.cpp | 5 +- .../webkit/WebCore/html/HTMLSourceElement.cpp | 3 +- .../webkit/WebCore/html/HTMLTextAreaElement.cpp | 37 + .../webkit/WebCore/html/HTMLTextAreaElement.h | 5 + .../webkit/WebCore/html/HTMLTextAreaElement.idl | 1 + src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp | 5 +- .../html/canvas/CanvasRenderingContext2D.cpp | 10 +- .../webkit/WebCore/inspector/InspectorBackend.cpp | 22 +- .../webkit/WebCore/inspector/InspectorBackend.h | 3 + .../webkit/WebCore/inspector/InspectorBackend.idl | 3 + .../WebCore/inspector/InspectorController.cpp | 101 +- .../webkit/WebCore/inspector/InspectorController.h | 8 + .../webkit/WebCore/inspector/InspectorDOMAgent.cpp | 2 +- .../webkit/WebCore/inspector/InspectorDOMAgent.h | 2 +- .../inspector/InspectorDOMStorageResource.cpp | 57 +- .../inspector/InspectorDOMStorageResource.h | 18 +- .../webkit/WebCore/inspector/InspectorFrontend.cpp | 47 +- .../webkit/WebCore/inspector/InspectorFrontend.h | 6 +- .../webkit/WebCore/inspector/InspectorResource.cpp | 51 +- .../webkit/WebCore/inspector/InspectorResource.h | 8 + .../WebCore/inspector/front-end/ConsoleView.js | 45 +- .../WebCore/inspector/front-end/DOMStorage.js | 46 +- .../inspector/front-end/DOMStorageDataGrid.js | 42 +- .../inspector/front-end/DOMStorageItemsView.js | 85 +- .../inspector/front-end/ElementsTreeOutline.js | 11 - .../WebCore/inspector/front-end/ImageView.js | 1 + .../inspector/front-end/Images/errorRedDot.png | Bin 0 -> 549 bytes .../inspector/front-end/Images/successGreenDot.png | Bin 0 -> 585 bytes .../front-end/Images/warningOrangeDot.png | Bin 0 -> 580 bytes .../WebCore/inspector/front-end/InjectedScript.js | 88 +- .../inspector/front-end/InjectedScriptAccess.js | 1 + .../WebCore/inspector/front-end/ObjectProxy.js | 8 + .../webkit/WebCore/inspector/front-end/Resource.js | 63 + .../WebCore/inspector/front-end/ResourceView.js | 50 +- .../WebCore/inspector/front-end/ScriptsPanel.js | 8 + .../WebCore/inspector/front-end/StoragePanel.js | 110 +- .../WebCore/inspector/front-end/inspector.css | 31 +- .../WebCore/inspector/front-end/inspector.js | 99 +- .../WebCore/inspector/front-end/utilities.js | 6 + .../webkit/WebCore/loader/CachedResourceHandle.h | 15 +- src/3rdparty/webkit/WebCore/loader/EmptyClients.h | 2 +- src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp | 193 +- src/3rdparty/webkit/WebCore/loader/FrameLoader.h | 16 +- .../webkit/WebCore/loader/ImageDocument.cpp | 4 +- .../loader/appcache/ApplicationCacheGroup.cpp | 4 +- .../loader/appcache/ApplicationCacheHost.cpp | 9 +- .../WebCore/loader/appcache/ApplicationCacheHost.h | 2 +- .../loader/appcache/DOMApplicationCache.cpp | 94 +- .../WebCore/loader/appcache/DOMApplicationCache.h | 58 +- .../loader/appcache/DOMApplicationCache.idl | 2 +- .../webkit/WebCore/mathml/MathMLElement.cpp | 52 + src/3rdparty/webkit/WebCore/mathml/MathMLElement.h | 45 + .../mathml/MathMLInlineContainerElement.cpp | 54 + .../WebCore/mathml/MathMLInlineContainerElement.h | 43 + .../webkit/WebCore/mathml/MathMLMathElement.cpp | 46 + .../webkit/WebCore/mathml/MathMLMathElement.h | 41 + src/3rdparty/webkit/WebCore/mathml/mathtags.in | 21 + .../webkit/WebCore/notifications/Notification.cpp | 132 +- .../webkit/WebCore/notifications/Notification.h | 32 +- .../webkit/WebCore/notifications/Notification.idl | 3 +- src/3rdparty/webkit/WebCore/page/Chrome.cpp | 4 +- src/3rdparty/webkit/WebCore/page/Chrome.h | 2 +- src/3rdparty/webkit/WebCore/page/ChromeClient.h | 2 +- src/3rdparty/webkit/WebCore/page/DOMWindow.cpp | 966 +------ src/3rdparty/webkit/WebCore/page/DOMWindow.h | 240 +- src/3rdparty/webkit/WebCore/page/DOMWindow.idl | 12 +- .../webkit/WebCore/page/DragController.cpp | 30 +- src/3rdparty/webkit/WebCore/page/EventHandler.cpp | 39 +- src/3rdparty/webkit/WebCore/page/EventHandler.h | 4 +- src/3rdparty/webkit/WebCore/page/EventSource.cpp | 91 +- src/3rdparty/webkit/WebCore/page/EventSource.h | 30 +- src/3rdparty/webkit/WebCore/page/EventSource.idl | 2 +- .../webkit/WebCore/page/FocusController.cpp | 7 +- src/3rdparty/webkit/WebCore/page/Frame.cpp | 25 +- src/3rdparty/webkit/WebCore/page/Frame.h | 14 +- src/3rdparty/webkit/WebCore/page/FrameView.cpp | 19 +- src/3rdparty/webkit/WebCore/page/FrameView.h | 1 + src/3rdparty/webkit/WebCore/page/Page.cpp | 4 +- .../webkit/WebCore/page/PageGroupLoadDeferrer.cpp | 6 +- src/3rdparty/webkit/WebCore/page/PositionOptions.h | 12 +- .../webkit/WebCore/page/SecurityOrigin.cpp | 16 + src/3rdparty/webkit/WebCore/page/SecurityOrigin.h | 5 + src/3rdparty/webkit/WebCore/page/XSSAuditor.cpp | 4 +- .../WebCore/page/animation/AnimationController.cpp | 6 +- src/3rdparty/webkit/WebCore/platform/HostWindow.h | 4 +- .../webkit/WebCore/platform/StaticConstructors.h | 4 +- src/3rdparty/webkit/WebCore/platform/Widget.h | 7 + .../webkit/WebCore/platform/graphics/FloatPoint.h | 5 +- .../webkit/WebCore/platform/graphics/FloatRect.h | 5 +- .../webkit/WebCore/platform/graphics/FloatSize.h | 5 +- .../WebCore/platform/graphics/FontDescription.h | 8 +- .../WebCore/platform/graphics/FontSmoothingMode.h | 35 + .../webkit/WebCore/platform/graphics/IntRect.h | 8 +- .../graphics/qt/MediaPlayerPrivatePhonon.cpp | 3 + .../platform/network/qt/DnsPrefetchHelper.cpp | 1 + .../platform/network/qt/SocketStreamError.h | 50 + .../platform/network/qt/SocketStreamHandle.h | 68 + .../platform/network/qt/SocketStreamHandleSoup.cpp | 88 + .../webkit/WebCore/platform/qt/CookieJarQt.cpp | 2 + .../WebCore/platform/qt/PlatformScreenQt.cpp | 36 +- .../webkit/WebCore/platform/qt/PopupMenuQt.cpp | 5 +- .../webkit/WebCore/platform/qt/QWebPageClient.h | 62 + .../webkit/WebCore/platform/qt/WidgetQt.cpp | 14 +- .../WebCore/platform/sql/SQLiteTransaction.cpp | 15 +- .../WebCore/platform/sql/SQLiteTransaction.h | 5 +- .../webkit/WebCore/platform/text/PlatformString.h | 8 + .../webkit/WebCore/platform/text/String.cpp | 26 + .../webkit/WebCore/plugins/mac/PluginViewMac.cpp | 24 +- .../webkit/WebCore/plugins/qt/PluginViewQt.cpp | 17 +- .../webkit/WebCore/plugins/win/PluginViewWin.cpp | 16 +- .../webkit/WebCore/rendering/FixedTableLayout.cpp | 23 + .../webkit/WebCore/rendering/RenderBlock.cpp | 2 +- .../webkit/WebCore/rendering/RenderBox.cpp | 13 +- src/3rdparty/webkit/WebCore/rendering/RenderBox.h | 2 +- .../webkit/WebCore/rendering/RenderForeignObject.h | 1 + .../webkit/WebCore/rendering/RenderLayer.cpp | 22 +- .../webkit/WebCore/rendering/RenderLayer.h | 1 + .../WebCore/rendering/RenderLayerBacking.cpp | 37 +- .../webkit/WebCore/rendering/RenderLayerBacking.h | 2 + .../WebCore/rendering/RenderLayerCompositor.cpp | 15 +- .../webkit/WebCore/rendering/RenderListBox.cpp | 3 +- .../webkit/WebCore/rendering/RenderObject.cpp | 5 + .../webkit/WebCore/rendering/RenderObject.h | 1 + .../webkit/WebCore/rendering/RenderTextControl.cpp | 2 +- .../rendering/RenderTextControlMultiLine.cpp | 4 +- .../WebCore/rendering/RenderThemeChromiumMac.h | 307 ++- .../WebCore/rendering/RenderThemeChromiumMac.mm | 1310 ++++------ .../WebCore/rendering/RenderThemeChromiumSkia.cpp | 7 +- .../WebCore/rendering/RenderThemeChromiumWin.cpp | 46 + .../WebCore/rendering/RenderThemeChromiumWin.h | 1 + .../webkit/WebCore/rendering/style/RenderStyle.h | 5 +- .../WebCore/rendering/style/RenderStyleConstants.h | 4 - .../webkit/WebCore/storage/SQLTransaction.cpp | 4 +- .../webkit/WebCore/storage/SQLTransaction.h | 1 + .../WebCore/storage/SQLTransactionCoordinator.cpp | 71 +- .../WebCore/storage/SQLTransactionCoordinator.h | 15 +- src/3rdparty/webkit/WebCore/svg/SVGElement.cpp | 19 +- .../webkit/WebCore/svg/SVGElementInstance.cpp | 443 +--- .../webkit/WebCore/svg/SVGElementInstance.h | 131 +- src/3rdparty/webkit/WebCore/svg/SVGImageLoader.cpp | 3 +- .../webkit/WebCore/svg/SVGScriptElement.cpp | 3 +- src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp | 24 +- .../WebCore/svg/animation/SVGSMILElement.cpp | 4 +- .../webkit/WebCore/websockets/WebSocket.cpp | 103 +- src/3rdparty/webkit/WebCore/websockets/WebSocket.h | 26 +- .../webkit/WebCore/websockets/WebSocket.idl | 6 +- .../webkit/WebCore/workers/AbstractWorker.cpp | 94 +- .../webkit/WebCore/workers/AbstractWorker.h | 22 +- .../webkit/WebCore/workers/AbstractWorker.idl | 2 +- .../WebCore/workers/DedicatedWorkerContext.cpp | 17 - .../WebCore/workers/DedicatedWorkerContext.h | 5 +- .../WebCore/workers/DedicatedWorkerContext.idl | 1 - .../workers/DefaultSharedWorkerRepository.cpp | 29 +- .../webkit/WebCore/workers/SharedWorkerContext.cpp | 28 +- .../webkit/WebCore/workers/SharedWorkerContext.h | 9 +- .../webkit/WebCore/workers/SharedWorkerContext.idl | 1 - src/3rdparty/webkit/WebCore/workers/Worker.cpp | 17 +- src/3rdparty/webkit/WebCore/workers/Worker.h | 12 +- src/3rdparty/webkit/WebCore/workers/Worker.idl | 1 - .../webkit/WebCore/workers/WorkerContext.cpp | 61 +- .../webkit/WebCore/workers/WorkerContext.h | 21 +- .../webkit/WebCore/workers/WorkerContext.idl | 1 + .../WebCore/workers/WorkerMessagingProxy.cpp | 9 +- .../webkit/WebCore/workers/WorkerRunLoop.cpp | 2 +- src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp | 161 +- src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.h | 55 +- src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.idl | 1 + .../WebCore/xml/XMLHttpRequestProgressEvent.h | 2 +- .../webkit/WebCore/xml/XMLHttpRequestUpload.cpp | 94 +- .../webkit/WebCore/xml/XMLHttpRequestUpload.h | 48 +- .../webkit/WebCore/xml/XMLHttpRequestUpload.idl | 3 +- src/3rdparty/webkit/WebCore/xml/XPathValue.cpp | 5 + src/3rdparty/webkit/WebCore/xml/XPathValue.h | 13 +- src/3rdparty/webkit/WebKit/ChangeLog | 23 + .../WebKit/mac/Configurations/Version.xcconfig | 2 +- .../webkit/WebKit/qt/Api/qwebgraphicsitem.cpp | 77 +- .../webkit/WebKit/qt/Api/qwebgraphicsitem.h | 2 - src/3rdparty/webkit/WebKit/qt/Api/qwebhistory.cpp | 26 +- src/3rdparty/webkit/WebKit/qt/Api/qwebhistory_p.h | 5 + .../webkit/WebKit/qt/Api/qwebinspector.cpp | 25 +- src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp | 9 +- src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h | 4 +- src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp | 15 +- src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp | 88 +- src/3rdparty/webkit/WebKit/qt/ChangeLog | 245 ++ .../webkit/WebKit/qt/QGVLauncher/QGVLauncher.pro | 2 +- .../WebKit/qt/WebCoreSupport/ChromeClientQt.cpp | 15 +- .../WebKit/qt/WebCoreSupport/ChromeClientQt.h | 2 +- .../WebKit/qt/WebCoreSupport/InspectorClientQt.cpp | 96 +- .../qt/tests/benchmarks/loading/tst_loading.pro | 2 + .../qt/tests/benchmarks/painting/tst_painting.pro | 2 + .../WebKit/qt/tests/qwebelement/qwebelement.pro | 2 +- .../webkit/WebKit/qt/tests/qwebframe/qwebframe.pro | 2 +- .../WebKit/qt/tests/qwebframe/tst_qwebframe.cpp | 19 +- .../qt/tests/qwebgraphicsitem/qwebgraphicsitem.pro | 6 + .../qwebgraphicsitem/tst_qwebgraphicsitem.cpp | 58 + .../WebKit/qt/tests/qwebhistory/qwebhistory.pro | 2 +- .../qt/tests/qwebhistory/tst_qwebhistory.cpp | 13 +- .../qwebhistoryinterface/qwebhistoryinterface.pro | 2 +- .../webkit/WebKit/qt/tests/qwebpage/qwebpage.pro | 2 +- .../WebKit/qt/tests/qwebpage/tst_qwebpage.cpp | 24 +- .../qwebplugindatabase/qwebplugindatabase.pro | 2 + .../webkit/WebKit/qt/tests/qwebview/qwebview.pro | 2 +- src/3rdparty/webkit/WebKit/qt/tests/tests.pro | 2 +- src/3rdparty/webkit/WebKit/qt/tests/util.h | 48 + 487 files changed, 9608 insertions(+), 6525 deletions(-) create mode 100644 src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro delete mode 100644 src/3rdparty/webkit/WebCore/WebCore.LP64.exp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodesCollection.cpp delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodesCollection.h delete mode 100644 src/3rdparty/webkit/WebCore/bindings/js/JSSharedWorkerContextCustom.cpp create mode 100644 src/3rdparty/webkit/WebCore/css/mathml.css create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/errorRedDot.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/successGreenDot.png create mode 100644 src/3rdparty/webkit/WebCore/inspector/front-end/Images/warningOrangeDot.png create mode 100644 src/3rdparty/webkit/WebCore/mathml/MathMLElement.cpp create mode 100644 src/3rdparty/webkit/WebCore/mathml/MathMLElement.h create mode 100644 src/3rdparty/webkit/WebCore/mathml/MathMLInlineContainerElement.cpp create mode 100644 src/3rdparty/webkit/WebCore/mathml/MathMLInlineContainerElement.h create mode 100644 src/3rdparty/webkit/WebCore/mathml/MathMLMathElement.cpp create mode 100644 src/3rdparty/webkit/WebCore/mathml/MathMLMathElement.h create mode 100644 src/3rdparty/webkit/WebCore/mathml/mathtags.in create mode 100644 src/3rdparty/webkit/WebCore/platform/graphics/FontSmoothingMode.h create mode 100644 src/3rdparty/webkit/WebCore/platform/network/qt/SocketStreamError.h create mode 100644 src/3rdparty/webkit/WebCore/platform/network/qt/SocketStreamHandle.h create mode 100644 src/3rdparty/webkit/WebCore/platform/network/qt/SocketStreamHandleSoup.cpp create mode 100644 src/3rdparty/webkit/WebCore/platform/qt/QWebPageClient.h create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebgraphicsitem/qwebgraphicsitem.pro create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/qwebgraphicsitem/tst_qwebgraphicsitem.cpp create mode 100644 src/3rdparty/webkit/WebKit/qt/tests/util.h diff --git a/src/3rdparty/webkit/ChangeLog b/src/3rdparty/webkit/ChangeLog index 4a08347..9065b3a 100644 --- a/src/3rdparty/webkit/ChangeLog +++ b/src/3rdparty/webkit/ChangeLog @@ -1,3 +1,84 @@ +2009-09-23 Xan Lopez + + Reviewed by Gustavo Noronha. + + Do not add unneeded include paths for gir files, and add the + include paths for headers manually instead of relying on our own + pc file and installed headers, since that adds a circular + dependency. + + * GNUmakefile.am: + +2009-09-23 Jan Michael Alonzo + + Reviewed by Xan Lopez. + + Minor reorganization to the patch landed in + http://trac.webkit.org/changeset/48670. Also move JSCore-1.0.gir + in the gtk directory as that's only useful to the Gtk port at the + moment. + + * GNUmakefile.am: + * configure.ac: + +2009-09-23 Xan Lopez + + Reviewed by Gustavo Noronha. + + [GTK] We should generate our own gir file for introspection + https://bugs.webkit.org/show_bug.cgi?id=29603 + + Generate gir and typelib files for WebKit and JSCore. The JSCore + gir file is handwritten (since it's only useful, for now, as a + dependency of the WebKit gir file), the WebKit one is + autogenerated from the headers. + + * GNUmakefile.am: + * JSCore-1.0.gir: Added. + * configure.ac: + +2009-09-22 Philippe Normand + + Reviewed by Xan Lopez. + + link errors due to wrong UNICODE_LIBS on Ubuntu Jaunty + https://bugs.webkit.org/show_bug.cgi?id=29638 + + Call icu-cconfig with ldflags-libsonly to prevent having a -L + statement that could override libs installed in another prefix. + + * autotools/webkit.m4: + +2009-09-21 Xan Lopez + + Reviewed by Gustavo Noronha. + + Bump version for 1.1.15 release. + + * configure.ac: + +2009-09-18 Xan Lopez + + Reviewed by Gustavo Noronha and Jan Alonzo. + + [GTK] context menu overriding API is very limited + https://bugs.webkit.org/show_bug.cgi?id=27546 + + Add new tests to the build. + + * GNUmakefile.am: + +2009-09-18 Xan Lopez + + Reviewed by Gustavo Noronha and Jan Alonzo. + + [GTK] context menu overriding API is very limited + https://bugs.webkit.org/show_bug.cgi?id=27546 + + Add WebKitHitTestResult to the build. + + * GNUmakefile.am: + 2009-09-10 Laszlo Gombos Reviewed by Ariya Hidayat. diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSStringRef.h b/src/3rdparty/webkit/JavaScriptCore/API/JSStringRef.h index 8b17ee2..c58b958 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSStringRef.h +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSStringRef.h @@ -37,7 +37,7 @@ extern "C" { #endif -#if !defined(WIN32) && !defined(_WIN32) +#if !defined(WIN32) && !defined(_WIN32) && !defined(__WINSCW__) /*! @typedef JSChar @abstract A Unicode character. diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog index 8aa8c1d..4899919 100644 --- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog +++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog @@ -1,3 +1,532 @@ +2009-09-23 Geoffrey Garen + + A piece of my last patch that I forgot. + + * wtf/HashCountedSet.h: + (WTF::::clear): Added HashCountedSet::clear. + +2009-09-24 Gabor Loki + + Reviewed by Gavin Barraclough. + + Avoid __clear_cache built-in function if DISABLE_BUILTIN_CLEAR_CACHE define is set + https://bugs.webkit.org/show_bug.cgi?id=28886 + + There are some GCC packages (for example GCC-2006q3 from CodeSourcery) + which contain __clear_cache built-in function only for C while the C++ + version of __clear_cache is missing on ARM architectures. + + Fixed a small bug in the inline assembly of cacheFlush function on + ARM_TRADITIONAL. + + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::cacheFlush): + +2009-09-23 Geoffrey Garen + + Reviewed by Sam Weinig. + + Added the ability to swap vectors with inline capacities, so you can + store a vector with inline capacity in a hash table. + + * wtf/Vector.h: + (WTF::swap): + (WTF::VectorBuffer::swap): + +2009-09-23 David Kilzer + + Move definition of USE(PLUGIN_HOST_PROCESS) from WebKitPrefix.h to Platform.h + + Reviewed by Mark Rowe. + + * wtf/Platform.h: Define WTF_USE_PLUGIN_HOST_PROCESS to 1 when + building on 64-bit SnowLeopard. Define to 0 elsewhere. + +2009-09-22 Oliver Hunt + + Reviewed by Geoff Garen. + + Code sampling builds are broken. + https://bugs.webkit.org/show_bug.cgi?id=29662 + + Fix build. + + * bytecode/EvalCodeCache.h: + (JSC::EvalCodeCache::get): + * bytecode/SamplingTool.cpp: + (JSC::ScriptSampleRecord::sample): + (JSC::SamplingTool::doRun): + (JSC::SamplingTool::notifyOfScope): + (JSC::compareScriptSampleRecords): + (JSC::SamplingTool::dump): + * bytecode/SamplingTool.h: + (JSC::ScriptSampleRecord::ScriptSampleRecord): + (JSC::ScriptSampleRecord::~ScriptSampleRecord): + (JSC::SamplingTool::SamplingTool): + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::BytecodeGenerator): + (JSC::BytecodeGenerator::emitNewFunction): + (JSC::BytecodeGenerator::emitNewFunctionExpression): + * bytecompiler/BytecodeGenerator.h: + (JSC::BytecodeGenerator::makeFunction): + * debugger/Debugger.cpp: + (JSC::evaluateInGlobalCallFrame): + * debugger/DebuggerCallFrame.cpp: + (JSC::DebuggerCallFrame::evaluate): + * parser/Nodes.cpp: + (JSC::ScopeNode::ScopeNode): + * runtime/Completion.cpp: + (JSC::checkSyntax): + (JSC::evaluate): + * runtime/Executable.cpp: + (JSC::FunctionExecutable::fromGlobalCode): + * runtime/Executable.h: + (JSC::ScriptExecutable::ScriptExecutable): + (JSC::EvalExecutable::EvalExecutable): + (JSC::EvalExecutable::create): + (JSC::ProgramExecutable::ProgramExecutable): + (JSC::FunctionExecutable::create): + (JSC::FunctionExecutable::FunctionExecutable): + * runtime/JSGlobalObjectFunctions.cpp: + (JSC::globalFuncEval): + +2009-09-22 Darin Adler + + Reviewed by Sam Weinig. + + * wtf/Forward.h: Added PassOwnPtr. + +2009-09-22 Yaar Schnitman + + Reviewed by David Levin. + + Ported chromium.org's javascriptcore.gyp for the webkit chromium port. + + https://bugs.webkit.org/show_bug.cgi?id=29617 + + * JavaScriptCore.gyp/JavaScriptCore.gyp: Added. + +2009-09-22 Thiago Macieira + + Reviewed by Simon Hausmann. + + Fix compilation with WINSCW: no varargs macros + + Disable variadic arguments for WINSCW just like we do + for MSVC7. + + * wtf/Assertions.h: + +2009-09-22 Kent Hansen + + Reviewed by Simon Hausmann. + + Disable variadic macros on MSVC7. + + This was originally added in r26589 but not extended + when LOG_DISABLED/ASSERT_DISABLED was introduced. + + * wtf/Assertions.h: + +2009-09-22 Simon Hausmann + + Unreviewed build fix for Windows CE < 5 + + Define WINCEBASIC to disable the IsDebuggerPresent() code in + wtf/Assertions.cpp. + + * JavaScriptCore.pri: + +2009-09-22 Joerg Bornemann + + Reviewed by Simon Hausmann. + + Fix major memory leak in JavaScriptCore RegisterFile on Windows CE + + https://bugs.webkit.org/show_bug.cgi?id=29367 + + On Widows CE we must decommit all committed pages before we release + them. See VirtualFree documentation. + Desktop Windows behaves much smoother in this situation. + + * interpreter/RegisterFile.cpp: + (JSC::RegisterFile::~RegisterFile): + +2009-09-21 Greg Bolsinga + + Reviewed by Simon Fraser & Sam Weinig. + + Add ENABLE(ORIENTATION_EVENTS) + https://bugs.webkit.org/show_bug.cgi?id=29508 + + * wtf/Platform.h: Also sort PLATFORM(IPHONE) #defines. + +2009-09-21 Jedrzej Nowacki + + Reviewed by Eric Seidel. + + [Fix] SourceCode's uninitialized member + + Potential source of crashes and bugs was fixed. Default constructor + didn't initialized m_provider member. + + https://bugs.webkit.org/show_bug.cgi?id=29364 + + * parser/SourceCode.h: + (JSC::SourceCode::SourceCode): + +2009-09-21 Oliver Hunt + + Reviewed by Geoff Garen. + + REGRESSION (r48582): Crash in StructureStubInfo::initPutByIdTransition when reloading trac.webkit.org + https://bugs.webkit.org/show_bug.cgi?id=29599 + + It is unsafe to attempt to cache new property transitions on + dictionaries of any type. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::tryCachePutByID): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCachePutByID): + +2009-09-21 Oliver Hunt + + RS=Maciej Stachowiak. + + Re-land SNES fix with corrected assertion. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolveGlobal): + (JSC::Interpreter::tryCachePutByID): + (JSC::Interpreter::tryCacheGetByID): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCachePutByID): + (JSC::JITThunks::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + * runtime/BatchedTransitionOptimizer.h: + (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): + * runtime/JSObject.cpp: + (JSC::JSObject::removeDirect): + * runtime/Structure.cpp: + (JSC::Structure::Structure): + (JSC::Structure::getEnumerablePropertyNames): + (JSC::Structure::despecifyDictionaryFunction): + (JSC::Structure::addPropertyTransitionToExistingStructure): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::removePropertyTransition): + (JSC::Structure::toDictionaryTransition): + (JSC::Structure::toCacheableDictionaryTransition): + (JSC::Structure::toUncacheableDictionaryTransition): + (JSC::Structure::fromDictionaryTransition): + (JSC::Structure::removePropertyWithoutTransition): + * runtime/Structure.h: + (JSC::Structure::isDictionary): + (JSC::Structure::isUncacheableDictionary): + (JSC::Structure::): + * runtime/StructureChain.cpp: + (JSC::StructureChain::isCacheable): + +2009-09-21 Adam Roben + + Revert r48573, as it caused many assertion failures + + * interpreter/Interpreter.cpp: + * jit/JITStubs.cpp: + * runtime/BatchedTransitionOptimizer.h: + * runtime/JSObject.cpp: + * runtime/Structure.cpp: + * runtime/Structure.h: + * runtime/StructureChain.cpp: + +2009-09-21 Gustavo Noronha Silva + + Unreviewed make dist build fix. Missing files. + + * GNUmakefile.am: + +2009-09-19 Gavin Barraclough + + Reviewed by Sam 'Cabin Boy' Weinig. + + Fix stack alignment with ARM THUMB2 JIT. + https://bugs.webkit.org/show_bug.cgi?id=29526 + + Stack is currently being decremented by 0x3c, bump this to 0x40 to make this a + multiple of 16 bytes. + + * jit/JITStubs.cpp: + (JSC::JITThunks::JITThunks): + * jit/JITStubs.h: + +2009-09-20 Oliver Hunt + + Reviewed by Maciej Stachowiak. + + SNES is too slow + https://bugs.webkit.org/show_bug.cgi?id=29534 + + The problem was that the emulator used multiple classes with + more properties than our dictionary cutoff allowed, this resulted + in more or less all critical logic inside the emulator requiring + uncached property access. + + Rather than simply bumping the dictionary cutoff, this patch + recognises that there are two ways to create a "dictionary" + structure. Either by adding a large number of properties, or + by removing a property. In the case of adding properties we + know all the existing properties will maintain their existing + offsets, so we could cache access to those properties, if we + know they won't be removed. + + To make this possible, this patch adds the logic required to + distinguish a dictionary created by addition from one created + by removal. With this logic in place we can now cache access + to objects with large numbers of properties. + + SNES performance improved by more than 6x. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::resolveGlobal): + (JSC::Interpreter::tryCachePutByID): + (JSC::Interpreter::tryCacheGetByID): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCachePutByID): + (JSC::JITThunks::tryCacheGetByID): + (JSC::DEFINE_STUB_FUNCTION): + * runtime/BatchedTransitionOptimizer.h: + (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): + * runtime/JSObject.cpp: + (JSC::JSObject::removeDirect): + * runtime/Structure.cpp: + (JSC::Structure::Structure): + (JSC::Structure::getEnumerablePropertyNames): + (JSC::Structure::despecifyDictionaryFunction): + (JSC::Structure::addPropertyTransitionToExistingStructure): + (JSC::Structure::addPropertyTransition): + (JSC::Structure::removePropertyTransition): + (JSC::Structure::toDictionaryTransition): + (JSC::Structure::toCacheableDictionaryTransition): + (JSC::Structure::toUncacheableDictionaryTransition): + (JSC::Structure::fromDictionaryTransition): + (JSC::Structure::removePropertyWithoutTransition): + * runtime/Structure.h: + (JSC::Structure::isDictionary): + (JSC::Structure::isUncacheableDictionary): + (JSC::Structure::): + * runtime/StructureChain.cpp: + (JSC::StructureChain::isCacheable): + +2009-09-19 Oliver Hunt + + Reviewed by Maciej Stachowiak. + + Implement ES5 Object.create function + https://bugs.webkit.org/show_bug.cgi?id=29524 + + Implement Object.create. Very simple patch, effectively Object.defineProperties + only creating the target object itself. + + * runtime/CommonIdentifiers.h: + * runtime/ObjectConstructor.cpp: + (JSC::ObjectConstructor::ObjectConstructor): + (JSC::objectConstructorCreate): + +2009-09-19 Dan Bernstein + + Fix clean debug builds. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-09-19 Joerg Bornemann + + Reviewed by George Staikos. + + QtWebKit Windows CE compile fix + + https://bugs.webkit.org/show_bug.cgi?id=29379 + + There is no _aligned_alloc or _aligned_free on Windows CE. + We just use the Windows code that was there before and use VirtualAlloc. + But that also means that the BLOCK_SIZE must be 64K as this function + allocates on 64K boundaries. + + * runtime/Collector.cpp: + (JSC::Heap::allocateBlock): + (JSC::Heap::freeBlock): + * runtime/Collector.h: + +2009-09-19 Oliver Hunt + + Reviewed by Sam Weinig. + + Implement ES5 Object.defineProperties function + https://bugs.webkit.org/show_bug.cgi?id=29522 + + Implement Object.defineProperties. Fairly simple patch, simply makes use of + existing functionality used for defineProperty. + + * runtime/CommonIdentifiers.h: + * runtime/ObjectConstructor.cpp: + (JSC::ObjectConstructor::ObjectConstructor): + (JSC::defineProperties): + (JSC::objectConstructorDefineProperties): + +2009-09-19 Oliver Hunt + + Reviewed by NOBODY (Build fix). + + Windows build fix part2 + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-09-19 Oliver Hunt + + Reviewed by NOBODY (Buildfix). + + Windows build fix part 1. + + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: + +2009-09-18 Oliver Hunt + + Reviewed by Geoff Garen. + + Implement ES5 Object.defineProperty function + https://bugs.webkit.org/show_bug.cgi?id=29503 + + Implement Object.defineProperty. This requires adding the API to + ObjectConstructor, along with a helper function that implements the + ES5 internal [[ToPropertyDescriptor]] function. It then adds + JSObject::defineOwnProperty that implements the appropriate ES5 semantics. + Currently defineOwnProperty uses a delete followed by a put to redefine + attributes of a property, clearly this is less efficient than it could be + but we can improve this if it needs to be possible in future. + + * JavaScriptCore.exp: + * debugger/DebuggerActivation.cpp: + (JSC::DebuggerActivation::defineGetter): + (JSC::DebuggerActivation::defineSetter): + * debugger/DebuggerActivation.h: + * interpreter/Interpreter.cpp: + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + Update defineGetter/Setter calls + * runtime/CommonIdentifiers.h: + * runtime/JSArray.cpp: + (JSC::JSArray::getOwnPropertySlot): + * runtime/JSGlobalObject.cpp: + (JSC::JSGlobalObject::defineGetter): + (JSC::JSGlobalObject::defineSetter): + * runtime/JSGlobalObject.h: + * runtime/JSObject.cpp: + (JSC::JSObject::defineGetter): + (JSC::JSObject::defineSetter): + (JSC::putDescriptor): + (JSC::JSObject::defineOwnProperty): + * runtime/JSObject.h: + * runtime/ObjectConstructor.cpp: + (JSC::ObjectConstructor::ObjectConstructor): + (JSC::objectConstructorGetOwnPropertyDescriptor): + (JSC::toPropertyDescriptor): + (JSC::objectConstructorDefineProperty): + * runtime/ObjectPrototype.cpp: + (JSC::objectProtoFuncDefineGetter): + (JSC::objectProtoFuncDefineSetter): + * runtime/PropertyDescriptor.cpp: + (JSC::PropertyDescriptor::writable): + (JSC::PropertyDescriptor::enumerable): + (JSC::PropertyDescriptor::configurable): + (JSC::PropertyDescriptor::isDataDescriptor): + (JSC::PropertyDescriptor::isGenericDescriptor): + (JSC::PropertyDescriptor::isAccessorDescriptor): + (JSC::PropertyDescriptor::getter): + (JSC::PropertyDescriptor::setter): + (JSC::PropertyDescriptor::setDescriptor): + (JSC::PropertyDescriptor::setAccessorDescriptor): + (JSC::PropertyDescriptor::setWritable): + (JSC::PropertyDescriptor::setEnumerable): + (JSC::PropertyDescriptor::setConfigurable): + (JSC::PropertyDescriptor::setSetter): + (JSC::PropertyDescriptor::setGetter): + (JSC::PropertyDescriptor::equalTo): + (JSC::PropertyDescriptor::attributesEqual): + (JSC::PropertyDescriptor::attributesWithOverride): + * runtime/PropertyDescriptor.h: + (JSC::PropertyDescriptor::PropertyDescriptor): + (JSC::PropertyDescriptor::value): + (JSC::PropertyDescriptor::setValue): + (JSC::PropertyDescriptor::isEmpty): + (JSC::PropertyDescriptor::writablePresent): + (JSC::PropertyDescriptor::enumerablePresent): + (JSC::PropertyDescriptor::configurablePresent): + (JSC::PropertyDescriptor::setterPresent): + (JSC::PropertyDescriptor::getterPresent): + (JSC::PropertyDescriptor::operator==): + (JSC::PropertyDescriptor::): + +2009-09-18 Gabor Loki + + Reviewed by Gavin Barraclough. + + Build fix to enable ARM_THUMB2 on Linux + https://bugs.webkit.org/show_bug.cgi?id= + + * jit/ExecutableAllocator.h: + (JSC::ExecutableAllocator::cacheFlush): + * jit/JITStubs.cpp: + * wtf/Platform.h: + +2009-09-18 Gabor Loki + + Reviewed by Gavin Barraclough. + + Defines two pseudo-platforms for ARM and Thumb-2 instruction set. + https://bugs.webkit.org/show_bug.cgi?id=29122 + + Introduces WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2 + macros on ARM platforms. The PLATFORM(ARM_THUMB2) should be used + when Thumb-2 instruction set is the required target. The + PLATFORM(ARM_TRADITIONAL) is for generic ARM instruction set. In + case where the code is common the PLATFORM(ARM) have to be used. + + * assembler/ARMAssembler.cpp: + * assembler/ARMAssembler.h: + * assembler/ARMv7Assembler.h: + * assembler/MacroAssembler.h: + * assembler/MacroAssemblerARM.cpp: + * assembler/MacroAssemblerARM.h: + * assembler/MacroAssemblerCodeRef.h: + (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr): + * jit/ExecutableAllocator.h: + * jit/JIT.h: + * jit/JITInlineMethods.h: + (JSC::JIT::beginUninterruptedSequence): + (JSC::JIT::preserveReturnAddressAfterCall): + (JSC::JIT::restoreReturnAddressBeforeReturn): + (JSC::JIT::restoreArgumentReference): + (JSC::JIT::restoreArgumentReferenceForTrampoline): + * jit/JITOpcodes.cpp: + * jit/JITStubs.cpp: + (JSC::JITThunks::JITThunks): + * jit/JITStubs.h: + * wtf/Platform.h: + * yarr/RegexJIT.cpp: + (JSC::Yarr::RegexGenerator::generateEnter): + +2009-09-18 Joerg Bornemann + + Reviewed by Simon Hausmann. + + Fix the Qt/Windows CE build. + + * JavaScriptCore.pri: Build the ce_time.cpp functions from + within Qt externally. + * wtf/DateMath.cpp: Removed unnecessary Qt #ifdef, for the + Qt build these functions are no external, too. + 2009-09-17 Janne Koskinen Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri index bd80add..7a815e3 100644 --- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri +++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri @@ -50,10 +50,9 @@ win32-* { } } -win32-msvc*: INCLUDEPATH += $$PWD/os-win32 wince* { - INCLUDEPATH += $$PWD/os-win32 SOURCES += $$QT_SOURCE_TREE/src/3rdparty/ce-compat/ce_time.cpp + DEFINES += WINCEBASIC } include(pcre/pcre.pri) diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro new file mode 100644 index 0000000..0cd2e1a --- /dev/null +++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro @@ -0,0 +1,69 @@ +# JavaScriptCore - qmake build info +CONFIG += building-libs +include($$PWD/../WebKit.pri) + +TEMPLATE = lib +CONFIG += staticlib +TARGET = JavaScriptCore + +CONFIG += depend_includepath + +contains(QT_CONFIG, embedded):CONFIG += embedded + +CONFIG(QTDIR_build) { + GENERATED_SOURCES_DIR = $$PWD/generated + OLDDESTDIR = $$DESTDIR + include($$QT_SOURCE_TREE/src/qbase.pri) + INSTALLS = + DESTDIR = $$OLDDESTDIR + PRECOMPILED_HEADER = $$PWD/../WebKit/qt/WebKit_pch.h + DEFINES *= NDEBUG +} + +isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = tmp +GENERATED_SOURCES_DIR_SLASH = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP} + +INCLUDEPATH += $$GENERATED_SOURCES_DIR + +!CONFIG(QTDIR_build) { + CONFIG(debug, debug|release) { + OBJECTS_DIR = obj/debug + } else { # Release + OBJECTS_DIR = obj/release + } +} + +CONFIG(release):!CONFIG(QTDIR_build) { + contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols + unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions +} + +linux-*: DEFINES += HAVE_STDINT_H +freebsd-*: DEFINES += HAVE_PTHREAD_NP_H + +DEFINES += BUILD_WEBKIT + +win32-*: DEFINES += _HAS_TR1=0 + +# Pick up 3rdparty libraries from INCLUDE/LIB just like with MSVC +win32-g++ { + TMPPATH = $$quote($$(INCLUDE)) + QMAKE_INCDIR_POST += $$split(TMPPATH,";") + TMPPATH = $$quote($$(LIB)) + QMAKE_LIBDIR_POST += $$split(TMPPATH,";") +} + +DEFINES += WTF_USE_JAVASCRIPTCORE_BINDINGS=1 + +DEFINES += WTF_CHANGES=1 + +include(JavaScriptCore.pri) + +QMAKE_EXTRA_TARGETS += generated_files + +lessThan(QT_MINOR_VERSION, 4) { + DEFINES += QT_BEGIN_NAMESPACE="" QT_END_NAMESPACE="" +} + +*-g++*:QMAKE_CXXFLAGS_RELEASE -= -O2 +*-g++*:QMAKE_CXXFLAGS_RELEASE += -O3 diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.cpp b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.cpp index 77d7a53..1324586 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.cpp @@ -26,7 +26,7 @@ #include "config.h" -#if ENABLE(ASSEMBLER) && PLATFORM(ARM) +#if ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL) #include "ARMAssembler.h" @@ -390,4 +390,4 @@ void* ARMAssembler::executableCopy(ExecutablePool* allocator) } // namespace JSC -#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM) +#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL) diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.h index 0b04bb4..9f9a450 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMAssembler.h @@ -29,7 +29,7 @@ #include -#if ENABLE(ASSEMBLER) && PLATFORM(ARM) +#if ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL) #include "AssemblerBufferWithConstantPool.h" #include @@ -764,6 +764,6 @@ namespace JSC { } // namespace JSC -#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM) +#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL) #endif // ARMAssembler_h diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h index e920255..078de44 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/ARMv7Assembler.h @@ -28,7 +28,7 @@ #include -#if ENABLE(ASSEMBLER) && PLATFORM_ARM_ARCH(7) +#if ENABLE(ASSEMBLER) && PLATFORM(ARM_THUMB2) #include "AssemblerBuffer.h" #include @@ -1753,6 +1753,6 @@ private: } // namespace JSC -#endif // ENABLE(ASSEMBLER) && PLATFORM_ARM_ARCH(7) +#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM_THUMB2) #endif // ARMAssembler_h diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssembler.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssembler.h index 9e1c5d3..2743ab4 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssembler.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssembler.h @@ -30,11 +30,11 @@ #if ENABLE(ASSEMBLER) -#if PLATFORM_ARM_ARCH(7) +#if PLATFORM(ARM_THUMB2) #include "MacroAssemblerARMv7.h" namespace JSC { typedef MacroAssemblerARMv7 MacroAssemblerBase; }; -#elif PLATFORM(ARM) +#elif PLATFORM(ARM_TRADITIONAL) #include "MacroAssemblerARM.h" namespace JSC { typedef MacroAssemblerARM MacroAssemblerBase; }; diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.cpp b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.cpp index 33fac64..43648c4 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.cpp @@ -26,7 +26,7 @@ #include "config.h" -#if ENABLE(ASSEMBLER) && PLATFORM(ARM) && !PLATFORM_ARM_ARCH(7) +#if ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL) #include "MacroAssemblerARM.h" @@ -64,4 +64,4 @@ const bool MacroAssemblerARM::s_isVFPPresent = isVFPPresent(); } -#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM) && !PLATFORM_ARM_ARCH(7) +#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL) diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h index 4a7c10a..0c696c9 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) && !PLATFORM_ARM_ARCH(7) +#if ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL) #include "ARMAssembler.h" #include "AbstractMacroAssembler.h" @@ -797,6 +797,6 @@ private: } -#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM) && !PLATFORM_ARM_ARCH(7) +#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL) #endif // MacroAssemblerARM_h diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerCodeRef.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerCodeRef.h index 341a7ff..568260a 100644 --- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerCodeRef.h +++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerCodeRef.h @@ -37,7 +37,7 @@ // ASSERT_VALID_CODE_POINTER checks that ptr is a non-null pointer, and that it is a valid // instruction address on the platform (for example, check any alignment requirements). -#if PLATFORM_ARM_ARCH(7) +#if PLATFORM(ARM_THUMB2) // ARM/thumb instructions must be 16-bit aligned, but all code pointers to be loaded // into the processor are decorated with the bottom bit set, indicating that this is // thumb code (as oposed to 32-bit traditional ARM). The first test checks for both @@ -124,7 +124,7 @@ public: } explicit MacroAssemblerCodePtr(void* value) -#if PLATFORM_ARM_ARCH(7) +#if PLATFORM(ARM_THUMB2) // Decorate the pointer as a thumb code pointer. : m_value(reinterpret_cast(value) + 1) #else @@ -141,7 +141,7 @@ public: } void* executableAddress() const { return m_value; } -#if PLATFORM_ARM_ARCH(7) +#if PLATFORM(ARM_THUMB2) // To use this pointer as a data address remove the decoration. void* dataLocation() const { ASSERT_VALID_CODE_POINTER(m_value); return reinterpret_cast(m_value) - 1; } #else diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/EvalCodeCache.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/EvalCodeCache.h index 0e1fb1e..05834fc 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/EvalCodeCache.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/EvalCodeCache.h @@ -50,7 +50,7 @@ namespace JSC { evalExecutable = m_cacheMap.get(evalSource.rep()); if (!evalExecutable) { - evalExecutable = EvalExecutable::create(makeSource(evalSource)); + evalExecutable = EvalExecutable::create(exec, makeSource(evalSource)); exceptionValue = evalExecutable->compile(exec, scopeChain); if (exceptionValue) return 0; diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.cpp b/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.cpp index 8d0faa1..865c919 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.cpp @@ -157,7 +157,7 @@ void SamplingThread::stop() } -void ScopeSampleRecord::sample(CodeBlock* codeBlock, Instruction* vPC) +void ScriptSampleRecord::sample(CodeBlock* codeBlock, Instruction* vPC) { if (!m_samples) { m_size = codeBlock->instructions().size(); @@ -196,8 +196,8 @@ void SamplingTool::doRun() #if ENABLE(CODEBLOCK_SAMPLING) if (CodeBlock* codeBlock = sample.codeBlock()) { - MutexLocker locker(m_scopeSampleMapMutex); - ScopeSampleRecord* record = m_scopeSampleMap->get(codeBlock->ownerExecutable()); + MutexLocker locker(m_scriptSampleMapMutex); + ScriptSampleRecord* record = m_scopeSampleMap->get(codeBlock->ownerExecutable()); ASSERT(record); record->sample(codeBlock, sample.vPC()); } @@ -209,13 +209,13 @@ void SamplingTool::sample() s_samplingTool->doRun(); } -void SamplingTool::notifyOfScope(ScopeNode* scope) +void SamplingTool::notifyOfScope(ScriptExecutable* script) { #if ENABLE(CODEBLOCK_SAMPLING) - MutexLocker locker(m_scopeSampleMapMutex); - m_scopeSampleMap->set(scope, new ScopeSampleRecord(scope)); + MutexLocker locker(m_scriptSampleMapMutex); + m_scopeSampleMap->set(script, new ScriptSampleRecord(script)); #else - UNUSED_PARAM(scope); + UNUSED_PARAM(script); #endif } @@ -254,10 +254,10 @@ static int compareLineCountInfoSampling(const void* left, const void* right) return (leftLineCount->line > rightLineCount->line) ? 1 : (leftLineCount->line < rightLineCount->line) ? -1 : 0; } -static int compareScopeSampleRecords(const void* left, const void* right) +static int compareScriptSampleRecords(const void* left, const void* right) { - const ScopeSampleRecord* const leftValue = *static_cast(left); - const ScopeSampleRecord* const rightValue = *static_cast(right); + const ScriptSampleRecord* const leftValue = *static_cast(left); + const ScriptSampleRecord* const rightValue = *static_cast(right); return (leftValue->m_sampleCount < rightValue->m_sampleCount) ? 1 : (leftValue->m_sampleCount > rightValue->m_sampleCount) ? -1 : 0; } @@ -318,26 +318,26 @@ void SamplingTool::dump(ExecState* exec) // (3) Build and sort 'codeBlockSamples' array. int scopeCount = m_scopeSampleMap->size(); - Vector codeBlockSamples(scopeCount); - ScopeSampleRecordMap::iterator iter = m_scopeSampleMap->begin(); + Vector codeBlockSamples(scopeCount); + ScriptSampleRecordMap::iterator iter = m_scopeSampleMap->begin(); for (int i = 0; i < scopeCount; ++i, ++iter) codeBlockSamples[i] = iter->second; - qsort(codeBlockSamples.begin(), scopeCount, sizeof(ScopeSampleRecord*), compareScopeSampleRecords); + qsort(codeBlockSamples.begin(), scopeCount, sizeof(ScriptSampleRecord*), compareScriptSampleRecords); // (4) Print data from 'codeBlockSamples' array. printf("\nCodeBlock samples\n\n"); for (int i = 0; i < scopeCount; ++i) { - ScopeSampleRecord* record = codeBlockSamples[i]; + ScriptSampleRecord* record = codeBlockSamples[i]; CodeBlock* codeBlock = record->m_codeBlock; double blockPercent = (record->m_sampleCount * 100.0) / m_sampleCount; if (blockPercent >= 1) { //Instruction* code = codeBlock->instructions().begin(); - printf("#%d: %s:%d: %d / %lld (%.3f%%)\n", i + 1, record->m_scope->sourceURL().UTF8String().c_str(), codeBlock->lineNumberForBytecodeOffset(exec, 0), record->m_sampleCount, m_sampleCount, blockPercent); + printf("#%d: %s:%d: %d / %lld (%.3f%%)\n", i + 1, record->m_executable->sourceURL().UTF8String().c_str(), codeBlock->lineNumberForBytecodeOffset(exec, 0), record->m_sampleCount, m_sampleCount, blockPercent); if (i < 10) { HashMap lineCounts; codeBlock->dump(exec); diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.h index 1a3f7cf..711b086 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/SamplingTool.h @@ -38,6 +38,8 @@ namespace JSC { + class ScriptExecutable; + class SamplingFlags { friend class JIT; public: @@ -92,9 +94,9 @@ namespace JSC { class ScopeNode; struct Instruction; - struct ScopeSampleRecord { - ScopeSampleRecord(ScopeNode* scope) - : m_scope(scope) + struct ScriptSampleRecord { + ScriptSampleRecord(ScriptExecutable* executable) + : m_executable(executable) , m_codeBlock(0) , m_sampleCount(0) , m_opcodeSampleCount(0) @@ -103,7 +105,7 @@ namespace JSC { { } - ~ScopeSampleRecord() + ~ScriptSampleRecord() { if (m_samples) free(m_samples); @@ -111,7 +113,7 @@ namespace JSC { void sample(CodeBlock*, Instruction*); - RefPtr m_scope; + ScriptExecutable* m_executable; CodeBlock* m_codeBlock; int m_sampleCount; int m_opcodeSampleCount; @@ -119,7 +121,7 @@ namespace JSC { unsigned m_size; }; - typedef WTF::HashMap ScopeSampleRecordMap; + typedef WTF::HashMap ScriptSampleRecordMap; class SamplingThread { public: @@ -193,7 +195,7 @@ namespace JSC { , m_sampleCount(0) , m_opcodeSampleCount(0) #if ENABLE(CODEBLOCK_SAMPLING) - , m_scopeSampleMap(new ScopeSampleRecordMap()) + , m_scopeSampleMap(new ScriptSampleRecordMap()) #endif { memset(m_opcodeSamples, 0, sizeof(m_opcodeSamples)); @@ -210,7 +212,7 @@ namespace JSC { void setup(); void dump(ExecState*); - void notifyOfScope(ScopeNode* scope); + void notifyOfScope(ScriptExecutable* scope); void sample(CodeBlock* codeBlock, Instruction* vPC) { @@ -266,8 +268,8 @@ namespace JSC { unsigned m_opcodeSamplesInCTIFunctions[numOpcodeIDs]; #if ENABLE(CODEBLOCK_SAMPLING) - Mutex m_scopeSampleMapMutex; - OwnPtr m_scopeSampleMap; + Mutex m_scriptSampleMapMutex; + OwnPtr m_scopeSampleMap; #endif }; diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp index af8f784..8951ce3 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp @@ -273,7 +273,7 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, const Debugger* d } else { for (size_t i = 0; i < functionStack.size(); ++i) { FunctionBodyNode* function = functionStack[i]; - globalObject->putWithAttributes(exec, function->ident(), new (exec) JSFunction(exec, makeFunction(function), scopeChain.node()), DontDelete); + globalObject->putWithAttributes(exec, function->ident(), new (exec) JSFunction(exec, makeFunction(exec, function), scopeChain.node()), DontDelete); } for (size_t i = 0; i < varStack.size(); ++i) { if (globalObject->hasProperty(exec, *varStack[i].first)) @@ -399,7 +399,7 @@ BytecodeGenerator::BytecodeGenerator(EvalNode* evalNode, const Debugger* debugge const DeclarationStacks::FunctionStack& functionStack = evalNode->functionStack(); for (size_t i = 0; i < functionStack.size(); ++i) - m_codeBlock->addFunctionDecl(makeFunction(functionStack[i])); + m_codeBlock->addFunctionDecl(makeFunction(m_globalData, functionStack[i])); const DeclarationStacks::VarStack& varStack = evalNode->varStack(); unsigned numVariables = varStack.size(); @@ -1316,7 +1316,7 @@ RegisterID* BytecodeGenerator::emitNewArray(RegisterID* dst, ElementNode* elemen RegisterID* BytecodeGenerator::emitNewFunction(RegisterID* dst, FunctionBodyNode* function) { - unsigned index = m_codeBlock->addFunctionDecl(makeFunction(function)); + unsigned index = m_codeBlock->addFunctionDecl(makeFunction(m_globalData, function)); emitOpcode(op_new_func); instructions().append(dst->index()); @@ -1336,7 +1336,7 @@ RegisterID* BytecodeGenerator::emitNewRegExp(RegisterID* dst, RegExp* regExp) RegisterID* BytecodeGenerator::emitNewFunctionExpression(RegisterID* r0, FuncExprNode* n) { FunctionBodyNode* function = n->body(); - unsigned index = m_codeBlock->addFunctionExpr(makeFunction(function)); + unsigned index = m_codeBlock->addFunctionExpr(makeFunction(m_globalData, function)); emitOpcode(op_new_func_exp); instructions().append(r0->index()); diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.h b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.h index 650b362..1a83ce9 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.h @@ -417,9 +417,14 @@ namespace JSC { RegisterID* addConstantValue(JSValue); unsigned addRegExp(RegExp*); - PassRefPtr makeFunction(FunctionBodyNode* body) + PassRefPtr makeFunction(ExecState* exec, FunctionBodyNode* body) { - return FunctionExecutable::create(body->ident(), body->source(), body->usesArguments(), body->parameters(), body->lineNo(), body->lastLine()); + return FunctionExecutable::create(exec, body->ident(), body->source(), body->usesArguments(), body->parameters(), body->lineNo(), body->lastLine()); + } + + PassRefPtr makeFunction(JSGlobalData* globalData, FunctionBodyNode* body) + { + return FunctionExecutable::create(globalData, body->ident(), body->source(), body->usesArguments(), body->parameters(), body->lineNo(), body->lastLine()); } Vector& instructions() { return m_codeBlock->instructions(); } diff --git a/src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.cpp b/src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.cpp index 61167d4..db02329 100644 --- a/src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/debugger/Debugger.cpp @@ -100,7 +100,7 @@ JSValue evaluateInGlobalCallFrame(const UString& script, JSValue& exception, JSG { CallFrame* globalCallFrame = globalObject->globalExec(); - EvalExecutable eval(makeSource(script)); + EvalExecutable eval(globalCallFrame, makeSource(script)); JSObject* error = eval.compile(globalCallFrame, globalCallFrame->scopeChain()); if (error) return error; diff --git a/src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerActivation.cpp b/src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerActivation.cpp index 7a68d7d..5cc9a9f 100644 --- a/src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerActivation.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerActivation.cpp @@ -81,14 +81,14 @@ bool DebuggerActivation::getPropertyAttributes(JSC::ExecState* exec, const Ident return m_activation->getPropertyAttributes(exec, propertyName, attributes); } -void DebuggerActivation::defineGetter(ExecState* exec, const Identifier& propertyName, JSObject* getterFunction) +void DebuggerActivation::defineGetter(ExecState* exec, const Identifier& propertyName, JSObject* getterFunction, unsigned attributes) { - m_activation->defineGetter(exec, propertyName, getterFunction); + m_activation->defineGetter(exec, propertyName, getterFunction, attributes); } -void DebuggerActivation::defineSetter(ExecState* exec, const Identifier& propertyName, JSObject* setterFunction) +void DebuggerActivation::defineSetter(ExecState* exec, const Identifier& propertyName, JSObject* setterFunction, unsigned attributes) { - m_activation->defineSetter(exec, propertyName, setterFunction); + m_activation->defineSetter(exec, propertyName, setterFunction, attributes); } JSValue DebuggerActivation::lookupGetter(ExecState* exec, const Identifier& propertyName) diff --git a/src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerActivation.h b/src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerActivation.h index 06aea5a..dd34265 100644 --- a/src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerActivation.h +++ b/src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerActivation.h @@ -44,8 +44,8 @@ namespace JSC { virtual bool deleteProperty(ExecState*, const Identifier& propertyName); virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&); virtual bool getPropertyAttributes(ExecState*, const Identifier& propertyName, unsigned& attributes) const; - virtual void defineGetter(ExecState*, const Identifier& propertyName, JSObject* getterFunction); - virtual void defineSetter(ExecState*, const Identifier& propertyName, JSObject* setterFunction); + virtual void defineGetter(ExecState*, const Identifier& propertyName, JSObject* getterFunction, unsigned attributes); + virtual void defineSetter(ExecState*, const Identifier& propertyName, JSObject* setterFunction, unsigned attributes); virtual JSValue lookupGetter(ExecState*, const Identifier& propertyName); virtual JSValue lookupSetter(ExecState*, const Identifier& propertyName); diff --git a/src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerCallFrame.cpp b/src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerCallFrame.cpp index 9c8ca2a..88b14e6 100644 --- a/src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerCallFrame.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/debugger/DebuggerCallFrame.cpp @@ -79,7 +79,7 @@ JSValue DebuggerCallFrame::evaluate(const UString& script, JSValue& exception) c if (!m_callFrame->codeBlock()) return JSValue(); - EvalExecutable eval(makeSource(script)); + EvalExecutable eval(m_callFrame, makeSource(script)); JSObject* error = eval.compile(m_callFrame, m_callFrame->scopeChain()); if (error) return error; diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp index 4560db0..8a8fb3c 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp @@ -169,7 +169,7 @@ NEVER_INLINE bool Interpreter::resolveGlobal(CallFrame* callFrame, Instruction* PropertySlot slot(globalObject); if (globalObject->getPropertySlot(callFrame, ident, slot)) { JSValue result = slot.getValue(callFrame, ident); - if (slot.isCacheable() && !globalObject->structure()->isDictionary() && slot.slotBase() == globalObject) { + if (slot.isCacheable() && !globalObject->structure()->isUncacheableDictionary() && slot.slotBase() == globalObject) { if (vPC[4].u.structure) vPC[4].u.structure->deref(); globalObject->structure()->ref(); @@ -953,7 +953,7 @@ NEVER_INLINE void Interpreter::tryCachePutByID(CallFrame* callFrame, CodeBlock* JSCell* baseCell = asCell(baseValue); Structure* structure = baseCell->structure(); - if (structure->isDictionary()) { + if (structure->isUncacheableDictionary()) { vPC[0] = getOpcode(op_put_by_id_generic); return; } @@ -988,6 +988,10 @@ NEVER_INLINE void Interpreter::tryCachePutByID(CallFrame* callFrame, CodeBlock* // Structure transition, cache transition info if (slot.type() == PutPropertySlot::NewProperty) { + if (structure->isDictionary()) { + vPC[0] = getOpcode(op_put_by_id_generic); + return; + } vPC[0] = getOpcode(op_put_by_id_transition); vPC[4] = structure->previousID(); vPC[5] = structure; @@ -1040,7 +1044,7 @@ NEVER_INLINE void Interpreter::tryCacheGetByID(CallFrame* callFrame, CodeBlock* Structure* structure = asCell(baseValue)->structure(); - if (structure->isDictionary()) { + if (structure->isUncacheableDictionary()) { vPC[0] = getOpcode(op_get_by_id_generic); return; } @@ -3731,7 +3735,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi JSObject* baseObj = asObject(callFrame->r(base).jsValue()); Identifier& ident = callFrame->codeBlock()->identifier(property); ASSERT(callFrame->r(function).jsValue().isObject()); - baseObj->defineSetter(callFrame, ident, asObject(callFrame->r(function).jsValue())); + baseObj->defineSetter(callFrame, ident, asObject(callFrame->r(function).jsValue()), 0); ++vPC; NEXT_INSTRUCTION(); diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp index 06ddefc..5424199 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp @@ -36,6 +36,9 @@ RegisterFile::~RegisterFile() #if HAVE(MMAP) munmap(m_buffer, ((m_max - m_start) + m_maxGlobals) * sizeof(Register)); #elif HAVE(VIRTUALALLOC) +#if PLATFORM(WINCE) + VirtualFree(m_buffer, DWORD(m_commitEnd) - DWORD(m_buffer), MEM_DECOMMIT); +#endif VirtualFree(m_buffer, 0, MEM_RELEASE); #else fastFree(m_buffer); diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h b/src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h index 51ada03..12e2a32 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h +++ b/src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h @@ -180,7 +180,7 @@ public: static void cacheFlush(void*, size_t) { } -#elif PLATFORM_ARM_ARCH(7) && PLATFORM(IPHONE) +#elif PLATFORM(ARM_THUMB2) && PLATFORM(IPHONE) static void cacheFlush(void* code, size_t size) { sys_dcache_flush(code, size); @@ -191,24 +191,29 @@ public: { User::IMB_Range(code, static_cast(code) + size); } -#elif PLATFORM(ARM) +#elif PLATFORM(ARM) && COMPILER(GCC) && (GCC_VERSION >= 30406) && !defined(DISABLE_BUILTIN_CLEAR_CACHE) static void cacheFlush(void* code, size_t size) { - #if COMPILER(GCC) && (GCC_VERSION >= 30406) __clear_cache(reinterpret_cast(code), reinterpret_cast(code) + size); - #else - const int syscall = 0xf0002; - __asm __volatile ( - "mov r0, %0\n" - "mov r1, %1\n" - "mov r7, %2\n" - "mov r2, #0x0\n" - "swi 0x00000000\n" - : - : "r" (code), "r" (reinterpret_cast(code) + size), "r" (syscall) - : "r0", "r1", "r7"); - #endif // COMPILER(GCC) && (GCC_VERSION >= 30406) } +#elif PLATFORM(ARM_TRADITIONAL) && PLATFORM(LINUX) + static void cacheFlush(void* code, size_t size) + { + asm volatile ( + "push {r7}\n" + "mov r0, %0\n" + "mov r1, %1\n" + "mov r7, #0xf0000\n" + "add r7, r7, #0x2\n" + "mov r2, #0x0\n" + "svc 0x0\n" + "pop {r7}\n" + : + : "r" (code), "r" (reinterpret_cast(code) + size) + : "r0", "r1"); + } +#else + #error "The cacheFlush support is missing on this platform." #endif private: diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h index f7ac20e..5c58e9d 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h @@ -226,7 +226,7 @@ namespace JSC { static const FPRegisterID fpRegT0 = X86Registers::xmm0; static const FPRegisterID fpRegT1 = X86Registers::xmm1; static const FPRegisterID fpRegT2 = X86Registers::xmm2; -#elif PLATFORM_ARM_ARCH(7) +#elif PLATFORM(ARM_THUMB2) static const RegisterID returnValueRegister = ARMRegisters::r0; static const RegisterID cachedResultRegister = ARMRegisters::r0; static const RegisterID firstArgumentRegister = ARMRegisters::r0; @@ -242,7 +242,7 @@ namespace JSC { static const FPRegisterID fpRegT0 = ARMRegisters::d0; static const FPRegisterID fpRegT1 = ARMRegisters::d1; static const FPRegisterID fpRegT2 = ARMRegisters::d2; -#elif PLATFORM(ARM) +#elif PLATFORM(ARM_TRADITIONAL) static const RegisterID returnValueRegister = ARMRegisters::r0; static const RegisterID cachedResultRegister = ARMRegisters::r0; static const RegisterID firstArgumentRegister = ARMRegisters::r0; @@ -571,7 +571,7 @@ namespace JSC { static const int patchOffsetMethodCheckProtoObj = 11; static const int patchOffsetMethodCheckProtoStruct = 18; static const int patchOffsetMethodCheckPutFunction = 29; -#elif PLATFORM_ARM_ARCH(7) +#elif PLATFORM(ARM_THUMB2) // These architecture specific value are used to enable patching - see comment on op_put_by_id. static const int patchOffsetPutByIdStructure = 10; static const int patchOffsetPutByIdExternalLoad = 20; @@ -594,7 +594,7 @@ namespace JSC { static const int patchOffsetMethodCheckProtoObj = 18; static const int patchOffsetMethodCheckProtoStruct = 28; static const int patchOffsetMethodCheckPutFunction = 46; -#elif PLATFORM(ARM) +#elif PLATFORM(ARM_TRADITIONAL) // These architecture specific value are used to enable patching - see comment on op_put_by_id. static const int patchOffsetPutByIdStructure = 4; static const int patchOffsetPutByIdExternalLoad = 16; @@ -620,7 +620,7 @@ namespace JSC { #endif #endif // USE(JSVALUE32_64) -#if PLATFORM(ARM) && !PLATFORM_ARM_ARCH(7) +#if PLATFORM(ARM_TRADITIONAL) // sequenceOpCall static const int sequenceOpCallInstructionSpace = 12; static const int sequenceOpCallConstantSpace = 2; diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h b/src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h index 60c9658..e69e273 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h @@ -110,7 +110,7 @@ ALWAYS_INLINE JIT::Call JIT::emitNakedCall(CodePtr function) ALWAYS_INLINE void JIT::beginUninterruptedSequence(int insnSpace, int constSpace) { -#if PLATFORM(ARM) && !PLATFORM_ARM_ARCH(7) +#if PLATFORM(ARM_TRADITIONAL) #ifndef NDEBUG // Ensure the label after the sequence can also fit insnSpace += sizeof(ARMWord); @@ -139,38 +139,38 @@ ALWAYS_INLINE void JIT::endUninterruptedSequence(int insnSpace, int constSpace) #endif -#if PLATFORM(X86) || PLATFORM(X86_64) || (PLATFORM(ARM) && !PLATFORM_ARM_ARCH(7)) +#if PLATFORM(ARM_THUMB2) ALWAYS_INLINE void JIT::preserveReturnAddressAfterCall(RegisterID reg) { - pop(reg); + move(linkRegister, reg); } ALWAYS_INLINE void JIT::restoreReturnAddressBeforeReturn(RegisterID reg) { - push(reg); + move(reg, linkRegister); } ALWAYS_INLINE void JIT::restoreReturnAddressBeforeReturn(Address address) { - push(address); + loadPtr(address, linkRegister); } -#elif PLATFORM_ARM_ARCH(7) +#else // PLATFORM(X86) || PLATFORM(X86_64) || PLATFORM(ARM_TRADITIONAL) ALWAYS_INLINE void JIT::preserveReturnAddressAfterCall(RegisterID reg) { - move(linkRegister, reg); + pop(reg); } ALWAYS_INLINE void JIT::restoreReturnAddressBeforeReturn(RegisterID reg) { - move(reg, linkRegister); + push(reg); } ALWAYS_INLINE void JIT::restoreReturnAddressBeforeReturn(Address address) { - loadPtr(address, linkRegister); + push(address); } #endif @@ -186,7 +186,7 @@ ALWAYS_INLINE void JIT::restoreArgumentReference() { move(stackPointerRegister, firstArgumentRegister); poke(callFrameRegister, OBJECT_OFFSETOF(struct JITStackFrame, callFrame) / sizeof (void*)); -#if PLATFORM(ARM) && !PLATFORM_ARM_ARCH(7) +#if PLATFORM(ARM_TRADITIONAL) move(ctiReturnRegister, ARMRegisters::lr); #endif } @@ -195,7 +195,7 @@ ALWAYS_INLINE void JIT::restoreArgumentReferenceForTrampoline() #if PLATFORM(X86) // Within a trampoline the return address will be on the stack at this point. addPtr(Imm32(sizeof(void*)), stackPointerRegister, firstArgumentRegister); -#elif PLATFORM_ARM_ARCH(7) +#elif PLATFORM(ARM_THUMB2) move(stackPointerRegister, firstArgumentRegister); #endif // In the trampoline on x86-64, the first argument register is not overwritten. diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp index 1c9cd7e..28d630b 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITOpcodes.cpp @@ -1681,7 +1681,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr* executable // so pull them off now addPtr(Imm32(NativeCallFrameSize - sizeof(NativeFunctionCalleeSignature)), stackPointerRegister); -#elif PLATFORM(ARM) && !PLATFORM_ARM_ARCH(7) +#elif PLATFORM(ARM_TRADITIONAL) emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT0); // Allocate stack space for our arglist diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp index 4ab58d5..055a536 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp @@ -69,6 +69,12 @@ namespace JSC { #define SYMBOL_STRING(name) #name #endif +#if PLATFORM(IPHONE) +#define THUMB_FUNC_PARAM(name) SYMBOL_STRING(name) +#else +#define THUMB_FUNC_PARAM(name) +#endif + #if USE(JSVALUE32_64) #if COMPILER(GCC) && PLATFORM(X86) @@ -193,7 +199,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "ret" "\n" ); -#elif COMPILER(GCC) && PLATFORM_ARM_ARCH(7) +#elif COMPILER(GCC) && PLATFORM(ARM_THUMB2) #if USE(JIT_STUB_ARGUMENT_VA_LIST) #error "JIT_STUB_ARGUMENT_VA_LIST not supported on ARMv7." @@ -204,7 +210,7 @@ asm volatile ( ".align 2" "\n" ".globl " SYMBOL_STRING(ctiTrampoline) "\n" ".thumb" "\n" -".thumb_func " SYMBOL_STRING(ctiTrampoline) "\n" +".thumb_func " THUMB_FUNC_PARAM(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" "sub sp, sp, #0x3c" "\n" "str lr, [sp, #0x20]" "\n" @@ -230,7 +236,7 @@ asm volatile ( ".align 2" "\n" ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" ".thumb" "\n" -".thumb_func " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" +".thumb_func " THUMB_FUNC_PARAM(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" "cpy r0, sp" "\n" "bl " SYMBOL_STRING(cti_vm_throw) "\n" @@ -247,7 +253,7 @@ asm volatile ( ".align 2" "\n" ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" ".thumb" "\n" -".thumb_func " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" +".thumb_func " THUMB_FUNC_PARAM(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "ldr r6, [sp, #0x2c]" "\n" "ldr r5, [sp, #0x28]" "\n" @@ -452,7 +458,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "ret" "\n" ); -#elif COMPILER(GCC) && PLATFORM_ARM_ARCH(7) +#elif COMPILER(GCC) && PLATFORM(ARM_THUMB2) #if USE(JIT_STUB_ARGUMENT_VA_LIST) #error "JIT_STUB_ARGUMENT_VA_LIST not supported on ARMv7." @@ -463,9 +469,9 @@ asm volatile ( ".align 2" "\n" ".globl " SYMBOL_STRING(ctiTrampoline) "\n" ".thumb" "\n" -".thumb_func " SYMBOL_STRING(ctiTrampoline) "\n" +".thumb_func " THUMB_FUNC_PARAM(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" - "sub sp, sp, #0x3c" "\n" + "sub sp, sp, #0x40" "\n" "str lr, [sp, #0x20]" "\n" "str r4, [sp, #0x24]" "\n" "str r5, [sp, #0x28]" "\n" @@ -480,7 +486,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n" "ldr r5, [sp, #0x28]" "\n" "ldr r4, [sp, #0x24]" "\n" "ldr lr, [sp, #0x20]" "\n" - "add sp, sp, #0x3c" "\n" + "add sp, sp, #0x40" "\n" "bx lr" "\n" ); @@ -489,7 +495,7 @@ asm volatile ( ".align 2" "\n" ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" ".thumb" "\n" -".thumb_func " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" +".thumb_func " THUMB_FUNC_PARAM(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" "cpy r0, sp" "\n" "bl " SYMBOL_STRING(cti_vm_throw) "\n" @@ -497,7 +503,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" "ldr r5, [sp, #0x28]" "\n" "ldr r4, [sp, #0x24]" "\n" "ldr lr, [sp, #0x20]" "\n" - "add sp, sp, #0x3c" "\n" + "add sp, sp, #0x40" "\n" "bx lr" "\n" ); @@ -506,7 +512,7 @@ asm volatile ( ".align 2" "\n" ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" ".thumb" "\n" -".thumb_func " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" +".thumb_func " THUMB_FUNC_PARAM(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "ldr r6, [sp, #0x2c]" "\n" "ldr r5, [sp, #0x28]" "\n" @@ -516,7 +522,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "bx lr" "\n" ); -#elif COMPILER(GCC) && PLATFORM(ARM) +#elif COMPILER(GCC) && PLATFORM(ARM_TRADITIONAL) asm volatile ( ".globl " SYMBOL_STRING(ctiTrampoline) "\n" @@ -636,7 +642,7 @@ JITThunks::JITThunks(JSGlobalData* globalData) { JIT::compileCTIMachineTrampolines(globalData, &m_executablePool, &m_ctiStringLengthTrampoline, &m_ctiVirtualCallLink, &m_ctiVirtualCall, &m_ctiNativeCallThunk); -#if PLATFORM_ARM_ARCH(7) +#if PLATFORM(ARM_THUMB2) // Unfortunate the arm compiler does not like the use of offsetof on JITStackFrame (since it contains non POD types), // and the OBJECT_OFFSETOF macro does not appear constantish enough for it to be happy with its use in COMPILE_ASSERT // macros. @@ -649,7 +655,7 @@ JITThunks::JITThunks(JSGlobalData* globalData) ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, callFrame) == 0x34); ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, exception) == 0x38); // The fifth argument is the first item already on the stack. - ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, enabledProfilerReference) == 0x3c); + ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, enabledProfilerReference) == 0x40); ASSERT(OBJECT_OFFSETOF(struct JITStackFrame, thunkReturnAddress) == 0x1C); #endif @@ -673,7 +679,7 @@ NEVER_INLINE void JITThunks::tryCachePutByID(CallFrame* callFrame, CodeBlock* co JSCell* baseCell = asCell(baseValue); Structure* structure = baseCell->structure(); - if (structure->isDictionary()) { + if (structure->isUncacheableDictionary()) { ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(cti_op_put_by_id_generic)); return; } @@ -689,7 +695,7 @@ NEVER_INLINE void JITThunks::tryCachePutByID(CallFrame* callFrame, CodeBlock* co // Structure transition, cache transition info if (slot.type() == PutPropertySlot::NewProperty) { StructureChain* prototypeChain = structure->prototypeChain(callFrame); - if (!prototypeChain->isCacheable()) { + if (!prototypeChain->isCacheable() || structure->isDictionary()) { ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(cti_op_put_by_id_generic)); return; } @@ -737,7 +743,7 @@ NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* co JSCell* baseCell = asCell(baseValue); Structure* structure = baseCell->structure(); - if (structure->isDictionary()) { + if (structure->isUncacheableDictionary()) { ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(cti_op_get_by_id_generic)); return; } @@ -876,7 +882,7 @@ static NEVER_INLINE void throwStackOverflowError(CallFrame* callFrame, JSGlobalD } \ } while (0) -#if PLATFORM_ARM_ARCH(7) +#if PLATFORM(ARM_THUMB2) #define DEFINE_STUB_FUNCTION(rtype, op) \ extern "C" { \ @@ -887,7 +893,7 @@ static NEVER_INLINE void throwStackOverflowError(CallFrame* callFrame, JSGlobalD ".align 2" "\n" \ ".globl " SYMBOL_STRING(cti_##op) "\n" \ ".thumb" "\n" \ - ".thumb_func " SYMBOL_STRING(cti_##op) "\n" \ + ".thumb_func " THUMB_FUNC_PARAM(cti_##op) "\n" \ SYMBOL_STRING(cti_##op) ":" "\n" \ "str lr, [sp, #0x1c]" "\n" \ "bl " SYMBOL_STRING(JITStubThunked_##op) "\n" \ @@ -1148,7 +1154,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_method_check) JSObject* slotBaseObject; if (baseValue.isCell() && slot.isCacheable() - && !(structure = asCell(baseValue)->structure())->isDictionary() + && !(structure = asCell(baseValue)->structure())->isUncacheableDictionary() && (slotBaseObject = asObject(slot.slotBase()))->getPropertySpecificValue(callFrame, ident, specific) && specific ) { @@ -1222,7 +1228,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_self_fail) if (baseValue.isCell() && slot.isCacheable() - && !asCell(baseValue)->structure()->isDictionary() + && !asCell(baseValue)->structure()->isUncacheableDictionary() && slot.slotBase() == baseValue) { CodeBlock* codeBlock = callFrame->codeBlock(); @@ -1293,7 +1299,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_list) CHECK_FOR_EXCEPTION(); - if (!baseValue.isCell() || !slot.isCacheable() || asCell(baseValue)->structure()->isDictionary()) { + if (!baseValue.isCell() || !slot.isCacheable() || asCell(baseValue)->structure()->isUncacheableDictionary()) { ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail)); return JSValue::encode(result); } @@ -2182,7 +2188,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_resolve_global) PropertySlot slot(globalObject); if (globalObject->getPropertySlot(callFrame, ident, slot)) { JSValue result = slot.getValue(callFrame, ident); - if (slot.isCacheable() && !globalObject->structure()->isDictionary() && slot.slotBase() == globalObject) { + if (slot.isCacheable() && !globalObject->structure()->isUncacheableDictionary() && slot.slotBase() == globalObject) { GlobalResolveInfo& globalResolveInfo = callFrame->codeBlock()->globalResolveInfo(globalResolveInfoIndex); if (globalResolveInfo.structure) globalResolveInfo.structure->deref(); diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.h b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.h index 1dbdeaa..46973ee 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.h +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.h @@ -129,7 +129,7 @@ namespace JSC { #if COMPILER(MSVC) #pragma pack(pop) #endif // COMPILER(MSVC) -#elif PLATFORM_ARM_ARCH(7) +#elif PLATFORM(ARM_THUMB2) struct JITStackFrame { void* reserved; // Unused JITStubArg args[6]; @@ -149,13 +149,15 @@ namespace JSC { CallFrame* callFrame; JSValue* exception; + void* padding2; + // These arguments passed on the stack. Profiler** enabledProfilerReference; JSGlobalData* globalData; ReturnAddressPtr* returnAddressSlot() { return &thunkReturnAddress; } }; -#elif PLATFORM(ARM) +#elif PLATFORM(ARM_TRADITIONAL) struct JITStackFrame { JITStubArg padding; // Unused JITStubArg args[7]; diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp b/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp index 14a398a..3bd318a 100644 --- a/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.cpp @@ -1886,10 +1886,6 @@ ScopeNode::ScopeNode(JSGlobalData* globalData) , ParserArenaRefCounted(globalData) , m_features(NoFeatures) { -#if ENABLE(CODEBLOCK_SAMPLING) - if (SamplingTool* sampler = globalData->interpreter->sampler()) - sampler->notifyOfScope(this); -#endif } ScopeNode::ScopeNode(JSGlobalData* globalData, const SourceCode& source, SourceElements* children, VarStack* varStack, FunctionStack* funcStack, CodeFeatures features, int numConstants) @@ -1899,10 +1895,6 @@ ScopeNode::ScopeNode(JSGlobalData* globalData, const SourceCode& source, SourceE , m_features(features) , m_source(source) { -#if ENABLE(CODEBLOCK_SAMPLING) - if (SamplingTool* sampler = globalData->interpreter->sampler()) - sampler->notifyOfScope(this); -#endif } inline void ScopeNode::emitStatementsBytecode(BytecodeGenerator& generator, RegisterID* dst) diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/SourceCode.h b/src/3rdparty/webkit/JavaScriptCore/parser/SourceCode.h index 84360b8..9ba4da3 100644 --- a/src/3rdparty/webkit/JavaScriptCore/parser/SourceCode.h +++ b/src/3rdparty/webkit/JavaScriptCore/parser/SourceCode.h @@ -37,7 +37,8 @@ namespace JSC { class SourceCode { public: SourceCode() - : m_startChar(0) + : m_provider(0) + , m_startChar(0) , m_endChar(0) , m_firstLine(0) { diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/BatchedTransitionOptimizer.h b/src/3rdparty/webkit/JavaScriptCore/runtime/BatchedTransitionOptimizer.h index b9f738f..929a5e7 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/BatchedTransitionOptimizer.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/BatchedTransitionOptimizer.h @@ -38,7 +38,7 @@ namespace JSC { : m_object(object) { if (!m_object->structure()->isDictionary()) - m_object->setStructure(Structure::toDictionaryTransition(m_object->structure())); + m_object->setStructure(Structure::toCacheableDictionaryTransition(m_object->structure())); } ~BatchedTransitionOptimizer() diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/CommonIdentifiers.h b/src/3rdparty/webkit/JavaScriptCore/runtime/CommonIdentifiers.h index 8493d73..abe5038 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/CommonIdentifiers.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/CommonIdentifiers.h @@ -39,6 +39,9 @@ macro(compile) \ macro(configurable) \ macro(constructor) \ + macro(create) \ + macro(defineProperty) \ + macro(defineProperties) \ macro(enumerable) \ macro(eval) \ macro(exec) \ diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Completion.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/Completion.cpp index f36de54..ec3e000 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Completion.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Completion.cpp @@ -37,7 +37,7 @@ Completion checkSyntax(ExecState* exec, const SourceCode& source) { JSLock lock(exec); - ProgramExecutable program(source); + ProgramExecutable program(exec, source); JSObject* error = program.checkSyntax(exec); if (error) return Completion(Throw, error); @@ -49,7 +49,7 @@ Completion evaluate(ExecState* exec, ScopeChain& scopeChain, const SourceCode& s { JSLock lock(exec); - ProgramExecutable program(source); + ProgramExecutable program(exec, source); JSObject* error = program.compile(exec, scopeChain.node()); if (error) return Completion(Throw, error); diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Executable.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/Executable.cpp index 5e79794..7586746 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Executable.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Executable.cpp @@ -259,7 +259,7 @@ PassRefPtr FunctionExecutable::fromGlobalCode(const Identifi FunctionBodyNode* body = static_cast(funcExpr)->body(); ASSERT(body); - return FunctionExecutable::create(functionName, body->source(), body->usesArguments(), body->parameters(), body->lineNo(), body->lastLine()); + return FunctionExecutable::create(&exec->globalData(), functionName, body->source(), body->usesArguments(), body->parameters(), body->lineNo(), body->lastLine()); } UString FunctionExecutable::paramString() const diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Executable.h b/src/3rdparty/webkit/JavaScriptCore/runtime/Executable.h index d437d46..9728775 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Executable.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Executable.h @@ -27,7 +27,9 @@ #define Executable_h #include "JSFunction.h" +#include "Interpreter.h" #include "Nodes.h" +#include "SamplingTool.h" namespace JSC { @@ -102,11 +104,30 @@ namespace JSC { class ScriptExecutable : public ExecutableBase { public: - ScriptExecutable(const SourceCode& source) + ScriptExecutable(JSGlobalData* globalData, const SourceCode& source) : ExecutableBase(NUM_PARAMETERS_NOT_COMPILED) , m_source(source) , m_features(0) { +#if ENABLE(CODEBLOCK_SAMPLING) + if (SamplingTool* sampler = globalData->interpreter->sampler()) + sampler->notifyOfScope(this); +#else + UNUSED_PARAM(globalData); +#endif + } + + ScriptExecutable(ExecState* exec, const SourceCode& source) + : ExecutableBase(NUM_PARAMETERS_NOT_COMPILED) + , m_source(source) + , m_features(0) + { +#if ENABLE(CODEBLOCK_SAMPLING) + if (SamplingTool* sampler = exec->globalData().interpreter->sampler()) + sampler->notifyOfScope(this); +#else + UNUSED_PARAM(exec); +#endif } const SourceCode& source() { return m_source; } @@ -137,8 +158,8 @@ namespace JSC { class EvalExecutable : public ScriptExecutable { public: - EvalExecutable(const SourceCode& source) - : ScriptExecutable(source) + EvalExecutable(ExecState* exec, const SourceCode& source) + : ScriptExecutable(exec, source) , m_evalCodeBlock(0) { } @@ -157,7 +178,7 @@ namespace JSC { JSObject* compile(ExecState*, ScopeChainNode*); ExceptionInfo* reparseExceptionInfo(JSGlobalData*, ScopeChainNode*, CodeBlock*); - static PassRefPtr create(const SourceCode& source) { return adoptRef(new EvalExecutable(source)); } + static PassRefPtr create(ExecState* exec, const SourceCode& source) { return adoptRef(new EvalExecutable(exec, source)); } private: EvalCodeBlock* m_evalCodeBlock; @@ -178,8 +199,8 @@ namespace JSC { class ProgramExecutable : public ScriptExecutable { public: - ProgramExecutable(const SourceCode& source) - : ScriptExecutable(source) + ProgramExecutable(ExecState* exec, const SourceCode& source) + : ScriptExecutable(exec, source) , m_programCodeBlock(0) { } @@ -221,9 +242,14 @@ namespace JSC { class FunctionExecutable : public ScriptExecutable { friend class JIT; public: - static PassRefPtr create(const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, int firstLine, int lastLine) + static PassRefPtr create(ExecState* exec, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, int firstLine, int lastLine) + { + return adoptRef(new FunctionExecutable(exec, name, source, forceUsesArguments, parameters, firstLine, lastLine)); + } + + static PassRefPtr create(JSGlobalData* globalData, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, int firstLine, int lastLine) { - return adoptRef(new FunctionExecutable(name, source, forceUsesArguments, parameters, firstLine, lastLine)); + return adoptRef(new FunctionExecutable(globalData, name, source, forceUsesArguments, parameters, firstLine, lastLine)); } ~FunctionExecutable(); @@ -263,8 +289,20 @@ namespace JSC { static PassRefPtr fromGlobalCode(const Identifier&, ExecState*, Debugger*, const SourceCode&, int* errLine = 0, UString* errMsg = 0); private: - FunctionExecutable(const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, int firstLine, int lastLine) - : ScriptExecutable(source) + FunctionExecutable(JSGlobalData* globalData, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, int firstLine, int lastLine) + : ScriptExecutable(globalData, source) + , m_forceUsesArguments(forceUsesArguments) + , m_parameters(parameters) + , m_codeBlock(0) + , m_name(name) + , m_numVariables(0) + { + m_firstLine = firstLine; + m_lastLine = lastLine; + } + + FunctionExecutable(ExecState* exec, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, int firstLine, int lastLine) + : ScriptExecutable(exec, source) , m_forceUsesArguments(forceUsesArguments) , m_parameters(parameters) , m_codeBlock(0) diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.cpp index 1fcca81..101f543 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.cpp @@ -223,7 +223,7 @@ bool JSArray::getOwnPropertySlot(ExecState* exec, unsigned i, PropertySlot& slot } } - return false; + return JSObject::getOwnPropertySlot(exec, Identifier::from(exec, i), slot); } bool JSArray::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.cpp index 3a1909d..8d71ac3 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.cpp @@ -175,18 +175,18 @@ void JSGlobalObject::putWithAttributes(ExecState* exec, const Identifier& proper } } -void JSGlobalObject::defineGetter(ExecState* exec, const Identifier& propertyName, JSObject* getterFunc) +void JSGlobalObject::defineGetter(ExecState* exec, const Identifier& propertyName, JSObject* getterFunc, unsigned attributes) { PropertySlot slot; if (!symbolTableGet(propertyName, slot)) - JSVariableObject::defineGetter(exec, propertyName, getterFunc); + JSVariableObject::defineGetter(exec, propertyName, getterFunc, attributes); } -void JSGlobalObject::defineSetter(ExecState* exec, const Identifier& propertyName, JSObject* setterFunc) +void JSGlobalObject::defineSetter(ExecState* exec, const Identifier& propertyName, JSObject* setterFunc, unsigned attributes) { PropertySlot slot; if (!symbolTableGet(propertyName, slot)) - JSVariableObject::defineSetter(exec, propertyName, setterFunc); + JSVariableObject::defineSetter(exec, propertyName, setterFunc, attributes); } static inline JSObject* lastInPrototypeChain(JSObject* object) diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h index d1150cc..5f7137f 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h @@ -175,8 +175,8 @@ namespace JSC { virtual void put(ExecState*, const Identifier&, JSValue, PutPropertySlot&); virtual void putWithAttributes(ExecState*, const Identifier& propertyName, JSValue value, unsigned attributes); - virtual void defineGetter(ExecState*, const Identifier& propertyName, JSObject* getterFunc); - virtual void defineSetter(ExecState*, const Identifier& propertyName, JSObject* setterFunc); + virtual void defineGetter(ExecState*, const Identifier& propertyName, JSObject* getterFunc, unsigned attributes); + virtual void defineSetter(ExecState*, const Identifier& propertyName, JSObject* setterFunc, unsigned attributes); // Linked list of all global objects that use the same JSGlobalData. JSGlobalObject*& head() { return d()->globalData->head; } diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp index b11070f..5ded370 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp @@ -286,7 +286,7 @@ JSValue JSC_HOST_CALL globalFuncEval(ExecState* exec, JSObject* function, JSValu if (JSValue parsedObject = preparser.tryLiteralParse()) return parsedObject; - EvalExecutable eval(makeSource(s)); + EvalExecutable eval(exec, makeSource(s)); JSObject* error = eval.compile(exec, static_cast(unwrappedObject)->globalScopeChain().node()); if (error) return throwError(exec, error); diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.cpp index f910603..74af4b1 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.cpp @@ -275,7 +275,7 @@ const HashEntry* JSObject::findPropertyHashEntry(ExecState* exec, const Identifi return 0; } -void JSObject::defineGetter(ExecState* exec, const Identifier& propertyName, JSObject* getterFunction) +void JSObject::defineGetter(ExecState* exec, const Identifier& propertyName, JSObject* getterFunction, unsigned attributes) { JSValue object = getDirect(propertyName); if (object && object.isGetterSetter()) { @@ -286,7 +286,7 @@ void JSObject::defineGetter(ExecState* exec, const Identifier& propertyName, JSO PutPropertySlot slot; GetterSetter* getterSetter = new (exec) GetterSetter(exec); - putDirectInternal(exec->globalData(), propertyName, getterSetter, Getter, true, slot); + putDirectInternal(exec->globalData(), propertyName, getterSetter, attributes | Getter, true, slot); // putDirect will change our Structure if we add a new property. For // getters and setters, though, we also need to change our Structure @@ -302,7 +302,7 @@ void JSObject::defineGetter(ExecState* exec, const Identifier& propertyName, JSO getterSetter->setGetter(getterFunction); } -void JSObject::defineSetter(ExecState* exec, const Identifier& propertyName, JSObject* setterFunction) +void JSObject::defineSetter(ExecState* exec, const Identifier& propertyName, JSObject* setterFunction, unsigned attributes) { JSValue object = getDirect(propertyName); if (object && object.isGetterSetter()) { @@ -313,7 +313,7 @@ void JSObject::defineSetter(ExecState* exec, const Identifier& propertyName, JSO PutPropertySlot slot; GetterSetter* getterSetter = new (exec) GetterSetter(exec); - putDirectInternal(exec->globalData(), propertyName, getterSetter, Setter, true, slot); + putDirectInternal(exec->globalData(), propertyName, getterSetter, attributes | Setter, true, slot); // putDirect will change our Structure if we add a new property. For // getters and setters, though, we also need to change our Structure @@ -471,7 +471,7 @@ JSObject* JSObject::unwrappedObject() void JSObject::removeDirect(const Identifier& propertyName) { size_t offset; - if (m_structure->isDictionary()) { + if (m_structure->isUncacheableDictionary()) { offset = m_structure->removePropertyWithoutTransition(propertyName); if (offset != WTF::notFound) putDirectOffset(offset, jsUndefined()); @@ -541,4 +541,131 @@ bool JSObject::getPropertyDescriptor(ExecState* exec, const Identifier& property object = asObject(prototype); } } + +static bool putDescriptor(ExecState* exec, JSObject* target, const Identifier& propertyName, PropertyDescriptor& descriptor, unsigned attributes, JSValue oldValue) +{ + if (descriptor.isGenericDescriptor() || descriptor.isDataDescriptor()) { + target->putWithAttributes(exec, propertyName, descriptor.value() ? descriptor.value() : oldValue, attributes & ~(Getter | Setter)); + return true; + } + attributes &= ~ReadOnly; + if (descriptor.getter() && descriptor.getter().isObject()) + target->defineGetter(exec, propertyName, asObject(descriptor.getter()), attributes); + if (exec->hadException()) + return false; + if (descriptor.setter() && descriptor.setter().isObject()) + target->defineSetter(exec, propertyName, asObject(descriptor.setter()), attributes); + return !exec->hadException(); +} + +bool JSObject::defineOwnProperty(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor, bool throwException) +{ + // If we have a new property we can just put it on normally + PropertyDescriptor current; + if (!getOwnPropertyDescriptor(exec, propertyName, current)) + return putDescriptor(exec, this, propertyName, descriptor, descriptor.attributes(), jsUndefined()); + + if (descriptor.isEmpty()) + return true; + + if (current.equalTo(descriptor)) + return true; + + // Filter out invalid changes + if (!current.configurable()) { + if (descriptor.configurable()) { + if (throwException) + throwError(exec, TypeError, "Attempting to configurable attribute of unconfigurable property."); + return false; + } + if (descriptor.enumerablePresent() && descriptor.enumerable() != current.enumerable()) { + if (throwException) + throwError(exec, TypeError, "Attempting to change enumerable attribute of unconfigurable property."); + return false; + } + } + + // A generic descriptor is simply changing the attributes of an existing property + if (descriptor.isGenericDescriptor()) { + if (!current.attributesEqual(descriptor)) { + deleteProperty(exec, propertyName); + putDescriptor(exec, this, propertyName, descriptor, current.attributesWithOverride(descriptor), current.value()); + } + return true; + } + + // Changing between a normal property or an accessor property + if (descriptor.isDataDescriptor() != current.isDataDescriptor()) { + if (!current.configurable()) { + if (throwException) + throwError(exec, TypeError, "Attempting to change access mechanism for an unconfigurable property."); + return false; + } + deleteProperty(exec, propertyName); + return putDescriptor(exec, this, propertyName, descriptor, current.attributesWithOverride(descriptor), current.value() ? current.value() : jsUndefined()); + } + + // Changing the value and attributes of an existing property + if (descriptor.isDataDescriptor()) { + if (!current.configurable()) { + if (!current.writable() && descriptor.writable()) { + if (throwException) + throwError(exec, TypeError, "Attempting to change writable attribute of unconfigurable property."); + return false; + } + if (!current.writable()) { + if (descriptor.value() || !JSValue::strictEqual(current.value(), descriptor.value())) { + if (throwException) + throwError(exec, TypeError, "Attempting to change value of a readonly property."); + return false; + } + } + } else if (current.attributesEqual(descriptor)) { + if (!descriptor.value()) + return true; + PutPropertySlot slot; + put(exec, propertyName, descriptor.value(), slot); + if (exec->hadException()) + return false; + return true; + } + deleteProperty(exec, propertyName); + return putDescriptor(exec, this, propertyName, descriptor, current.attributesWithOverride(descriptor), current.value()); + } + + // Changing the accessor functions of an existing accessor property + ASSERT(descriptor.isAccessorDescriptor()); + if (!current.configurable()) { + if (descriptor.setterPresent() && !(current.setter() && JSValue::strictEqual(current.setter(), descriptor.setter()))) { + if (throwException) + throwError(exec, TypeError, "Attempting to change the setter of an unconfigurable property."); + return false; + } + if (descriptor.getterPresent() && !(current.getter() && JSValue::strictEqual(current.getter(), descriptor.getter()))) { + if (throwException) + throwError(exec, TypeError, "Attempting to change the getter of an unconfigurable property."); + return false; + } + } + JSValue accessor = getDirect(propertyName); + if (!accessor) + return false; + GetterSetter* getterSetter = asGetterSetter(accessor); + if (current.attributesEqual(descriptor)) { + if (descriptor.setter()) + getterSetter->setSetter(asObject(descriptor.setter())); + if (descriptor.getter()) + getterSetter->setGetter(asObject(descriptor.getter())); + return true; + } + deleteProperty(exec, propertyName); + unsigned attrs = current.attributesWithOverride(descriptor); + if (descriptor.setter()) + attrs |= Setter; + if (descriptor.getter()) + attrs |= Getter; + putDirect(propertyName, getterSetter, attrs); + return true; +} + } // namespace JSC diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.h b/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.h index bdc949b..3fd1e3c 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.h @@ -186,10 +186,11 @@ namespace JSC { void fillGetterPropertySlot(PropertySlot&, JSValue* location); - virtual void defineGetter(ExecState*, const Identifier& propertyName, JSObject* getterFunction); - virtual void defineSetter(ExecState*, const Identifier& propertyName, JSObject* setterFunction); + virtual void defineGetter(ExecState*, const Identifier& propertyName, JSObject* getterFunction, unsigned attributes = 0); + virtual void defineSetter(ExecState*, const Identifier& propertyName, JSObject* setterFunction, unsigned attributes = 0); virtual JSValue lookupGetter(ExecState*, const Identifier& propertyName); virtual JSValue lookupSetter(ExecState*, const Identifier& propertyName); + virtual bool defineOwnProperty(ExecState*, const Identifier& propertyName, PropertyDescriptor&, bool shouldThrow); virtual bool isGlobalObject() const { return false; } virtual bool isVariableObject() const { return false; } diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/MarkStackPosix.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/MarkStackPosix.cpp index 8e78ff3..43f8b29 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/MarkStackPosix.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/MarkStackPosix.cpp @@ -29,22 +29,44 @@ #include "MarkStack.h" #include +#if defined (__SYMBIAN32__) +#include "wtf/FastMalloc.h" +#include +#include +#include +#include +#else #include +#endif namespace JSC { void MarkStack::initializePagesize() { +#if defined (__SYMBIAN32__) + TInt page_size; + UserHal::PageSizeInBytes(page_size); + MarkStack::s_pageSize = page_size; +#else MarkStack::s_pageSize = getpagesize(); +#endif } void* MarkStack::allocateStack(size_t size) { +#if defined (__SYMBIAN32__) + return fastMalloc(size); +#else return mmap(0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); +#endif } void MarkStack::releaseStack(void* addr, size_t size) { +#if defined (__SYMBIAN32__) + fastFree(addr); +#else munmap(addr, size); +#endif } } diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/ObjectConstructor.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/ObjectConstructor.cpp index fd45c45..2992f1b 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/ObjectConstructor.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/ObjectConstructor.cpp @@ -37,6 +37,9 @@ ASSERT_CLASS_FITS_IN_CELL(ObjectConstructor); static JSValue JSC_HOST_CALL objectConstructorGetPrototypeOf(ExecState*, JSObject*, JSValue, const ArgList&); static JSValue JSC_HOST_CALL objectConstructorGetOwnPropertyDescriptor(ExecState*, JSObject*, JSValue, const ArgList&); static JSValue JSC_HOST_CALL objectConstructorKeys(ExecState*, JSObject*, JSValue, const ArgList&); +static JSValue JSC_HOST_CALL objectConstructorDefineProperty(ExecState*, JSObject*, JSValue, const ArgList&); +static JSValue JSC_HOST_CALL objectConstructorDefineProperties(ExecState*, JSObject*, JSValue, const ArgList&); +static JSValue JSC_HOST_CALL objectConstructorCreate(ExecState*, JSObject*, JSValue, const ArgList&); ObjectConstructor::ObjectConstructor(ExecState* exec, PassRefPtr structure, ObjectPrototype* objectPrototype, Structure* prototypeFunctionStructure) : InternalFunction(&exec->globalData(), structure, Identifier(exec, "Object")) @@ -50,6 +53,9 @@ ObjectConstructor::ObjectConstructor(ExecState* exec, PassRefPtr stru putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, prototypeFunctionStructure, 1, exec->propertyNames().getPrototypeOf, objectConstructorGetPrototypeOf), DontEnum); putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, prototypeFunctionStructure, 2, exec->propertyNames().getOwnPropertyDescriptor, objectConstructorGetOwnPropertyDescriptor), DontEnum); putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, prototypeFunctionStructure, 1, exec->propertyNames().keys, objectConstructorKeys), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, prototypeFunctionStructure, 3, exec->propertyNames().defineProperty, objectConstructorDefineProperty), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, prototypeFunctionStructure, 2, exec->propertyNames().defineProperties, objectConstructorDefineProperties), DontEnum); + putDirectFunctionWithoutTransition(exec, new (exec) NativeFunctionWrapper(exec, prototypeFunctionStructure, 2, exec->propertyNames().create, objectConstructorCreate), DontEnum); } // ECMA 15.2.2 @@ -103,15 +109,14 @@ JSValue JSC_HOST_CALL objectConstructorGetOwnPropertyDescriptor(ExecState* exec, return jsUndefined(); if (exec->hadException()) return jsUndefined(); - ASSERT(descriptor.isValid()); JSObject* description = constructEmptyObject(exec); - if (!descriptor.hasAccessors()) { - description->putDirect(exec->propertyNames().value, descriptor.value(), 0); + if (!descriptor.isAccessorDescriptor()) { + description->putDirect(exec->propertyNames().value, descriptor.value() ? descriptor.value() : jsUndefined(), 0); description->putDirect(exec->propertyNames().writable, jsBoolean(descriptor.writable()), 0); } else { - description->putDirect(exec->propertyNames().get, descriptor.getter(), 0); - description->putDirect(exec->propertyNames().set, descriptor.setter(), 0); + description->putDirect(exec->propertyNames().get, descriptor.getter() ? descriptor.getter() : jsUndefined(), 0); + description->putDirect(exec->propertyNames().set, descriptor.setter() ? descriptor.setter() : jsUndefined(), 0); } description->putDirect(exec->propertyNames().enumerable, jsBoolean(descriptor.enumerable()), 0); @@ -133,4 +138,163 @@ JSValue JSC_HOST_CALL objectConstructorKeys(ExecState* exec, JSObject*, JSValue, return keys; } +// ES5 8.10.5 ToPropertyDescriptor +static bool toPropertyDescriptor(ExecState* exec, JSValue in, PropertyDescriptor& desc) +{ + if (!in.isObject()) { + throwError(exec, TypeError, "Property description must be an object."); + return false; + } + JSObject* description = asObject(in); + + PropertySlot enumerableSlot; + if (description->getPropertySlot(exec, exec->propertyNames().enumerable, enumerableSlot)) { + desc.setEnumerable(enumerableSlot.getValue(exec, exec->propertyNames().enumerable).toBoolean(exec)); + if (exec->hadException()) + return false; + } + + PropertySlot configurableSlot; + if (description->getPropertySlot(exec, exec->propertyNames().configurable, configurableSlot)) { + desc.setConfigurable(configurableSlot.getValue(exec, exec->propertyNames().configurable).toBoolean(exec)); + if (exec->hadException()) + return false; + } + + JSValue value; + PropertySlot valueSlot; + if (description->getPropertySlot(exec, exec->propertyNames().value, valueSlot)) { + desc.setValue(valueSlot.getValue(exec, exec->propertyNames().value)); + if (exec->hadException()) + return false; + } + + PropertySlot writableSlot; + if (description->getPropertySlot(exec, exec->propertyNames().writable, writableSlot)) { + desc.setWritable(writableSlot.getValue(exec, exec->propertyNames().writable).toBoolean(exec)); + if (exec->hadException()) + return false; + } + + PropertySlot getSlot; + if (description->getPropertySlot(exec, exec->propertyNames().get, getSlot)) { + JSValue get = getSlot.getValue(exec, exec->propertyNames().get); + if (exec->hadException()) + return false; + if (!get.isUndefined()) { + CallData callData; + if (get.getCallData(callData) == CallTypeNone) { + throwError(exec, TypeError, "Getter must be a function."); + return false; + } + } else + get = JSValue(); + desc.setGetter(get); + } + + PropertySlot setSlot; + if (description->getPropertySlot(exec, exec->propertyNames().set, setSlot)) { + JSValue set = setSlot.getValue(exec, exec->propertyNames().set); + if (exec->hadException()) + return false; + if (!set.isUndefined()) { + CallData callData; + if (set.getCallData(callData) == CallTypeNone) { + throwError(exec, TypeError, "Setter must be a function."); + return false; + } + } else + set = JSValue(); + + desc.setSetter(set); + } + + if (!desc.isAccessorDescriptor()) + return true; + + if (desc.value()) { + throwError(exec, TypeError, "Invalid property. 'value' present on property with getter or setter."); + return false; + } + + if (desc.writablePresent()) { + throwError(exec, TypeError, "Invalid property. 'writable' present on property with getter or setter."); + return false; + } + return true; +} + +JSValue JSC_HOST_CALL objectConstructorDefineProperty(ExecState* exec, JSObject*, JSValue, const ArgList& args) +{ + if (!args.at(0).isObject()) + return throwError(exec, TypeError, "Properties can only be defined on Objects."); + JSObject* O = asObject(args.at(0)); + UString propertyName = args.at(1).toString(exec); + if (exec->hadException()) + return jsNull(); + PropertyDescriptor descriptor; + if (!toPropertyDescriptor(exec, args.at(2), descriptor)) + return jsNull(); + ASSERT((descriptor.attributes() & (Getter | Setter)) || (!descriptor.isAccessorDescriptor())); + ASSERT(!exec->hadException()); + O->defineOwnProperty(exec, Identifier(exec, propertyName), descriptor, true); + return O; +} + +static JSValue defineProperties(ExecState* exec, JSObject* object, JSObject* properties) +{ + PropertyNameArray propertyNames(exec); + asObject(properties)->getOwnPropertyNames(exec, propertyNames); + size_t numProperties = propertyNames.size(); + Vector descriptors; + MarkedArgumentBuffer markBuffer; + for (size_t i = 0; i < numProperties; i++) { + PropertySlot slot; + JSValue prop = properties->get(exec, propertyNames[i]); + if (exec->hadException()) + return jsNull(); + PropertyDescriptor descriptor; + if (!toPropertyDescriptor(exec, prop, descriptor)) + return jsNull(); + descriptors.append(descriptor); + // Ensure we mark all the values that we're accumulating + if (descriptor.isDataDescriptor() && descriptor.value()) + markBuffer.append(descriptor.value()); + if (descriptor.isAccessorDescriptor()) { + if (descriptor.getter()) + markBuffer.append(descriptor.getter()); + if (descriptor.setter()) + markBuffer.append(descriptor.setter()); + } + } + for (size_t i = 0; i < numProperties; i++) { + object->defineOwnProperty(exec, propertyNames[i], descriptors[i], true); + if (exec->hadException()) + return jsNull(); + } + return object; +} + +JSValue JSC_HOST_CALL objectConstructorDefineProperties(ExecState* exec, JSObject*, JSValue, const ArgList& args) +{ + if (!args.at(0).isObject()) + return throwError(exec, TypeError, "Properties can only be defined on Objects."); + if (!args.at(1).isObject()) + return throwError(exec, TypeError, "Property descriptor list must be an Object."); + return defineProperties(exec, asObject(args.at(0)), asObject(args.at(1))); +} + +JSValue JSC_HOST_CALL objectConstructorCreate(ExecState* exec, JSObject*, JSValue, const ArgList& args) +{ + if (!args.at(0).isObject() && !args.at(0).isNull()) + return throwError(exec, TypeError, "Object prototype may only be an Object or null."); + JSObject* newObject = constructEmptyObject(exec); + newObject->setPrototype(args.at(0)); + if (args.at(1).isUndefined()) + return newObject; + if (!args.at(1).isObject()) + return throwError(exec, TypeError, "Property descriptor list must be an Object."); + return defineProperties(exec, newObject, asObject(args.at(1))); +} + } // namespace JSC diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/PropertyDescriptor.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/PropertyDescriptor.cpp index d892e0a..4db814f 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/PropertyDescriptor.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/PropertyDescriptor.cpp @@ -30,29 +30,40 @@ #include "GetterSetter.h" #include "JSObject.h" +#include "Operations.h" namespace JSC { +unsigned PropertyDescriptor::defaultAttributes = (DontDelete << 1) - 1; + bool PropertyDescriptor::writable() const { - ASSERT(!hasAccessors()); + ASSERT(!isAccessorDescriptor()); return !(m_attributes & ReadOnly); } bool PropertyDescriptor::enumerable() const { - ASSERT(isValid()); return !(m_attributes & DontEnum); } bool PropertyDescriptor::configurable() const { - ASSERT(isValid()); return !(m_attributes & DontDelete); } -bool PropertyDescriptor::hasAccessors() const +bool PropertyDescriptor::isDataDescriptor() const { - return !!(m_attributes & (Getter | Setter)); + return m_value || (m_seenAttributes & WritablePresent); +} + +bool PropertyDescriptor::isGenericDescriptor() const +{ + return !isAccessorDescriptor() && !isDataDescriptor(); +} + +bool PropertyDescriptor::isAccessorDescriptor() const +{ + return m_getter || m_setter; } void PropertyDescriptor::setUndefined() @@ -63,32 +74,31 @@ void PropertyDescriptor::setUndefined() JSValue PropertyDescriptor::getter() const { - ASSERT(hasAccessors()); - if (!m_getter) - return jsUndefined(); + ASSERT(isAccessorDescriptor()); return m_getter; } JSValue PropertyDescriptor::setter() const { - ASSERT(hasAccessors()); - if (!m_setter) - return jsUndefined(); + ASSERT(isAccessorDescriptor()); return m_setter; } void PropertyDescriptor::setDescriptor(JSValue value, unsigned attributes) { ASSERT(value); + m_attributes = attributes; if (attributes & (Getter | Setter)) { GetterSetter* accessor = asGetterSetter(value); m_getter = accessor->getter(); m_setter = accessor->setter(); ASSERT(m_getter || m_setter); + m_seenAttributes = EnumerablePresent | ConfigurablePresent; + m_attributes &= ~ReadOnly; } else { m_value = value; + m_seenAttributes = EnumerablePresent | ConfigurablePresent | WritablePresent; } - m_attributes = attributes; } void PropertyDescriptor::setAccessorDescriptor(JSValue getter, JSValue setter, unsigned attributes) @@ -98,6 +108,88 @@ void PropertyDescriptor::setAccessorDescriptor(JSValue getter, JSValue setter, u m_attributes = attributes; m_getter = getter; m_setter = setter; + m_attributes &= ~ReadOnly; + m_seenAttributes = EnumerablePresent | ConfigurablePresent; +} + +void PropertyDescriptor::setWritable(bool writable) +{ + if (writable) + m_attributes &= ~ReadOnly; + else + m_attributes |= ReadOnly; + m_seenAttributes |= WritablePresent; +} + +void PropertyDescriptor::setEnumerable(bool enumerable) +{ + if (enumerable) + m_attributes &= ~DontEnum; + else + m_attributes |= DontEnum; + m_seenAttributes |= EnumerablePresent; +} + +void PropertyDescriptor::setConfigurable(bool configurable) +{ + if (configurable) + m_attributes &= ~DontDelete; + else + m_attributes |= DontDelete; + m_seenAttributes |= ConfigurablePresent; +} + +void PropertyDescriptor::setSetter(JSValue setter) +{ + m_setter = setter; + m_attributes |= Setter; + m_attributes &= ~ReadOnly; +} + +void PropertyDescriptor::setGetter(JSValue getter) +{ + m_getter = getter; + m_attributes |= Getter; + m_attributes &= ~ReadOnly; +} + +bool PropertyDescriptor::equalTo(const PropertyDescriptor& other) const +{ + if (!other.m_value == m_value || + !other.m_getter == m_getter || + !other.m_setter == m_setter) + return false; + return (!m_value || JSValue::strictEqual(other.m_value, m_value)) && + (!m_getter || JSValue::strictEqual(other.m_getter, m_getter)) && + (!m_setter || JSValue::strictEqual(other.m_setter, m_setter)) && + attributesEqual(other); +} + +bool PropertyDescriptor::attributesEqual(const PropertyDescriptor& other) const +{ + unsigned mismatch = other.m_attributes ^ m_attributes; + unsigned sharedSeen = other.m_seenAttributes & m_seenAttributes; + if (sharedSeen & WritablePresent && mismatch & ReadOnly) + return false; + if (sharedSeen & ConfigurablePresent && mismatch & DontDelete) + return false; + if (sharedSeen & EnumerablePresent && mismatch & DontEnum) + return false; + return true; +} + +unsigned PropertyDescriptor::attributesWithOverride(const PropertyDescriptor& other) const +{ + unsigned mismatch = other.m_attributes ^ m_attributes; + unsigned sharedSeen = other.m_seenAttributes & m_seenAttributes; + unsigned newAttributes = m_attributes & defaultAttributes; + if (sharedSeen & WritablePresent && mismatch & ReadOnly) + newAttributes ^= ReadOnly; + if (sharedSeen & ConfigurablePresent && mismatch & DontDelete) + newAttributes ^= DontDelete; + if (sharedSeen & EnumerablePresent && mismatch & DontEnum) + newAttributes ^= DontEnum; + return newAttributes; } } diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/PropertyDescriptor.h b/src/3rdparty/webkit/JavaScriptCore/runtime/PropertyDescriptor.h index ad7c056..40bec86 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/PropertyDescriptor.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/PropertyDescriptor.h @@ -32,29 +32,48 @@ namespace JSC { class PropertyDescriptor { public: PropertyDescriptor() - : m_attributes(0) + : m_attributes(defaultAttributes) + , m_seenAttributes(0) { } bool writable() const; bool enumerable() const; bool configurable() const; - bool hasAccessors() const; + bool isDataDescriptor() const; + bool isGenericDescriptor() const; + bool isAccessorDescriptor() const; unsigned attributes() const { return m_attributes; } -#ifndef NDEBUG - bool isValid() const { return m_value || ((m_getter || m_setter) && hasAccessors()); } -#endif - JSValue value() const { ASSERT(m_value); return m_value; } + JSValue value() const { return m_value; } JSValue getter() const; JSValue setter() const; void setUndefined(); void setDescriptor(JSValue value, unsigned attributes); void setAccessorDescriptor(JSValue getter, JSValue setter, unsigned attributes); + void setWritable(bool); + void setEnumerable(bool); + void setConfigurable(bool); + void setValue(JSValue value) { m_value = value; } + void setSetter(JSValue); + void setGetter(JSValue); + bool isEmpty() const { return !(m_value || m_getter || m_setter || m_seenAttributes); } + bool writablePresent() const { return m_seenAttributes & WritablePresent; } + bool enumerablePresent() const { return m_seenAttributes & EnumerablePresent; } + bool configurablePresent() const { return m_seenAttributes & ConfigurablePresent; } + bool setterPresent() const { return m_setter; } + bool getterPresent() const { return m_getter; } + bool equalTo(const PropertyDescriptor& other) const; + bool attributesEqual(const PropertyDescriptor& other) const; + unsigned attributesWithOverride(const PropertyDescriptor& other) const; private: + static unsigned defaultAttributes; + bool operator==(const PropertyDescriptor&){ return false; } + enum { WritablePresent = 1, EnumerablePresent = 2, ConfigurablePresent = 4}; // May be a getter/setter JSValue m_value; JSValue m_getter; JSValue m_setter; unsigned m_attributes; + unsigned m_seenAttributes; }; } diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.cpp index 34c27b7..7209b5f 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.cpp @@ -127,7 +127,7 @@ Structure::Structure(JSValue prototype, const TypeInfo& typeInfo) , m_propertyTable(0) , m_propertyStorageCapacity(JSObject::inlineStorageCapacity) , m_offset(noOffset) - , m_isDictionary(false) + , m_dictionaryKind(NoneDictionaryKind) , m_isPinnedPropertyTable(false) , m_hasGetterSetterProperties(false) , m_attributesInPrevious(0) @@ -290,7 +290,7 @@ void Structure::getOwnEnumerablePropertyNames(ExecState* exec, PropertyNameArray void Structure::getEnumerablePropertyNames(ExecState* exec, PropertyNameArray& propertyNames, JSObject* baseObject) { - bool shouldCache = propertyNames.shouldCache() && !(propertyNames.size() || m_isDictionary); + bool shouldCache = propertyNames.shouldCache() && !(propertyNames.size() || isDictionary()); if (shouldCache && m_cachedPropertyNameArrayData) { if (m_cachedPropertyNameArrayData->cachedPrototypeChain() == prototypeChain(exec)) { @@ -349,7 +349,7 @@ void Structure::despecifyDictionaryFunction(const Identifier& propertyName) materializePropertyMapIfNecessary(); - ASSERT(m_isDictionary); + ASSERT(isDictionary()); ASSERT(m_propertyTable); unsigned i = rep->computedHash(); @@ -391,7 +391,7 @@ void Structure::despecifyDictionaryFunction(const Identifier& propertyName) PassRefPtr Structure::addPropertyTransitionToExistingStructure(Structure* structure, const Identifier& propertyName, unsigned attributes, JSCell* specificValue, size_t& offset) { - ASSERT(!structure->m_isDictionary); + ASSERT(!structure->isDictionary()); ASSERT(structure->typeInfo().type() == ObjectType); if (Structure* existingTransition = structure->table.get(make_pair(propertyName.ustring().rep(), attributes), specificValue)) { @@ -405,12 +405,12 @@ PassRefPtr Structure::addPropertyTransitionToExistingStructure(Struct PassRefPtr Structure::addPropertyTransition(Structure* structure, const Identifier& propertyName, unsigned attributes, JSCell* specificValue, size_t& offset) { - ASSERT(!structure->m_isDictionary); + ASSERT(!structure->isDictionary()); ASSERT(structure->typeInfo().type() == ObjectType); ASSERT(!Structure::addPropertyTransitionToExistingStructure(structure, propertyName, attributes, specificValue, offset)); if (structure->transitionCount() > s_maxTransitionLength) { - RefPtr transition = toDictionaryTransition(structure); + RefPtr transition = toCacheableDictionaryTransition(structure); ASSERT(structure != transition); offset = transition->put(propertyName, attributes, specificValue); if (transition->propertyStorageSize() > transition->propertyStorageCapacity()) @@ -454,9 +454,9 @@ PassRefPtr Structure::addPropertyTransition(Structure* structure, con PassRefPtr Structure::removePropertyTransition(Structure* structure, const Identifier& propertyName, size_t& offset) { - ASSERT(!structure->m_isDictionary); + ASSERT(!structure->isUncacheableDictionary()); - RefPtr transition = toDictionaryTransition(structure); + RefPtr transition = toUncacheableDictionaryTransition(structure); offset = transition->remove(propertyName); @@ -554,25 +554,35 @@ PassRefPtr Structure::getterSetterTransition(Structure* structure) return transition.release(); } -PassRefPtr Structure::toDictionaryTransition(Structure* structure) +PassRefPtr Structure::toDictionaryTransition(Structure* structure, DictionaryKind kind) { - ASSERT(!structure->m_isDictionary); - + ASSERT(!structure->isUncacheableDictionary()); + RefPtr transition = create(structure->m_prototype, structure->typeInfo()); - transition->m_isDictionary = true; + transition->m_dictionaryKind = kind; transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity; transition->m_hasGetterSetterProperties = structure->m_hasGetterSetterProperties; - + structure->materializePropertyMapIfNecessary(); transition->m_propertyTable = structure->copyPropertyTable(); transition->m_isPinnedPropertyTable = true; - + return transition.release(); } +PassRefPtr Structure::toCacheableDictionaryTransition(Structure* structure) +{ + return toDictionaryTransition(structure, CachedDictionaryKind); +} + +PassRefPtr Structure::toUncacheableDictionaryTransition(Structure* structure) +{ + return toDictionaryTransition(structure, UncachedDictionaryKind); +} + PassRefPtr Structure::fromDictionaryTransition(Structure* structure) { - ASSERT(structure->m_isDictionary); + ASSERT(structure->isDictionary()); // Since dictionary Structures are not shared, and no opcodes specialize // for them, we don't need to allocate a new Structure when transitioning @@ -581,7 +591,7 @@ PassRefPtr Structure::fromDictionaryTransition(Structure* structure) // FIMXE: We can make this more efficient by canonicalizing the Structure (draining the // deleted offsets vector) before transitioning from dictionary. if (!structure->m_propertyTable || !structure->m_propertyTable->deletedOffsets || structure->m_propertyTable->deletedOffsets->isEmpty()) - structure->m_isDictionary = false; + structure->m_dictionaryKind = NoneDictionaryKind; return structure; } @@ -600,7 +610,7 @@ size_t Structure::addPropertyWithoutTransition(const Identifier& propertyName, u size_t Structure::removePropertyWithoutTransition(const Identifier& propertyName) { - ASSERT(m_isDictionary); + ASSERT(isUncacheableDictionary()); materializePropertyMapIfNecessary(); diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h index f7cb04b..ed9f6e5 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h @@ -70,7 +70,8 @@ namespace JSC { static PassRefPtr despecifyFunctionTransition(Structure*, const Identifier&); static PassRefPtr addAnonymousSlotsTransition(Structure*, unsigned count); static PassRefPtr getterSetterTransition(Structure*); - static PassRefPtr toDictionaryTransition(Structure*); + static PassRefPtr toCacheableDictionaryTransition(Structure*); + static PassRefPtr toUncacheableDictionaryTransition(Structure*); static PassRefPtr fromDictionaryTransition(Structure*); ~Structure(); @@ -81,8 +82,9 @@ namespace JSC { size_t addPropertyWithoutTransition(const Identifier& propertyName, unsigned attributes, JSCell* specificValue); size_t removePropertyWithoutTransition(const Identifier& propertyName); void setPrototypeWithoutTransition(JSValue prototype) { m_prototype = prototype; } - - bool isDictionary() const { return m_isDictionary; } + + bool isDictionary() const { return m_dictionaryKind != NoneDictionaryKind; } + bool isUncacheableDictionary() const { return m_dictionaryKind == UncachedDictionaryKind; } const TypeInfo& typeInfo() const { return m_typeInfo; } @@ -127,6 +129,13 @@ namespace JSC { private: Structure(JSValue prototype, const TypeInfo&); + + typedef enum { + NoneDictionaryKind = 0, + CachedDictionaryKind = 1, + UncachedDictionaryKind = 2 + } DictionaryKind; + static PassRefPtr toDictionaryTransition(Structure*, DictionaryKind); size_t put(const Identifier& propertyName, unsigned attributes, JSCell* specificValue); size_t remove(const Identifier& propertyName); @@ -187,7 +196,7 @@ namespace JSC { size_t m_propertyStorageCapacity; signed char m_offset; - bool m_isDictionary : 1; + unsigned m_dictionaryKind : 2; bool m_isPinnedPropertyTable : 1; bool m_hasGetterSetterProperties : 1; #if COMPILER(WINSCW) diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/StructureChain.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/StructureChain.cpp index eb57a5ac..6e8a0ee 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/StructureChain.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/StructureChain.cpp @@ -51,6 +51,7 @@ bool StructureChain::isCacheable() const uint32_t i = 0; while (m_vector[i]) { + // Both classes of dictionary structure may change arbitrarily so we can't cache them if (m_vector[i]->isDictionary()) return false; if (!m_vector[i++]->typeInfo().hasDefaultGetPropertyNames()) diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.h index 59efd84..b68e70c 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Assertions.h @@ -144,7 +144,13 @@ void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChann #if ASSERT_DISABLED #define ASSERT(assertion) ((void)0) +#if COMPILER(MSVC7) +#define ASSERT_WITH_MESSAGE(assertion) ((void)0) +#elif PLATFORM(SYMBIAN) +#define ASSERT_WITH_MESSAGE(assertion...) ((void)0) +#else #define ASSERT_WITH_MESSAGE(assertion, ...) ((void)0) +#endif /* COMPILER(MSVC7) */ #define ASSERT_NOT_REACHED() ((void)0) #define ASSERT_UNUSED(variable, assertion) ((void)variable) @@ -158,6 +164,8 @@ void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChann while (0) #if COMPILER(MSVC7) #define ASSERT_WITH_MESSAGE(assertion) ((void)0) +#elif PLATFORM(SYMBIAN) +#define ASSERT_WITH_MESSAGE(assertion...) ((void)0) #else #define ASSERT_WITH_MESSAGE(assertion, ...) do \ if (!(assertion)) { \ @@ -199,10 +207,12 @@ while (0) /* FATAL */ -#if FATAL_DISABLED +#if FATAL_DISABLED && !COMPILER(MSVC7) && !PLATFORM(SYMBIAN) #define FATAL(...) ((void)0) #elif COMPILER(MSVC7) #define FATAL() ((void)0) +#elif PLATFORM(SYMBIAN) +#define FATAL(args...) ((void)0) #else #define FATAL(...) do { \ WTFReportFatalError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, __VA_ARGS__); \ @@ -212,20 +222,24 @@ while (0) /* LOG_ERROR */ -#if ERROR_DISABLED +#if ERROR_DISABLED && !COMPILER(MSVC7) && !PLATFORM(SYMBIAN) #define LOG_ERROR(...) ((void)0) #elif COMPILER(MSVC7) #define LOG_ERROR() ((void)0) +#elif PLATFORM(SYMBIAN) +#define LOG_ERROR(args...) ((void)0) #else #define LOG_ERROR(...) WTFReportError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, __VA_ARGS__) #endif /* LOG */ -#if LOG_DISABLED +#if LOG_DISABLED && !COMPILER(MSVC7) && !PLATFORM(SYMBIAN) #define LOG(channel, ...) ((void)0) #elif COMPILER(MSVC7) #define LOG() ((void)0) +#elif PLATFORM(SYMBIAN) +#define LOG(channel, args...) ((void)0) #else #define LOG(channel, ...) WTFLog(&JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, channel), __VA_ARGS__) #define JOIN_LOG_CHANNEL_WITH_PREFIX(prefix, channel) JOIN_LOG_CHANNEL_WITH_PREFIX_LEVEL_2(prefix, channel) @@ -234,10 +248,12 @@ while (0) /* LOG_VERBOSE */ -#if LOG_DISABLED +#if LOG_DISABLED && !COMPILER(MSVC7) && !PLATFORM(SYMBIAN) #define LOG_VERBOSE(channel, ...) ((void)0) #elif COMPILER(MSVC7) #define LOG_VERBOSE(channel) ((void)0) +#elif PLATFORM(SYMBIAN) +#define LOG_VERBOSE(channel, args...) ((void)0) #else #define LOG_VERBOSE(channel, ...) WTFLogVerbose(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, &JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, channel), __VA_ARGS__) #endif diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Forward.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Forward.h index 67dc3be..448de7d 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Forward.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Forward.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006 Apple Computer, Inc. + * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -27,6 +27,7 @@ namespace WTF { template class ListRefPtr; template class OwnArrayPtr; template class OwnPtr; + template class PassOwnPtr; template class PassRefPtr; template class RefPtr; template class Vector; @@ -35,9 +36,9 @@ namespace WTF { using WTF::ListRefPtr; using WTF::OwnArrayPtr; using WTF::OwnPtr; +using WTF::PassOwnPtr; using WTF::PassRefPtr; using WTF::RefPtr; using WTF::Vector; #endif // WTF_Forward_h - diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/HashCountedSet.h b/src/3rdparty/webkit/JavaScriptCore/wtf/HashCountedSet.h index 1a422d8..1fda9c1 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/HashCountedSet.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/HashCountedSet.h @@ -64,8 +64,13 @@ namespace WTF { void remove(const ValueType& value); void remove(iterator it); - void clear(); - + // removes the value, regardless of its count + void clear(iterator it); + void clear(const ValueType& value); + + // clears the whole set + void clear(); + private: ImplType m_impl; }; @@ -166,6 +171,21 @@ namespace WTF { } template + inline void HashCountedSet::clear(const ValueType& value) + { + clear(find(value)); + } + + template + inline void HashCountedSet::clear(iterator it) + { + if (it == end()) + return; + + m_impl.remove(it); + } + + template inline void HashCountedSet::clear() { m_impl.clear(); diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/ListRefPtr.h b/src/3rdparty/webkit/JavaScriptCore/wtf/ListRefPtr.h index 9f9a354..d863226 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/ListRefPtr.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/ListRefPtr.h @@ -34,13 +34,8 @@ namespace WTF { ListRefPtr(const RefPtr& o) : RefPtr(o) {} // see comment in PassRefPtr.h for why this takes const reference template ListRefPtr(const PassRefPtr& o) : RefPtr(o) {} - - ~ListRefPtr() - { - RefPtr reaper = this->release(); - while (reaper && reaper->hasOneRef()) - reaper = reaper->releaseNext(); // implicitly protects reaper->next, then derefs reaper - } + + ~ListRefPtr(); ListRefPtr& operator=(T* optr) { RefPtr::operator=(optr); return *this; } ListRefPtr& operator=(const RefPtr& o) { RefPtr::operator=(o); return *this; } @@ -49,6 +44,17 @@ namespace WTF { template ListRefPtr& operator=(const PassRefPtr& o) { RefPtr::operator=(o); return *this; } }; + template +#if !COMPILER(WINSCW) + inline +#endif + ListRefPtr::~ListRefPtr() + { + RefPtr reaper = this->release(); + while (reaper && reaper->hasOneRef()) + reaper = reaper->releaseNext(); // implicitly protects reaper->next, then derefs reaper + } + template inline T* getPtr(const ListRefPtr& p) { return p.get(); diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h index 2abf3d2..e508f77 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h @@ -226,8 +226,11 @@ #endif /* PLATFORM(ARM) */ +#define PLATFORM_ARM_ARCH(N) (PLATFORM(ARM) && ARM_ARCH_VERSION >= N) + #if defined(arm) \ - || defined(__arm__) + || defined(__arm__) \ + || defined(__MARM__) #define WTF_PLATFORM_ARM 1 #if defined(__ARMEB__) #define WTF_PLATFORM_BIG_ENDIAN 1 @@ -241,22 +244,35 @@ #endif #if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) \ || defined(__ARM_ARCH_5E__) || defined(__ARM_ARCH_5TE__) \ - || defined(__ARM_ARCH_5TEJ__) + || defined(__ARM_ARCH_5TEJ__) || defined(__MARM_ARMV5__) #undef ARM_ARCH_VERSION #define ARM_ARCH_VERSION 5 #endif #if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \ || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) \ - || defined(__ARM_ARCH_6ZK__) + || defined(__ARM_ARCH_6ZK__) || defined(__ARMV6__) #undef ARM_ARCH_VERSION #define ARM_ARCH_VERSION 6 #endif -#if defined(__ARM_ARCH_7A__) +#if defined(__ARM_ARCH_7A__) || defined(__ARMV7__) #undef ARM_ARCH_VERSION #define ARM_ARCH_VERSION 7 #endif +/* Defines two pseudo-platforms for ARM and Thumb-2 instruction set. */ +#if !defined(WTF_PLATFORM_ARM_TRADITIONAL) && !defined(WTF_PLATFORM_ARM_THUMB2) +# if defined(thumb2) || defined(__thumb2__) +# define WTF_PLATFORM_ARM_TRADITIONAL 0 +# define WTF_PLATFORM_ARM_THUMB2 1 +# elif PLATFORM_ARM_ARCH(4) || PLATFORM_ARM_ARCH(5) +# define WTF_PLATFORM_ARM_TRADITIONAL 1 +# define WTF_PLATFORM_ARM_THUMB2 0 +# else +# error "Not supported ARM architecture" +# endif +#elif PLATFORM(ARM_TRADITIONAL) && PLATFORM(ARM_THUMB2) /* Sanity Check */ +# error "Cannot use both of WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2 platforms" +#endif // !defined(ARM_TRADITIONAL) && !defined(ARM_THUMB2) #endif /* ARM */ -#define PLATFORM_ARM_ARCH(N) (PLATFORM(ARM) && ARM_ARCH_VERSION >= N) /* PLATFORM(X86) */ #if defined(__i386__) \ @@ -392,6 +408,9 @@ #if PLATFORM(MAC) && !PLATFORM(IPHONE) #define WTF_PLATFORM_CF 1 #define WTF_USE_PTHREADS 1 +#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_TIGER) && defined(__x86_64__) +#define WTF_USE_PLUGIN_HOST_PROCESS 1 +#endif #if !defined(ENABLE_MAC_JAVA_BRIDGE) #define ENABLE_MAC_JAVA_BRIDGE 1 #endif @@ -400,7 +419,7 @@ #endif #define HAVE_READLINE 1 #define HAVE_RUNLOOP_TIMER 1 -#endif +#endif // PLATFORM(MAC) && !PLATFORM(IPHONE) #if PLATFORM(CHROMIUM) && PLATFORM(DARWIN) #define WTF_PLATFORM_CF 1 @@ -408,18 +427,19 @@ #endif #if PLATFORM(IPHONE) -#define WTF_PLATFORM_CF 1 -#define WTF_USE_PTHREADS 1 #define ENABLE_CONTEXT_MENUS 0 #define ENABLE_DRAG_SUPPORT 0 #define ENABLE_FTPDIR 1 +#define ENABLE_GEOLOCATION 1 +#define ENABLE_ICONDATABASE 0 #define ENABLE_INSPECTOR 0 #define ENABLE_MAC_JAVA_BRIDGE 0 -#define ENABLE_ICONDATABASE 0 -#define ENABLE_GEOLOCATION 1 #define ENABLE_NETSCAPE_PLUGIN_API 0 -#define HAVE_READLINE 1 +#define ENABLE_ORIENTATION_EVENTS 1 #define ENABLE_REPAINT_THROTTLING 1 +#define HAVE_READLINE 1 +#define WTF_PLATFORM_CF 1 +#define WTF_USE_PTHREADS 1 #endif #if PLATFORM(WIN) @@ -579,6 +599,14 @@ #define ENABLE_NETSCAPE_PLUGIN_API 1 #endif +#if !defined(WTF_USE_PLUGIN_HOST_PROCESS) +#define WTF_USE_PLUGIN_HOST_PROCESS 0 +#endif + +#if !defined(ENABLE_ORIENTATION_EVENTS) +#define ENABLE_ORIENTATION_EVENTS 0 +#endif + #if !defined(ENABLE_OPCODE_STATS) #define ENABLE_OPCODE_STATS 0 #endif @@ -637,7 +665,7 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */ #elif PLATFORM(X86) && PLATFORM(MAC) #define ENABLE_JIT 1 #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1 -#elif PLATFORM_ARM_ARCH(7) && PLATFORM(IPHONE) +#elif PLATFORM(ARM_THUMB2) && PLATFORM(IPHONE) /* Under development, temporarily disabled until 16Mb link range limit in assembler is fixed. */ #define ENABLE_JIT 0 #define ENABLE_JIT_OPTIMIZE_NATIVE_CALL 0 @@ -656,8 +684,11 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */ #elif PLATFORM(X86) && PLATFORM(LINUX) && GCC_VERSION >= 40100 #define ENABLE_JIT 1 #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1 -#elif PLATFORM(ARM) && !PLATFORM_ARM_ARCH(7) && PLATFORM(LINUX) +#elif PLATFORM(ARM_TRADITIONAL) && PLATFORM(LINUX) #define ENABLE_JIT 1 + #if PLATFORM(ARM_THUMB2) + #define ENABLE_JIT_OPTIMIZE_NATIVE_CALL 0 + #endif #endif #endif /* PLATFORM(QT) */ @@ -703,7 +734,7 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */ #if (PLATFORM(X86) && PLATFORM(MAC)) \ || (PLATFORM(X86_64) && PLATFORM(MAC)) \ /* Under development, temporarily disabled until 16Mb link range limit in assembler is fixed. */ \ - || (PLATFORM_ARM_ARCH(7) && PLATFORM(IPHONE) && 0) \ + || (PLATFORM(ARM_THUMB2) && PLATFORM(IPHONE) && 0) \ || (PLATFORM(X86) && PLATFORM(WIN)) #define ENABLE_YARR 1 #define ENABLE_YARR_JIT 1 @@ -713,7 +744,7 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */ #if (PLATFORM(X86) && PLATFORM(WIN_OS) && COMPILER(MINGW) && GCC_VERSION >= 40100) \ || (PLATFORM(X86) && PLATFORM(WIN_OS) && COMPILER(MSVC)) \ || (PLATFORM(X86) && PLATFORM(LINUX) && GCC_VERSION >= 40100) \ - || (PLATFORM(ARM) && !PLATFORM_ARM_ARCH(7) && PLATFORM(LINUX)) + || (PLATFORM(ARM_TRADITIONAL) && PLATFORM(LINUX)) #define ENABLE_YARR 1 #define ENABLE_YARR_JIT 1 #endif diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/RefPtr.h b/src/3rdparty/webkit/JavaScriptCore/wtf/RefPtr.h index 77835ad..1a0b1fe 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/RefPtr.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/RefPtr.h @@ -50,7 +50,7 @@ namespace WTF { ~RefPtr() { T* ptr = m_ptr; derefIfNotNull(ptr); } - template RefPtr(const RefPtr& o) : m_ptr(o.get()) { if (T* ptr = m_ptr) ptr->ref(); } + template RefPtr(const RefPtr& o) : m_ptr(static_cast(o.get())) { if (T* ptr = static_cast(m_ptr)) ptr->ref(); } T* get() const { return m_ptr; } diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h index 7cba4e4..e1fc5b4 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h @@ -63,6 +63,13 @@ namespace WTF { template struct AlignedBuffer { WTF_ALIGNED(AlignedBufferChar, buffer[size], 32); }; template struct AlignedBuffer { WTF_ALIGNED(AlignedBufferChar, buffer[size], 64); }; + template + void swap(AlignedBuffer& a, AlignedBuffer& b) + { + for (size_t i = 0; i < size; ++i) + std::swap(a.buffer[i], b.buffer[i]); + } + template class VectorDestructor; @@ -404,6 +411,27 @@ namespace WTF { Base::deallocateBuffer(bufferToDeallocate); } + void swap(VectorBuffer& other) + { + if (buffer() == inlineBuffer() && other.buffer() == other.inlineBuffer()) { + WTF::swap(m_inlineBuffer, other.m_inlineBuffer); + std::swap(m_capacity, other.m_capacity); + } else if (buffer() == inlineBuffer()) { + m_buffer = other.m_buffer; + other.m_buffer = other.inlineBuffer(); + WTF::swap(m_inlineBuffer, other.m_inlineBuffer); + std::swap(m_capacity, other.m_capacity); + } else if (other.buffer() == other.inlineBuffer()) { + other.m_buffer = m_buffer; + m_buffer = inlineBuffer(); + WTF::swap(m_inlineBuffer, other.m_inlineBuffer); + std::swap(m_capacity, other.m_capacity); + } else { + std::swap(m_buffer, other.m_buffer); + std::swap(m_capacity, other.m_capacity); + } + } + void restoreInlineBufferIfNeeded() { if (m_buffer) diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/Unicode.h b/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/Unicode.h index d59439d..7016a03 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/Unicode.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/unicode/Unicode.h @@ -26,7 +26,11 @@ #include #if USE(QT4_UNICODE) +#if COMPILER(WINSCW) || COMPILER(RVCT) +#include "wtf/unicode/qt4/UnicodeQt4.h" +#else #include "qt4/UnicodeQt4.h" +#endif #elif USE(ICU_UNICODE) #include #elif USE(GLIB_UNICODE) diff --git a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp index 16b1ecc..4390b5b 100644 --- a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp @@ -1309,7 +1309,7 @@ class RegexGenerator : private MacroAssembler { loadPtr(Address(X86Registers::ebp, 2 * sizeof(void*)), output); #endif #elif PLATFORM(ARM) -#if !PLATFORM_ARM_ARCH(7) +#if PLATFORM(ARM_TRADITIONAL) push(ARMRegisters::lr); #endif push(ARMRegisters::r4); diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 16d854d..e13219b 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -4,8 +4,8 @@ This is a snapshot of the Qt port of WebKit from The commit imported was from the - origin/qtwebkit-4.6-staging branch/tag + qtwebkit-4.6-snapshot-24092009 branch/tag and has the sha1 checksum - f572f72dce91be9a4525941c87d1b0a8c383ba39 + 75c44947a340d74a9e0098a3dfffabce0c9512ef diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 8a278ce..5d83c7b 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,2660 @@ +2009-09-24 Oswald Buddenhagen + + Reviewed by Simon Hausmann. + + Fix QApp::translate() calls to provide the correct class name without + a trailing comma. + + * platform/qt/Localizations.cpp: + (WebCore::localizedMediaTimeDescription): + +2009-09-24 Geoffrey Garen + + More build fix: Removed JSSharedWorkerContextCustom.cpp from project + files, since it no longer exists in the repository. + + * GNUmakefile.am: + * WebCore.gypi: + * WebCore.pro: + * WebCore.vcproj/WebCore.vcproj: + +2009-09-24 Geoffrey Garen + + Windows build fix: Declare set/unsetPendingActivity public, so + SharedWorkerScriptLoader can call them. + + * dom/ActiveDOMObject.h: + +2009-09-24 Geoffrey Garen + + Fixed a bit of the Windows build. + + * workers/SharedWorker.idl: Declare a custom mark function. (I accidentally + removed this in my last patch.) + * WebCore.xcodeproj/project.pbxproj: Added JSSharedWorkerCustom.cpp back + to the build. (I accidentally removed this in my last patch.) + +2009-09-23 Geoffrey Garen + + 32-bit build fix: restore previous cast that I thought was unnecessary. + + * xml/XMLHttpRequest.cpp: + (WebCore::XMLHttpRequest::didSendData): + (WebCore::XMLHttpRequest::didReceiveData): + +2009-09-23 Geoffrey Garen + + Reviewed by Sam Weinig. + + Bring a little sanity to this crazy EventTarget world of ours + https://bugs.webkit.org/show_bug.cgi?id=29701 + + Lots of EventTarget refactoring to achieve a single shared implementation + that fixes some of the performance and correctness bugs of the many individual + implementations, and makes reasoning about EventTargets and EventListeners + much easier. + + The basic design is this: + - EventTarget manages a set of EventListeners. + - onXXX EventListener attributes forward to standard EventTarget APIs. + - Since the onXXX code is repetitive, it is usually done with macros + of the form DEFINE_ATTRIBUTE_EVENT_LISTENER(attributeName). + - EventTarget provides a shared implementation of dispatchEvent, + which subclasses with special event dispatch rules, like Node, override. + - To support Node, which lazily instantiates its EventTarget data, + EventTarget has no data members, and instead makes a virtual call + to get its data from wherever its subclass chose to store it. + + Code that used to call dispatchEvent, passing an ExceptionCode paratmeter, + even though no exception could be thrown, has been changed not to do so, + to improve clarity and performance. + + Code that used to call a special dispatchXXXEvent function, which just + turned around and called dispatchEvent, has been changed to call + dispatchEvent, to improve clarity and performance. + + * WebCore.base.exp: + * WebCore.xcodeproj/project.pbxproj: Another day in the life of a WebKit + engineer. + + * bindings/js/JSDOMBinding.cpp: + (WebCore::isObservableThroughDOM): Updated for Node API change. Added + "is not in the document but is firing event listeners" as a condition + that makes a Node observable in the DOM, so that event listeners firing + on removed nodes are not destroyed midstream. (This was a long-standing + bug that was somewhat hidden by the old implementation's habit of + copying the RegisteredEventListener vector before firing events, which + would keep almost all the relevant objects from being destroyed.) + + * bindings/js/JSEventListener.cpp: + (WebCore::JSEventListener::handleEvent): Removed the isWindowEvent flag + because it was one of the most elaborately planned no-ops in the history + of software crime, and one of the reasons clients thought they needed more + than one dispatchEvent function even though they didn't. + * bindings/js/JSEventListener.h: + + * bindings/js/JSDOMWindowCustom.cpp: + (WebCore::JSDOMWindow::markChildren): + (WebCore::JSMessagePort::markChildren): + * bindings/js/JSNodeCustom.cpp: + (WebCore::JSNode::markChildren): + * bindings/js/JSAbstractWorkerCustom.cpp: + * bindings/js/JSDOMApplicationCacheCustom.cpp: + * bindings/js/JSDedicatedWorkerContextCustom.cpp: + * bindings/js/JSEventSourceCustom.cpp: + * bindings/js/JSMessagePortCustom.cpp: + * bindings/js/JSSharedWorkerContextCustom.cpp: Removed. + * bindings/js/JSWebSocketCustom.cpp: + * bindings/js/JSWorkerContextCustom.cpp: + (WebCore::JSWorkerContext::markChildren): + * bindings/js/JSWorkerCustom.cpp: + * bindings/js/JSXMLHttpRequestCustom.cpp: + (WebCore::JSXMLHttpRequest::markChildren): + * bindings/js/JSXMLHttpRequestUploadCustom.cpp: + (WebCore::JSXMLHttpRequestUpload::markChildren): EventListener marking is + now autogenerated. Classes that still have custom mark functions for other + reasons now call a shared EventTarget API to mark their EventListeners. + + * bindings/objc/ObjCEventListener.h: + * bindings/objc/ObjCEventListener.mm: + (WebCore::ObjCEventListener::handleEvent): Bye bye isWindowEvent. + + * bindings/scripts/CodeGeneratorJS.pm: Autogeneration support for + marking and invalidating event listeners. + + * dom/CharacterData.cpp: + (WebCore::CharacterData::dispatchModifiedEvent): + * dom/ContainerNode.cpp: + (WebCore::ContainerNode::insertBefore): + (WebCore::ContainerNode::replaceChild): + (WebCore::willRemoveChild): + (WebCore::ContainerNode::appendChild): + (WebCore::dispatchChildInsertionEvents): + (WebCore::dispatchChildRemovalEvents): + * dom/Document.cpp: + (WebCore::Document::removeAllEventListeners): + (WebCore::Document::implicitClose): + (WebCore::Document::setFocusedNode): + (WebCore::Document::dispatchWindowEvent): + (WebCore::Document::dispatchWindowLoadEvent): + (WebCore::Document::finishedParsing): + * dom/Document.h: Use dispatchEvent directly. + + * dom/Element.h: Moved a few event listener attributes down from Node, + since they don't apply to all Nodes, only Elements. + + * dom/EventListener.h: Removed isWindowEvent parameter. + + * dom/EventNames.h: Added the "display" event name, so it works correctly + with attribute macros, and for performance. + + * dom/EventTarget.cpp: + (WebCore::forbidEventDispatch): + (WebCore::allowEventDispatch): + (WebCore::eventDispatchForbidden): Made this code (embarrasingly) thread + safe, since it's now called on multiple threads. (Currently, we only forbid + event dispatch on the main thread. If we ever want to forbid event dispatch + on secondary threads, we can improve it then.) + + (WebCore::EventTarget::addEventListener): + (WebCore::EventTarget::removeEventListener): + (WebCore::EventTarget::setAttributeEventListener): + (WebCore::EventTarget::getAttributeEventListener): + (WebCore::EventTarget::clearAttributeEventListener): + (WebCore::EventTarget::dispatchEvent): + (WebCore::EventTarget::fireEventListeners): + (WebCore::EventTarget::getEventListeners): + (WebCore::EventTarget::removeAllEventListeners): + * dom/EventTarget.h: + (WebCore::FiringEventEndIterator::FiringEventEndIterator): + (WebCore::EventTarget::ref): + (WebCore::EventTarget::deref): + (WebCore::EventTarget::markEventListeners): + (WebCore::EventTarget::invalidateEventListeners): + (WebCore::EventTarget::isFiringEventListeners): + (WebCore::EventTarget::hasEventListeners): The ONE TRUE IMPLEMENTATION of + EventTarget APIs, crafted from an amalgam of all the different versions + we used to have. The most significant change here is that we no longer + make a copy of an EventListener vector before firing the events in the + vector -- instead, we use a reference to the original vector, along with + a notification mechanism for the unlikely case when an EventListener is + removed from the vector. This substantially reduces malloc, copying, and + refcount overhead, and complexity. + + * dom/InputElement.cpp: + (WebCore::InputElement::setValueFromRenderer): + * dom/MessageEvent.h: + (WebCore::MessageEvent::create): Use dispatchEvent directly. + + * dom/MessagePort.cpp: + (WebCore::MessagePort::dispatchMessages): + (WebCore::MessagePort::eventTargetData): + (WebCore::MessagePort::ensureEventTargetData): + * dom/MessagePort.h: + (WebCore::MessagePort::setOnmessage): + (WebCore::MessagePort::onmessage): + * dom/MessagePort.idl: Removed custom EventTarget implementation. + + * dom/MutationEvent.h: + (WebCore::MutationEvent::create): Added some default values so callers + can construct MutationEvents more easily, without calling a custom dispatch + function. + + * dom/Node.cpp: + (WebCore::Node::addEventListener): + (WebCore::Node::removeEventListener): + (WebCore::Node::eventTargetData): + (WebCore::Node::ensureEventTargetData): + (WebCore::Node::handleLocalEvents): + (WebCore::Node::dispatchEvent): + (WebCore::Node::dispatchGenericEvent): + (WebCore::Node::dispatchSubtreeModifiedEvent): + (WebCore::Node::dispatchUIEvent): + (WebCore::Node::dispatchKeyEvent): + (WebCore::Node::dispatchMouseEvent): + (WebCore::Node::dispatchWheelEvent): + (WebCore::Node::dispatchFocusEvent): + (WebCore::Node::dispatchBlurEvent): + * dom/Node.h: + (WebCore::Node::preDispatchEventHandler): + (WebCore::Node::postDispatchEventHandler): + * dom/Node.idl: + * dom/NodeRareData.h: + (WebCore::NodeRareData::eventTargetData): + (WebCore::NodeRareData::ensureEventTargetData): Use the shared EventTarget + interface, and call dispatchEvent directly instead of custom dispatchXXXEvent + functions that just forwarded to dispatchEvent. + + * dom/RegisteredEventListener.cpp: + * dom/RegisteredEventListener.h: + (WebCore::RegisteredEventListener::RegisteredEventListener): + (WebCore::operator==): This is just a simple struct now, since we no longer + do a complicated copy / refCount / isRemoved dance just to honor the rule + that an EventListener can be removed during event dispatch. + + * history/CachedFrame.cpp: + (WebCore::CachedFrameBase::restore): Removed another custom dispatchEvent. + + * html/HTMLBodyElement.cpp: + * html/HTMLBodyElement.h: Use the shared EventTarget API. + + * html/HTMLFormControlElement.cpp: + (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent): + (WebCore::HTMLFormControlElement::checkValidity): + * html/HTMLFormElement.cpp: + (WebCore::HTMLFormElement::handleLocalEvents): + (WebCore::HTMLFormElement::prepareSubmit): + (WebCore::HTMLFormElement::reset): + * html/HTMLFormElement.h: Use the standard dispatchEvent API. + + * html/HTMLFrameSetElement.cpp: + * html/HTMLFrameSetElement.h: Use the shared EventTarget API. + + * html/HTMLImageLoader.cpp: + (WebCore::HTMLImageLoader::dispatchLoadEvent): + * html/HTMLInputElement.cpp: + (WebCore::HTMLInputElement::onSearch): + * html/HTMLMediaElement.cpp: + (WebCore::HTMLMediaElement::loadInternal): + * html/HTMLScriptElement.cpp: + (WebCore::HTMLScriptElement::dispatchLoadEvent): + (WebCore::HTMLScriptElement::dispatchErrorEvent): + * html/HTMLSourceElement.cpp: + (WebCore::HTMLSourceElement::errorEventTimerFired): + * html/HTMLTokenizer.cpp: + (WebCore::HTMLTokenizer::notifyFinished): Use the standard dispatchEvent API. + + * inspector/InspectorDOMAgent.cpp: + (WebCore::InspectorDOMAgent::handleEvent): + * inspector/InspectorDOMAgent.h: + * inspector/InspectorDOMStorageResource.cpp: + (WebCore::InspectorDOMStorageResource::handleEvent): + * inspector/InspectorDOMStorageResource.h: + * loader/FrameLoader.cpp: + (WebCore::FrameLoader::stopLoading): + (WebCore::FrameLoader::canCachePageContainingThisFrame): + (WebCore::FrameLoader::logCanCacheFrameDecision): + (WebCore::HashChangeEventTask::performTask): + (WebCore::FrameLoader::pageHidden): No more isWindowEvent. + + * loader/ImageDocument.cpp: + (WebCore::ImageEventListener::handleEvent): + * loader/appcache/ApplicationCacheGroup.cpp: + (WebCore::CallCacheListenerTask::performTask): + * loader/appcache/ApplicationCacheHost.cpp: + (WebCore::ApplicationCacheHost::notifyDOMApplicationCache): + * loader/appcache/ApplicationCacheHost.h: + * loader/appcache/DOMApplicationCache.cpp: + (WebCore::DOMApplicationCache::eventTargetData): + (WebCore::DOMApplicationCache::ensureEventTargetData): + * loader/appcache/DOMApplicationCache.h: + * loader/appcache/DOMApplicationCache.idl: Switched to the standard + EventTarget API. As a part of this, I switched this class from using a + custom internal event name enumeration to using the standard EventNames. + + * notifications/Notification.cpp: + (WebCore::Notification::eventTargetData): + (WebCore::Notification::ensureEventTargetData): + * notifications/Notification.h: + (WebCore::Notification::scriptExecutionContext): + * notifications/Notification.idl: Switched to the standard EventTarget API. + + * page/DOMWindow.cpp: + (WebCore::PostMessageTimer::event): + (WebCore::windowsWithUnloadEventListeners): + (WebCore::windowsWithBeforeUnloadEventListeners): + (WebCore::allowsBeforeUnloadListeners): + (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents): + (WebCore::DOMWindow::pendingUnloadEventListeners): + (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): Changed the "pending" + unload / beforeunload listener tracker just to track which windows had + such listeners, instead of actually keeping a copy of the listeners. Now, + this code can use the standard EventTarget API. + + (WebCore::DOMWindow::~DOMWindow): + (WebCore::DOMWindow::postMessageTimerFired): + (WebCore::DOMWindow::addEventListener): + (WebCore::DOMWindow::removeEventListener): + (WebCore::DOMWindow::dispatchLoadEvent): + (WebCore::DOMWindow::dispatchEvent): + (WebCore::DOMWindow::removeAllEventListeners): + (WebCore::DOMWindow::captureEvents): + (WebCore::DOMWindow::releaseEvents): + (WebCore::DOMWindow::eventTargetData): + (WebCore::DOMWindow::ensureEventTargetData): + * page/DOMWindow.h: + * page/DOMWindow.idl: Use the standard EventTarget APIs. + + * page/EventHandler.cpp: + (WebCore::EventHandler::canMouseDownStartSelect): + (WebCore::EventHandler::canMouseDragExtendSelect): + (WebCore::EventHandler::sendResizeEvent): + (WebCore::EventHandler::sendScrollEvent): Use dispatchEvent directly. + + * page/EventSource.cpp: + (WebCore::EventSource::endRequest): + (WebCore::EventSource::didReceiveResponse): + (WebCore::EventSource::parseEventStreamLine): + (WebCore::EventSource::stop): + (WebCore::EventSource::createMessageEvent): + (WebCore::EventSource::eventTargetData): + (WebCore::EventSource::ensureEventTargetData): + * page/EventSource.h: + * page/EventSource.idl: Use the standard EventTarget APIs. + + * page/FocusController.cpp: + (WebCore::dispatchEventsOnWindowAndFocusedNode): + (WebCore::FocusController::setFocusedFrame): + * page/Frame.cpp: + (WebCore::Frame::shouldClose): + * page/Frame.h: + * page/Page.cpp: + (WebCore::networkStateChanged): + * page/animation/AnimationController.cpp: + (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired): + * rendering/RenderListBox.cpp: + (WebCore::RenderListBox::valueChanged): + * rendering/RenderTextControl.cpp: + (WebCore::RenderTextControl::selectionChanged): + * rendering/RenderTextControlMultiLine.cpp: + (WebCore::RenderTextControlMultiLine::subtreeHasChanged): Use dispatchEvent. + + * svg/SVGElement.cpp: + (WebCore::hasLoadListener): Rewritten for new EventTarget API. + + * svg/SVGElementInstance.cpp: + (WebCore::dummyEventTargetData): + (WebCore::SVGElementInstance::addEventListener): + (WebCore::SVGElementInstance::removeEventListener): + (WebCore::SVGElementInstance::removeAllEventListeners): + (WebCore::SVGElementInstance::dispatchEvent): + (WebCore::SVGElementInstance::eventTargetData): + (WebCore::SVGElementInstance::ensureEventTargetData): Use the EventTarget API. + + * svg/SVGElementInstance.h: + * svg/SVGImageLoader.cpp: + (WebCore::SVGImageLoader::dispatchLoadEvent): + * svg/SVGScriptElement.cpp: + (WebCore::SVGScriptElement::dispatchErrorEvent): Use dispatchEvent directly. + + * svg/SVGUseElement.cpp: + (WebCore::SVGUseElement::transferEventListenersToShadowTree): Updated for + new EventTarget API. + + * svg/animation/SVGSMILElement.cpp: + (WebCore::ConditionEventListener::handleEvent): No more isWindowEvent. + + * websockets/WebSocket.cpp: + (WebCore::ProcessWebSocketEventTask::create): + (WebCore::ProcessWebSocketEventTask::performTask): + (WebCore::ProcessWebSocketEventTask::ProcessWebSocketEventTask): + (WebCore::WebSocket::didConnect): + (WebCore::WebSocket::didReceiveMessage): + (WebCore::WebSocket::didClose): + (WebCore::WebSocket::eventTargetData): + (WebCore::WebSocket::ensureEventTargetData): + * websockets/WebSocket.h: + * websockets/WebSocket.idl: + * workers/AbstractWorker.cpp: + (WebCore::AbstractWorker::eventTargetData): + (WebCore::AbstractWorker::ensureEventTargetData): + * workers/AbstractWorker.h: + * workers/AbstractWorker.idl: + * workers/DedicatedWorkerContext.cpp: + * workers/DedicatedWorkerContext.h: + * workers/DedicatedWorkerContext.idl: + * workers/DefaultSharedWorkerRepository.cpp: + (WebCore::SharedWorkerConnectTask::performTask): + (WebCore::SharedWorkerScriptLoader::load): + (WebCore::SharedWorkerScriptLoader::notifyFinished): + * workers/SharedWorker.idl: + * workers/SharedWorkerContext.cpp: + (WebCore::createConnectEvent): + * workers/SharedWorkerContext.h: + * workers/SharedWorkerContext.idl: + * workers/Worker.cpp: + (WebCore::Worker::notifyFinished): + * workers/Worker.h: + * workers/Worker.idl: + * workers/WorkerContext.cpp: + (WebCore::WorkerContext::eventTargetData): + (WebCore::WorkerContext::ensureEventTargetData): + * workers/WorkerContext.h: + * workers/WorkerContext.idl: + * workers/WorkerMessagingProxy.cpp: + (WebCore::MessageWorkerContextTask::performTask): + (WebCore::MessageWorkerTask::performTask): + (WebCore::WorkerExceptionTask::performTask): + * xml/XMLHttpRequest.cpp: + (WebCore::XMLHttpRequest::callReadyStateChangeListener): + (WebCore::XMLHttpRequest::createRequest): + (WebCore::XMLHttpRequest::abort): + (WebCore::XMLHttpRequest::networkError): + (WebCore::XMLHttpRequest::abortError): + (WebCore::XMLHttpRequest::didSendData): + (WebCore::XMLHttpRequest::didReceiveData): + (WebCore::XMLHttpRequest::eventTargetData): + (WebCore::XMLHttpRequest::ensureEventTargetData): + * xml/XMLHttpRequest.h: + * xml/XMLHttpRequest.idl: + * xml/XMLHttpRequestProgressEvent.h: + (WebCore::XMLHttpRequestProgressEvent::create): + * xml/XMLHttpRequestUpload.cpp: + (WebCore::XMLHttpRequestUpload::eventTargetData): + (WebCore::XMLHttpRequestUpload::ensureEventTargetData): + * xml/XMLHttpRequestUpload.h: + * xml/XMLHttpRequestUpload.idl: Use new EventTarget API. + +2009-09-23 Kent Tamura + + Reviewed by Darin Adler. + + - Support for maxLength of